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 @@ /> -