From 801e83de3caae9a44c50c7fd627728dd3a95ec75 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期五, 08 八月 2025 15:12:53 +0800
Subject: [PATCH] feat: 任务

---
 src/views/DictionaryManage/DataDictionary.vue |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/views/DictionaryManage/DataDictionary.vue b/src/views/DictionaryManage/DataDictionary.vue
index febbb11..86acd05 100644
--- a/src/views/DictionaryManage/DataDictionary.vue
+++ b/src/views/DictionaryManage/DataDictionary.vue
@@ -1,7 +1,7 @@
 <template>
   <LoadingLayout :loading="state.loading">
     <AppContainer>
-      <ProTableQueryFilterBar @on-reset="reset">
+      <ProTableQueryFilterBar @on-reset="handleReset">
         <template #query>
           <QueryFilterItem>
             <FieldSelect
@@ -42,9 +42,6 @@
             :inactive-value="true"
             :before-change="() => setCategoryVis(row)"
           />
-        </template>
-        <template #category="{ row }">
-          {{ row.category?.name }}
         </template>
       </ProTableV2>
     </AppContainer>
@@ -181,7 +178,9 @@
     isDisabled: false,
     field1: '',
     field2: [] as UploadUserFile[],
+    title: '鏂板瀛楀吀',
   },
+  editTitle: '缂栬緫瀛楀吀',
 });
 
 async function handleAddOrEdit() {
@@ -201,7 +200,7 @@
     let res = await dictionaryServices.saveDictionaryData(params);
     if (res) {
       Message.successMessage('鎿嶄綔鎴愬姛');
-      updateDictionaryDataSelect();
+      updateDictionaryDataSelect(editForm.categoryId);
       getList(paginationState.pageIndex);
       dialogState.dialogVisible = false;
     }
@@ -216,8 +215,16 @@
       isDisabled: !row.isDisabled,
     };
     let res = await dictionaryServices.setDictionaryDataIsDisabled(params);
+    updateDictionaryDataSelect(row.categoryId);
     getList(paginationState.pageIndex);
     return !!res;
   } catch (error) {}
 }
+
+async function handleReset() {
+  try {
+    const dictionaryCategoryList = await ensureQueryData();
+    reset({ categoryId: dictionaryCategoryList[0].value });
+  } catch (error) {}
+}
 </script>

--
Gitblit v1.9.1