6181cbd2 by lihua

提交新增的值域范围规则

1 parent c7acd525
......@@ -19,9 +19,9 @@ VITE_SERVE_BASE = /
# 流程设计访问地址
VITE_BPMN_URL = https://workflow-swzl-test.csbr.cn
# 数据标准、元数据、数据目录 接口地址
VITE_APP_PLAN_BASEURL = ms-daop-zcgl-data-plan-service
VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service
#数据质量接口地址
VITE_APP_QUALITY_BASEURL = ms-daop-zcgl-data-quality-service
VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service
#门户接口
......
......@@ -18,9 +18,9 @@ VITE_SERVE_BASE = /
# 流程设计访问地址
VITE_BPMN_URL = https://workflow.zgsjzc.com
# 数据标准、元数据、数据目录 接口地址
VITE_APP_PLAN_BASEURL = ms-daop-zcgl-data-plan-service
VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service
#数据质量接口地址
VITE_APP_QUALITY_BASEURL = ms-daop-zcgl-data-quality-service
VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service
#门户接口
VITE_API_PORTALURL = https://www.zgsjzc.com/portal
......
......@@ -175,28 +175,23 @@ export const deleteImportData = (params) => request({
})
// 数据导入-分页查询
export const getImportData = (params) => request({
url: `${import.meta.env.VITE_APP_ADD_FILE}/import-data/list`,
url: `${import.meta.env.VITE_APP_ADD_FILE}/import-data/page-list`,
method: 'post',
data: params,
})
// 导出数据字典模板
export const exportDictionary = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/export/data-dictionary/schema`,
// 导出采集任务分类模板。
export const exportCollectTask = (params) => request({
url: `${import.meta.env.VITE_APP_ADD_FILE}/import-config/export-more-sheet-template`,
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`,
// 导出数据字典模板
export const exportDictionary = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/export/data-dictionary/schema`,
method: 'post',
params
data: params,
responseType: 'blob'
})
\ No newline at end of file
......
......@@ -304,6 +304,34 @@ const transformRulesInfo = (info: any) => {
})]
}));
})
} else if (info.ruleCode == 'value_of_range') {
let subjectTables = toSubjectTables.value;
for (const ds in info.ruleFields) {
let fields = info.ruleFields[ds];
let tableInfo = subjectTables.find(t => t.enName === ds);
modelRules.push(Object.assign({}, {
modelGroupGuid: modelGroupGuid.value,
name: tableInfo.chName,
subjectName: tableInfo.enName,
subjectGuid: tableInfo.guid,
dataSourceGuid: tableInfo.dataSourceGuid,
databaseName: tableInfo.dataServerName,
modelRuleConfList: [Object.assign({}, info, {
ruleField: fields.map(f => {
return {
guid: f.guid,
enName: f.enName,
chName: f.chName,
dataType: f.dataType,
startValue: f.startValue,
endValue: f.endValue,
dataRange: f.dataRange
}
}),
ruleFields: ''
})]
}));
}
}
return modelRules;
}
......
......@@ -120,6 +120,26 @@ const transformRulesInfo = (info: any) => {
differenceRange: info.rows[0].differenceRange,
rows: ''
});
} else if (info.ruleCode == 'value_of_range') {
let subjectName = detailInfo.value.subjectName;
let fields = info.ruleFields[subjectName];
return Object.assign({}, info, {
guid: ruleGuid,
qualityModelGuid: detailInfo.value.qualityModelGuid,
ruleCode: detailInfo.value.ruleCode,
ruleField: fields.map(f => {
return {
guid: f.guid,
enName: f.enName,
chName: f.chName,
dataType: f.dataType,
startValue: f.startValue,
endValue: f.endValue,
dataRange: f.dataRange
}
}),
ruleFields: ''
});
}
}
......
......@@ -116,6 +116,25 @@ const transformRulesInfo = (info) => {
differenceRange: info.rows[0].differenceRange,
rows: ''
});
} else if (info.ruleCode === 'value_of_range') {
let subjectName = modelDetailInfo.value.subjectName;
let fields = info.ruleFields[subjectName];
return Object.assign({}, info, {
qualityModelGuid: modelGuid,
ruleCode: info.ruleCode,
ruleField: fields.map(f => {
return {
guid: f.guid,
enName: f.enName,
chName: f.chName,
dataType: f.dataType,
startValue: f.startValue,
endValue: f.endValue,
dataRange: f.dataRange
}
}),
ruleFields: ''
});
}
}
......
......@@ -17,8 +17,7 @@ import {
deleteImportData,
getImportData,
exportDictionary,
getStandardSetTree,
getDictionaryTree,
exportCollectTask,
getImageContent
} from '@/api/modules/queryService';
import { commonPageConfig } from '@/utils/enum';
......@@ -347,6 +346,14 @@ const exportData = (ids: any = null) => {
exportDictionary(params).then((res: any) => {
download(res, '数据字典模板.xlsx', 'excel')
});
} else if (tabsActiveName.value == 'importFile' && isfileImport == '4') {
exportCollectTask({
importTypes: [
"0042"
]
}).then((res: any) => {
download(res, '元数据模板.xlsx', 'excel')
});
}
}
......@@ -360,13 +367,28 @@ const importData = (info) => {
// dialogInfo.value.footer.btns.map((item: any) => delete item.disabled)
return
}
let paramUrl = '';
if (isfileImport == '2') {
uploadFiles.value.forEach((item: any, index: number) => {
params.append("file", item.raw);
});
let paramUrl = '';
if (isfileImport == '2') {
paramUrl = `${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/excel-by-subject-guid?staffGuid=${userData.staffGuid}&subjectGuid=${route.query.bizGuid}`
} else if (isfileImport == '4') {
if (!info.collectTaskName) {
ElMessage({
type: 'error',
message: '请填写采集任务名称'
})
return;
}
uploadFiles.value.forEach((item: any, index: number) => {
params.append("uploadFile", item.raw);
});
paramUrl = `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/meta-collect-import?staffGuid=${userData.staffGuid}&collectTaskName=${info.collectTaskName}`
} else {
uploadFiles.value.forEach((item: any, index: number) => {
params.append("file", item.raw);
});
paramUrl = `${import.meta.env.VITE_APP_ADD_FILE}/import-data/import-common?importType=${importType.value}&staffGuid=${userData.staffGuid}&tenantGuid=${userData.tenantGuid}&dataType=2`
if (info && Object.keys(info).length) {
paramUrl += `&extendFields=${JSON.stringify(info)}`
......@@ -424,6 +446,8 @@ const setUploadInfo = () => {
} else {
if (isfileImport == '2') {
importType.value = '0034';
} else if (isfileImport == '4') {
importType.value = '0042';
} else {
importType.value = '0033';
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!