fix: 数据源修改
This commit is contained in:
parent
d45ff4431b
commit
cfa898e12b
|
@ -367,23 +367,22 @@ const clickDel = (row: any) => {
|
|||
|
||||
const clickSave = () => {
|
||||
formRef.value.validate().then((_data: any) => {
|
||||
console.log(_data)
|
||||
// const columns = cloneDeep(table.data);
|
||||
// columns.forEach((item) => delete item.index);
|
||||
// if (!columns.length) {
|
||||
// onlyMessage('请配置数据源字段', 'error');
|
||||
// return;
|
||||
// }
|
||||
// const params = {
|
||||
// name: leftData.selectedKeys[0],
|
||||
// columns,
|
||||
// };
|
||||
// saveTable_api(id, params).then((resp) => {
|
||||
// if (resp.status === 200) {
|
||||
// message.success('操作成功');
|
||||
// queryTables(params.name);
|
||||
// }
|
||||
// });
|
||||
const columns = cloneDeep(table.data);
|
||||
columns.forEach((item) => delete item.index);
|
||||
if (!columns.length) {
|
||||
onlyMessage('请配置数据源字段', 'error');
|
||||
return;
|
||||
}
|
||||
const params = {
|
||||
name: leftData.selectedKeys[0],
|
||||
columns,
|
||||
};
|
||||
saveTable_api(id, params).then((resp) => {
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功');
|
||||
queryTables(params.name);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ const dialogTitle = computed(() =>
|
|||
const loading = ref(false);
|
||||
|
||||
const checkUrl = (_rule: Rule, value: string): Promise<any> => {
|
||||
if (!value) return Promise.reject('请输入URL');
|
||||
if (!value) return Promise.resolve();
|
||||
const arr = value.split(':');
|
||||
if (arr?.[0] === 'jdbc' || arr?.[0] === 'r2dbc') {
|
||||
return Promise.resolve();
|
||||
|
|
Loading…
Reference in New Issue