已重命名11个文件
已修改10个文件
已添加2个文件
已删除12个文件
| | |
| | | // v1 |
| | | getHiddenCheckList: (data: object) => { |
| | | return request({ |
| | | url: `/prevent/dangerRectify/select/getDangerRectifyPage`, |
| | | url: `/prevent/dangerRectify/select/getRectifyOverPage`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | | }, |
| | | // v1 |
| | | addHiddenCheck: (data: object) => { |
| | | submitHiddenCheck: (data: object) => { |
| | | return request({ |
| | | url: `/prevent/dangerManage/select/saveDangerManage`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | | }, |
| | | // v1 |
| | | modHiddenCheck: (data: object) => { |
| | | return request({ |
| | | url: `/prevent/dangerRectify/update/updateDangerRectify`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | | }, |
| | | // v1 |
| | | deleteHiddenCheck: (data: object) => { |
| | | return request({ |
| | | url: `/prevent/dangerRectify/delete/deleteDangerRectify`, |
| | | url: `/prevent/dangerRectify/update/reportRectify`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
对比新文件 |
| | |
| | | <template> |
| | | <div class="system-add-menu-container"> |
| | | <el-dialog :title="title" v-model="isShowRecordDialog" append-to-body :close-on-click-modal="false" width="600px"> |
| | | <div class="record-form"> |
| | | <el-form :model="recordForm" ref="recordFormRef" size="default" label-width="100px"> |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="检查内容" prop="checkContent"> |
| | | <el-input class="input-length" type="textarea" :rows="3" v-model.trim="recordForm.checkContent" placeholder="检查内容"> </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog :title="title" v-model="isShowSubmitDialog" width="600px"> |
| | | <el-form :model="submitForm" ref="rectifyFormRef" size="default" label-width="120px"> |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="处理结果" prop="checkResult"> |
| | | <el-select class="input-add" v-model="checkResults.checkResult" placeholder="请输入处理结果"> |
| | | <el-option v-for="item in resultList" :label="item.name" :key="item.id" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="isShowSubmitDialog = !isShowSubmitDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitRecord" v-throttle size="default">确 实</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { getUserByDepartment } from '/@/assets/methods'; |
| | | |
| | | interface stateType { |
| | | isShowRecordDialog: Boolean; |
| | | isShowSubmitDialog: Boolean; |
| | | recordForm: { |
| | | taskCode: string | null; |
| | | checkContent: string | null; |
| | | checkResult: string | null; |
| | | checkTaskId: number | null; |
| | | classify1: number | null; |
| | | classify2: number | null; |
| | | classify3: string | null; |
| | | controlMeasureCode: string | null; |
| | | controlMeasureId: number | null; |
| | | controlType: number | null; |
| | | measureDesc: string | null; |
| | | }; |
| | | title: string; |
| | | submitForm: { |
| | | execUserId: number | null; |
| | | id: number | null; |
| | | checkResults: Array<checkResults>; |
| | | }; |
| | | checkResults: { |
| | | id: number | null; |
| | | controlMeasureId: number | null; |
| | | checkResult: number | null; |
| | | }; |
| | | resultList: Array<result>; |
| | | } |
| | | interface result { |
| | | id: number; |
| | | name: string; |
| | | } |
| | | interface checkResults { |
| | | id: number | null; |
| | | controlMeasureId: number | null; |
| | | checkResult: number | null; |
| | | } |
| | | import { reactive, toRefs, ref } from 'vue'; |
| | | import { recordApi } from '/@/api/doublePreventSystem/record'; |
| | | import { ElMessage } from 'element-plus'; |
| | | export default { |
| | | name: 'recordDialog', |
| | | setup(props: any, context: any) { |
| | | const recordFormRef = ref(); |
| | | const state = reactive<stateType>({ |
| | | title: '查看', |
| | | isShowSubmitDialog: false, |
| | | isShowRecordDialog: false, |
| | | recordForm: { |
| | | taskCode: null, |
| | | checkContent: null, |
| | | checkResult: null, |
| | | checkTaskId: null, |
| | | classify1: null, |
| | | classify2: null, |
| | | classify3: null, |
| | | controlMeasureCode: null, |
| | | controlMeasureId: null, |
| | | controlType: null, |
| | | measureDesc: null |
| | | }, |
| | | submitForm: { |
| | | id: null, |
| | | execUserId: null, |
| | | checkResults: [] |
| | | }, |
| | | checkResults: { |
| | | id: null, |
| | | controlMeasureId: null, |
| | | checkResult: null |
| | | }, |
| | | resultList: [ |
| | | { id: 1, name: '正常' }, |
| | | { id: 2, name: '不正常' } |
| | | ] |
| | | }); |
| | | |
| | | //打开模态框 |
| | | const openRecordDialog = async (type: string, value: object) => { |
| | | if (type === '查看') { |
| | | state.title = '查看'; |
| | | state.isShowRecordDialog = true; |
| | | let recordFormValue = JSON.parse(JSON.stringify(value)); |
| | | state.recordForm.taskCode = recordFormValue.taskCode; |
| | | state.recordForm.checkContent = recordFormValue.checkContent; |
| | | } else { |
| | | state.title = '提交'; |
| | | state.isShowSubmitDialog = true; |
| | | state.submitForm.id = JSON.parse(JSON.stringify(value)).checkTaskId; |
| | | state.checkResults.id = JSON.parse(JSON.stringify(value)).id; |
| | | state.checkResults.controlMeasureId = JSON.parse(JSON.stringify(value)).controlMeasureId; |
| | | } |
| | | }; |
| | | |
| | | //新增修改提交 |
| | | const submitRecord = async () => { |
| | | if (state.checkResults.checkResult !== null) { |
| | | if (state.title === '提交') { |
| | | state.submitForm.checkResults.push(state.checkResults); |
| | | let res = await recordApi().submitRecord(state.submitForm); |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '排查记录新增成功', |
| | | duration: 2000 |
| | | }); |
| | | state.isShowRecordDialog = false; |
| | | context.emit('refreshRecord'); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请完善基本信息' |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | return { |
| | | ...toRefs(state), |
| | | recordFormRef, |
| | | submitRecord, |
| | | openRecordDialog |
| | | }; |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | ::v-deep.el-divider--horizontal { |
| | | margin-top: 0px !important; |
| | | } |
| | | |
| | | ::v-deep.el-dialog__body { |
| | | padding-top: 10px !important; |
| | | } |
| | | .filter-container { |
| | | padding: 10px 0px; |
| | | } |
| | | </style> |
文件名从 src/views/doublePrevent/checkTaskManage/record/index.vue 修改 |
| | |
| | | </el-button> |
| | | </div> |
| | | <el-table :data="recordData.data" style="width: 100%"> |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | | <el-table-column prop="checkRecordName" label="排查名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="checkRecordType" label="排查类型" show-overflow-tooltip> |
| | | <el-table-column type="expand"> |
| | | <template #default="scope"> |
| | | {{ parseNumber(scope.row.checkRecordType, '排查类型') }} |
| | | <el-table :data="scope.row.checkContent" style="width: 100%"> |
| | | <el-table-column label="序号" type="index" width="150" align="center"> </el-table-column> |
| | | <el-table-column label="检查内容" prop="checkContent" align="center"> </el-table-column> |
| | | <el-table-column label="操作" align="center" width="280" class-name="small-padding fixed-width"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button> |
| | | <el-button size="small" text type="primary" :icon="Check" @click="onOpenDialogRef('整改', scope.row)">提交</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="riskLevel" label="风险等级" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="location" label="区域位置" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="status" label="状态" show-overflow-tooltip> </el-table-column> |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | | <el-table-column prop="taskCode" label="排查名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="taskStatus" label="状态" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ parseNumber(scope.row.taskStatus, '状态') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createUserName" label="创建人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="操作" width="150"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" @click="onDelrecord(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br /> |
| | | <el-pagination |
| | | @size-change="onHandleSizeChange" |
| | | @current-change="onHandleCurrentChange" |
| | | :pager-count="5" |
| | | :page-sizes="[10, 20, 30]" |
| | | v-model:current-page="recordData.params.pageIndex" |
| | | background |
| | | v-model:page-size="recordData.params.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="recordData.total" |
| | | class="page-position" |
| | | > |
| | | </el-pagination> |
| | | <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="recordData.params.pageIndex" background v-model:page-size="recordData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="recordData.total" class="page-position"> </el-pagination> |
| | | <br /> |
| | | <br /> |
| | | </el-card> |
| | |
| | | import { recordApi } from '/@/api/doublePreventSystem/record/index.ts'; |
| | | import { departmentApi } from '/@/api/department'; |
| | | import { checkUnitApi } from '/@/api/doublePreventSystem/checkUnit'; |
| | | import { View, Check } from '@element-plus/icons-vue'; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface TableData { |
| | |
| | | |
| | | export default defineComponent({ |
| | | name: 'record', |
| | | components: { recordDialog }, |
| | | components: { recordDialog, View, Check }, |
| | | setup() { |
| | | const recordDialogRef = ref(); |
| | | const state = reactive<TableDataState>({ |
| | |
| | | |
| | | // 打开生产装置弹窗 |
| | | const onOpenDialogRef = (type: string, value: any) => { |
| | | recordDialogRef.value.openRecordDialog(type, value, state.departmentList, state.checkRecordTypeList, state.taskUnitList); |
| | | recordDialogRef.value.openRecordDialog(type, value); |
| | | }; |
| | | // 删除角色 |
| | | const onDelRecord = (row: any) => { |
| | |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | const parseNumber = (value: string | number, type: string) => {}; |
| | | |
| | | const handleSearch = () => { |
| | | initRecordTableData(); |
| | | }; |
| | |
| | | state.recordData.params.pageIndex = val; |
| | | initRecordTableData(); |
| | | }; |
| | | |
| | | const parseNumber = (value: string | number, type: string) => { |
| | | if (type === '状态') { |
| | | return state.taskStatusList.find((item) => item.id === value)?.name; |
| | | } |
| | | }; |
| | | |
| | | // 页面加载时 |
| | | onMounted(() => { |
| | | initRecordTableData(); |
| | |
| | | }); |
| | | |
| | | return { |
| | | View, |
| | | Check, |
| | | parseNumber, |
| | | handleSearch, |
| | | onOpenDialogRef, |
| | | onHandleSizeChange, |
| | | onDelRecord, |
| | | parseNumber, |
| | | onHandleCurrentChange, |
| | | recordDialog, |
| | | recordDialogRef, |
文件名从 src/views/doublePrevent/checkTaskManage/record/components/recordDialog.vue 修改 |
| | |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="排查类型" prop="checkWorkType"> |
| | | <el-select class="input-add" v-model="workForm.checkWorkType" placeholder="请输入排查类型" clearable> |
| | | <el-option v-for="item in checkWorkTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option |
| | | ></el-select> |
| | | <el-select class="input-add" v-model="workForm.checkWorkType" placeholder="请输入排查类型" clearable> <el-option v-for="item in checkWorkTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option></el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="整改部门" prop="depId"> |
| | | <el-cascader |
| | | @change="achieveUserList" |
| | | :options="departmentList" |
| | | :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" |
| | | placeholder="请选择部门" |
| | | clearable |
| | | filterable |
| | | class="input-add" |
| | | v-model="workForm.depId" |
| | | > |
| | | </el-cascader> |
| | | <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-add" v-model="workForm.depId"> </el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="排查周期" prop="checkCycle"> |
| | | <el-input |
| | | class="input-add" |
| | | type="number" |
| | | v-model.trim="workForm.checkCycle" |
| | | placeholder="请输入排查周期" |
| | | clearable |
| | | ></el-input> |
| | | <el-input class="input-add" type="number" v-model.trim="workForm.checkCycle" placeholder="请输入排查周期" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="有效时间" prop="validTime"> |
| | | <el-input |
| | | class="input-add" |
| | | type="number" |
| | | v-model.trim="workForm.validTime" |
| | | placeholder="请输入有效时间" |
| | | clearable |
| | | ></el-input> |
| | | <el-input class="input-add" type="number" v-model.trim="workForm.validTime" placeholder="请输入有效时间" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="提醒时间" prop="noticeTime"> |
| | | <el-input |
| | | class="input-add" |
| | | type="number" |
| | | v-model.trim="workForm.noticeTime" |
| | | placeholder="请输入提醒时间" |
| | | clearable |
| | | ></el-input> |
| | | <el-input class="input-add" type="number" v-model.trim="workForm.noticeTime" placeholder="请输入提醒时间" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="首次任务开始时间" prop="firstStartTime"> |
| | | <el-date-picker |
| | | class="input-add" |
| | | type="datetime" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | v-model="workForm.firstStartTime" |
| | | placeholder="请选择首次任务开始时间" |
| | | clearable |
| | | ></el-date-picker> |
| | | <el-date-picker class="input-add" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" v-model="workForm.firstStartTime" placeholder="请选择首次任务开始时间" clearable></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isShowWorkDialog = !isShowWorkDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitWork" v-throttle size="default">确 实</el-button> |
| | | </span> |
| | |
| | | import { getUserByDepartment } from '/@/assets/methods'; |
| | | |
| | | interface stateType { |
| | | disabled: Boolean; |
| | | isShowWorkDialog: Boolean; |
| | | workForm: { |
| | | checkWorkType: number | null; |
| | |
| | | const workFormRef = ref(); |
| | | const state = reactive<stateType>({ |
| | | title: '', |
| | | disabled: false, |
| | | activeName: 'inspectionPoint', |
| | | checkWorkTypeList: [], |
| | | departmentList: [], |
| | | taskUnitList: [], |
| | | userList: [], |
| | | timeType: [ |
| | | { id: 1, name: '分' }, |
| | | { id: 2, name: '小时' }, |
| | | { id: 3, name: '日' }, |
| | | { id: 4, name: '月' }, |
| | |
| | | depId: null |
| | | }, |
| | | workFormRules: { |
| | | produceDeviceName: [{ required: true, message: '请填写生产装置名称', trigger: 'blur' }], |
| | | depId: [{ required: true, message: '请选择部门', trigger: 'change' }], |
| | | riskLevel: [{ required: true, message: '请选择风险等级', trigger: 'change' }], |
| | | location: [{ required: true, message: '请填写区域位置', trigger: 'blur' }] |
| | | checkWorkType: [{ required: true, message: '请填写排查作业类型', trigger: 'change' }], |
| | | checkWorkName: [{ required: true, message: '请选择排查作业名称', trigger: 'blur' }], |
| | | taskUnitId: [{ required: true, message: '请选择任务单元', trigger: 'change' }], |
| | | execUserId: [{ required: true, message: '请选择执行人', trigger: 'change' }], |
| | | checkCycle: [{ required: true, message: '请填写排查周期', trigger: 'blur' }], |
| | | checkCycleUnit: [{ required: true, message: '请选择时间单位', trigger: 'change' }], |
| | | validTime: [{ required: true, message: '请填写有效时间', trigger: 'blur' }], |
| | | validTimeUnit: [{ required: true, message: '请选择时间单位', trigger: 'change' }], |
| | | noticeTime: [{ required: true, message: '请填写提醒时间', trigger: 'blur' }], |
| | | noticeTimeUnit: [{ required: true, message: '请选择时间单位', trigger: 'change' }], |
| | | firstStartTime: [{ required: true, message: '请填写首次排查任务开始时间', trigger: 'blur' }], |
| | | depId: [{ required: true, message: '请选择部门', trigger: 'change' }] |
| | | } |
| | | }); |
| | | |
| | | //打开模态框 |
| | | const openWorkDialog = (type: string, value: object, department: [], checkWorkTypeList: [], taskUnitList: []) => { |
| | | const openWorkDialog = async (type: string, value: object, department: [], checkWorkTypeList: [], taskUnitList: []) => { |
| | | state.isShowWorkDialog = true; |
| | | state.departmentList = department; |
| | | state.taskUnitList = JSON.parse(JSON.stringify(taskUnitList)); |
| | |
| | | workFormRef.value.clearValidate(); |
| | | }); |
| | | if (type === '新增') { |
| | | state.title = '新增生产装置'; |
| | | state.disabled = true; |
| | | state.title = '新增排查任务'; |
| | | state.workForm = { |
| | | checkWorkType: null, |
| | | checkWorkName: null, |
| | |
| | | firstStartTime: null, |
| | | depId: null |
| | | }; |
| | | } else if (type === '查看') { |
| | | state.disabled = false; |
| | | state.title = '查看排查任务'; |
| | | state.workForm.depId = JSON.parse(JSON.stringify(value)).depId; |
| | | await achieveUserList(); |
| | | state.workForm = JSON.parse(JSON.stringify(value)); |
| | | } else { |
| | | state.title = '修改生产装置'; |
| | | state.disabled = true; |
| | | state.title = '修改排查任务'; |
| | | state.workForm.depId = JSON.parse(JSON.stringify(value)).depId; |
| | | await achieveUserList(); |
| | | state.workForm = JSON.parse(JSON.stringify(value)); |
| | | } |
| | | }; |
| | |
| | | const submitWork = async () => { |
| | | workFormRef.value.validate(async (valid: Boolean) => { |
| | | if (valid) { |
| | | if (state.title === '新增生产装置') { |
| | | if (state.title === '新增排查任务') { |
| | | let res = await workApi().addWork(state.workForm); |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '生产装置新增成功', |
| | | message: '排查任务新增成功', |
| | | duration: 2000 |
| | | }); |
| | | state.isShowWorkDialog = false; |
| | |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '生产装置修改成功', |
| | | message: '排查任务修改成功', |
| | | duration: 2000 |
| | | }); |
| | | state.isShowWorkDialog = false; |
文件名从 src/views/doublePrevent/checkTaskManage/work/index.vue 修改 |
| | |
| | | {{ parseNumber(scope.row.checkWorkType, '排查类型') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="riskLevel" label="风险等级" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="location" label="区域位置" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="status" label="状态" show-overflow-tooltip> </el-table-column> |
| | | <el-table-column prop="taskUnitName" label="任务单元" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="execUserName" label="执行人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="checkCycle" label="排查周期" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <span> |
| | | {{ scope.row.checkCycle }} |
| | | </span> |
| | | <span> |
| | | {{ parseNumber(scope.row.checkWorkType, '排查周期') }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="validTime" label="排查周期" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <span> |
| | | {{ scope.row.validTime }} |
| | | </span> |
| | | <span> |
| | | {{ parseNumber(scope.row.validTimeUnit, '排查周期') }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="操作" width="150"> |
| | | <el-table-column label="操作" width="200" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" @click="onDelWork(scope.row)">删除</el-button> |
| | | <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button> |
| | | <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" :icon="Delete" @click="onDelWork(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br /> |
| | | <el-pagination |
| | | @size-change="onHandleSizeChange" |
| | | @current-change="onHandleCurrentChange" |
| | | :pager-count="5" |
| | | :page-sizes="[10, 20, 30]" |
| | | v-model:current-page="workData.params.pageIndex" |
| | | background |
| | | v-model:page-size="workData.params.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="workData.total" |
| | | class="page-position" |
| | | > |
| | | </el-pagination> |
| | | <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="workData.params.pageIndex" background v-model:page-size="workData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="workData.total" class="page-position"> </el-pagination> |
| | | <br /> |
| | | <br /> |
| | | </el-card> |
| | |
| | | import workDialog from './components/workDialog.vue'; |
| | | import { workApi } from '/@/api/doublePreventSystem/work/index.ts'; |
| | | import { departmentApi } from '/@/api/department'; |
| | | import { userApi } from '/@/api/user'; |
| | | import { Edit, Delete, View } from '@element-plus/icons-vue'; |
| | | import { checkUnitApi } from '/@/api/doublePreventSystem/checkUnit'; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | |
| | | checkWorkName: string | null; |
| | | }; |
| | | }; |
| | | taskUnitList: []; |
| | | timeType: Array<levelListState>; |
| | | taskUnitList: Array<taskUnit>; |
| | | departmentList: Array<DepartmentState>; |
| | | checkWorkTypeList: Array<levelListState>; |
| | | checkWorkStatusList: Array<levelListState>; |
| | | } |
| | | interface levelListState {} |
| | | interface levelListState { |
| | | id: number; |
| | | name: string; |
| | | } |
| | | interface DepartmentState {} |
| | | interface taskUnit { |
| | | id: number; |
| | | taskUnitName: string; |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'work', |
| | | components: { workDialog }, |
| | | components: { workDialog, Edit, Delete, View }, |
| | | setup() { |
| | | const workDialogRef = ref(); |
| | | const state = reactive<TableDataState>({ |
| | |
| | | { id: 1, name: '开启' }, |
| | | { id: 2, name: '关闭' }, |
| | | { id: 2, name: '过期' } |
| | | ], |
| | | timeType: [ |
| | | { id: 1, name: '分' }, |
| | | { id: 2, name: '小时' }, |
| | | { id: 3, name: '日' }, |
| | | { id: 4, name: '月' }, |
| | | { id: 5, name: '年' } |
| | | ] |
| | | }); |
| | | // 初始化表格数据 |
| | |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | const parseNumber = (value: string | number, type: string) => {}; |
| | | const parseNumber = (value: string | number, type: string) => { |
| | | if (type === '排查类型') { |
| | | return state.checkWorkTypeList.find((item) => item.id === value)?.name; |
| | | } else if (type === '排查周期') { |
| | | return state.timeType.find((item) => item.id == value)?.name; |
| | | } |
| | | }; |
| | | |
| | | const handleSearch = () => { |
| | | initWorkTableData(); |
| | |
| | | }); |
| | | |
| | | return { |
| | | Edit, |
| | | Delete, |
| | | View, |
| | | handleSearch, |
| | | onOpenDialogRef, |
| | | onHandleSizeChange, |
对比新文件 |
| | |
| | | <template> |
| | | <div class="system-add-menu-container"> |
| | | <el-dialog :title="title" v-model="isShowCheckDialog" width="600px"> |
| | | <el-form :model="checkForm" :rules="checkFormRules" ref="checkFormRef" size="default" label-width="120px"> |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="验收意见" prop="checkInfo"> |
| | | <el-input class="input-add" type="textarea" :rows="2" v-model.trim="checkForm.checkAcceptDesc" placeholder="请输入验收意见" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="isShowCheckDialog = !isShowCheckDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitCheck" v-throttle size="default">确 实</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog :title="title" v-model="isShowCheckInfoDialog" width="600px"> |
| | | <el-form :model="checkInfoForm" ref="checkFormRef" size="default" label-width="120px"> |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="验收意见" prop="rectifyDesc"> |
| | | <el-input class="input-add" type="textarea" :rows="2" v-model.trim="checkInfoForm.rectifyDesc" readonly></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="整改类型" prop="rectifyType"> |
| | | <el-select class="input-add" v-model="checkInfoForm.rectifyType" readonly> |
| | | <el-option v-for="item in rectifyTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="整改部门" prop="rectifyDepId"> |
| | | <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-add" v-model="checkInfoForm.rectifyDepId" readonly> </el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="整改责任人" prop="liablePersonId"> |
| | | <el-select class="input-add" v-model="checkInfoForm.liablePersonId" clearable filterable readonly> |
| | | <el-option v-for="item in userList" :key="item.uid" :label="item.username" :value="item.uid"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="整改资金" prop="dangerResult"> |
| | | <el-input class="input-add" type="number" v-model="checkInfoForm.cost" readonly> </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { getUserByDepartment } from '/@/assets/methods'; |
| | | |
| | | interface stateType { |
| | | isShowCheckDialog: Boolean; |
| | | isShowCheckInfoDialog: Boolean; |
| | | checkForm: { |
| | | id: number | null; |
| | | dangerManagerId: number | null; |
| | | checkAcceptDesc: string | null; |
| | | }; |
| | | departmentList: []; |
| | | userList: []; |
| | | rectifyTypeList: Array<rectifyType>; |
| | | checkInfoForm: { |
| | | rectifyDepId: number | null; |
| | | liablePersonId: number | null; |
| | | }; |
| | | title: string; |
| | | checkTypeList: Array<checkTypeState>; |
| | | checkFormRules: {}; |
| | | } |
| | | interface checkTypeState { |
| | | regionType: string; |
| | | id: number; |
| | | } |
| | | |
| | | interface rectifyType { |
| | | id: number; |
| | | name: string; |
| | | } |
| | | |
| | | import { reactive, toRefs, ref } from 'vue'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { hiddenCheckApi } from '/@/api/doublePreventSystem/check'; |
| | | export default { |
| | | name: 'hiddenCheckDialog', |
| | | setup(props: any, context: any) { |
| | | const checkFormRef = ref(); |
| | | const state = reactive<stateType>({ |
| | | title: '', |
| | | checkTypeList: [], |
| | | rectifyTypeList: [ |
| | | { id: 1, name: '即查即改' }, |
| | | { id: 2, name: '限期整改' } |
| | | ], |
| | | departmentList: [], |
| | | userList: [], |
| | | isShowCheckDialog: false, |
| | | isShowCheckInfoDialog: false, |
| | | checkForm: { |
| | | id: null, |
| | | dangerManagerId: null, |
| | | checkAcceptDesc: null |
| | | }, |
| | | checkInfoForm: { |
| | | rectifyDepId: null, |
| | | liablePersonId: null |
| | | }, |
| | | checkFormRules: { |
| | | checkAcceptDesc: [{ required: true, message: '请填写整改说明', trigger: 'blur' }] |
| | | } |
| | | }); |
| | | |
| | | //打开模态框 |
| | | const openCheckDialog = async (type: string, value: object, departmentList: []) => { |
| | | state.departmentList = departmentList; |
| | | if (type === '验收') { |
| | | state.title = '验收'; |
| | | state.isShowCheckDialog = true; |
| | | const checkForm = JSON.parse(JSON.stringify(value)); |
| | | state.checkForm.id = checkForm.id; |
| | | state.checkForm.dangerManagerId = checkForm.dangerManagerId; |
| | | } else { |
| | | state.title = '查看'; |
| | | state.isShowCheckInfoDialog = true; |
| | | state.checkInfoForm.rectifyDepId = JSON.parse(JSON.stringify(value)).rectifyDepId; |
| | | await achieveUserList(); |
| | | state.checkInfoForm = JSON.parse(JSON.stringify(value)); |
| | | } |
| | | }; |
| | | |
| | | //提交整改 |
| | | const submitCheck = async () => { |
| | | checkFormRef.value.validate(async (valid: Boolean) => { |
| | | if (valid) { |
| | | let res = await hiddenCheckApi().submitHiddenCheck(state.checkForm); |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '整改提交成功', |
| | | duration: 2000 |
| | | }); |
| | | state.isShowCheckDialog = false; |
| | | context.emit('refreshCheck'); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请完善基本信息' |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | const achieveUserList = async () => { |
| | | state.checkInfoForm.liablePersonId = null; |
| | | const user: unknown = await getUserByDepartment(state.checkInfoForm.rectifyDepId); |
| | | state.userList = user as []; |
| | | }; |
| | | |
| | | return { |
| | | ...toRefs(state), |
| | | checkFormRef, |
| | | submitCheck, |
| | | openCheckDialog |
| | | }; |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped></style> |
文件名从 src/views/doublePrevent/hiddenManage/hiddenCheck/index.vue 修改 |
| | |
| | | </div> |
| | | <div class="basic-line"> |
| | | <span>整改部门:</span> |
| | | <el-cascader |
| | | :options="departmentList" |
| | | :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" |
| | | placeholder="请选择部门" |
| | | clearable |
| | | filterable |
| | | class="input-box" |
| | | v-model="checkData.params.rectifyDepId" |
| | | > |
| | | </el-cascader> |
| | | <el-cascader :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-box" v-model="checkData.params.rectifyDepId"> </el-cascader> |
| | | </div> |
| | | |
| | | <el-button size="default" type="primary" class="ml10" v-throttle @click="handleSearch"> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="liablePerson" label="整改责任人" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="cost" label="整改资金" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="cost" label="验收状态" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="dangerStatus" label="验收状态" show-overflow-tooltip min-width="150px" align="center"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.dangerStatus === 0 ? 'info' : scope.row.dangerStatus === 1 ? 'primary' : scope.row.dangerStatus === 2 ? 'warning' : scope.row.dangerStatus === 4 ? 'danger' : 'success'"> |
| | | {{ parseNumber(scope.row.dangerStatus, '隐患整改状态') }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="checkAcceptPerson" label="验收人" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column label="操作" width="250" fixed="right" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" :icon="Check" @click="onOpenDialogRef('验收', scope.row)">验收</el-button> |
| | | <el-button size="small" text type="danger" :icon="Delete" @click="onDelProductionDevice(scope.row)">删除</el-button> |
| | | <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button> |
| | | <el-button size="small" text type="primary" :icon="Check" v-show="scope.row.dangerStatus === 1" @click="onOpenDialogRef('验收', scope.row)">验收</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br /> |
| | | <el-pagination |
| | | @size-change="onHandleSizeChange" |
| | | @current-change="onHandleCurrentChange" |
| | | :pager-count="5" |
| | | :page-sizes="[10, 20, 30]" |
| | | v-model:current-page="checkData.params.pageIndex" |
| | | background |
| | | v-model:page-size="checkData.params.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="checkData.total" |
| | | class="page-position" |
| | | > |
| | | </el-pagination> |
| | | <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="checkData.params.pageIndex" background v-model:page-size="checkData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="checkData.total" class="page-position"> </el-pagination> |
| | | <br /> |
| | | <br /> |
| | | </el-card> |
| | |
| | | import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue'; |
| | | import { ElMessageBox, ElMessage } from 'element-plus'; |
| | | import checkDialog from './components/checkDialog.vue'; |
| | | import { Check, Delete } from '@element-plus/icons-vue'; |
| | | import { Check, Delete, View } from '@element-plus/icons-vue'; |
| | | import { departmentApi } from '/@/api/department'; |
| | | import { productionDeviceApi } from '/@/api/doublePreventSystem/productionDevice'; |
| | | import { hiddenReportApi } from '/@/api/doublePreventSystem/report'; |
| | | import { hiddenRectifyApi } from '/@/api/doublePreventSystem/rectify'; |
| | | import { hiddenCheckApi } from '/@/api/doublePreventSystem/check'; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface TableData { |
| | |
| | | |
| | | export default defineComponent({ |
| | | name: 'check', |
| | | components: { checkDialog, Check, Delete }, |
| | | components: { checkDialog, Check, Delete, View }, |
| | | setup() { |
| | | const checkDialogRef = ref(); |
| | | const state = reactive<TableDataState>({ |
| | |
| | | { id: 9, name: '已验收' } |
| | | ] |
| | | }); |
| | | |
| | | // 初始化表格数据 |
| | | const initCheckTableData = async () => { |
| | | let res = await hiddenRectifyApi().getHiddenRectifyList(state.checkData.params); |
| | | let res = await hiddenCheckApi().getHiddenCheckList(state.checkData.params); |
| | | if (res.data.code === '200') { |
| | | state.checkData.data = res.data.data; |
| | | state.checkData.total = res.data.count; |
| | |
| | | |
| | | // 打开弹窗 |
| | | const onOpenDialogRef = (type: string, value: any) => { |
| | | checkDialogRef.value.opencheckDialog(type, value, state.departmentList); |
| | | }; |
| | | // 删除 |
| | | const onDelProductionDevice = (row: any) => { |
| | | ElMessageBox.confirm(`此操作将永久删除该巡检点:“${row.code}”,是否继续?`, '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(async () => { |
| | | let res = await hiddencheckApi().deleteHiddencheck({ id: row.id }); |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | duration: 2000, |
| | | message: '删除成功' |
| | | }); |
| | | await initCheckTableData(); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | checkDialogRef.value.openCheckDialog(type, value, state.departmentList); |
| | | }; |
| | | |
| | | const parseNumber = (value: string | number, type: string) => { |
| | |
| | | return { |
| | | Check, |
| | | Delete, |
| | | View, |
| | | parseNumber, |
| | | handleSearch, |
| | | onOpenDialogRef, |
| | | onHandleSizeChange, |
| | | onDelProductionDevice, |
| | | onHandleCurrentChange, |
| | | checkDialog, |
| | | checkDialogRef, |
文件名从 src/views/doublePrevent/hiddenManage/hiddenRectify/components/rectifyDialog.vue 修改 |
| | |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="整改说明" prop="rectifyInfo"> |
| | | <el-input |
| | | class="input-add" |
| | | type="textarea" |
| | | :rows="2" |
| | | v-model.trim="rectifyForm.rectifyInfo" |
| | | placeholder="请输入整改说明" |
| | | clearable |
| | | ></el-input> |
| | | <el-input class="input-add" type="textarea" :rows="2" v-model.trim="rectifyForm.rectifyInfo" placeholder="请输入整改说明" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="整改时间" prop="applyTime"> |
| | | <el-date-picker |
| | | type="datetime" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | class="input-add" |
| | | v-model="rectifyForm.applyTime" |
| | | placeholder="请选择整改时间" |
| | | clearable |
| | | > |
| | | </el-date-picker> |
| | | <el-date-picker type="datetime" value-format="YYYY-MM-DD HH:mm:ss" class="input-add" v-model="rectifyForm.applyTime" placeholder="请选择整改时间" clearable> </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="延期说明" prop="timeOutDesc"> |
| | | <el-input |
| | | class="input-add" |
| | | type="textarea" |
| | | :rows="2" |
| | | v-model.trim="delayForm.timeOutDesc" |
| | | placeholder="请输入延期说明" |
| | | clearable |
| | | ></el-input> |
| | | <el-input class="input-add" type="textarea" :rows="2" v-model.trim="delayForm.timeOutDesc" placeholder="请输入延期说明" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="整改期限" prop="rectifyTime"> |
| | | <el-date-picker |
| | | type="datetime" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | class="input-add" |
| | | v-model="delayForm.rectifyTime" |
| | | placeholder="请选择整改期限" |
| | | clearable |
| | | > |
| | | </el-date-picker> |
| | | <el-date-picker type="datetime" value-format="YYYY-MM-DD HH:mm:ss" class="input-add" v-model="delayForm.rectifyTime" placeholder="请选择整改期限" clearable> </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isShowDelayDialog = !isShowDelayDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitDelay" v-throttle size="default">确 实</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog :title="title" v-model="isShowCheckInfoDialog" width="600px"> |
| | | <el-form :model="checkInfoForm" ref="checkFormRef" size="default" label-width="120px"> |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="整改内容说明" prop="rectifyDesc"> |
| | | <el-input class="input-add" type="textarea" :rows="2" v-model.trim="checkInfoForm.rectifyDesc" readonly></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="整改类型" prop="rectifyType"> |
| | | <el-select class="input-add" v-model="checkInfoForm.rectifyType" readonly> |
| | | <el-option v-for="item in rectifyTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="整改部门" prop="rectifyDepId"> |
| | | <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-add" v-model="checkInfoForm.rectifyDepId" readonly> </el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="整改责任人" prop="liablePersonId"> |
| | | <el-select class="input-add" v-model="checkInfoForm.liablePersonId" clearable filterable readonly> |
| | | <el-option v-for="item in userList" :key="item.uid" :label="item.username" :value="item.uid"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="整改资金" prop="dangerResult"> |
| | | <el-input class="input-add" type="number" v-model="checkInfoForm.cost" readonly> </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { getUserByDepartment } from '/@/assets/methods'; |
| | | |
| | | interface stateType { |
| | | disabled: Boolean; |
| | | isShowRectifyDialog: Boolean; |
| | | isShowDelayDialog: Boolean; |
| | | isShowCheckInfoDialog: Boolean; |
| | | rectifyForm: { |
| | | id: number | null; |
| | | dangerManagerId: number | null; |
| | |
| | | timeOutDesc: string | null; |
| | | }; |
| | | title: string; |
| | | departmentList: []; |
| | | userList: []; |
| | | rectifyTypeList: Array<rectifyTypeState>; |
| | | rectifyFormRules: {}; |
| | | delayFormRules: {}; |
| | | checkInfoForm: { |
| | | rectifyDepId: number | null; |
| | | liablePersonId: number | null; |
| | | }; |
| | | } |
| | | interface rectifyTypeState { |
| | | regionType: string; |
| | |
| | | const rectifyFormRef = ref(); |
| | | const state = reactive<stateType>({ |
| | | title: '', |
| | | disabled: false, |
| | | rectifyTypeList: [], |
| | | departmentList: [], |
| | | userList: [], |
| | | isShowCheckInfoDialog: false, |
| | | checkInfoForm: { |
| | | rectifyDepId: null, |
| | | liablePersonId: null |
| | | }, |
| | | isShowDelayDialog: false, |
| | | isShowRectifyDialog: false, |
| | | rectifyForm: { |
| | |
| | | }); |
| | | |
| | | //打开模态框 |
| | | const openRectifyDialog = (type: string, value: object) => { |
| | | const openRectifyDialog = async (type: string, value: object, departmentList: []) => { |
| | | state.departmentList = departmentList; |
| | | if (type === '延期') { |
| | | state.title = '延期'; |
| | | state.disabled = true; |
| | | state.isShowDelayDialog = true; |
| | | const delayForm = JSON.parse(JSON.stringify(value)); |
| | | state.delayForm.id = delayForm.id; |
| | | state.delayForm.dangerManagerId = delayForm.dangerManagerId; |
| | | state.delayForm.timeOutDesc = null; |
| | | state.delayForm.rectifyTime = null; |
| | | } else if (type === '查看') { |
| | | state.title = '查看'; |
| | | state.isShowCheckInfoDialog = true; |
| | | state.checkInfoForm.rectifyDepId = JSON.parse(JSON.stringify(value)).rectifyDepId; |
| | | await achieveUserList(); |
| | | state.checkInfoForm = JSON.parse(JSON.stringify(value)); |
| | | } else { |
| | | state.disabled = true; |
| | | state.title = '整改'; |
| | | state.isShowRectifyDialog = true; |
| | | const rectifyForm = JSON.parse(JSON.stringify(value)); |
| | |
| | | }); |
| | | }; |
| | | |
| | | const achieveUserList = async () => { |
| | | state.checkInfoForm.liablePersonId = null; |
| | | const user: unknown = await getUserByDepartment(state.checkInfoForm.rectifyDepId); |
| | | state.userList = user as []; |
| | | }; |
| | | |
| | | return { |
| | | ...toRefs(state), |
| | | rectifyFormRef, |
| | | submitDelay, |
| | | achieveUserList, |
| | | submitRectify, |
| | | openRectifyDialog |
| | | }; |
| | |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .input-length { |
| | | width: 85%; |
| | | } |
| | | </style> |
| | | <style scoped></style> |
文件名从 src/views/doublePrevent/hiddenManage/hiddenRectify/index.vue 修改 |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="liablePerson" label="整改责任人" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="cost" label="整改资金" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="dangerStatus" label="隐患整改状态" show-overflow-tooltip min-width="150px"> |
| | | <el-table-column prop="dangerStatus" label="隐患整改状态" show-overflow-tooltip min-width="150px" align="center"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.dangerStatus === 0 ? 'info' : scope.row.dangerStatus === 1 ? 'primary' : scope.row.dangerStatus === 2 ? 'warning' : scope.row.dangerStatus === 4 ? 'danger' : 'success'"> |
| | | {{ parseNumber(scope.row.dangerStatus, '隐患整改状态') }} |
| | |
| | | <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip min-width="200px"></el-table-column> |
| | | <el-table-column label="操作" width="250" fixed="right" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" :icon="Check" v-show="scope.row.dangerStatus === 0" @click="onOpenDialogRef('整改', scope.row)">整改</el-button> |
| | | <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('延期', scope.row)">延期</el-button> |
| | | <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button> |
| | | <el-button size="small" text type="primary" :icon="Check" v-show="scope.row.dangerStatus === 0 || scope.row.dangerStatus === 2" @click="onOpenDialogRef('整改', scope.row)">整改</el-button> |
| | | <el-button size="small" text type="primary" :icon="Edit" v-show="scope.row.dangerStatus === 0 || scope.row.dangerStatus === 2" @click="onOpenDialogRef('延期', scope.row)">延期</el-button> |
| | | <el-button size="small" text type="danger" :icon="Delete" @click="onDelHiddenRectify(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue'; |
| | | import { ElMessageBox, ElMessage } from 'element-plus'; |
| | | import rectifyDialog from './components/rectifyDialog.vue'; |
| | | import { Edit, Delete, Check } from '@element-plus/icons-vue'; |
| | | import { Edit, Delete, Check, View } from '@element-plus/icons-vue'; |
| | | import { hiddenRectifyApi } from '/@/api/doublePreventSystem/rectify'; |
| | | import { departmentApi } from '/@/api/department'; |
| | | import { productionDeviceApi } from '/@/api/doublePreventSystem/productionDevice'; |
| | |
| | | |
| | | export default defineComponent({ |
| | | name: 'rectify', |
| | | components: { rectifyDialog, Edit, Delete }, |
| | | components: { rectifyDialog, Edit, Delete, View }, |
| | | setup() { |
| | | const rectifyDialogRef = ref(); |
| | | const state = reactive<TableDataState>({ |
| | |
| | | |
| | | // 打开弹窗 |
| | | const onOpenDialogRef = (type: string, value: any) => { |
| | | rectifyDialogRef.value.openRectifyDialog(type, value); |
| | | rectifyDialogRef.value.openRectifyDialog(type, value, state.departmentList); |
| | | }; |
| | | // 删除 |
| | | const onDelHiddenRectify = (row: any) => { |
| | |
| | | |
| | | return { |
| | | Edit, |
| | | View, |
| | | Check, |
| | | Delete, |
| | | parseNumber, |
文件名从 src/views/doublePrevent/hiddenManage/hiddenReport/components/reportDialog.vue 修改 |
| | |
| | | <el-row :gutter="25"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="隐患描述" prop="dangerDesc"> |
| | | <el-input |
| | | class="input-add" |
| | | v-model.trim="reportForm.dangerDesc" |
| | | placeholder="请输入隐患情况描述" |
| | | clearable |
| | | ></el-input> |
| | | <el-input class="input-add" v-model.trim="reportForm.dangerDesc" placeholder="请输入隐患情况描述" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="隐患名称" prop="dangerCode"> |
| | | <el-input |
| | | class="input-add" |
| | | v-model.trim="reportForm.dangerCode" |
| | | placeholder="请输入隐患名称" |
| | | clearable |
| | | ></el-input> |
| | | <el-input class="input-add" v-model.trim="reportForm.dangerCode" placeholder="请输入隐患名称" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="隐患所属部门" prop="depId"> |
| | | <el-cascader |
| | | :options="departmentList" |
| | | :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" |
| | | placeholder="请选择部门" |
| | | clearable |
| | | filterable |
| | | class="input-add" |
| | | v-model="reportForm.depId" |
| | | > |
| | | </el-cascader> |
| | | <el-cascader :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-add" v-model="reportForm.depId"> </el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="生产装置" prop="produceDeviceId"> |
| | | <el-select |
| | | class="input-add" |
| | | v-model="reportForm.produceDeviceId" |
| | | placeholder="请输入生产装置" |
| | | clearable |
| | | filterable |
| | | @change="changeUnit" |
| | | > |
| | | <el-option |
| | | v-for="item in allProduceDeviceData" |
| | | :key="item.id" |
| | | :label="item.produceDeviceName" |
| | | :value="item.id" |
| | | ></el-option> |
| | | <el-select class="input-add" v-model="reportForm.produceDeviceId" placeholder="请输入生产装置" clearable filterable @change="changeUnit"> |
| | | <el-option v-for="item in allProduceDeviceData" :key="item.id" :label="item.produceDeviceName" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="风险分析单元" prop="riskUnitId"> |
| | | <el-select |
| | | class="input-add" |
| | | v-model.trim="reportForm.riskUnitId" |
| | | placeholder="请输入风险分析单元" |
| | | clearable |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="item in safetyRiskUnitData" |
| | | :key="item.id" |
| | | :label="item.riskUnitName" |
| | | :value="item.id" |
| | | ></el-option> |
| | | <el-select class="input-add" v-model.trim="reportForm.riskUnitId" placeholder="请输入风险分析单元" clearable filterable> |
| | | <el-option v-for="item in safetyRiskUnitData" :key="item.id" :label="item.riskUnitName" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="隐患可能后果" prop="dangerResult"> |
| | | <el-select |
| | | class="input-add" |
| | | v-model="reportForm.dangerResult" |
| | | placeholder="请选择隐患可能后果" |
| | | clearable |
| | | filterable |
| | | > |
| | | <el-select class="input-add" v-model="reportForm.dangerResult" placeholder="请选择隐患可能后果" clearable filterable> |
| | | <el-option v-for="item in dangerResultList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12"> |
| | | <el-form-item label="隐患产生原因" prop="dangerReason"> |
| | | <el-input |
| | | class="input-add" |
| | | type="textarea" |
| | | :rows="2" |
| | | style="padding-bottom: 10px" |
| | | v-model.trim="reportForm.dangerReason" |
| | | placeholder="请输入隐患产生原因" |
| | | ></el-input> |
| | | <el-input class="input-add" type="textarea" :rows="2" style="padding-bottom: 10px" v-model.trim="reportForm.dangerReason" placeholder="请输入隐患产生原因"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="整改类型" prop="rectifyType"> |
| | | <el-select class="input-add" v-model="reportForm.rectifyType" placeholder="请选择整改类型" clearable filterable> |
| | | <el-option |
| | | v-for="item in rectifyTypeList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> </el-select |
| | | ></el-form-item> |
| | | <el-option v-for="item in rectifyTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="整改期限" prop="rectifyTime"> |
| | | <el-date-picker |
| | | type="datetime" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | class="input-add" |
| | | v-model="reportForm.rectifyTime" |
| | | placeholder="请选择整改期限" |
| | | clearable |
| | | > |
| | | </el-date-picker> |
| | | <el-date-picker type="datetime" value-format="YYYY-MM-DD HH:mm:ss" class="input-add" v-model="reportForm.rectifyTime" placeholder="请选择整改期限" clearable> </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="整改部门" prop="rectifyDepId"> |
| | | <el-cascader |
| | | @change="achieveUserList" |
| | | :options="departmentList" |
| | | :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" |
| | | placeholder="请选择部门" |
| | | clearable |
| | | filterable |
| | | class="input-add" |
| | | v-model="reportForm.rectifyDepId" |
| | | > |
| | | </el-cascader> |
| | | <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-add" v-model="reportForm.rectifyDepId"> </el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="整改责任人" prop="liablePersonId"> |
| | | <el-select |
| | | class="input-add" |
| | | v-model="reportForm.liablePersonId" |
| | | placeholder="请选择整改责任人" |
| | | clearable |
| | | filterable |
| | | > |
| | | <el-select class="input-add" v-model="reportForm.liablePersonId" placeholder="请选择整改责任人" clearable filterable> |
| | | <el-option v-for="item in userList" :key="item.uid" :label="item.username" :value="item.uid"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12"> |
| | | <el-form-item label="整改措施" prop="rectifyDesc"> |
| | | <el-input |
| | | class="input-add" |
| | | type="textarea" |
| | | :rows="2" |
| | | style="padding-bottom: 10px" |
| | | v-model.trim="reportForm.rectifyDesc" |
| | | placeholder="请输入整改措施" |
| | | ></el-input> |
| | | <el-input class="input-add" type="textarea" :rows="2" style="padding-bottom: 10px" v-model.trim="reportForm.rectifyDesc" placeholder="请输入整改措施"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-tabs> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isShowReportDialog = !isShowReportDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitReport" v-throttle size="default">确 实</el-button> |
| | | </span> |
| | |
| | | reportFormRef.value.clearValidate(); |
| | | }); |
| | | if (type === '新增') { |
| | | state.disabled = false; |
| | | state.disabled = true; |
| | | state.title = '新增隐患'; |
| | | state.reportForm = { |
| | | dangerDesc: null, |
| | |
| | | cost: null, |
| | | rectifyDesc: null |
| | | }; |
| | | } else if (type === '查看') { |
| | | state.title = '修改隐患'; |
| | | state.disabled = false; |
| | | state.reportForm.rectifyDepId = JSON.parse(JSON.stringify(value)).rectifyDepId; |
| | | achieveUserList(); |
| | | state.reportForm = JSON.parse(JSON.stringify(value)); |
| | | } else { |
| | | state.title = '修改隐患'; |
| | | state.disabled = true; |
文件名从 src/views/doublePrevent/hiddenManage/hiddenReport/index.vue 修改 |
| | |
| | | {{ parseNumber(scope.row.dangerSource, '隐患来源') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dangerLevel" label="隐患等级" show-overflow-tooltip min-width="150px"> |
| | | <el-table-column prop="dangerLevel" label="隐患等级" show-overflow-tooltip min-width="150px" align="center"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.dangerLevel === 1 ? 'warning' : 'danger'"> |
| | | {{ parseNumber(scope.row.dangerLevel, '隐患等级') }} |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dangerReason" label="隐患产生原因分析" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="dangerResult" label="隐患可能导致后果" show-overflow-tooltip min-width="150px"> |
| | | <el-table-column prop="dangerResult" label="隐患可能导致后果" show-overflow-tooltip min-width="150px" align="center"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.dangerResult === 1 ? 'success' : scope.row.dangerResult === 2 ? 'info' : scope.row.dangerResult === 3 ? 'warning' : 'danger'"> {{ parseNumber(scope.row.dangerResult, '隐患可能导致后果') }}</el-tag> |
| | | </template> |
| | |
| | | <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip min-width="200px"></el-table-column> |
| | | <el-table-column label="操作" width="250" fixed="right" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button> |
| | | <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" :icon="Delete" @click="onDelProductionDevice(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue'; |
| | | import { ElMessageBox, ElMessage } from 'element-plus'; |
| | | import reportDialog from './components/reportDialog.vue'; |
| | | import { Edit, Delete } from '@element-plus/icons-vue'; |
| | | import { Edit, Delete, View } from '@element-plus/icons-vue'; |
| | | import { hiddenReportApi } from '/@/api/doublePreventSystem/report'; |
| | | import { departmentApi } from '/@/api/department'; |
| | | import { productionDeviceApi } from '/@/api/doublePreventSystem/productionDevice'; |
| | |
| | | |
| | | export default defineComponent({ |
| | | name: 'report', |
| | | components: { reportDialog, Edit, Delete }, |
| | | components: { reportDialog, Edit, Delete, View }, |
| | | setup() { |
| | | const reportDialogRef = ref(); |
| | | const state = reactive<TableDataState>({ |
| | |
| | | |
| | | return { |
| | | Edit, |
| | | View, |
| | | Delete, |
| | | parseNumber, |
| | | handleSearch, |
| | |
| | | <template> |
| | | <div class="system-add-menu-container"> |
| | | <el-dialog :title="title" v-model="isRiskControlMeasureDialog" width="600px"> |
| | | <el-form |
| | | :model="riskControlMeasureForm" |
| | | :rules="riskControlMeasureFormRules" |
| | | ref="riskControlMeasureFormRef" |
| | | size="default" |
| | | label-width="160px" |
| | | > |
| | | <el-form :model="riskControlMeasureForm" :rules="riskControlMeasureFormRules" ref="riskControlMeasureFormRef" size="default" label-width="160px"> |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="风险事件名称" prop="riskEventId"> |
| | | <el-select class="input-length" v-model="riskControlMeasureForm.riskEventId" placeholder="请选择风险事件" clearable> |
| | | <el-option |
| | | v-for="item in allSafetyRiskEventData" |
| | | :key="item.id" |
| | | :label="item.riskEventName" |
| | | :value="item.id" |
| | | ></el-option> |
| | | <el-option v-for="item in allSafetyRiskEventData" :key="item.id" :label="item.riskEventName" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="风险措施编码" prop="controlMeasureCode"> |
| | | <el-input |
| | | class="input-length" |
| | | v-model.trim="riskControlMeasureForm.controlMeasureCode" |
| | | placeholder="请输入风险措施编码" |
| | | ></el-input> |
| | | <el-input class="input-length" v-model.trim="riskControlMeasureForm.controlMeasureCode" placeholder="请输入风险措施编码"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="管控内容" prop="checkContent"> |
| | | <el-input |
| | | class="input-length" |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model.trim="riskControlMeasureForm.checkContent" |
| | | placeholder="请输入管控内容" |
| | | clearable |
| | | > |
| | | </el-input> |
| | | <el-input class="input-length" type="textarea" :rows="3" v-model.trim="riskControlMeasureForm.checkContent" placeholder="请输入管控内容" clearable> </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="管控措施分类1" prop="classify1"> |
| | | <el-select |
| | | class="input-length" |
| | | v-model.trim="riskControlMeasureForm.classify1" |
| | | @change="changeClassifyTwoList" |
| | | placeholder="请选择管控方式" |
| | | clearable |
| | | > |
| | | <el-select class="input-length" v-model.trim="riskControlMeasureForm.classify1" @change="changeClassifyTwoList" placeholder="请选择管控方式" clearable> |
| | | <el-option v-for="item in classifyOneList" :key="item.id" :label="item.riskMeasureName" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="管控措施分类3" prop="classify3"> |
| | | <el-input class="input-length" v-model.trim="riskControlMeasureForm.classify3" placeholder="请选择管控方式" clearable> |
| | | </el-input> |
| | | <el-input class="input-length" v-model.trim="riskControlMeasureForm.classify3" placeholder="请选择管控方式" clearable> </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="措施说明" prop="measureDesc"> |
| | | <el-input |
| | | class="input-length" |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model.trim="riskControlMeasureForm.measureDesc" |
| | | placeholder="请输入措施说明" |
| | | clearable |
| | | > |
| | | </el-input> |
| | | <el-input class="input-length" type="textarea" :rows="3" v-model.trim="riskControlMeasureForm.measureDesc" placeholder="请输入措施说明" clearable> </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isRiskControlMeasureDialog = !isRiskControlMeasureDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitRiskControlMeasureDialog" v-throttle size="default">确 实</el-button> |
| | | </span> |
| | |
| | | <script lang="ts"> |
| | | interface stateType { |
| | | isRiskControlMeasureDialog: Boolean; |
| | | disabled: Boolean; |
| | | riskControlMeasureForm: { |
| | | riskEventId: number | null; |
| | | controlMeasureCode: string | null; |
| | |
| | | const riskControlMeasureFormRef = ref(); |
| | | const state = reactive<stateType>({ |
| | | title: '', |
| | | disabled: false, |
| | | controlTypeList: [ |
| | | { id: 1, name: '自动化监控' }, |
| | | { id: 2, name: '隐患排查' } |
| | |
| | | riskControlMeasureFormRef.value.clearValidate(); |
| | | }); |
| | | if (type === '新增') { |
| | | state.disabled = true; |
| | | state.title = '新增风险管控措施'; |
| | | state.riskControlMeasureForm = { |
| | | riskEventId: null, |
| | |
| | | classify3: null, |
| | | measureDesc: null |
| | | }; |
| | | } else if (type === '查看') { |
| | | state.disabled = false; |
| | | state.title = '修改风险管控措施'; |
| | | state.riskControlMeasureForm = JSON.parse(JSON.stringify(value)); |
| | | } else { |
| | | state.disabled = true; |
| | | state.title = '修改风险管控措施'; |
| | | state.riskControlMeasureForm = JSON.parse(JSON.stringify(value)); |
| | | } |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="操作" width="150"> |
| | | <el-table-column label="操作" width="200" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" @click="onDelRiskControlMeasure(scope.row)">删除</el-button> |
| | | <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button> |
| | | <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" :icon="Delete" @click="onDelRiskControlMeasure(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br /> |
| | | <el-pagination |
| | | @size-change="onHandleSizeChange" |
| | | @current-change="onHandleCurrentChange" |
| | | class="page-position" |
| | | :pager-count="5" |
| | | :page-sizes="[10, 20, 30]" |
| | | v-model:current-page="riskControlMeasureData.params.pageIndex" |
| | | background |
| | | v-model:page-size="riskControlMeasureData.params.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="riskControlMeasureData.total" |
| | | > |
| | | </el-pagination> |
| | | <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="page-position" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="riskControlMeasureData.params.pageIndex" background v-model:page-size="riskControlMeasureData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="riskControlMeasureData.total"> </el-pagination> |
| | | <br /> |
| | | <br /> |
| | | </el-card> |
| | |
| | | import riskControlMeasureDialog from './components/riskControlMeasureDialog.vue'; |
| | | import { riskControlMeasureApi } from '/@/api/doublePreventSystem/riskControlMeasure/index.ts'; |
| | | import { safetyRiskEventApi } from '/@/api/doublePreventSystem/safetyRiskEvent'; |
| | | import { Edit, Delete, View } from '@element-plus/icons-vue'; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface TableData { |
| | |
| | | |
| | | export default { |
| | | name: 'riskControlMeasure', |
| | | components: { riskControlMeasureDialog }, |
| | | components: { riskControlMeasureDialog, Edit, Delete, View }, |
| | | setup() { |
| | | const riskControlMeasureDialogRef = ref(); |
| | | const state = reactive<TableDataState>({ |
| | |
| | | |
| | | const dateFormat = (fmt: any, date: any) => { |
| | | date = new Date(date); |
| | | fmt = |
| | | date.getFullYear() + |
| | | '-' + |
| | | (date.getMonth() + 1) + |
| | | '-' + |
| | | date.getDate() + |
| | | ' ' + |
| | | date.getHours().toString() + |
| | | ':' + |
| | | (date.getMinutes().toString() === '0' ? '00' : date.getMinutes().toString()) + |
| | | ':' + |
| | | (date.getSeconds().toString() === '0' ? '00' : date.getMinutes().toString()); |
| | | fmt = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours().toString() + ':' + (date.getMinutes().toString() === '0' ? '00' : date.getMinutes().toString()) + ':' + (date.getSeconds().toString() === '0' ? '00' : date.getMinutes().toString()); |
| | | return fmt; |
| | | }; |
| | | |
| | |
| | | |
| | | // 打开生产装置弹窗 |
| | | const onOpenDialogRef = (type: string, value: any) => { |
| | | riskControlMeasureDialogRef.value.openSafetyRiskEventDialog( |
| | | type, |
| | | value, |
| | | state.allSafetyRiskEventData, |
| | | state.classifyOneList, |
| | | state.classifyTwoList |
| | | ); |
| | | riskControlMeasureDialogRef.value.openSafetyRiskEventDialog(type, value, state.allSafetyRiskEventData, state.classifyOneList, state.classifyTwoList); |
| | | }; |
| | | |
| | | // 删除角色 |
| | |
| | | }); |
| | | |
| | | return { |
| | | Edit, |
| | | Delete, |
| | | View, |
| | | dateFormat, |
| | | handleSearch, |
| | | parseNumber, |
| | |
| | | <template> |
| | | <div class="system-add-menu-container"> |
| | | <el-dialog :title="title" v-model="isShowProductionDeviceDialog" width="600px"> |
| | | <el-form |
| | | :model="productionDeviceForm" |
| | | :rules="productionDeviceFormRules" |
| | | ref="productionDeviceFormRef" |
| | | size="default" |
| | | label-width="120px" |
| | | > |
| | | <el-dialog :title="title" v-model="isShowProductionDeviceDialog" width="600px" :close-on-click-modal="false"> |
| | | <el-form :model="productionDeviceForm" :rules="productionDeviceFormRules" ref="productionDeviceFormRef" size="default" label-width="120px"> |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="生产装置名称" prop="produceDeviceName"> |
| | | <el-input |
| | | class="input-length" |
| | | v-model.trim="productionDeviceForm.produceDeviceName" |
| | | placeholder="请输入生产装置名称" |
| | | clearable |
| | | ></el-input> |
| | | <el-input class="input-length" v-model.trim="productionDeviceForm.produceDeviceName" placeholder="请输入生产装置名称" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="所属部门" prop="depId"> |
| | | <el-cascader |
| | | :options="departmentList" |
| | | :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" |
| | | placeholder="请选择部门" |
| | | clearable |
| | | filterable |
| | | style="width: 85%" |
| | | v-model="productionDeviceForm.depId" |
| | | > |
| | | </el-cascader> |
| | | <el-cascader :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable style="width: 85%" v-model="productionDeviceForm.depId"> </el-cascader> |
| | | <!-- <el-select class="input-length" v-model="productionDeviceForm.depName" placeholder="请选择所属部门" clearable filterable></el-select>--> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="风险等级" prop="riskLevel"> |
| | | <el-select |
| | | class="input-length" |
| | | v-model="productionDeviceForm.riskLevel" |
| | | placeholder="请选择风险等级" |
| | | clearable |
| | | filterable |
| | | > |
| | | <el-select class="input-length" v-model="productionDeviceForm.riskLevel" placeholder="请选择风险等级" clearable filterable> |
| | | <el-option v-for="item in levelList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="区域位置" prop="location"> |
| | | <el-input |
| | | class="input-length" |
| | | v-model.trim="productionDeviceForm.location" |
| | | type="textarea" |
| | | placeholder="请输入区域位置" |
| | | maxlength="150" |
| | | ></el-input> |
| | | <el-input class="input-length" v-model.trim="productionDeviceForm.location" type="textarea" placeholder="请输入区域位置" maxlength="150"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isShowProductionDeviceDialog = !isShowProductionDeviceDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitProductionDevice" v-throttle size="default">确 实</el-button> |
| | | </span> |
| | |
| | | <script lang="ts"> |
| | | interface stateType { |
| | | isShowProductionDeviceDialog: Boolean; |
| | | disabled: Boolean; |
| | | productionDeviceForm: { |
| | | produceDeviceName: string; |
| | | depId: number | null; |
| | |
| | | const productionDeviceFormRef = ref(); |
| | | const state = reactive<stateType>({ |
| | | title: '', |
| | | disabled: false, |
| | | departmentList: [], |
| | | isShowProductionDeviceDialog: false, |
| | | levelList: [ |
| | |
| | | productionDeviceFormRef.value.clearValidate(); |
| | | }); |
| | | if (type === '新增') { |
| | | state.disabled = true; |
| | | state.title = '新增生产装置'; |
| | | state.productionDeviceForm = { |
| | | produceDeviceName: '', |
| | |
| | | riskLevel: null, |
| | | location: '' |
| | | }; |
| | | } else if (type === '查看') { |
| | | state.disabled = false; |
| | | state.title = '查看生产装置'; |
| | | state.productionDeviceForm = JSON.parse(JSON.stringify(value)); |
| | | } else { |
| | | state.disabled = true; |
| | | state.title = '修改生产装置'; |
| | | state.productionDeviceForm = JSON.parse(JSON.stringify(value)); |
| | | } |
| | |
| | | </div> |
| | | <div class="basic-line"> |
| | | <span>部门:</span> |
| | | <el-cascader |
| | | :options="departmentList" |
| | | :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" |
| | | placeholder="请选择部门" |
| | | clearable |
| | | filterable |
| | | class="input-box" |
| | | v-model="productionDeviceData.params.depId" |
| | | > |
| | | </el-cascader> |
| | | <el-cascader :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-box" v-model="productionDeviceData.params.depId"> </el-cascader> |
| | | </div> |
| | | <el-button size="default" type="primary" class="ml10" v-throttle @click="handleSearch"> |
| | | <el-icon> |
| | |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | | <el-table-column prop="produceDeviceName" label="生产装置名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="depName" label="所属部门" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="riskLevel" label="风险等级" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="riskLevel" label="风险等级" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.riskLevel === 1 ? 'success' : scope.row.riskLevel === 2 ? 'info' : scope.row.riskLevel === 3 ? 'warning' : 'danger'"> |
| | | {{ parseNumber(scope.row.riskLevel, '风险等级') }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="location" label="区域位置" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="status" label="状态" show-overflow-tooltip> </el-table-column> |
| | | <el-table-column prop="status" label="状态" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.status === 1 ? 'primary' : 'warning'"> |
| | | {{ parseNumber(scope.row.status, '状态') }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="操作" width="150"> |
| | | <el-table-column label="操作" width="200" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" @click="onDelProductionDevice(scope.row)">删除</el-button> |
| | | <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button> |
| | | <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" :icon="Delete" @click="onDelProductionDevice(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br /> |
| | | <el-pagination |
| | | @size-change="onHandleSizeChange" |
| | | @current-change="onHandleCurrentChange" |
| | | :pager-count="5" |
| | | :page-sizes="[10, 20, 30]" |
| | | v-model:current-page="productionDeviceData.params.pageIndex" |
| | | background |
| | | v-model:page-size="productionDeviceData.params.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="productionDeviceData.total" |
| | | class="page-position" |
| | | > |
| | | </el-pagination> |
| | | <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="productionDeviceData.params.pageIndex" background v-model:page-size="productionDeviceData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="productionDeviceData.total" class="page-position"> </el-pagination> |
| | | <br /> |
| | | <br /> |
| | | </el-card> |
| | |
| | | import productionDeviceDialog from './components/productionDeviceDialog.vue'; |
| | | import { productionDeviceApi } from '/@/api/doublePreventSystem/productionDevice/index.ts'; |
| | | import { departmentApi } from '/@/api/department'; |
| | | import { Edit, Delete, View } from '@element-plus/icons-vue'; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface TableData { |
| | |
| | | }; |
| | | }; |
| | | departmentList: Array<DepartmentState>; |
| | | stateList: Array<levelListState>; |
| | | levelList: Array<levelListState>; |
| | | } |
| | | interface levelListState {} |
| | | interface levelListState { |
| | | id: number; |
| | | name: string; |
| | | } |
| | | interface DepartmentState {} |
| | | |
| | | export default { |
| | | name: 'productionDevice', |
| | | components: { productionDeviceDialog }, |
| | | components: { productionDeviceDialog, Edit, Delete, View }, |
| | | setup() { |
| | | const productionDeviceDialogRef = ref(); |
| | | const state = reactive<TableDataState>({ |
| | |
| | | { id: 2, name: '一般风险' }, |
| | | { id: 3, name: '较大风险' }, |
| | | { id: 4, name: '重大风险' } |
| | | ], |
| | | stateList: [ |
| | | { id: 1, name: '使用中' }, |
| | | { id: 2, name: '已弃用' } |
| | | ] |
| | | }); |
| | | // 初始化表格数据 |
| | |
| | | getDepartmentData(); |
| | | }); |
| | | |
| | | const parseNumber = (value: string | number, type: string) => { |
| | | if (type === '风险等级') { |
| | | return state.levelList.find((item) => item.id === value)?.name; |
| | | } else if (type === '状态') { |
| | | return state.stateList.find((item) => item.id === value)?.name; |
| | | } |
| | | }; |
| | | |
| | | return { |
| | | Edit, |
| | | Delete, |
| | | View, |
| | | parseNumber, |
| | | handleSearch, |
| | | onOpenDialogRef, |
| | | onHandleSizeChange, |
| | |
| | | <template> |
| | | <div class="system-add-menu-container"> |
| | | <el-dialog :title="title" v-model="isSafetyRiskEventDialog" width="600px"> |
| | | <el-form |
| | | :model="safetyRiskEventForm" |
| | | :rules="safetyRiskEventFormRules" |
| | | ref="safetyRiskAnalyseUnitFormRef" |
| | | size="default" |
| | | label-width="180px" |
| | | > |
| | | <el-dialog :title="title" v-model="isSafetyRiskEventDialog" width="600px" :close-on-click-modal="false"> |
| | | <el-form :model="safetyRiskEventForm" :rules="safetyRiskEventFormRules" ref="safetyRiskAnalyseUnitFormRef" size="default" label-width="180px"> |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="安全风险分析单元名称" prop="riskUnitId"> |
| | | <el-select class="input-length" v-model="safetyRiskEventForm.riskUnitId" placeholder="请输入安全风险分析单元名称"> |
| | | <el-option |
| | | v-for="item in allSafetyRiskEventData" |
| | | :key="item.id" |
| | | :label="item.riskUnitName" |
| | | :value="item.id" |
| | | ></el-option> |
| | | <el-option v-for="item in allSafetyRiskEventData" :key="item.id" :label="item.riskUnitName" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="安全风险事件名称" prop="riskEventName"> |
| | | <el-input |
| | | class="input-length" |
| | | v-model.trim="safetyRiskEventForm.riskEventName" |
| | | placeholder="请输入生产装置名称" |
| | | clearable |
| | | ></el-input> |
| | | <el-input class="input-length" v-model.trim="safetyRiskEventForm.riskEventName" placeholder="请输入生产装置名称" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isSafetyRiskEventDialog = !isSafetyRiskEventDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitSafetyRiskEventDialog" v-throttle size="default">确 实</el-button> |
| | | </span> |
| | |
| | | <script lang="ts"> |
| | | interface stateType { |
| | | isSafetyRiskEventDialog: Boolean; |
| | | disabled: Boolean; |
| | | safetyRiskEventForm: { |
| | | riskEventName: string | null; |
| | | riskUnitId: number | null; |
| | |
| | | const safetyRiskAnalyseUnitFormRef = ref(); |
| | | const state = reactive<stateType>({ |
| | | title: '', |
| | | disabled: false, |
| | | departmentList: [], |
| | | allSafetyRiskEventData: [], |
| | | isSafetyRiskEventDialog: false, |
| | |
| | | }); |
| | | |
| | | //打开模态框 |
| | | const openSafetyRiskEventDialog = (type: string, value: object, department: [], allSafetyRiskEventData: []) => { |
| | | const openSafetyRiskEventDialog = (type: string, value: object, allSafetyRiskEventData: []) => { |
| | | state.isSafetyRiskEventDialog = true; |
| | | state.allSafetyRiskEventData = JSON.parse(JSON.stringify(allSafetyRiskEventData)); |
| | | state.departmentList = department; |
| | | setTimeout(() => { |
| | | safetyRiskAnalyseUnitFormRef.value.clearValidate(); |
| | | }); |
| | | if (type === '新增') { |
| | | state.disabled = true; |
| | | state.title = '新增风险事件'; |
| | | state.safetyRiskEventForm = { |
| | | riskEventName: null, |
| | | riskUnitId: null |
| | | }; |
| | | } else if (type === '查看') { |
| | | state.disabled = false; |
| | | state.title = '查看风险事件'; |
| | | state.safetyRiskEventForm = JSON.parse(JSON.stringify(value)); |
| | | } else { |
| | | state.disabled = true; |
| | | state.title = '修改风险事件'; |
| | | state.safetyRiskEventForm = JSON.parse(JSON.stringify(value)); |
| | | } |
| | |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="操作" width="150"> |
| | | <el-table-column label="操作" width="200" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" @click="onDelSafetyRiskEvent(scope.row)">删除</el-button> |
| | | <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button> |
| | | <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" :icon="Delete" @click="onDelSafetyRiskEvent(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br /> |
| | | <el-pagination |
| | | @size-change="onHandleSizeChange" |
| | | @current-change="onHandleCurrentChange" |
| | | class="page-position" |
| | | :pager-count="5" |
| | | :page-sizes="[10, 20, 30]" |
| | | v-model:current-page="safetyRiskEventData.params.pageIndex" |
| | | background |
| | | v-model:page-size="safetyRiskEventData.params.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="safetyRiskEventData.total" |
| | | > |
| | | </el-pagination> |
| | | <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="page-position" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="safetyRiskEventData.params.pageIndex" background v-model:page-size="safetyRiskEventData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="safetyRiskEventData.total"> </el-pagination> |
| | | <br /> |
| | | <br /> |
| | | </el-card> |
| | |
| | | import { safetyRiskEventApi } from '/@/api/doublePreventSystem/safetyRiskEvent/index.ts'; |
| | | import { departmentApi } from '/@/api/department'; |
| | | import { safetyRiskAnalyseUnitApi } from '/@/api/doublePreventSystem/safetyRiskAnalyseUnit'; |
| | | import { Edit, Delete, View } from '@element-plus/icons-vue'; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface TableData { |
| | |
| | | |
| | | export default { |
| | | name: 'productionDevice', |
| | | components: { safetyRiskEventDialog }, |
| | | components: { safetyRiskEventDialog, Edit, Delete, View }, |
| | | setup() { |
| | | const safetyRiskEventDialogRef = ref(); |
| | | const state = reactive<TableDataState>({ |
| | |
| | | const getAllSafetyRiskEventData = async () => { |
| | | let res = await safetyRiskAnalyseUnitApi().getAllSafetyRiskAnalyseUnitList(); |
| | | if (res.data.code === '200') { |
| | | state.allSafetyRiskEventData = JSON.parse(JSON.stringify(res.data.data)); |
| | | state.allSafetyRiskEventData = res.data.data; |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | }); |
| | | |
| | | return { |
| | | Edit, |
| | | Delete, |
| | | View, |
| | | handleSearch, |
| | | onOpenDialogRef, |
| | | onHandleSizeChange, |
| | |
| | | <el-row :gutter="25"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="隐患描述" prop="dangerDesc"> |
| | | <el-input |
| | | class="input-add" |
| | | v-model.trim="reportForm.dangerDesc" |
| | | placeholder="请输入隐患情况描述" |
| | | clearable |
| | | ></el-input> |
| | | <el-input class="input-add" v-model.trim="reportForm.dangerDesc" placeholder="请输入隐患情况描述" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="隐患所属部门" prop="depId"> |
| | | <el-cascader |
| | | :options="departmentList" |
| | | :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" |
| | | placeholder="请选择部门" |
| | | clearable |
| | | filterable |
| | | class="input-add" |
| | | v-model="reportForm.depId" |
| | | > |
| | | </el-cascader> |
| | | <el-cascader :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-add" v-model="reportForm.depId"> </el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="生产装置" prop="produceDeviceId"> |
| | | <el-select |
| | | class="input-add" |
| | | v-model="reportForm.produceDeviceId" |
| | | placeholder="请输入生产装置" |
| | | clearable |
| | | filterable |
| | | @change="changeUnit" |
| | | > |
| | | <el-option |
| | | v-for="item in allProduceDeviceData" |
| | | :key="item.id" |
| | | :label="item.produceDeviceName" |
| | | :value="item.id" |
| | | ></el-option> |
| | | <el-select class="input-add" v-model="reportForm.produceDeviceId" placeholder="请输入生产装置" clearable filterable @change="changeUnit"> |
| | | <el-option v-for="item in allProduceDeviceData" :key="item.id" :label="item.produceDeviceName" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="风险分析单元" prop="riskUnitId"> |
| | | <el-select |
| | | class="input-add" |
| | | v-model.trim="reportForm.riskUnitId" |
| | | placeholder="请输入风险分析单元" |
| | | clearable |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="item in safetyRiskUnitData" |
| | | :key="item.id" |
| | | :label="item.riskUnitName" |
| | | :value="item.id" |
| | | ></el-option> |
| | | <el-select class="input-add" v-model.trim="reportForm.riskUnitId" placeholder="请输入风险分析单元" clearable filterable> |
| | | <el-option v-for="item in safetyRiskUnitData" :key="item.id" :label="item.riskUnitName" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="隐患可能后果" prop="dangerResult"> |
| | | <el-select |
| | | class="input-add" |
| | | v-model="reportForm.dangerResult" |
| | | placeholder="请选择隐患可能后果" |
| | | clearable |
| | | filterable |
| | | > |
| | | <el-select class="input-add" v-model="reportForm.dangerResult" placeholder="请选择隐患可能后果" clearable filterable> |
| | | <el-option v-for="item in dangerResultList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12"> |
| | | <el-form-item label="隐患产生原因" prop="dangerReason"> |
| | | <el-input |
| | | class="input-add" |
| | | type="textarea" |
| | | :rows="2" |
| | | style="padding-bottom: 10px" |
| | | v-model.trim="reportForm.dangerReason" |
| | | placeholder="请输入隐患产生原因" |
| | | ></el-input> |
| | | <el-input class="input-add" type="textarea" :rows="2" style="padding-bottom: 10px" v-model.trim="reportForm.dangerReason" placeholder="请输入隐患产生原因"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="整改类型" prop="dangerResult"> |
| | | <el-select class="input-add" v-model="reportForm.dangerResult" placeholder="请选择整改类型" clearable filterable> |
| | | <el-option |
| | | v-for="item in RFIDList" |
| | | :key="item.id" |
| | | :label="item.rfidName" |
| | | :value="item.id" |
| | | ></el-option> </el-select |
| | | <el-select class="input-add" v-model="reportForm.dangerResult" placeholder="请选择整改类型" clearable filterable> <el-option v-for="item in RFIDList" :key="item.id" :label="item.rfidName" :value="item.id"></el-option> </el-select |
| | | ></el-form-item> </el-col |
| | | ><el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="整改责任人" prop="dangerResult"> |
| | | <el-select |
| | | class="input-add" |
| | | v-model="reportForm.dangerResult" |
| | | placeholder="请选择整改责任人" |
| | | clearable |
| | | filterable |
| | | > |
| | | <el-select class="input-add" v-model="reportForm.dangerResult" placeholder="请选择整改责任人" clearable filterable> |
| | | <el-option v-for="item in RFIDList" :key="item.id" :label="item.rfidName" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12"> |
| | | <el-form-item label="整改内容" prop="rectifyDesc"> |
| | | <el-input |
| | | class="input-add" |
| | | type="textarea" |
| | | :rows="2" |
| | | style="padding-bottom: 10px" |
| | | v-model.trim="reportForm.rectifyDesc" |
| | | placeholder="请输入整改内容" |
| | | ></el-input> |
| | | <el-input class="input-add" type="textarea" :rows="2" style="padding-bottom: 10px" v-model.trim="reportForm.rectifyDesc" placeholder="请输入整改内容"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | }; |
| | | |
| | | const changeUnit = () => { |
| | | debugger; |
| | | state.reportForm.riskUnitId = null; |
| | | state.safetyRiskUnitData = state.allSafetyRiskUnitData.filter((item) => item.produceDeviceId === state.reportForm.produceDeviceId); |
| | | }; |
文件名从 src/views/doublePrevent/riskLevel/check/components/checkUnitDialog.vue 修改 |
| | |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="任务单元名称" prop="taskUnitName"> |
| | | <el-input |
| | | class="input-length" |
| | | v-model.trim="checkUnitForm.taskUnitName" |
| | | placeholder="请输入任务单元名称" |
| | | clearable |
| | | ></el-input> |
| | | <el-input class="input-length" v-model.trim="checkUnitForm.taskUnitName" placeholder="请输入任务单元名称" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="任务单元说明" prop="note"> |
| | | <el-input |
| | | class="input-length" |
| | | v-model.trim="checkUnitForm.note" |
| | | placeholder="请输入任务单元说明" |
| | | clearable |
| | | ></el-input> |
| | | <el-input class="input-length" v-model.trim="checkUnitForm.note" placeholder="请输入任务单元说明" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isShowCheckUnitDialog = !isShowCheckUnitDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitCheckUnit" v-throttle size="default">确 实</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog title="选择风险管控措施" v-model="isShowSelectMeasureControlDialog" append-to-body :close-on-click-modal="false" width="70%"> |
| | | <select-measure-control-dialog |
| | | ref="SelectMeasureControlDialogRef" |
| | | @receiveRiskControlId="receiveRiskControlId" |
| | | ></select-measure-control-dialog> |
| | | <select-measure-control-dialog ref="SelectMeasureControlDialogRef" @receiveRiskControlId="receiveRiskControlId"></select-measure-control-dialog> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import SelectMeasureControlDialog from '/@/views/doublePrevent/riskLevel/checkUnit/components/selectMeasureControlDialog.vue'; |
| | | import SelectMeasureControlDialog from '/@/views/doublePrevent/riskLevel/riskCheckUnit/components/selectMeasureControlDialog.vue'; |
| | | import { reactive, toRefs, ref } from 'vue'; |
| | | import { checkUnitApi } from '/@/api/doublePreventSystem/checkUnit'; |
| | | import { ElMessage } from 'element-plus'; |
| | | interface stateType { |
| | | isShowCheckUnitDialog: Boolean; |
| | | disabled: Boolean; |
| | | isShowSelectMeasureControlDialog: Boolean; |
| | | checkUnitForm: { |
| | | taskUnitName: string | null; |
| | |
| | | const riskControlMeasureDialogRef = ref(); |
| | | const state = reactive<stateType>({ |
| | | title: '', |
| | | disabled: false, |
| | | activeName: 'checkUnit', |
| | | measureData: [], |
| | | checkUnitData: [], |
| | |
| | | checkUnitFormRef.value.clearValidate(); |
| | | }); |
| | | if (type === '新增') { |
| | | state.disabled = true; |
| | | state.title = '新增隐患排查单元'; |
| | | state.checkUnitForm = { |
| | | taskUnitName: null, |
| | | note: null, |
| | | measureList: [] |
| | | }; |
| | | } else if (type === '查看') { |
| | | state.disabled = false; |
| | | state.title = '查看隐患排查单元'; |
| | | state.checkUnitForm = JSON.parse(JSON.stringify(value)); |
| | | } else { |
| | | state.disabled = true; |
| | | state.title = '修改隐患排查单元'; |
| | | state.checkUnitForm = JSON.parse(JSON.stringify(value)); |
| | | } |
文件名从 src/views/doublePrevent/riskLevel/check/index.vue 修改 |
| | |
| | | </div> |
| | | <div class="basic-line"> |
| | | <span>部门:</span> |
| | | <el-cascader |
| | | :options="departmentList" |
| | | :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" |
| | | placeholder="请选择部门" |
| | | clearable |
| | | filterable |
| | | class="input-box" |
| | | v-model="checkUnitData.params.depId" |
| | | > |
| | | </el-cascader> |
| | | <el-cascader :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-box" v-model="checkUnitData.params.depId"> </el-cascader> |
| | | </div> |
| | | <el-button size="default" type="primary" class="ml10" v-throttle @click="handleSearch"> |
| | | <el-icon> |
| | |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="操作" width="150"> |
| | | <el-table-column label="操作" width="200" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" @click="onDelcheckUnit(scope.row)">删除</el-button> |
| | | <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button> |
| | | <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" :icon="Delete" @click="onDelcheckUnit(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br /> |
| | | <el-pagination |
| | | @size-change="onHandleSizeChange" |
| | | @current-change="onHandleCurrentChange" |
| | | :pager-count="5" |
| | | :page-sizes="[10, 20, 30]" |
| | | v-model:current-page="checkUnitData.params.pageIndex" |
| | | background |
| | | v-model:page-size="checkUnitData.params.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="checkUnitData.total" |
| | | class="page-position" |
| | | > |
| | | </el-pagination> |
| | | <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="checkUnitData.params.pageIndex" background v-model:page-size="checkUnitData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="checkUnitData.total" class="page-position"> </el-pagination> |
| | | <br /> |
| | | <br /> |
| | | </el-card> |
| | |
| | | import { ElMessageBox, ElMessage } from 'element-plus'; |
| | | import checkUnitDialog from './components/checkUnitDialog.vue'; |
| | | import { checkUnitApi } from '/@/api/doublePreventSystem/checkUnit/index.ts'; |
| | | import { Edit, Delete, View } from '@element-plus/icons-vue'; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface TableData { |
| | |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'checkUnit', |
| | | components: { checkUnitDialog }, |
| | | name: 'index', |
| | | components: { checkUnitDialog, Edit, Delete, View }, |
| | | setup() { |
| | | const checkUnitDialogRef = ref(); |
| | | const state = reactive<TableDataState>({ |
| | |
| | | }); |
| | | |
| | | return { |
| | | Edit, |
| | | Delete, |
| | | View, |
| | | handleSearch, |
| | | onOpenDialogRef, |
| | | onHandleSizeChange, |
| | |
| | | <template> |
| | | <div class="system-add-menu-container"> |
| | | <el-dialog :title="title" v-model="isSafetyRiskAnalyseUnitDialog" width="600px"> |
| | | <el-form |
| | | :model="safetyRiskAnalyseUnitForm" |
| | | :rules="safetyRiskAnalyseUnitFormRules" |
| | | ref="safetyRiskAnalyseUnitFormRef" |
| | | size="default" |
| | | label-width="180px" |
| | | > |
| | | <el-dialog :title="title" v-model="isSafetyRiskAnalyseUnitDialog" width="600px" :close-on-click-modal="false"> |
| | | <el-form :model="safetyRiskAnalyseUnitForm" :rules="safetyRiskAnalyseUnitFormRules" ref="safetyRiskAnalyseUnitFormRef" size="default" label-width="180px"> |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="安全风险分析对象编码" prop="riskCode"> |
| | | <el-input |
| | | class="input-length" |
| | | v-model.trim="safetyRiskAnalyseUnitForm.riskCode" |
| | | placeholder="请输入安全风险分析对象编码" |
| | | ></el-input> |
| | | <el-input class="input-length" v-model.trim="safetyRiskAnalyseUnitForm.riskCode" placeholder="请输入安全风险分析对象编码"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="安全风险分析单元名称" prop="riskUnitName"> |
| | | <el-input |
| | | class="input-length" |
| | | v-model.trim="safetyRiskAnalyseUnitForm.riskUnitName" |
| | | placeholder="请输入安全风险分析单元名称" |
| | | ></el-input> |
| | | <el-input class="input-length" v-model.trim="safetyRiskAnalyseUnitForm.riskUnitName" placeholder="请输入安全风险分析单元名称"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="生产装置名称" prop="produceDeviceId"> |
| | | <el-select |
| | | class="input-length" |
| | | v-model="safetyRiskAnalyseUnitForm.produceDeviceId" |
| | | placeholder="请输入生产装置名称" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="item in allProduceDeviceData" |
| | | :key="item.id" |
| | | :label="item.produceDeviceName" |
| | | :value="item.id" |
| | | ></el-option> |
| | | <el-select class="input-length" v-model="safetyRiskAnalyseUnitForm.produceDeviceId" placeholder="请输入生产装置名称" clearable> |
| | | <el-option v-for="item in allProduceDeviceData" :key="item.id" :label="item.produceDeviceName" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="责任部门" prop="liableDepId"> |
| | | <el-cascader |
| | | @change="achieveUserList" |
| | | :options="departmentList" |
| | | :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" |
| | | placeholder="请选择部门" |
| | | clearable |
| | | filterable |
| | | style="width: 85%" |
| | | v-model="safetyRiskAnalyseUnitForm.liableDepId" |
| | | > |
| | | </el-cascader> |
| | | <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable style="width: 85%" v-model="safetyRiskAnalyseUnitForm.liableDepId"> </el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="责任人" prop="liablePersonId"> |
| | | <el-select |
| | | class="input-length" |
| | | v-model="safetyRiskAnalyseUnitForm.liablePersonId" |
| | | placeholder="请选择责任人" |
| | | clearable |
| | | filterable |
| | | > |
| | | <el-select class="input-length" v-model="safetyRiskAnalyseUnitForm.liablePersonId" placeholder="请选择责任人" clearable filterable> |
| | | <el-option v-for="item in userList" :key="item.uid" :label="item.realName" :value="item.uid"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isSafetyRiskAnalyseUnitDialog = !isSafetyRiskAnalyseUnitDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitSafetyRiskAnalyseUnitDialog" v-throttle size="default">确 实</el-button> |
| | | </span> |
| | |
| | | <script lang="ts"> |
| | | interface stateType { |
| | | isSafetyRiskAnalyseUnitDialog: Boolean; |
| | | disabled: Boolean; |
| | | safetyRiskAnalyseUnitForm: { |
| | | riskCode: string | null; |
| | | riskUnitName: string | null; |
| | |
| | | const safetyRiskAnalyseUnitFormRef = ref(); |
| | | const state = reactive<stateType>({ |
| | | title: '', |
| | | disabled: false, |
| | | userList: [], |
| | | departmentList: [], |
| | | allProduceDeviceData: [], |
| | |
| | | safetyRiskAnalyseUnitFormRef.value.clearValidate(); |
| | | }); |
| | | if (type === '新增') { |
| | | state.disabled = true; |
| | | state.title = '新增风险分析单元'; |
| | | state.safetyRiskAnalyseUnitForm = { |
| | | riskCode: null, |
| | |
| | | liableDepId: null, |
| | | produceDeviceId: null |
| | | }; |
| | | } else if (type === '查看') { |
| | | state.disabled = false; |
| | | state.title = '查看风险分析单元'; |
| | | state.safetyRiskAnalyseUnitForm = JSON.parse(JSON.stringify(value)); |
| | | } else { |
| | | state.disabled = true; |
| | | state.title = '修改风险分析单元'; |
| | | state.safetyRiskAnalyseUnitForm = JSON.parse(JSON.stringify(value)); |
| | | } |
| | |
| | | <div class="system-user-search mb15"> |
| | | <div class="basic-line"> |
| | | <span>责任部门:</span> |
| | | <el-cascader |
| | | @change="achieveUserList" |
| | | :options="departmentList" |
| | | :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" |
| | | placeholder="责任部门" |
| | | clearable |
| | | filterable |
| | | class="input-box" |
| | | v-model="safetyRiskAnalyseUnitData.params.liableDepId" |
| | | > |
| | | </el-cascader> |
| | | <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="责任部门" clearable filterable class="input-box" v-model="safetyRiskAnalyseUnitData.params.liableDepId"> </el-cascader> |
| | | </div> |
| | | <div class="basic-line"> |
| | | <span>责任人:</span> |
| | |
| | | </div> |
| | | <div class="basic-line"> |
| | | <span>单元名称:</span> |
| | | <el-input v-model="safetyRiskAnalyseUnitData.params.riskUnitName" clearable filterable class="input-box" placeholder="单元名称"> |
| | | </el-input> |
| | | <el-input v-model="safetyRiskAnalyseUnitData.params.riskUnitName" clearable filterable class="input-box" placeholder="单元名称"> </el-input> |
| | | </div> |
| | | <el-button size="default" type="primary" class="ml10" v-throttle @click="handleSearch"> |
| | | <el-icon> |
| | |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="操作" width="150"> |
| | | <el-table-column label="操作" width="200" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" @click="onDelProductionDevice(scope.row)">删除</el-button> |
| | | <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button> |
| | | <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" :icon="Delete" @click="onDelRiskUnit(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br /> |
| | | <el-pagination |
| | | @size-change="onHandleSizeChange" |
| | | @current-change="onHandleCurrentChange" |
| | | class="page-position" |
| | | :pager-count="5" |
| | | :page-sizes="[10, 20, 30]" |
| | | v-model:current-page="safetyRiskAnalyseUnitData.params.pageIndex" |
| | | background |
| | | v-model:page-size="safetyRiskAnalyseUnitData.params.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="safetyRiskAnalyseUnitData.total" |
| | | > |
| | | </el-pagination> |
| | | <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="page-position" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="safetyRiskAnalyseUnitData.params.pageIndex" background v-model:page-size="safetyRiskAnalyseUnitData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="safetyRiskAnalyseUnitData.total"> </el-pagination> |
| | | <br /> |
| | | <br /> |
| | | </el-card> |
| | |
| | | import { departmentApi } from '/@/api/department'; |
| | | import { userApi } from '/@/api/user'; |
| | | import { productionDeviceApi } from '/@/api/doublePreventSystem/productionDevice'; |
| | | import { Edit, Delete, View } from '@element-plus/icons-vue'; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface TableData { |
| | |
| | | |
| | | export default { |
| | | name: 'productionDevice', |
| | | components: { safetyRiskAnalyseUnitDialog }, |
| | | components: { safetyRiskAnalyseUnitDialog, Edit, Delete, View }, |
| | | setup() { |
| | | const safetyRiskAnalyseUnitDialogRef = ref(); |
| | | const state = reactive<TableDataState>({ |
| | |
| | | }; |
| | | |
| | | // 删除角色 |
| | | const onDelProductionDevice = (row: any) => { |
| | | const onDelRiskUnit = (row: any) => { |
| | | ElMessageBox.confirm(`此操作将永久删除该条安全风险分析单元:“${row.riskUnitName}”,是否继续?`, '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | |
| | | }); |
| | | |
| | | return { |
| | | Edit, |
| | | Delete, |
| | | View, |
| | | handleSearch, |
| | | achieveUserList, |
| | | onOpenDialogRef, |
| | | onHandleSizeChange, |
| | | onDelProductionDevice, |
| | | onDelRiskUnit, |
| | | onHandleCurrentChange, |
| | | safetyRiskAnalyseUnitDialog, |
| | | safetyRiskAnalyseUnitDialogRef, |