ee400337 by lihua

fix

1 parent 1e1c762a
......@@ -1778,14 +1778,14 @@ const submitValueRange = () => {
let valueTableFields = valueRangeTableListData.value[table];
let ruleFields: any = []
for (const field of valueTableFields) {
if (field.startValue != null && field.endValue == null || (field.endValue != null && field.startValue == null)) {
if (field.startValue == null && field.endValue == null) {
if (dialogSelectSubjectTable.value.enName != table) {
valueCheckFormListRef.value.setSelectList(table, 'enName');
}
ElMessage.error(`表【${table}】的字段【${field.enName}】设置了值域,但范围未填写完整`);
return;
}
if (field.startValue) {
if (field.startValue != null || field.endValue != null) {
ruleFields.push(field);
} else if (field.dataRange) {
ruleFields.push(field);
......
......@@ -77,8 +77,8 @@ const getSubjectTableTreeData = () => {
child.label = child.tableChName + `(${child.tableName})`;
child.guid = child.tableGuid;
child.dataServerName = d.database;
child.dataSourceGuid = d.databaseGuid;
child.parentGuid = d.databaseGuid;
child.dataSourceGuid = d.databaseGuid;
child.parentGuid = d.databaseGuid;
return child;
})
return d;
......@@ -95,8 +95,8 @@ const getSubjectTableTreeData = () => {
d.children = d.children?.map(child => {
child.label = child.name + `(${child.tableName})`;
child.dataServerName = d.name;
child.dataSourceGuid = d.guid;
return child;
child.dataSourceGuid = d.guid;
return child;
})
return d;
}) || [];
......@@ -195,7 +195,7 @@ const changeStep = (val, skip = false) => {
child.chName = child.tableChName || child.name;
child.dataSourceGuid = child.parentGuid;
child.databaseName = child.databaseName,
toSubjectTables.value.push(child);
toSubjectTables.value.push(child);
})
});
step.value = val - 1;
......@@ -424,10 +424,17 @@ const transformRulesInfo = (info: any) => {
databaseName: tableInfo.dataServerName,
dataSource: route.query.dataSource ? parseInt(<string>route.query.dataSource) : null,
modelRuleConfList: [Object.assign({}, info, {
enName: row.mainTableField,
compareTableGuid: row.compareTableGuid,
compareTableName: row.compareTableName,
compareEnName: row.compareEnName
ruleField: info.ruleFields.map(row => {
return {
// guid: row.mainTable,
enName: row.mainTableField,
//chName: row.chName,
compareTableGuid: row.compareTableGuid,
compareTableName: row.compareTableName,
compareEnName: row.compareEnName
}
}),
ruleFields: ''
})]
}));
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!