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