From 7f4fd9a7d182b8da1a7130355c718914cc086293 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 11 十一月 2025 16:41:55 +0800
Subject: [PATCH] feat: s

---
 src/views/CustomerManage/CustomerManage.vue |   34 ++++++++++++++++------------------
 1 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/src/views/CustomerManage/CustomerManage.vue b/src/views/CustomerManage/CustomerManage.vue
index 90acbda..b73db10 100644
--- a/src/views/CustomerManage/CustomerManage.vue
+++ b/src/views/CustomerManage/CustomerManage.vue
@@ -32,14 +32,16 @@
           </QueryFilterItem>
         </template>
         <template #btn>
-          <el-button @click="goAddOrEdit()" icon="Plus" type="primary">鏂板瀹㈡埛</el-button>
+          <el-button
+            v-if="checkSubModuleItemShow('pageButton', 'addBtn')"
+            @click="goAddOrEdit()"
+            icon="Plus"
+            type="primary"
+            >鏂板瀹㈡埛</el-button
+          >
         </template>
       </ProTableQueryFilterBar>
-      <ProTableV2
-        v-bind="proTableProps"
-        :columns="CustomerManageColumns"
-        :operationBtns="operationBtns"
-      >
+      <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns">
       </ProTableV2>
     </AppContainer>
   </LoadingLayout>
@@ -69,26 +71,22 @@
   name: 'CustomerManage',
 });
 
-const operationBtns = defineOperationBtns([
-  {
-    data: {
-      enCode: 'detailBtn',
-      name: '鏌ョ湅',
-    },
+const operationBtnMap: Record<string, OperationBtnType> = {
+  detailBtn: {
     emits: {
       onClick: (role) => goDetail(role),
     },
   },
-  {
-    data: {
-      enCode: 'editBtn',
-      name: '缂栬緫',
-    },
+  editBtn: {
     emits: {
       onClick: (role) => goAddOrEdit(role),
     },
   },
-]);
+};
+
+const { checkSubModuleItemShow, column, operationBtns } = useAccess({
+  operationBtnMap,
+});
 
 const BaseState = {
   loading: true,

--
Gitblit v1.9.1