| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | { 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: '三级吊装作业' }, |
| | |
| | | |
| | | // 删除 |
| | | 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' |
| | |
| | | parseNumber, |
| | | deleteApproveRule, |
| | | getApproveRule, |
| | | deleteMoreApproveRule, |
| | | handleSelectionChange, |
| | | onHandleSizeChange, |
| | | onHandleCurrentChange, |
| | |
| | | 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); |