From 61aa46c5c464eb3c2b6674173cd854e1c9afd7ae Mon Sep 17 00:00:00 2001 From: Your Name <123456> Date: 星期五, 19 八月 2022 17:08:15 +0800 Subject: [PATCH] bug --- src/views/specialWorkSystem/workFlow/approveBasic/index.vue | 30 +++++++++++++++++++++++++++++- 1 files changed, 29 insertions(+), 1 deletions(-) diff --git a/src/views/specialWorkSystem/workFlow/approveBasic/index.vue b/src/views/specialWorkSystem/workFlow/approveBasic/index.vue index 8720d1f..d6fda36 100644 --- a/src/views/specialWorkSystem/workFlow/approveBasic/index.vue +++ b/src/views/specialWorkSystem/workFlow/approveBasic/index.vue @@ -22,7 +22,7 @@ <el-row class="cardTop"> <el-col :span="12" class="mainCardBtn"> <el-button type="primary" :icon="Plus" size="default" @click="openApproveBasicDialog('新增', {})">新建</el-button> - <!-- <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button>--> + <el-button type="danger" :icon="Delete" size="default" @click="deleteMoreApproveBasic" plain>批量删除</el-button> </el-col> <el-button type="primary" :icon="Refresh" size="default" /> </el-row> @@ -199,6 +199,33 @@ type: 'warning' }) .then(async () => { + let res = await approveBasicApi().deleteApproveBasic({ ids: [row.ruleStandId] }); + if (res.data.code === '200') { + state.deleteList.ids = []; + ElMessage({ + type: 'success', + duration: 2000, + message: '删除成功' + }); + await getInspectionTask(); + } else { + ElMessage({ + type: 'warning', + message: res.data.msg + }); + } + }) + .catch(() => {}); + }; + + // 批量删除 + const deleteMoreApproveBasic = (row: any) => { + ElMessageBox.confirm(`此操作将永久删除这些标准项,是否继续?`, '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning' + }) + .then(async () => { let res = await approveBasicApi().deleteApproveBasic(state.deleteList); if (res.data.code === '200') { ElMessage({ @@ -274,6 +301,7 @@ parseNumber, handleSelectionChange, deleteApproveBasic, + deleteMoreApproveBasic, getInspectionTask, onHandleSizeChange, onHandleCurrentChange, -- Gitblit v1.9.2