Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop
Showing
6 changed files
with
96 additions
and
39 deletions
| ... | @@ -69,7 +69,7 @@ export const saveMetaReportAnalysis = (params) => request({ | ... | @@ -69,7 +69,7 @@ export const saveMetaReportAnalysis = (params) => request({ |
| 69 | **/ | 69 | **/ |
| 70 | // 树形数据 | 70 | // 树形数据 |
| 71 | export const getMetaTreeData = (params) => request({ | 71 | export const getMetaTreeData = (params) => request({ |
| 72 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-tree-list`, | 72 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-tree-list?isImportCreate=${params.isImportCreate}`, |
| 73 | method: 'post', | 73 | method: 'post', |
| 74 | data: params | 74 | data: params |
| 75 | }) | 75 | }) | ... | ... |
| ... | @@ -81,6 +81,13 @@ export const getDatabase = (params) => request({ | ... | @@ -81,6 +81,13 @@ export const getDatabase = (params) => request({ |
| 81 | data: params | 81 | data: params |
| 82 | }) | 82 | }) |
| 83 | 83 | ||
| 84 | /** 获取盘点的数据库目录 */ | ||
| 85 | export const getInventoryDsDir = () => request({ | ||
| 86 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/tree-list`, | ||
| 87 | method: 'post', | ||
| 88 | data: {} | ||
| 89 | }) | ||
| 90 | |||
| 84 | /** 新建质检表,获取主题域分层的主题表树结构 */ | 91 | /** 新建质检表,获取主题域分层的主题表树结构 */ |
| 85 | export const getSubjectTableTree = (params) => request({ | 92 | export const getSubjectTableTree = (params) => request({ |
| 86 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-catalog-directory/directory-tree-list`, | 93 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-catalog-directory/directory-tree-list`, |
| ... | @@ -95,10 +102,10 @@ export const getSubjectTableByDomain = (params) => request({ | ... | @@ -95,10 +102,10 @@ export const getSubjectTableByDomain = (params) => request({ |
| 95 | data: params | 102 | data: params |
| 96 | }) | 103 | }) |
| 97 | 104 | ||
| 98 | /** 获取主题表的字段列表 */ | 105 | /** 获取主题表的字段列表,目前应包括盘点目录和元数据目录的表及字段 */ |
| 99 | export const getSubjectFields = (params) => request({ | 106 | export const getSubjectFields = (tableGuid, dataSource) => request({ |
| 100 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-catalog-subject/field/list?subjectGuid=${params}`, | 107 | url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/field/list-by-subject-guid?tableGuid=${tableGuid}&dataSource=${dataSource}`, |
| 101 | method: 'get', | 108 | method: 'post', |
| 102 | }) | 109 | }) |
| 103 | 110 | ||
| 104 | /** 表的逻辑条件和sql检验。 */ | 111 | /** 表的逻辑条件和sql检验。 */ | ... | ... |
| ... | @@ -255,10 +255,12 @@ const groupTableInfo = ref({ | ... | @@ -255,10 +255,12 @@ const groupTableInfo = ref({ |
| 255 | label: "操作", | 255 | label: "操作", |
| 256 | type: "btn", | 256 | type: "btn", |
| 257 | width: 92, | 257 | width: 92, |
| 258 | btns: [ | 258 | btns: (scope) => { |
| 259 | { label: "编辑", value: "edit" }, | 259 | return [ |
| 260 | { label: "删除", value: "delete" }, | 260 | { label: "编辑", value: "edit", disabled: scope.row.dataSource != '5' }, |
| 261 | ], | 261 | { label: "删除", value: "delete", disabled: scope.row.dataSource != '5' }, |
| 262 | ] | ||
| 263 | }, | ||
| 262 | } | 264 | } |
| 263 | }); | 265 | }); |
| 264 | 266 | ||
| ... | @@ -402,7 +404,8 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -402,7 +404,8 @@ const tableBtnClick = (scope, btn) => { |
| 402 | name: 'ruleTemplate', | 404 | name: 'ruleTemplate', |
| 403 | query: { | 405 | query: { |
| 404 | modelGuid: row.guid, | 406 | modelGuid: row.guid, |
| 405 | name: row.name | 407 | name: row.name, |
| 408 | dataSource: row.dataSource | ||
| 406 | } | 409 | } |
| 407 | }); | 410 | }); |
| 408 | } else if (type == "delete") { | 411 | } else if (type == "delete") { |
| ... | @@ -489,6 +492,7 @@ const groupTableBtnClick = (scope, btn) => { | ... | @@ -489,6 +492,7 @@ const groupTableBtnClick = (scope, btn) => { |
| 489 | type: "success", | 492 | type: "success", |
| 490 | message: "删除分组成功", | 493 | message: "删除分组成功", |
| 491 | }); | 494 | }); |
| 495 | getQualityGroupTreeData(); | ||
| 492 | } else { | 496 | } else { |
| 493 | ElMessage({ | 497 | ElMessage({ |
| 494 | type: "error", | 498 | type: "error", |
| ... | @@ -639,7 +643,8 @@ const clickCreateTable = () => { | ... | @@ -639,7 +643,8 @@ const clickCreateTable = () => { |
| 639 | name: 'ruleModel', | 643 | name: 'ruleModel', |
| 640 | query: { | 644 | query: { |
| 641 | groupGuid: page.value.modelGroupGuid, | 645 | groupGuid: page.value.modelGroupGuid, |
| 642 | name: lastSelectNode.value.data.name | 646 | name: lastSelectNode.value.data.name, |
| 647 | dataSource: lastSelectNode.value.data.dataSource | ||
| 643 | } | 648 | } |
| 644 | }); | 649 | }); |
| 645 | } | 650 | } |
| ... | @@ -650,7 +655,8 @@ const clickCreateRule = () => { | ... | @@ -650,7 +655,8 @@ const clickCreateRule = () => { |
| 650 | name: 'ruleTemplate', | 655 | name: 'ruleTemplate', |
| 651 | query: { | 656 | query: { |
| 652 | modelGuid: lastSelectNode.value.data.guid, | 657 | modelGuid: lastSelectNode.value.data.guid, |
| 653 | name: lastSelectNode.value.data.name | 658 | name: lastSelectNode.value.data.name, |
| 659 | dataSource: lastSelectNode.value.parent.data.dataSource | ||
| 654 | } | 660 | } |
| 655 | }); | 661 | }); |
| 656 | } | 662 | } |
| ... | @@ -744,6 +750,7 @@ let editSubmitPromise: any = ref(null); | ... | @@ -744,6 +750,7 @@ let editSubmitPromise: any = ref(null); |
| 744 | /** 新建分组对话框确定。 */ | 750 | /** 新建分组对话框确定。 */ |
| 745 | const dialogBtnClick = (btn, info) => { | 751 | const dialogBtnClick = (btn, info) => { |
| 746 | if (btn.value == 'submit') { | 752 | if (btn.value == 'submit') { |
| 753 | info.dataSource = '5'; | ||
| 747 | if (dialogInfo.value.type == 'add') { | 754 | if (dialogInfo.value.type == 'add') { |
| 748 | if (submitPromise.value) { | 755 | if (submitPromise.value) { |
| 749 | return; | 756 | return; |
| ... | @@ -753,6 +760,7 @@ const dialogBtnClick = (btn, info) => { | ... | @@ -753,6 +760,7 @@ const dialogBtnClick = (btn, info) => { |
| 753 | if (res.code == proxy.$passCode) { | 760 | if (res.code == proxy.$passCode) { |
| 754 | groupPage.value.curr = 1; | 761 | groupPage.value.curr = 1; |
| 755 | getGroupTableData(); | 762 | getGroupTableData(); |
| 763 | getQualityGroupTreeData(); | ||
| 756 | ElMessage({ | 764 | ElMessage({ |
| 757 | type: 'success', | 765 | type: 'success', |
| 758 | message: '新建分组成功' | 766 | message: '新建分组成功' |
| ... | @@ -779,6 +787,7 @@ const dialogBtnClick = (btn, info) => { | ... | @@ -779,6 +787,7 @@ const dialogBtnClick = (btn, info) => { |
| 779 | type: 'success', | 787 | type: 'success', |
| 780 | message: '编辑分组成功' | 788 | message: '编辑分组成功' |
| 781 | }) | 789 | }) |
| 790 | getQualityGroupTreeData(); | ||
| 782 | dialogInfo.value.visible = false; | 791 | dialogInfo.value.visible = false; |
| 783 | } else { | 792 | } else { |
| 784 | ElMessage({ | 793 | ElMessage({ | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -9,7 +9,7 @@ import { ElMessage, ElMessageBox } from "element-plus"; | ... | @@ -9,7 +9,7 @@ import { ElMessage, ElMessageBox } from "element-plus"; |
| 9 | import StepBar from "@/components/StepBar/index.vue"; | 9 | import StepBar from "@/components/StepBar/index.vue"; |
| 10 | import TreeTransfer from "@/components/TreeTransfer/index.vue"; | 10 | import TreeTransfer from "@/components/TreeTransfer/index.vue"; |
| 11 | import { | 11 | import { |
| 12 | getSubjectTableTree, | 12 | getInventoryDsDir, |
| 13 | getSubjectTableByDomain, | 13 | getSubjectTableByDomain, |
| 14 | saveQualityTable, | 14 | saveQualityTable, |
| 15 | getRuleTypeList, | 15 | getRuleTypeList, |
| ... | @@ -63,15 +63,46 @@ const toSubjectTables: any = ref([]); | ... | @@ -63,15 +63,46 @@ const toSubjectTables: any = ref([]); |
| 63 | 63 | ||
| 64 | const getSubjectTableTreeData = () => { | 64 | const getSubjectTableTreeData = () => { |
| 65 | dsFromTreeDataLoading.value = true; | 65 | dsFromTreeDataLoading.value = true; |
| 66 | getMetaTreeData({}).then((res: any) => { | 66 | if (route.query.dataSource == '4') { |
| 67 | dsFromTreeDataLoading.value = false; | 67 | getInventoryDsDir().then((res: any) => { |
| 68 | if (res.code == proxy.$passCode) { | 68 | dsFromTreeDataLoading.value = false; |
| 69 | dsFromTreeData.value = res.data?.map(d => { | 69 | if (res.code == proxy.$passCode) { |
| 70 | d.parentGuid = 0; | 70 | dsFromTreeData.value = res.data?.map(d => { |
| 71 | return d; | 71 | d.parentGuid = 0; |
| 72 | }) || []; | 72 | d.guid = d.databaseGuid; |
| 73 | } | 73 | d.name = d.databaseChName; |
| 74 | }) | 74 | d.label = d.databaseChName + `(${d.database})`; |
| 75 | d.children = d.children?.map(child => { | ||
| 76 | child.parentGuid = d.guid; | ||
| 77 | child.label = child.tableChName + `(${child.tableName})`; | ||
| 78 | child.guid = child.tableGuid; | ||
| 79 | child.dataServerName = d.database; | ||
| 80 | child.dataSourceGuid = d.databaseGuid; | ||
| 81 | child.parentGuid = d.databaseGuid; | ||
| 82 | return child; | ||
| 83 | }) | ||
| 84 | return d; | ||
| 85 | }) || []; | ||
| 86 | } | ||
| 87 | }) | ||
| 88 | } else { | ||
| 89 | getMetaTreeData({ isImportCreate: 'N' }).then((res: any) => { | ||
| 90 | dsFromTreeDataLoading.value = false; | ||
| 91 | if (res.code == proxy.$passCode) { | ||
| 92 | dsFromTreeData.value = res.data?.children?.map(d => { | ||
| 93 | d.parentGuid = 0; | ||
| 94 | d.label = d.name; | ||
| 95 | d.children = d.children?.map(child => { | ||
| 96 | child.label = child.name + `(${child.tableName})`; | ||
| 97 | child.dataServerName = d.name; | ||
| 98 | child.dataSourceGuid = d.guid; | ||
| 99 | return child; | ||
| 100 | }) | ||
| 101 | return d; | ||
| 102 | }) || []; | ||
| 103 | } | ||
| 104 | }) | ||
| 105 | } | ||
| 75 | } | 106 | } |
| 76 | 107 | ||
| 77 | const getSubjectTableByDomainData = (guid) => { | 108 | const getSubjectTableByDomainData = (guid) => { |
| ... | @@ -158,11 +189,13 @@ const changeStep = (val, skip = false) => { | ... | @@ -158,11 +189,13 @@ const changeStep = (val, skip = false) => { |
| 158 | } | 189 | } |
| 159 | toSubjectTables.value = []; | 190 | toSubjectTables.value = []; |
| 160 | dsToTreeData.value.forEach(d => { | 191 | dsToTreeData.value.forEach(d => { |
| 161 | d.children.forEach(c => { | 192 | d.children.forEach(child => { |
| 162 | c.children.forEach(child => { | 193 | child.guid = child.tableGuid || child.guid; |
| 163 | child.label = `${child.enName}(${child.chName})`; | 194 | child.enName = child.tableName; |
| 164 | toSubjectTables.value.push(child); | 195 | child.chName = child.tableChName || child.name; |
| 165 | }) | 196 | child.dataSourceGuid = child.parentGuid; |
| 197 | child.databaseName = child.databaseName, | ||
| 198 | toSubjectTables.value.push(child); | ||
| 166 | }) | 199 | }) |
| 167 | }); | 200 | }); |
| 168 | step.value = val - 1; | 201 | step.value = val - 1; |
| ... | @@ -211,6 +244,7 @@ const transformRulesInfo = (info: any) => { | ... | @@ -211,6 +244,7 @@ const transformRulesInfo = (info: any) => { |
| 211 | subjectGuid: tableInfo.guid, | 244 | subjectGuid: tableInfo.guid, |
| 212 | dataSourceGuid: tableInfo.dataSourceGuid, | 245 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 213 | databaseName: tableInfo.dataServerName, | 246 | databaseName: tableInfo.dataServerName, |
| 247 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 214 | modelRuleConfList: [Object.assign({}, info, { | 248 | modelRuleConfList: [Object.assign({}, info, { |
| 215 | qualityModelGuid: modelGuid | 249 | qualityModelGuid: modelGuid |
| 216 | })] | 250 | })] |
| ... | @@ -229,6 +263,7 @@ const transformRulesInfo = (info: any) => { | ... | @@ -229,6 +263,7 @@ const transformRulesInfo = (info: any) => { |
| 229 | subjectGuid: tableInfo.guid, | 263 | subjectGuid: tableInfo.guid, |
| 230 | dataSourceGuid: tableInfo.dataSourceGuid, | 264 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 231 | databaseName: tableInfo.dataServerName, | 265 | databaseName: tableInfo.dataServerName, |
| 266 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 232 | modelRuleConfList: [Object.assign({}, info, { | 267 | modelRuleConfList: [Object.assign({}, info, { |
| 233 | ruleField: fields?.map(f => { | 268 | ruleField: fields?.map(f => { |
| 234 | return { | 269 | return { |
| ... | @@ -252,6 +287,7 @@ const transformRulesInfo = (info: any) => { | ... | @@ -252,6 +287,7 @@ const transformRulesInfo = (info: any) => { |
| 252 | subjectGuid: tableInfo.guid, | 287 | subjectGuid: tableInfo.guid, |
| 253 | dataSourceGuid: tableInfo.dataSourceGuid, | 288 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 254 | databaseName: tableInfo.dataServerName, | 289 | databaseName: tableInfo.dataServerName, |
| 290 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 255 | modelRuleConfList: [Object.assign({}, info, { | 291 | modelRuleConfList: [Object.assign({}, info, { |
| 256 | ruleField: [{ | 292 | ruleField: [{ |
| 257 | guid: fields.guid, | 293 | guid: fields.guid, |
| ... | @@ -276,6 +312,7 @@ const transformRulesInfo = (info: any) => { | ... | @@ -276,6 +312,7 @@ const transformRulesInfo = (info: any) => { |
| 276 | subjectGuid: tableInfo.guid, | 312 | subjectGuid: tableInfo.guid, |
| 277 | dataSourceGuid: tableInfo.dataSourceGuid, | 313 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 278 | databaseName: tableInfo.dataServerName, | 314 | databaseName: tableInfo.dataServerName, |
| 315 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 279 | modelRuleConfList: [Object.assign({}, info, { | 316 | modelRuleConfList: [Object.assign({}, info, { |
| 280 | ruleField: fields?.map(f => { | 317 | ruleField: fields?.map(f => { |
| 281 | return { | 318 | return { |
| ... | @@ -300,6 +337,7 @@ const transformRulesInfo = (info: any) => { | ... | @@ -300,6 +337,7 @@ const transformRulesInfo = (info: any) => { |
| 300 | subjectGuid: tableInfo.guid, | 337 | subjectGuid: tableInfo.guid, |
| 301 | dataSourceGuid: tableInfo.dataSourceGuid, | 338 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 302 | databaseName: tableInfo.dataServerName, | 339 | databaseName: tableInfo.dataServerName, |
| 340 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 303 | modelRuleConfList: [Object.assign({}, info, { | 341 | modelRuleConfList: [Object.assign({}, info, { |
| 304 | differenceRange: row.differenceRange, | 342 | differenceRange: row.differenceRange, |
| 305 | rows: [], | 343 | rows: [], |
| ... | @@ -319,6 +357,7 @@ const transformRulesInfo = (info: any) => { | ... | @@ -319,6 +357,7 @@ const transformRulesInfo = (info: any) => { |
| 319 | subjectGuid: tableInfo.guid, | 357 | subjectGuid: tableInfo.guid, |
| 320 | dataSourceGuid: tableInfo.dataSourceGuid, | 358 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 321 | databaseName: tableInfo.dataServerName, | 359 | databaseName: tableInfo.dataServerName, |
| 360 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 322 | modelRuleConfList: [Object.assign({}, info, { | 361 | modelRuleConfList: [Object.assign({}, info, { |
| 323 | ruleField: fields.map(f => { | 362 | ruleField: fields.map(f => { |
| 324 | return { | 363 | return { |
| ... | @@ -347,6 +386,7 @@ const transformRulesInfo = (info: any) => { | ... | @@ -347,6 +386,7 @@ const transformRulesInfo = (info: any) => { |
| 347 | subjectGuid: tableInfo.guid, | 386 | subjectGuid: tableInfo.guid, |
| 348 | dataSourceGuid: tableInfo.dataSourceGuid, | 387 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 349 | databaseName: tableInfo.dataServerName, | 388 | databaseName: tableInfo.dataServerName, |
| 389 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 350 | modelRuleConfList: [Object.assign({}, info, { | 390 | modelRuleConfList: [Object.assign({}, info, { |
| 351 | ruleField: fields.map(f => { | 391 | ruleField: fields.map(f => { |
| 352 | return { | 392 | return { |
| ... | @@ -382,6 +422,7 @@ const transformRulesInfo = (info: any) => { | ... | @@ -382,6 +422,7 @@ const transformRulesInfo = (info: any) => { |
| 382 | subjectGuid: tableInfo.guid, | 422 | subjectGuid: tableInfo.guid, |
| 383 | dataSourceGuid: tableInfo.dataSourceGuid, | 423 | dataSourceGuid: tableInfo.dataSourceGuid, |
| 384 | databaseName: tableInfo.dataServerName, | 424 | databaseName: tableInfo.dataServerName, |
| 425 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 385 | modelRuleConfList: [Object.assign({}, info, { | 426 | modelRuleConfList: [Object.assign({}, info, { |
| 386 | enName: row.mainTableField, | 427 | enName: row.mainTableField, |
| 387 | compareTableGuid: row.compareTableGuid, | 428 | compareTableGuid: row.compareTableGuid, |
| ... | @@ -432,17 +473,17 @@ const save = () => { | ... | @@ -432,17 +473,17 @@ const save = () => { |
| 432 | <div class="panel_title"> | 473 | <div class="panel_title"> |
| 433 | <div class="title_text"> | 474 | <div class="title_text"> |
| 434 | <span>选择表</span> | 475 | <span>选择表</span> |
| 435 | <span class="tips_text">选择需要添加质检规则的表,请确保数据库为脱产环境,避免数据质检影响您的生产环境,且允许在该脱产环境建脏数据的库,请知晓!</span> | 476 | <span class="tips_text">{{ route.query.dataSource == '5' ? |
| 477 | '选择需要添加质检规则的表,请确保数据库为脱产环境,避免数据质检影响您的生产环境,且允许在该脱产环境建脏数据的库,请知晓!' : '选择需要添加质检规则的表' }}</span> | ||
| 436 | </div> | 478 | </div> |
| 437 | </div> | 479 | </div> |
| 438 | <TreeTransfer mode="transfer" :title="['可选表', '已选表']" pid="parentGuid" | 480 | <TreeTransfer mode="transfer" :title="[route.query.dataSource == '5' ? '可选元数据目录表' : '可选盘点数据库目录表', '已选表']" |
| 439 | :from-tree-data-loading="dsFromTreeDataLoading" :checkOnClickNode="true" | 481 | pid="parentGuid" :from-tree-data-loading="dsFromTreeDataLoading" :checkOnClickNode="true" |
| 440 | :from_checked_all="false" :from_data="dsFromTreeData" :to_data="dsToTreeData" node_key="guid" | 482 | :from_checked_all="false" :from_data="dsFromTreeData" :to_data="dsToTreeData" node_key="guid" |
| 441 | :transferOpenNode="true" width="70%" :defaultProps="{ | 483 | :transferOpenNode="true" width="70%" :defaultProps="{ |
| 442 | label: 'name', | 484 | label: 'label', |
| 443 | value: 'guid' | 485 | value: 'guid' |
| 444 | }" | 486 | }" height="calc(100% - 64px)"> |
| 445 | height="calc(100% - 64px)"> | ||
| 446 | </TreeTransfer> | 487 | </TreeTransfer> |
| 447 | </div> | 488 | </div> |
| 448 | </div> | 489 | </div> |
| ... | @@ -457,7 +498,8 @@ const save = () => { | ... | @@ -457,7 +498,8 @@ const save = () => { |
| 457 | <div class="panel_content"> | 498 | <div class="panel_content"> |
| 458 | <div class="form_panel"> | 499 | <div class="form_panel"> |
| 459 | <ruleForm ref="ruleFormRef" :toSubjectTables="toSubjectTables" :ruleTypeList="ruleTypeList" | 500 | <ruleForm ref="ruleFormRef" :toSubjectTables="toSubjectTables" :ruleTypeList="ruleTypeList" |
| 460 | :largeCategoryList="largeCategoryList" :smallCategoryList="smallCategoryList"></ruleForm> | 501 | :data-source="route.query.dataSource as string" :largeCategoryList="largeCategoryList" |
| 502 | :smallCategoryList="smallCategoryList"></ruleForm> | ||
| 461 | </div> | 503 | </div> |
| 462 | </div> | 504 | </div> |
| 463 | </div> | 505 | </div> | ... | ... |
| ... | @@ -204,15 +204,14 @@ const save = () => { | ... | @@ -204,15 +204,14 @@ const save = () => { |
| 204 | subjectGuid: modelDetailInfo.value.subjectGuid, | 204 | subjectGuid: modelDetailInfo.value.subjectGuid, |
| 205 | subjectName: modelDetailInfo.value.subjectName, | 205 | subjectName: modelDetailInfo.value.subjectName, |
| 206 | dataSourceGuid: modelDetailInfo.value.dataSourceGuid, | 206 | dataSourceGuid: modelDetailInfo.value.dataSourceGuid, |
| 207 | modelRuleConfList: submitInfos | 207 | modelRuleConfList: submitInfos, |
| 208 | dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, | ||
| 208 | }]).then((res: any) => { | 209 | }]).then((res: any) => { |
| 209 | fullScreenLoading.value = false; | 210 | fullScreenLoading.value = false; |
| 210 | if (res.code == proxy.$passCode) { | 211 | if (res.code == proxy.$passCode) { |
| 211 | ElMessage.success('新建规则保存成功'); | 212 | ElMessage.success('新建规则保存成功'); |
| 212 | router.push({ | ||
| 213 | name: 'qualityRules' | ||
| 214 | }); | ||
| 215 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | 213 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); |
| 214 | router.go(-1); | ||
| 216 | dataQualityStore.setModelGuid(modelGuid); | 215 | dataQualityStore.setModelGuid(modelGuid); |
| 217 | } else { | 216 | } else { |
| 218 | ElMessage.error(res.msg); | 217 | ElMessage.error(res.msg); |
| ... | @@ -317,7 +316,7 @@ const cancel = () => { | ... | @@ -317,7 +316,7 @@ const cancel = () => { |
| 317 | </div> | 316 | </div> |
| 318 | <div class="panel_content" v-show="item.open"> | 317 | <div class="panel_content" v-show="item.open"> |
| 319 | <div class="form_panel"> | 318 | <div class="form_panel"> |
| 320 | <ruleForm ref="ruleFormRef" :toSubjectTables="toSubjectTables" :ruleTypeList="ruleTypeList" | 319 | <ruleForm ref="ruleFormRef" :toSubjectTables="toSubjectTables" :ruleTypeList="ruleTypeList" :dataSource="route.query.dataSource as string" |
| 321 | :largeCategoryList="largeCategoryList" :smallCategoryList="smallCategoryList" :isSingle="true"> | 320 | :largeCategoryList="largeCategoryList" :smallCategoryList="smallCategoryList" :isSingle="true"> |
| 322 | </ruleForm> | 321 | </ruleForm> |
| 323 | </div> | 322 | </div> | ... | ... |
-
Please register or sign in to post a comment