From f5c76c1b7acf3efa2f9308e7edb1c8962c803bdb Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Fri, 27 Feb 2026 14:46:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E5=91=8A=E6=A8=A1=E7=89=88=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/tableStore.ts | 5 +- .../components/Administration.vue | 382 ++++++++++-------- .../components/disposition.vue | 10 + src/views/system/scheduledTasks/form.vue | 2 +- src/views/system/strategyManage/index.vue | 4 +- 5 files changed, 222 insertions(+), 181 deletions(-) diff --git a/src/utils/tableStore.ts b/src/utils/tableStore.ts index 47590f1b..49921e63 100644 --- a/src/utils/tableStore.ts +++ b/src/utils/tableStore.ts @@ -77,6 +77,7 @@ export default class TableStore { } index() { + this.table.beforeSearchFun && this.table.beforeSearchFun() this.table.data = [] this.table.loading = true @@ -97,10 +98,12 @@ export default class TableStore { url: this.url, method: this.method }, + requestPayload(this.method, this.table.params, this.paramsPOST) ) ) .then((res: any) => { + if (res.data) { this.table.data = res.data.records || res.data this.table.total = res.data?.total || res.data.length || 0 @@ -137,7 +140,7 @@ export default class TableStore { this.table.params.pageNum = 1 this.index() - console.log('search') + } ], [ diff --git a/src/views/system/ReportConfiguration/components/Administration.vue b/src/views/system/ReportConfiguration/components/Administration.vue index fa8d899a..17e1e01d 100644 --- a/src/views/system/ReportConfiguration/components/Administration.vue +++ b/src/views/system/ReportConfiguration/components/Administration.vue @@ -1,8 +1,37 @@ \ No newline at end of file diff --git a/src/views/system/ReportConfiguration/components/disposition.vue b/src/views/system/ReportConfiguration/components/disposition.vue index 5b62eb28..32b630d8 100644 --- a/src/views/system/ReportConfiguration/components/disposition.vue +++ b/src/views/system/ReportConfiguration/components/disposition.vue @@ -20,6 +20,7 @@ :tree-data="treeDataForChild" v-if="showDictionary" @close="closeReportDictionary" + @refreshTree="handleRefreshTree" /> { } } +// 监听子组件触发的刷新事件 +const handleRefreshTree = async () => { + try { + const res = await getDictTree({ type: Number(tableStore.table.params.type) }) + treeDataForChild.value = res.data // 更新树数据 + } catch (error) { + ElMessage.error('刷新树数据失败') + } +} const closeReportDictionary = () => { showDictionary.value = false } diff --git a/src/views/system/scheduledTasks/form.vue b/src/views/system/scheduledTasks/form.vue index c810f019..1f952103 100644 --- a/src/views/system/scheduledTasks/form.vue +++ b/src/views/system/scheduledTasks/form.vue @@ -92,7 +92,7 @@ const submit = () => { }) } else { updateTimer(form).then(res => { - ElMessage.success('新增成功') + ElMessage.success('修改成功') dialogVisible.value = false emit('submit') }) diff --git a/src/views/system/strategyManage/index.vue b/src/views/system/strategyManage/index.vue index 61a74754..fa79035a 100644 --- a/src/views/system/strategyManage/index.vue +++ b/src/views/system/strategyManage/index.vue @@ -3,7 +3,7 @@ - +
@@ -37,7 +37,7 @@ > 新增类型
-
+