From 23fab5997a11c65a4b25875acf6e0b3305da711a Mon Sep 17 00:00:00 2001 From: hupeng Date: Fri, 20 Dec 2024 13:21:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=88=A0=E9=99=A4=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yshop-crm-vue/package.json | 2 +- yshop-crm-vue/src/api/crm/crmflow/index.ts | 5 ++++- .../views/crm/crmflow/components/FlowStepForm.vue | 15 +++++++++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/yshop-crm-vue/package.json b/yshop-crm-vue/package.json index d392773..69b05ec 100644 --- a/yshop-crm-vue/package.json +++ b/yshop-crm-vue/package.json @@ -1,6 +1,6 @@ { "name": "yshop-crm-vue3", - "version": "1.0.0", + "version": "1.1.3", "description": "基于vue3、vite4、element-plus、typesScript", "author": "yshop", "private": false, diff --git a/yshop-crm-vue/src/api/crm/crmflow/index.ts b/yshop-crm-vue/src/api/crm/crmflow/index.ts index 001c7a5..b9188aa 100644 --- a/yshop-crm-vue/src/api/crm/crmflow/index.ts +++ b/yshop-crm-vue/src/api/crm/crmflow/index.ts @@ -51,5 +51,8 @@ export const FlowApi = { }, getFlowUserIds: async (type) => { return await request.get({ url: `/crm/flow/flow-users?flowType=` + type }) - } + }, + deleteFlowStep: async (id: number) => { + return await request.delete({ url: `/crm/flow/delete-step?id=` + id }) + }, } \ No newline at end of file diff --git a/yshop-crm-vue/src/views/crm/crmflow/components/FlowStepForm.vue b/yshop-crm-vue/src/views/crm/crmflow/components/FlowStepForm.vue index 564a850..5a165b3 100644 --- a/yshop-crm-vue/src/views/crm/crmflow/components/FlowStepForm.vue +++ b/yshop-crm-vue/src/views/crm/crmflow/components/FlowStepForm.vue @@ -44,7 +44,7 @@ @@ -109,10 +109,17 @@ const handleAdd = () => { } /** 删除按钮操作 */ -const handleDelete = (index) => { - formData.value.splice(index, 1) -} +const handleDelete = async(index,id) => { + try { + // 删除的二次确认 + await message.delConfirm() + // 发起删除 + await FlowApi.deleteFlowStep(id) + message.success(t('common.delSuccess')) + formData.value.splice(index, 1) + } catch {} +} /** 表单校验 */ const validate = () => { return formRef.value.validate()