From 7fd564307d3bef974f2a0c99632e5020f38fda98 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Thu, 4 Jan 2024 12:10:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=9A=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0=E4=B8=80=E4=B8=AA=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E4=B8=8A=E4=BC=A0=E7=AC=AC=E4=BA=8C=E4=B8=AA?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E5=A4=B1=E6=95=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UploadFile/src/UploadFile.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/UploadFile/src/UploadFile.vue b/src/components/UploadFile/src/UploadFile.vue index ce207a88..a0ef08d6 100644 --- a/src/components/UploadFile/src/UploadFile.vue +++ b/src/components/UploadFile/src/UploadFile.vue @@ -100,7 +100,9 @@ const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => { // 文件上传成功 const handleFileSuccess: UploadProps['onSuccess'] = (res: any): void => { message.success('上传成功') - fileList.value.shift() + // 删除自身 + const index = fileList.value.findIndex((item) => item.response?.data === res.data) + fileList.value.splice(index, 1) uploadList.value.push({ name: res.data, url: res.data }) if (uploadList.value.length == uploadNumber.value) { fileList.value.push(...uploadList.value) @@ -144,6 +146,7 @@ watch( fileList.value.push( ...val.split(',').map((url) => ({ name: url.substring(url.lastIndexOf('/') + 1), url })) ) + return } // 情况2:数组 fileList.value.push( From 17be1abb65cfaf5166bb62e8335d86b1a86a6674 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 6 Jan 2024 12:29:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/customer/index.ts | 16 ++- src/api/crm/permission/index.ts | 12 -- .../OperateLogV2/src/OperateLogV2.vue | 87 ++----------- .../customer/detail/CustomerDetailsHeader.vue | 45 +------ src/views/crm/customer/detail/index.vue | 96 ++++++++++++--- src/views/crm/customer/index.vue | 115 +++++++++++++++--- .../permission/components/PermissionList.vue | 14 ++- 7 files changed, 209 insertions(+), 176 deletions(-) diff --git a/src/api/crm/customer/index.ts b/src/api/crm/customer/index.ts index a025e346..cfc3613f 100644 --- a/src/api/crm/customer/index.ts +++ b/src/api/crm/customer/index.ts @@ -69,11 +69,23 @@ export const queryAllList = async () => { } // 查询客户操作日志 -export const getOperateLogPage = async (params: any) => { - return await request.get({ url: '/crm/customer/operate-log-page', params }) +export const getOperateLogPage = async (id: number) => { + return await request.get({ url: '/crm/customer/operate-log-page?id=' + id }) } +//======================= 业务操作 ======================= + // 锁定/解锁客户 export const lockCustomer = async (id: number, lockStatus: boolean) => { return await request.put({ url: `/crm/customer/lock`, data: { id, lockStatus } }) } + +// 领取公海客户 +export const receive = async (ids: any[]) => { + return await request.put({ url: '/crm/customer/receive', params: { ids: ids.join(',') } }) +} + +// 客户放入公海 +export const putPool = async (id: number) => { + return await request.put({ url: `/crm/customer/put-pool?id=${id}` }) +} diff --git a/src/api/crm/permission/index.ts b/src/api/crm/permission/index.ts index c221b089..9a098b81 100644 --- a/src/api/crm/permission/index.ts +++ b/src/api/crm/permission/index.ts @@ -58,15 +58,3 @@ export const deletePermissionBatch = async (params) => { export const deleteSelfPermission = async (id) => { return await request.delete({ url: '/crm/permission/quit-team?id=' + id }) } - -// TODO @puhui999:调整下位置 -// 领取公海数据 -export const receive = async (data: { bizType: number; bizId: number }) => { - return await request.put({ url: `/crm/permission/receive`, data }) -} - -// TODO @puhui999:调整下位置 -// 数据放入公海 -export const putPool = async (data: { bizType: number; bizId: number }) => { - return await request.put({ url: `/crm/permission/put-pool`, data }) -} diff --git a/src/components/OperateLogV2/src/OperateLogV2.vue b/src/components/OperateLogV2/src/OperateLogV2.vue index e3409276..e3b00e2e 100644 --- a/src/components/OperateLogV2/src/OperateLogV2.vue +++ b/src/components/OperateLogV2/src/OperateLogV2.vue @@ -2,36 +2,14 @@
- - - ======================= - {{ log.userName }} - {{ log.title }} - ======================= - - - - + {{ log.userName }} + {{ log.action }}