From 999cab6fb3fc6d2a288d365da991351c5a396bf0 Mon Sep 17 00:00:00 2001 From: Admin <978517621@qq.com> Date: 星期三, 21 九月 2022 15:53:18 +0800 Subject: [PATCH] 删除无用页面 --- src/views/specialWorkSystem/workFlow/approveBasic/index.vue | 37 +++++++++++++++++++++++++++++++------ 1 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/views/specialWorkSystem/workFlow/approveBasic/index.vue b/src/views/specialWorkSystem/workFlow/approveBasic/index.vue index 8720d1f..9f2ec17 100644 --- a/src/views/specialWorkSystem/workFlow/approveBasic/index.vue +++ b/src/views/specialWorkSystem/workFlow/approveBasic/index.vue @@ -21,8 +21,8 @@ <div class="main-card"> <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="primary" :icon="Plus" size="default" @click="openApproveBasicDialog('新增', {})">新增</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, @@ -288,7 +316,7 @@ <style scoped lang="scss"> $homeNavLengh: 8; .home-container { - height: calc(100vh - 114px); + height: calc(100vh - 144px); box-sizing: border-box; overflow: hidden; .homeCard { @@ -410,9 +438,6 @@ border: 2px solid #0098f5; color: #0098f5; } -} -:deep(.el-date-editor) { - width: 100%; } :deep(.el-textarea.is-disabled .el-textarea__inner) { background-color: var(--el-card-bg-color); -- Gitblit v1.9.2