From f895069d6929719d79598cdbc64e554785d511a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <14166000+zhangtonghai@user.noreply.gitee.com> Date: Thu, 4 Jul 2024 18:02:29 +0800 Subject: [PATCH] 07/04 --- src/hooks/Permissions/index.ts | 7 + src/views/baseinfo/goodstype/columns.tsx | 8 +- src/views/baseinfo/goodstype/index.vue | 51 +-- .../autoduizang/TenantAuditStepModal.vue | 305 ++++++++++++++---- src/views/operation/autoduizang/api.ts | 26 +- src/views/operation/autoduizang/columns.tsx | 287 +++++++++++++--- src/views/operation/autoduizang/index.vue | 11 +- 7 files changed, 553 insertions(+), 142 deletions(-) create mode 100644 src/hooks/Permissions/index.ts diff --git a/src/hooks/Permissions/index.ts b/src/hooks/Permissions/index.ts new file mode 100644 index 00000000..54aec9a1 --- /dev/null +++ b/src/hooks/Permissions/index.ts @@ -0,0 +1,7 @@ +import { intersection } from 'lodash-es' +import { usePermissionStore } from '/@/store/modules/permission' +export function checkPermissions(key) { + const permissionStore = usePermissionStore() + const allCodeList = permissionStore.getPermCodeList as string[] + return !((intersection([key], allCodeList) as string[]).length > 0) +} \ No newline at end of file diff --git a/src/views/baseinfo/goodstype/columns.tsx b/src/views/baseinfo/goodstype/columns.tsx index 8fe2dd88..f9c27de2 100644 --- a/src/views/baseinfo/goodstype/columns.tsx +++ b/src/views/baseinfo/goodstype/columns.tsx @@ -4,11 +4,13 @@ export const columns: BasicColumn[] = [ { title: '商品类型代码', dataIndex: 'goodsTypeCode', + sorter: true, width: 150, }, { title: '商品类型名称', dataIndex: 'goodsTypeName', + sorter: true, width: 200, }, // { @@ -19,12 +21,14 @@ export const columns: BasicColumn[] = [ { title: '描述', dataIndex: 'description', + sorter: true, width: 200, }, { title: '是否启用', dataIndex: 'status', - width: 80, + sorter: true, + width: 100, customRender: ({ text }) => { if (text === 0) { return 启用 @@ -37,11 +41,13 @@ export const columns: BasicColumn[] = [ { title: '备注', dataIndex: 'note', + sorter: true, width: 150, }, { title: '创建时间', dataIndex: 'createTime', + sorter: true, width: 200, }, ] diff --git a/src/views/baseinfo/goodstype/index.vue b/src/views/baseinfo/goodstype/index.vue index 8e2e189f..3854bb58 100644 --- a/src/views/baseinfo/goodstype/index.vue +++ b/src/views/baseinfo/goodstype/index.vue @@ -2,8 +2,20 @@