From 1488c4eb2d78be014eb7d3250b0b9f6181bff240 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Wed, 23 Jul 2025 17:37:38 +0800 Subject: [PATCH] fix: bug fix --- frontend/src/i18n/en.json | 2 +- frontend/src/i18n/zh-CN.json | 2 +- frontend/src/views/ds/DataTable.vue | 77 +++++++++++++++---- frontend/src/views/ds/DelMessageBox.vue | 10 --- frontend/src/views/system/member/index.vue | 5 +- frontend/src/views/system/user/User.vue | 8 +- frontend/src/views/system/user/index.vue | 1 + .../workspace/AuthorizedWorkspaceDialog.vue | 4 + frontend/src/views/system/workspace/index.vue | 1 + 9 files changed, 78 insertions(+), 32 deletions(-) diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index 0b5b64c5..eb6a3563 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -341,7 +341,7 @@ "there_are": "There are", "2_dashboards": "{msg} dashboards", "smart_data_centers": "{msg} smart data centers", - "confirm_to_delete": "This data source is in use. Deleting it will cause these resources to not work properly. Confirm to delete?", + "confirm_to_delete": "After the data source is deleted, the related questions can no longer be asked and the charts in the dashboard cannot be displayed normally. Please operate with caution!", "id_account_to_add": "Search user ID/account to add", "find_user": "Find user", "add_successfully": "Add successfully", diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json index 53d07817..fc11d6a4 100644 --- a/frontend/src/i18n/zh-CN.json +++ b/frontend/src/i18n/zh-CN.json @@ -354,7 +354,7 @@ "there_are": "有 ", "2_dashboards": "{msg} 个仪表板", "smart_data_centers": "{msg} 个智能问数", - "confirm_to_delete": "正在使用此数据源,删除后会导致这些资源无法正常使用,确认删除?", + "confirm_to_delete": "数据源删除后,相关的问数不可继续提问,仪表板中的图表无法正常显示,请谨慎操作!", "id_account_to_add": "搜索用户ID/账号添加", "find_user": "查找用户", "add_successfully": "添加成功", diff --git a/frontend/src/views/ds/DataTable.vue b/frontend/src/views/ds/DataTable.vue index 491d131a..a0c66a2a 100644 --- a/frontend/src/views/ds/DataTable.vue +++ b/frontend/src/views/ds/DataTable.vue @@ -58,7 +58,7 @@ const keywords = ref('') const tableListWithSearch = computed(() => { if (!keywords.value) return tableList.value return tableList.value.filter((ele) => - ele.name.toLowerCase().includes(keywords.value.toLowerCase()) + ele.table_name.toLowerCase().includes(keywords.value.toLowerCase()) ) }) const total = ref(1000) @@ -181,6 +181,31 @@ const emits = defineEmits(['back', 'refresh']) const back = () => { emits('back') } + +const btnSelectClick = (val: any) => { + btnSelect.value = val + loading.value = true + + if (val === 'd') { + datasourceApi + .fieldList(currentTable.value.id) + .then((res) => { + fieldList.value = res + }) + .finally(() => { + loading.value = false + }) + } else { + datasourceApi + .previewData(props.info.id, buildData()) + .then((res) => { + previewData.value = res + }) + .finally(() => { + loading.value = false + }) + } +}