update 优化 代码生成导入下拉框默认值处理
This commit is contained in:
parent
3b710d9e99
commit
f203716f31
@ -63,14 +63,18 @@ const emit = defineEmits(['ok']);
|
||||
|
||||
/** 查询参数列表 */
|
||||
const show = (dataName: string) => {
|
||||
getDataNameList();
|
||||
if (dataName) {
|
||||
queryParams.dataName = dataName;
|
||||
} else {
|
||||
queryParams.dataName = 'master';
|
||||
}
|
||||
getList();
|
||||
visible.value = true;
|
||||
getDataNames().then(res => {
|
||||
if (res.code == 200) {
|
||||
dataNameList.value = res.data;
|
||||
if (dataName) {
|
||||
queryParams.dataName = dataName;
|
||||
} else {
|
||||
queryParams.dataName = dataNameList.value[0];
|
||||
}
|
||||
getList();
|
||||
visible.value = true;
|
||||
}
|
||||
});
|
||||
};
|
||||
/** 单击选择行 */
|
||||
const clickRow = (row: DbTableVO) => {
|
||||
@ -111,11 +115,6 @@ const handleImportTable = async () => {
|
||||
emit('ok');
|
||||
}
|
||||
};
|
||||
/** 查询多数据源名称 */
|
||||
const getDataNameList = async () => {
|
||||
const res = await getDataNames();
|
||||
dataNameList.value = res.data;
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
show
|
||||
|
Loading…
x
Reference in New Issue
Block a user