From d735f782fcb3fa63f625bbc53aeb0169731b1302 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 20 Jan 2024 22:46:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20CRM=20=E7=9A=84?= =?UTF-8?q?=E4=B8=80=E4=BA=9B=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/permission/index.ts | 17 ++++---- src/views/crm/customer/detail/index.vue | 1 + .../permission/components/PermissionForm.vue | 42 ++++++++++++------- .../permission/components/PermissionList.vue | 33 ++++++++++----- 4 files changed, 60 insertions(+), 33 deletions(-) diff --git a/src/api/crm/permission/index.ts b/src/api/crm/permission/index.ts index 9a098b81..e616a404 100644 --- a/src/api/crm/permission/index.ts +++ b/src/api/crm/permission/index.ts @@ -2,14 +2,15 @@ import request from '@/config/axios' export interface PermissionVO { id?: number // 数据权限编号 - userId: number | undefined // 用户编号 - bizType: number | undefined // Crm 类型 - bizId: number | undefined // Crm 类型数据编号 - level: number | undefined // 权限级别 + userId: number // 用户编号 + bizType: number // Crm 类型 + bizId: number // Crm 类型数据编号 + level: number // 权限级别 deptName?: string // 部门名称 nickname?: string // 用户昵称 postNames?: string[] // 岗位名称数组 createTime?: Date + ids?: number[] } /** @@ -50,11 +51,11 @@ export const updatePermission = async (data) => { } // 删除数据权限(删除团队成员) -export const deletePermissionBatch = async (params) => { - return await request.delete({ url: '/crm/permission/delete', params }) +export const deletePermissionBatch = async (val: number[]) => { + return await request.delete({ url: '/crm/permission/delete?ids=' + val.join(',') }) } // 删除自己的数据权限(退出团队) -export const deleteSelfPermission = async (id) => { - return await request.delete({ url: '/crm/permission/quit-team?id=' + id }) +export const deleteSelfPermission = async (id: number) => { + return await request.delete({ url: '/crm/permission/delete-self?id=' + id }) } diff --git a/src/views/crm/customer/detail/index.vue b/src/views/crm/customer/detail/index.vue index 41b9a0be..23c169f6 100644 --- a/src/views/crm/customer/detail/index.vue +++ b/src/views/crm/customer/detail/index.vue @@ -51,6 +51,7 @@ :biz-id="customer.id!" :biz-type="BizTypeEnum.CRM_CUSTOMER" :show-action="!permissionListRef?.isPool || false" + @quit-team="close" /> diff --git a/src/views/crm/permission/components/PermissionForm.vue b/src/views/crm/permission/components/PermissionForm.vue index fa73b22a..aced2f48 100644 --- a/src/views/crm/permission/components/PermissionForm.vue +++ b/src/views/crm/permission/components/PermissionForm.vue @@ -17,7 +17,6 @@ /> -