820266a3 by xukangle

Merge branch 'develop' into dev_20241202_xukangle

2 parents bdc72733 4f8e081a
...@@ -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") {
...@@ -429,9 +432,10 @@ const open = (msg, type, isBatch = false) => { ...@@ -429,9 +432,10 @@ const open = (msg, type, isBatch = false) => {
429 if (res.code == proxy.$passCode) { 432 if (res.code == proxy.$passCode) {
430 page.value.curr = 1; 433 page.value.curr = 1;
431 getTableData(); 434 getTableData();
432 let node = qualityModelTreeRef.value.treeRef.store.nodesMap[currTableData.value.modelGroupGuid]; 435 // let node = qualityModelTreeRef.value.treeRef.store.nodesMap[currTableData.value.modelGroupGuid];
433 node.loaded = false; 436 // node.loaded = false;
434 node.expand(); 437 // node.expand();
438 getQualityGroupTreeData();
435 ElMessage.success('删除成功'); 439 ElMessage.success('删除成功');
436 } else { 440 } else {
437 ElMessage.error(res.msg); 441 ElMessage.error(res.msg);
...@@ -489,6 +493,7 @@ const groupTableBtnClick = (scope, btn) => { ...@@ -489,6 +493,7 @@ const groupTableBtnClick = (scope, btn) => {
489 type: "success", 493 type: "success",
490 message: "删除分组成功", 494 message: "删除分组成功",
491 }); 495 });
496 getQualityGroupTreeData();
492 } else { 497 } else {
493 ElMessage({ 498 ElMessage({
494 type: "error", 499 type: "error",
...@@ -608,9 +613,10 @@ const ruleOpen = (msg, type, isBatch = false) => { ...@@ -608,9 +613,10 @@ const ruleOpen = (msg, type, isBatch = false) => {
608 deleteQualityTableRule(guids).then((res: any) => { 613 deleteQualityTableRule(guids).then((res: any) => {
609 if (res.code == proxy.$passCode) { 614 if (res.code == proxy.$passCode) {
610 getRuleTableData(); 615 getRuleTableData();
611 let node = qualityModelTreeRef.value.treeRef.store.nodesMap[lastSelectNode.value.data.guid]; 616 // let node = qualityModelTreeRef.value.treeRef.store.nodesMap[lastSelectNode.value.data.guid];
612 node.loaded = false; 617 // node.loaded = false;
613 node.expand(); 618 // node.expand();
619 getQualityGroupTreeData();
614 ElMessage.success('删除质检表成功'); 620 ElMessage.success('删除质检表成功');
615 } else { 621 } else {
616 ElMessage.error(res.msg); 622 ElMessage.error(res.msg);
...@@ -639,7 +645,8 @@ const clickCreateTable = () => { ...@@ -639,7 +645,8 @@ const clickCreateTable = () => {
639 name: 'ruleModel', 645 name: 'ruleModel',
640 query: { 646 query: {
641 groupGuid: page.value.modelGroupGuid, 647 groupGuid: page.value.modelGroupGuid,
642 name: lastSelectNode.value.data.name 648 name: lastSelectNode.value.data.name,
649 dataSource: lastSelectNode.value.data.dataSource
643 } 650 }
644 }); 651 });
645 } 652 }
...@@ -650,7 +657,8 @@ const clickCreateRule = () => { ...@@ -650,7 +657,8 @@ const clickCreateRule = () => {
650 name: 'ruleTemplate', 657 name: 'ruleTemplate',
651 query: { 658 query: {
652 modelGuid: lastSelectNode.value.data.guid, 659 modelGuid: lastSelectNode.value.data.guid,
653 name: lastSelectNode.value.data.name 660 name: lastSelectNode.value.data.name,
661 dataSource: lastSelectNode.value.parent.data.dataSource
654 } 662 }
655 }); 663 });
656 } 664 }
...@@ -744,6 +752,7 @@ let editSubmitPromise: any = ref(null); ...@@ -744,6 +752,7 @@ let editSubmitPromise: any = ref(null);
744 /** 新建分组对话框确定。 */ 752 /** 新建分组对话框确定。 */
745 const dialogBtnClick = (btn, info) => { 753 const dialogBtnClick = (btn, info) => {
746 if (btn.value == 'submit') { 754 if (btn.value == 'submit') {
755 info.dataSource = '5';
747 if (dialogInfo.value.type == 'add') { 756 if (dialogInfo.value.type == 'add') {
748 if (submitPromise.value) { 757 if (submitPromise.value) {
749 return; 758 return;
...@@ -753,6 +762,7 @@ const dialogBtnClick = (btn, info) => { ...@@ -753,6 +762,7 @@ const dialogBtnClick = (btn, info) => {
753 if (res.code == proxy.$passCode) { 762 if (res.code == proxy.$passCode) {
754 groupPage.value.curr = 1; 763 groupPage.value.curr = 1;
755 getGroupTableData(); 764 getGroupTableData();
765 getQualityGroupTreeData();
756 ElMessage({ 766 ElMessage({
757 type: 'success', 767 type: 'success',
758 message: '新建分组成功' 768 message: '新建分组成功'
...@@ -779,6 +789,7 @@ const dialogBtnClick = (btn, info) => { ...@@ -779,6 +789,7 @@ const dialogBtnClick = (btn, info) => {
779 type: 'success', 789 type: 'success',
780 message: '编辑分组成功' 790 message: '编辑分组成功'
781 }) 791 })
792 getQualityGroupTreeData();
782 dialogInfo.value.visible = false; 793 dialogInfo.value.visible = false;
783 } else { 794 } else {
784 ElMessage({ 795 ElMessage({
...@@ -862,8 +873,9 @@ onActivated(async () => { ...@@ -862,8 +873,9 @@ onActivated(async () => {
862 if (lastSelectNode.value && lastSelectNode.value.data.guid == dataQualityStore.modelGroupGuid) { 873 if (lastSelectNode.value && lastSelectNode.value.data.guid == dataQualityStore.modelGroupGuid) {
863 getTableData(); 874 getTableData();
864 } 875 }
865 let node = qualityModelTreeRef.value.treeRef.store.nodesMap[dataQualityStore.modelGroupGuid]; 876 // let node = qualityModelTreeRef.value.treeRef.store.nodesMap[dataQualityStore.modelGroupGuid];
866 node?.expand(); 877 // node?.expand();
878 getQualityGroupTreeData();
867 dataQualityStore.set(null); 879 dataQualityStore.set(null);
868 }); 880 });
869 } else { 881 } else {
...@@ -871,8 +883,9 @@ onActivated(async () => { ...@@ -871,8 +883,9 @@ onActivated(async () => {
871 if (lastSelectNode.value && lastSelectNode.value.data.guid == dataQualityStore.modelGroupGuid) { 883 if (lastSelectNode.value && lastSelectNode.value.data.guid == dataQualityStore.modelGroupGuid) {
872 getTableData(); 884 getTableData();
873 } 885 }
874 let node = qualityModelTreeRef.value.treeRef.store.nodesMap[dataQualityStore.modelGroupGuid]; 886 // let node = qualityModelTreeRef.value.treeRef.store.nodesMap[dataQualityStore.modelGroupGuid];
875 node.expand(); 887 // node.expand();
888 getQualityGroupTreeData();
876 dataQualityStore.set(null); 889 dataQualityStore.set(null);
877 } 890 }
878 } 891 }
......
...@@ -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;
195 child.chName = child.tableChName || child.name;
196 child.dataSourceGuid = child.parentGuid;
197 child.databaseName = child.databaseName,
164 toSubjectTables.value.push(child); 198 toSubjectTables.value.push(child);
165 })
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,11 +422,19 @@ const transformRulesInfo = (info: any) => { ...@@ -382,11 +422,19 @@ 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 ruleField: info.ruleFields.map(row => {
387 compareTableGuid: row.compareTableGuid, 428 return {
388 compareTableName: row.compareTableName, 429 // guid: row.mainTable,
389 compareEnName: row.compareEnName 430 enName: row.mainTableField,
431 //chName: row.chName,
432 compareTableGuid: row.compareTableGuid,
433 compareTableName: row.compareTableName,
434 compareEnName: row.compareEnName
435 }
436 }),
437 ruleFields: ''
390 })] 438 })]
391 })); 439 }));
392 } 440 }
...@@ -432,17 +480,17 @@ const save = () => { ...@@ -432,17 +480,17 @@ const save = () => {
432 <div class="panel_title"> 480 <div class="panel_title">
433 <div class="title_text"> 481 <div class="title_text">
434 <span>选择表</span> 482 <span>选择表</span>
435 <span class="tips_text">选择需要添加质检规则的表,请确保数据库为脱产环境,避免数据质检影响您的生产环境,且允许在该脱产环境建脏数据的库,请知晓!</span> 483 <span class="tips_text">{{ route.query.dataSource == '5' ?
484 '选择需要添加质检规则的表,请确保数据库为脱产环境,避免数据质检影响您的生产环境,且允许在该脱产环境建脏数据的库,请知晓!' : '选择需要添加质检规则的表' }}</span>
436 </div> 485 </div>
437 </div> 486 </div>
438 <TreeTransfer mode="transfer" :title="['可选表', '已选表']" pid="parentGuid" 487 <TreeTransfer mode="transfer" :title="[route.query.dataSource == '5' ? '可选元数据目录表' : '可选盘点数据库目录表', '已选表']"
439 :from-tree-data-loading="dsFromTreeDataLoading" :checkOnClickNode="true" 488 pid="parentGuid" :from-tree-data-loading="dsFromTreeDataLoading" :checkOnClickNode="true"
440 :from_checked_all="false" :from_data="dsFromTreeData" :to_data="dsToTreeData" node_key="guid" 489 :from_checked_all="false" :from_data="dsFromTreeData" :to_data="dsToTreeData" node_key="guid"
441 :transferOpenNode="true" width="70%" :defaultProps="{ 490 :transferOpenNode="true" width="70%" :defaultProps="{
442 label: 'name', 491 label: 'label',
443 value: 'guid' 492 value: 'guid'
444 }" 493 }" height="calc(100% - 64px)">
445 height="calc(100% - 64px)">
446 </TreeTransfer> 494 </TreeTransfer>
447 </div> 495 </div>
448 </div> 496 </div>
...@@ -457,7 +505,8 @@ const save = () => { ...@@ -457,7 +505,8 @@ const save = () => {
457 <div class="panel_content"> 505 <div class="panel_content">
458 <div class="form_panel"> 506 <div class="form_panel">
459 <ruleForm ref="ruleFormRef" :toSubjectTables="toSubjectTables" :ruleTypeList="ruleTypeList" 507 <ruleForm ref="ruleFormRef" :toSubjectTables="toSubjectTables" :ruleTypeList="ruleTypeList"
460 :largeCategoryList="largeCategoryList" :smallCategoryList="smallCategoryList"></ruleForm> 508 :data-source="route.query.dataSource as string" :largeCategoryList="largeCategoryList"
509 :smallCategoryList="smallCategoryList"></ruleForm>
461 </div> 510 </div>
462 </div> 511 </div>
463 </div> 512 </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>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!