8e6500f7 by lihua

提交与后端联调的网关修改

1 parent 2ab01a61
......@@ -2,14 +2,14 @@
VITE_APP_TITLE = 数据资产管理系统
# 接口域名
# VITE_API_BASEURL = https://www.zgsjzc.com/api
VITE_API_BASEURL = https://swzl-test.csbr.cn/api
# VITE_API_BASEURL = http://192.168.3.122:8083/
# VITE_API_BASEURL = https://swzl-test.csbr.cn/api
VITE_API_BASEURL = http://10.4.82.30:8052/
# 平台用户 接口请地址
VITE_APP_USER_API_BASEURL = csbr-zuul/user
VITE_APP_USER_API_BASEURL = gateway-server/user
# 系统管理 接口地址
VITE_APP_API_BASEURL = ms-swzl-system-manager-service
VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service
# 文件上传请求地址
VITE_APP_ADD_FILE = ms-common-import-data-service
VITE_APP_ADD_FILE = ms-daop-import-data-service
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
# 是否开启代理
......@@ -19,11 +19,10 @@ VITE_SERVE_BASE = /
# 流程设计访问地址
VITE_BPMN_URL = https://workflow-swzl-test.csbr.cn
# 数据标准、元数据、数据目录 接口地址
VITE_APP_PLAN_BASEURL = ms-swzl-data-plan-service
VITE_APP_PLAN_BASEURL = ms-daop-zcgl-data-plan-service
#数据质量接口地址
VITE_APP_QUALITY_BASEURL = ms-swzl-data-quality-service
#数据服务接口地址
VITE_APP_SERVICE_BASEURL = ms-swzl-data-open-service
VITE_APP_QUALITY_BASEURL = ms-daop-zcgl-data-quality-service
#门户接口
VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal
......
......@@ -4,11 +4,11 @@ VITE_APP_TITLE = 数据资产管理系统
VITE_API_BASEURL = https://www.zgsjzc.com/api
# VITE_API_BASEURL = http://49.4.26.201:31709/
# 平台用户 接口请地址
VITE_APP_USER_API_BASEURL = csbr-zuul/user
VITE_APP_USER_API_BASEURL = gateway-server/user
# 系统管理 接口地址
VITE_APP_API_BASEURL = ms-swzl-system-manager-service
VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service
# 文件上传请求地址
VITE_APP_ADD_FILE = ms-common-import-data-service
VITE_APP_ADD_FILE = ms-daop-import-data-service
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
# 是否开启代理
......@@ -18,11 +18,10 @@ VITE_SERVE_BASE = /
# 流程设计访问地址
VITE_BPMN_URL = https://workflow.zgsjzc.com
# 数据标准、元数据、数据目录 接口地址
VITE_APP_PLAN_BASEURL = ms-swzl-data-plan-service
VITE_APP_PLAN_BASEURL = ms-daop-zcgl-data-plan-service
#数据质量接口地址
VITE_APP_QUALITY_BASEURL = ms-swzl-data-quality-service
#数据服务接口地址
VITE_APP_SERVICE_BASEURL = ms-swzl-data-open-service
VITE_APP_QUALITY_BASEURL = ms-daop-zcgl-data-quality-service
#门户接口
VITE_API_PORTALURL = https://www.zgsjzc.com/portal
......
......@@ -22,12 +22,11 @@
"@vueuse/integrations": "^10.1.0",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12",
"ant-design-vue": "^3.2.20",
"axios": "^1.4.0",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.7",
"echarts": "^5.4.3",
"element-plus": "^2.5.3",
"element-plus": "^2.5.2",
"eruda": "^3.0.0",
"file-saver": "^2.0.5",
"hotkeys-js": "^3.10.2",
......
......@@ -26,9 +26,6 @@ dependencies:
'@wangeditor/editor-for-vue':
specifier: ^5.1.12
version: 5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.13)
ant-design-vue:
specifier: ^3.2.20
version: 3.2.20(vue@3.5.13)
axios:
specifier: ^1.4.0
version: 1.7.7
......@@ -42,7 +39,7 @@ dependencies:
specifier: ^5.4.3
version: 5.5.1
element-plus:
specifier: ^2.5.3
specifier: ^2.5.2
version: 2.8.8(vue@3.5.13)
eruda:
specifier: ^3.0.0
......
......@@ -155,3 +155,48 @@ export const updateAllFinish = (staffGuid) => request({
url: `${import.meta.env.VITE_API_MESSAGE}/message/update-all-finish?staffGuid=${staffGuid}`,
method: 'put'
});
/** 导入导出 */
// 数据导入-新增
export const addImportData = (url, params) => request({
url: url,
method: 'post',
data: params,
headers: {
'Content-Type': 'multipart/form-data'
}
})
// 数据导入-删除
export const deleteImportData = (params) => request({
url: `${import.meta.env.VITE_APP_ADD_FILE}/import-data/delete`,
method: 'delete',
data: params,
})
// 数据导入-分页查询
export const getImportData = (params) => request({
url: `${import.meta.env.VITE_APP_ADD_FILE}/import-data/list`,
method: 'post',
data: params,
})
// 导出数据字典模板
export const exportDictionary = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/export/data-dictionary/schema`,
method: 'post',
data: params,
responseType: 'blob'
})
/** 获取树形结构的标准集列表 */
export const getStandardSetTree = () => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-standard-set/list-tree`,
method: 'get'
})
// 数据字典树形数据
export const getDictionaryTree = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/tree-list`,
method: 'post',
params
})
\ No newline at end of file
......
......@@ -590,6 +590,7 @@
// dialog弹出层样式
.el-dialog {
--el-dialog-bg-color: #fff;
padding: 0px;
.el-dialog__header {
padding: 0 20px;
......
......@@ -146,6 +146,12 @@ defineExpose({
:max-collapse-tags="item.cascaderInfo.maxTags ?? 1" :filterable="item.cascaderInfo.filterable ?? false"
@change="cascaderChange" />
</div>
<div class="form_item" v-if="item.type == 'input'">
<span class="item_label" :class="{ required_mark: item.selectInfo.required }">{{ item.selectInfo.label
}}:</span>
<el-input v-model="extraParams[item.selectInfo.field]" :placeholder="item.selectInfo.placeholder"
:disabled="item.selectInfo.disabled" :clearable="item.selectInfo.disabled"> </el-input>
</div>
<div class="item_btn" v-else-if="item.type == 'btn_down'">
<el-button plain @click="toolBtnClick({ value: 'exoprt_model' })" v-preReClick>
<el-icon>
......@@ -332,6 +338,10 @@ defineExpose({
}
}
}
.el-input {
width: 240px;
}
}
.item_btn {
......
......@@ -39,6 +39,23 @@ const routes: RouteRecordRaw[] = [
}
}
},
{
path: 'import-file-meta',
name: 'importFileMeta',
component: () => import('@/views/importFile.vue'),
meta: {
title: '导入数据',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true
},
beforeEnter: (to, from) => {
if (to.query.bizGuid) {
to.meta.title = `导入数据-采集任务`;
}
}
}
],
},
{
......
......@@ -23,7 +23,7 @@ interface metaInfoRaw {
// 固定路由(默认路由)
const constantRoutes: RouteRecordRaw[] = [
{
path: '/login-zgsjzc',
path: '/login',
name: 'login',
component: () => import('@/views/login.vue'),
meta: {
......
......@@ -571,6 +571,17 @@ const dialogBtnClick = (btn, info) => {
}
};
const importMeta = () => {
let query: any = {
isfileImport: '4'
}
// 打开导入文件.
router.push({
name: 'importFileMeta',
query: query
});
}
onActivated(() => {
getDataSourceList()
})
......@@ -586,7 +597,8 @@ onBeforeMount(() => {
<!-- 头部搜索 -->
<TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" :init="false" />
<div class="tools_btns">
<el-button type="primary" @click="loadDrawer" v-preReClick>新建</el-button>
<el-button type="primary" @click="loadDrawer">新建</el-button>
<el-button type="primary" @click="importMeta">导入</el-button>
</div>
</div>
<div class="table_panel_wrap">
......
......@@ -826,6 +826,24 @@ const radioGroupChange = (val, inlineValue, init) => {
} else {
item.visible = true;
}
} else if (val === 'value_of_range') { // 值域范围
item.visible = false
if (index === 3 || index === 4 || index === 5 || index === 6 || index == 7 || index == 9 || index == 10 || index == 11 || index === 13) {
} else {
item.visible = true;
}
} else if (val === 'ref_integrality') { // 引用完整性
item.visible = false
if (index === 3 || index === 4 || index === 5 || index === 6 || index == 7 || index == 9 || index == 10 || index == 11 || index === 13) {
} else {
item.visible = true;
}
} else if (val === 'norm_check') { // 规范校验
item.visible = false
if (index === 3 || index === 4 || index === 5 || index === 6 || index == 7 || index == 9 || index == 10 || index == 11 || index === 13) {
} else {
item.visible = true;
}
} else if (val === 'custom_sql') {//自定义sql
item.visible = false
if (index === 3 || index === 4 || index === 5 || index === 6 || index == 7 || index == 8 || index == 10 || index == 11 || index === 13) {
......@@ -1558,6 +1576,9 @@ defineExpose({
</template>
</el-dialog>
<!-- 值域范围 -->
<el-dialog></el-dialog>
<!-- 表行数检查 -->
<el-dialog v-model="tableRowDialogVisible" title="规则设置" width="750" :modal="true" :close-on-click-modal="false"
destroy-on-close align-center>
......
......@@ -18,7 +18,7 @@ const enterCompany = () => {
}
const logon = () => {
window.open('/login-zgsjzc');
window.open('/login');
}
const register = () => {
......
......@@ -18,9 +18,9 @@ import {
getImportData,
exportDictionary,
getStandardSetTree,
getDictionaryTree
} from '@/api/modules/dataStandardService'
import { getImageContent } from "@/api/modules/queryService";
getDictionaryTree,
getImageContent
} from '@/api/modules/queryService';
import { commonPageConfig } from '@/utils/enum';
const { proxy } = getCurrentInstance() as any;
......@@ -28,6 +28,7 @@ const { proxy } = getCurrentInstance() as any;
const userStore = useUserStore()
const route = useRoute()
const router = useRouter()
/** 2表示资产目录的。3是主数据; 4是元数据导入 */
const isfileImport = route.query.isfileImport
const userData = JSON.parse(userStore.userData)
const cacheStore = useCatchStore()
......@@ -129,46 +130,24 @@ const dialogInfo: any = ref({
},
})
// 获取所有标准集
const getSetList = () => {
let params: any = {}
params.pageIndex = 0;
params.pageSize = 0;
getStandardSetTree().then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data || []
data.map(item => {
item.label = item.standardName
item.value = item.guid
})
standardSetList.value = data
} else {
ElMessage({
type: 'info',
message: res.msg,
})
}
})
}
// 获取所有数据字典
const getDictList = () => {
const params = {
paramCode: 'data_structure_code'
}
getDictionaryTree(params).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data ?? []
const treeList = data.filter(item => item.children && item.children.length)
dictionaryList.value = treeList
} else {
ElMessage({
type: 'error',
message: res.msg,
})
}
})
}
// // 获取所有数据字典
// const getDictList = () => {
// const params = {
// paramCode: 'data_structure_code'
// }
// getDictionaryTree(params).then((res: any) => {
// if (res.code == proxy.$passCode) {
// const data = res.data ?? []
// const treeList = data.filter(item => item.children && item.children.length)
// dictionaryList.value = treeList
// } else {
// ElMessage({
// type: 'error',
// message: res.msg,
// })
// }
// })
// }
const tabsChange = (name) => {
tabsActiveName.value = name
......@@ -290,7 +269,7 @@ const batching = (type) => {
}
open("此操作将永久删除, 是否继续?", "warning", true);
} else if(type === 'importFile') {
if (isfileImport == '2') {
if (isfileImport == '2' || isfileImport == '4') {
dialogInfo.value.header.title = '导入数据'
dialogInfo.value.type = 'upload'
dialogInfo.value.size = 500
......@@ -539,7 +518,7 @@ const setUploadInfo = () => {
uploadInfo.value.uploadInfo.extraParams = {
dictionaryGuid: dictionaryGuid.value
}
} else if (tabsActiveName.value == 'importFile') {
} else if (tabsActiveName.value == 'importFile' && isfileImport == '2') {
uploadSteps.value = [
{
title: '选择准备好的文件导入',
......@@ -555,6 +534,40 @@ const setUploadInfo = () => {
}
]
uploadInfo.value.uploadInfo.extraParams = {}
} else if (tabsActiveName.value == 'importFile' && isfileImport == '4') { //元数据导入
uploadSteps.value = [
{
title: '1、导入前请先录入以下内容',
type: 'input',
selectInfo: {
label: '采集任务名称',
placeholder: '请输入',
field: 'collectTaskName',
default: '',
clearable: true,
maxlength: 50,
filterable: true,
required: true
}
},
{
title: '2、请下载最新的模板,并按照模板格式准备需要导入的数据',
type: 'btn_down'
},
{
title: '3、选择准备好的文件导入',
type: 'btn_upload',
uploadInfo: {
action: '',
auto: false,
cover: true,
fileList: [],
accept: '.xlsx, .xls',
tips: '当前支持xls、xlsx文件,默认使用第一个sheet'
}
}
]
uploadInfo.value.uploadInfo.extraParams = {}
} else {
uploadSteps.value = [
{
......@@ -586,8 +599,7 @@ onActivated(() => {
tabsActiveName.value = uploadSetting.value?.type || 'standard'
}
getSetList()
getDictList()
//getDictList()
setUploadInfo()
})
......
......@@ -537,14 +537,6 @@ font-weight: 200;
.el-input__suffix {
right: 10px;
}
.el-input__wrapper {
// border-radius: 0;
// box-shadow: none;
// border-bottom: 1px solid #e5e5e5;
&:hover {
// box-shadow: none;
}
}
}
}
.flex-bar {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!