| | |
| | | <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> |
| | |
| | | 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({ |
| | |
| | | parseNumber, |
| | | handleSelectionChange, |
| | | deleteApproveBasic, |
| | | deleteMoreApproveBasic, |
| | | getInspectionTask, |
| | | onHandleSizeChange, |
| | | onHandleCurrentChange, |
| | |
| | | <style scoped lang="scss"> |
| | | $homeNavLengh: 8; |
| | | .home-container { |
| | | height: calc(100vh - 114px); |
| | | height: calc(100vh - 144px); |
| | | box-sizing: border-box; |
| | | overflow: hidden; |
| | | .homeCard { |
| | |
| | | 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); |