From f7a37dd4b29476fa5d9412bf96030fe4f08b58bf Mon Sep 17 00:00:00 2001 From: caiyuchao Date: Wed, 20 Aug 2025 15:26:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=A2=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/license/customer/index.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/web-antd/src/views/license/customer/index.vue b/apps/web-antd/src/views/license/customer/index.vue index 6e78654..b7dfe6d 100644 --- a/apps/web-antd/src/views/license/customer/index.vue +++ b/apps/web-antd/src/views/license/customer/index.vue @@ -2,6 +2,7 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { CustomerApi } from '#/api/license/customer'; +import { useAccess } from '@vben/access'; import { Page, useVbenModal } from '@vben/common-ui'; import { downloadFileFromBlobPart } from '@vben/utils'; @@ -19,6 +20,8 @@ import { useGridColumns, useGridFormSchema } from './data'; import Form from './modules/form.vue'; import ImportForm from './modules/import-form.vue'; +const { hasAccessByRoles } = useAccess(); + const [FormModal, formModalApi] = useVbenModal({ connectedComponent: Form, destroyOnClose: true, @@ -89,6 +92,17 @@ const [Grid, gridApi] = useVbenVxeGrid({ id: 'license-customer-list', customConfig: { storage: true, + visibleMethod({ column }) { + if (!hasAccessByRoles(['business'])) { + // 商务角色不显示序号列 + return ( + column.field !== 'contacts' && + column.field !== 'role' && + column.field !== 'phone' + ); + } + return true; + }, }, proxyConfig: { ajax: {