| | |
| | | <div class="main-card"> |
| | | <el-row class="cardTop"> |
| | | <el-col :span="12" class="mainCardBtn"> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="openSafetyActionDialog('新增', {})">新建</el-button> |
| | | <!-- <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button>--> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="openSafetyActionDialog('新增', {})">新增</el-button> |
| | | <el-button type="danger" :icon="Delete" size="default" @click="deleteMoreSafetyAction" plain>批量删除</el-button> |
| | | </el-col> |
| | | <el-button type="primary" :icon="Refresh" size="default" /> |
| | | </el-row> |
| | |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column property="context" label="措施内容"></el-table-column> |
| | | <el-table-column property="context" label="措施内容" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="correctVal" label="正确值" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <span> |
| | |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="modifiedUname" label="最后修改人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtModified" label="最后修改时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column property="status" label="状态" width="60" /> |
| | | <!-- <el-table-column property="status" label="状态" width="60" />--> |
| | | <el-table-column fixed="right" label="操作" align="center" width="300"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" :icon="View" @click="openSafetyActionDialog('查看', scope.row)">查看</el-button> |
| | |
| | | // }; |
| | | |
| | | // 删除 |
| | | const deleteSafetyAction = (row: any) => { |
| | | const deleteMoreSafetyAction = () => { |
| | | ElMessageBox.confirm(`此操作将永久删除该措施,是否继续?`, '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | |
| | | .then(async () => { |
| | | let res = await safetyActionApi().deleteSafetyAction(state.deleteList); |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | duration: 2000, |
| | | message: '删除成功' |
| | | }); |
| | | await initSafetyAction(); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | // 删除 |
| | | const deleteSafetyAction = (row: any) => { |
| | | ElMessageBox.confirm(`此操作将永久删除该措施,是否继续?`, '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(async () => { |
| | | let res = await safetyActionApi().deleteSafetyAction({ ids: [row.id] }); |
| | | if (res.data.code === '200') { |
| | | state.deleteList.ids = []; |
| | | ElMessage({ |
| | | type: 'success', |
| | | duration: 2000, |
| | |
| | | parseNumber, |
| | | handleSelectionChange, |
| | | deleteSafetyAction, |
| | | deleteMoreSafetyAction, |
| | | initSafetyAction, |
| | | 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); |