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: {