流程删除优化

This commit is contained in:
hupeng 2024-12-20 13:21:17 +08:00
parent 635ac6b40a
commit 23fab5997a
3 changed files with 16 additions and 6 deletions

View File

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

View File

@ -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 })
},
}

View File

@ -44,7 +44,7 @@
</el-table-column>
<el-table-column align="center" fixed="right" label="操作" width="60">
<template #default="{ $index }">
<el-button @click="handleDelete($index)" link></el-button>
<el-button @click="handleDelete($index,row.id)" link></el-button>
</template>
</el-table-column>
</el-table>
@ -109,10 +109,17 @@ const handleAdd = () => {
}
/** 删除按钮操作 */
const handleDelete = (index) => {
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()