From 324eed59a668758755219d5cd4e68463a9cc427d Mon Sep 17 00:00:00 2001
From: Admin <978517621@qq.com>
Date: 星期三, 14 九月 2022 15:22:36 +0800
Subject: [PATCH] Default Changelist
---
src/views/specialWorkSystem/workFlow/approveRule/index.vue | 53 +++++++++++++++++++++++++++++++++++------------------
1 files changed, 35 insertions(+), 18 deletions(-)
diff --git a/src/views/specialWorkSystem/workFlow/approveRule/index.vue b/src/views/specialWorkSystem/workFlow/approveRule/index.vue
index 0893fd7..f78529f 100644
--- a/src/views/specialWorkSystem/workFlow/approveRule/index.vue
+++ b/src/views/specialWorkSystem/workFlow/approveRule/index.vue
@@ -4,9 +4,7 @@
<el-row class="homeCard">
<div class="basic-line">
<span>规则名称:</span>
- <el-select v-model="tableData.params.searchParams.ruleName" clearable filterable class="input-box" placeholder="任务类型">
- <el-option v-for="item in workTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option>
- </el-select>
+ <el-input v-model="tableData.params.searchParams.ruleName" class="input-box" placeholder="规则名称"> </el-input>
</div>
<div class="basic-line">
<span>部门:</span>
@@ -33,8 +31,8 @@
<div class="main-card">
<el-row class="cardTop">
<el-col :span="12" class="mainCardBtn">
- <el-button type="primary" :icon="Plus" size="default" @click="openApproveRuleDialog('新增', {})">新建</el-button>
- <!-- <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button>-->
+ <el-button type="primary" :icon="Plus" size="default" @click="openApproveRuleDialog('新增', {})">新增</el-button>
+ <el-button type="danger" :icon="Delete" size="default" @click="deleteMoreApproveRule" plain>批量删除</el-button>
</el-col>
<el-button type="primary" :icon="Refresh" size="default" />
</el-row>
@@ -63,7 +61,7 @@
<template #default="scope">
<el-button link type="primary" size="small" :icon="View" @click="openApproveRuleDialog('查看', scope.row)">查看</el-button>
<el-button link type="primary" size="small" :icon="Edit" @click="openApproveRuleDialog('修改', scope.row)">修改</el-button>
- <el-button link type="danger" size="small" :icon="Delete" @click="deleteApproveRule(scope.row)">删除</el-button>
+ <el-button link type="primary" style="color: red" size="small" :icon="Delete" @click="deleteApproveRule(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -150,13 +148,13 @@
{ id: 8, name: '盲板抽堵作业' }
],
workLevelList: [
+ { id: 3, name: '特级动火作业' },
{ id: 1, name: '一级动火作业' },
{ id: 2, name: '二级动火作业' },
- { id: 3, name: '三级动火作业' },
+ { id: 7, name: '特级高处作业' },
{ id: 4, name: '一级高处作业' },
{ id: 5, name: '二级高处作业' },
{ id: 6, name: '三级高处作业' },
- { id: 7, name: '四级高处作业' },
{ id: 8, name: '一级吊装作业' },
{ id: 9, name: '二级吊装作业' },
{ id: 10, name: '三级吊装作业' },
@@ -217,7 +215,34 @@
// 删除
const deleteApproveRule = (row: any) => {
- ElMessageBox.confirm(`此操作将永久删除该任务:“${row.unitName}”,是否继续?`, '提示', {
+ ElMessageBox.confirm(`此操作将永久删除该审批规则,是否继续?`, '提示', {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning'
+ })
+ .then(async () => {
+ let res = await approveRuleApi().deleteApproveRule({ ids: [row.id] });
+ state.deleteList.ids = [];
+ if (res.data.code === '200') {
+ ElMessage({
+ type: 'success',
+ duration: 2000,
+ message: '删除成功'
+ });
+ await getApproveRule();
+ } else {
+ ElMessage({
+ type: 'warning',
+ message: res.data.msg
+ });
+ }
+ })
+ .catch(() => {});
+ };
+
+ // 批量删除
+ const deleteMoreApproveRule = (row: any) => {
+ ElMessageBox.confirm(`此操作将永久删除这些审批规则,是否继续?`, '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
@@ -301,6 +326,7 @@
parseNumber,
deleteApproveRule,
getApproveRule,
+ deleteMoreApproveRule,
handleSelectionChange,
onHandleSizeChange,
onHandleCurrentChange,
@@ -437,15 +463,6 @@
border: 2px solid #0098f5;
color: #0098f5;
}
-}
-.el-input {
- width: 100% !important;
-}
-:deep(.el-date-editor) {
- width: 100%;
-}
-.el-select {
- width: 100%;
}
:deep(.el-textarea.is-disabled .el-textarea__inner) {
background-color: var(--el-card-bg-color);
--
Gitblit v1.9.2