ee400337 by lihua

fix

1 parent 1e1c762a
...@@ -1778,14 +1778,14 @@ const submitValueRange = () => { ...@@ -1778,14 +1778,14 @@ const submitValueRange = () => {
1778 let valueTableFields = valueRangeTableListData.value[table]; 1778 let valueTableFields = valueRangeTableListData.value[table];
1779 let ruleFields: any = [] 1779 let ruleFields: any = []
1780 for (const field of valueTableFields) { 1780 for (const field of valueTableFields) {
1781 if (field.startValue != null && field.endValue == null || (field.endValue != null && field.startValue == null)) { 1781 if (field.startValue == null && field.endValue == null) {
1782 if (dialogSelectSubjectTable.value.enName != table) { 1782 if (dialogSelectSubjectTable.value.enName != table) {
1783 valueCheckFormListRef.value.setSelectList(table, 'enName'); 1783 valueCheckFormListRef.value.setSelectList(table, 'enName');
1784 } 1784 }
1785 ElMessage.error(`表【${table}】的字段【${field.enName}】设置了值域,但范围未填写完整`); 1785 ElMessage.error(`表【${table}】的字段【${field.enName}】设置了值域,但范围未填写完整`);
1786 return; 1786 return;
1787 } 1787 }
1788 if (field.startValue) { 1788 if (field.startValue != null || field.endValue != null) {
1789 ruleFields.push(field); 1789 ruleFields.push(field);
1790 } else if (field.dataRange) { 1790 } else if (field.dataRange) {
1791 ruleFields.push(field); 1791 ruleFields.push(field);
......
...@@ -77,8 +77,8 @@ const getSubjectTableTreeData = () => { ...@@ -77,8 +77,8 @@ const getSubjectTableTreeData = () => {
77 child.label = child.tableChName + `(${child.tableName})`; 77 child.label = child.tableChName + `(${child.tableName})`;
78 child.guid = child.tableGuid; 78 child.guid = child.tableGuid;
79 child.dataServerName = d.database; 79 child.dataServerName = d.database;
80 child.dataSourceGuid = d.databaseGuid; 80 child.dataSourceGuid = d.databaseGuid;
81 child.parentGuid = d.databaseGuid; 81 child.parentGuid = d.databaseGuid;
82 return child; 82 return child;
83 }) 83 })
84 return d; 84 return d;
...@@ -95,8 +95,8 @@ const getSubjectTableTreeData = () => { ...@@ -95,8 +95,8 @@ const getSubjectTableTreeData = () => {
95 d.children = d.children?.map(child => { 95 d.children = d.children?.map(child => {
96 child.label = child.name + `(${child.tableName})`; 96 child.label = child.name + `(${child.tableName})`;
97 child.dataServerName = d.name; 97 child.dataServerName = d.name;
98 child.dataSourceGuid = d.guid; 98 child.dataSourceGuid = d.guid;
99 return child; 99 return child;
100 }) 100 })
101 return d; 101 return d;
102 }) || []; 102 }) || [];
...@@ -195,7 +195,7 @@ const changeStep = (val, skip = false) => { ...@@ -195,7 +195,7 @@ const changeStep = (val, skip = false) => {
195 child.chName = child.tableChName || child.name; 195 child.chName = child.tableChName || child.name;
196 child.dataSourceGuid = child.parentGuid; 196 child.dataSourceGuid = child.parentGuid;
197 child.databaseName = child.databaseName, 197 child.databaseName = child.databaseName,
198 toSubjectTables.value.push(child); 198 toSubjectTables.value.push(child);
199 }) 199 })
200 }); 200 });
201 step.value = val - 1; 201 step.value = val - 1;
...@@ -424,10 +424,17 @@ const transformRulesInfo = (info: any) => { ...@@ -424,10 +424,17 @@ const transformRulesInfo = (info: any) => {
424 databaseName: tableInfo.dataServerName, 424 databaseName: tableInfo.dataServerName,
425 dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null, 425 dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null,
426 modelRuleConfList: [Object.assign({}, info, { 426 modelRuleConfList: [Object.assign({}, info, {
427 enName: row.mainTableField, 427 ruleField: info.ruleFields.map(row => {
428 compareTableGuid: row.compareTableGuid, 428 return {
429 compareTableName: row.compareTableName, 429 // guid: row.mainTable,
430 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: ''
431 })] 438 })]
432 })); 439 }));
433 } 440 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!