From 8e0cf5c1e54afd114a41fd40f838614a68bbb4d0 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Tue, 14 Nov 2023 12:06:42 +0800 Subject: [PATCH] =?UTF-8?q?crm-=E5=9B=A2=E9=98=9F=E6=88=90=E5=91=98?= =?UTF-8?q?=EF=BC=9A=E6=96=B0=E5=A2=9E=E8=8E=B7=E5=BE=97=E6=9D=83=E9=99=90?= =?UTF-8?q?=E7=BA=A7=E5=88=AB=E5=90=8D=E7=A7=B0=E5=87=BD=E6=95=B0=20getLev?= =?UTF-8?q?elName?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/permission/index.ts | 1 + src/views/crm/components/CrmTeamList.vue | 38 ++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/api/crm/permission/index.ts b/src/api/crm/permission/index.ts index c592bb23..e790c334 100644 --- a/src/api/crm/permission/index.ts +++ b/src/api/crm/permission/index.ts @@ -9,6 +9,7 @@ export interface PermissionVO { deptName?: string // 部门名称 nickname?: string // 用户昵称 postNames?: string // 岗位名称数组 + createTime?: Date } // 查询团队成员列表 diff --git a/src/views/crm/components/CrmTeamList.vue b/src/views/crm/components/CrmTeamList.vue index 6a1c14bc..f7591f6a 100644 --- a/src/views/crm/components/CrmTeamList.vue +++ b/src/views/crm/components/CrmTeamList.vue @@ -28,7 +28,11 @@ - + + + @@ -47,7 +51,20 @@ const props = defineProps<{ bizId: number }>() const loading = ref(true) // 列表的加载中 -const list = ref([]) // 列表的数据 +const list = ref([ + // TODO 测试数据 + { + id: 1, // 数据权限编号 + userId: 1, // 用户编号 + bizType: 1, // Crm 类型 + bizId: 1, // Crm 类型数据编号 + level: 1, // 权限级别 + deptName: '研发部门', // 部门名称 + nickname: '芋道源码', // 用户昵称 + postNames: '全栈开发工程师', // 岗位名称数组 + createTime: new Date() + } +]) // 列表的数据 const getList = async () => { loading.value = true try { @@ -60,7 +77,22 @@ const getList = async () => { loading.value = false } } - +/** + * 获得权限级别名称 + * @param level 权限级别 + */ +const getLevelName = computed(() => (level: number) => { + switch (level) { + case CrmPermissionLevelEnum.OWNER: + return '负责人' + case CrmPermissionLevelEnum.READ: + return '只读' + case CrmPermissionLevelEnum.WRITE: + return '读写' + default: + break + } +}) const multipleSelection = ref([]) const handleSelectionChange = (val: PermissionApi.PermissionVO[]) => { multipleSelection.value = val