diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index bcceb80c..1298b7e2 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -6,6 +6,7 @@ "AI Model Configuration": "AI Model Configuration" }, "common": { + "limited_to_30": "The number of data tables is limited to 30", "enter_your_password": "Please enter your password", "your_account_email_address": "Please enter your account/email address", "the_correct_password": "Please enter the correct password", diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json index dc52b112..ce571212 100644 --- a/frontend/src/i18n/zh-CN.json +++ b/frontend/src/i18n/zh-CN.json @@ -6,6 +6,7 @@ "AI Model Configuration": "模型配置" }, "common": { + "limited_to_30": "数据表数量限制30", "enter_your_password": "请输入密码", "your_account_email_address": "请输入账号/邮箱", "the_correct_password": "请输入正确的密码", diff --git a/frontend/src/views/ds/DatasourceForm.vue b/frontend/src/views/ds/DatasourceForm.vue index 966a511b..4444208d 100644 --- a/frontend/src/views/ds/DatasourceForm.vue +++ b/frontend/src/views/ds/DatasourceForm.vue @@ -233,7 +233,6 @@ const save = async (formEl: FormInstance | undefined) => { if (!formEl) return await formEl.validate((valid) => { if (valid) { - saveLoading.value = true const list = tableList.value .filter((ele: any) => { return checkList.value.includes(ele.tableName) @@ -242,6 +241,12 @@ const save = async (formEl: FormInstance | undefined) => { return { table_name: ele.tableName, table_comment: ele.tableComment } }) + if (checkList.value.length > 30) { + ElMessage.error(t('common.limited_to_30')) + return + } + saveLoading.value = true + const requestObj = buildConf() if (form.value.id) { if (!isEditTable.value) { @@ -278,8 +283,6 @@ const save = async (formEl: FormInstance | undefined) => { .finally(() => { saveLoading.value = false }) - - console.log(a, 'datasourceApi') } } })