| | |
| | | <br> |
| | | </div> |
| | | |
| | | <el-dialog :title="title" :visible.sync="inspectionTaskVisible" :modal-append-to-body="false" :close-on-click-modal="false" width="55%"> |
| | | <el-dialog :title="title" :visible.sync="inspectionTaskVisible" append-to-body :close-on-click-modal="false" width="55%"> |
| | | |
| | | |
| | | <el-divider></el-divider> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检查频次" prop="hazardLiablePerson"> |
| | | <el-input v-model="inspectionTaskForm.hazardLiablePerson" class="analyseUnit_input"></el-input> |
| | | <el-form-item label="巡检任务类型" prop="type"> |
| | | <el-select v-model="inspectionTaskForm.type" class="analyseUnit_input"> |
| | | <el-option |
| | | v-for="item in typeList" |
| | | :key="item.id" |
| | | :value="item.name" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="周期开始时间" prop="hazardLiablePerson"> |
| | | <el-date-picker v-model="inspectionTaskForm.hazardLiablePerson" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="周期开始时间" class="analyseUnit_input"></el-date-picker> |
| | | <el-form-item label="周期开始时间" prop="startTime"> |
| | | <el-date-picker v-model="inspectionTaskForm.startTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="周期开始时间" class="analyseUnit_input"></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="周期结束时间" prop="hazardLiablePerson"> |
| | | <el-date-picker v-model="inspectionTaskForm.hazardLiablePerson" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="周期结束时间" class="analyseUnit_input"></el-date-picker> |
| | | <el-form-item label="检查频次" prop="intervalSeconds"> |
| | | <el-input v-model="inspectionTaskForm.intervalSeconds" class="analyseUnit_input"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="异常通知人" prop="hazardLiablePerson"> |
| | | <el-input v-model="inspectionTaskForm.hazardLiablePerson" class="analyseUnit_input"></el-input> |
| | | <el-form-item label="提前通知时间" prop="noticeSeconds"> |
| | | <el-input v-model="inspectionTaskForm.noticeSeconds" class="analyseUnit_input"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="巡检人" prop="hazardLiablePerson"> |
| | | <el-input v-model="inspectionTaskForm.hazardLiablePerson" class="analyseUnit_input"></el-input> |
| | | <el-form-item label="任务有效时间" prop="effectSeconds"> |
| | | <el-input v-model="inspectionTaskForm.effectSeconds" class="analyseUnit_input"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="点位类型" prop="type"> |
| | | <el-input v-model="inspectionTaskForm.type" class="analyseUnit_input"></el-input> |
| | | <el-form-item label="异常通知部门" prop="noticeDepartment"> |
| | | <el-select v-model="noticeDepartment" class="analyseUnit_input" filterable clearable @change="changeNotice"> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item.department" |
| | | :label="item.department" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="异常通知人员" prop="noticeUid"> |
| | | <el-select v-model="inspectionTaskForm.noticeUid" filterable clearable class="analyseUnit_input"> |
| | | <el-option |
| | | v-for="item in noticeUidList" |
| | | :key="item.id" |
| | | :value="item.realname" |
| | | :label="item.realname" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="执行巡检部门" prop="execDepartment"> |
| | | <el-select v-model="execDepartment" filterable clearable class="analyseUnit_input" @change="changeExec"> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item.department" |
| | | :label="item.department" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="执行巡检人员" prop="execUid"> |
| | | <el-select v-model="inspectionTaskForm.execUid" filterable clearable class="analyseUnit_input"> |
| | | <el-option |
| | | v-for="item in execUidList" |
| | | :key="item.id" |
| | | :value="item.realname" |
| | | :label="item.realname" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | import { addAnalyseUnit, deleteAnalyseUnit, getAnalyseUnitList, updateAnalyseUnit } from '@/api/riskLevelManage' |
| | | import { getInspectionTask } from "../../../../api/inspectionTask"; |
| | | import {getAllDepartment, getDepartmentList} from "../../../../api/departmentManage"; |
| | | import {safetyInspectionItemName} from "../../../../api/safetySelfInspection"; |
| | | export default { |
| | | name: 'index', |
| | | filters: { |
| | |
| | | activeName:'inspectionPoint', |
| | | inspectionTaskData: [], |
| | | departmentList:[], |
| | | userList:[], |
| | | noticeUidList:[], |
| | | execUidList:[], |
| | | typeList:[{id:1,name:'日常检查'},{id:2,name:'周期检查'}], |
| | | listLoading: false, |
| | | pageSize: 10, |
| | | recordTotal: 0, |
| | |
| | | title:'', |
| | | company:'', |
| | | code:'', |
| | | noticeDepartment:'', |
| | | execDepartment:'', |
| | | inspectionTaskVisible:false, |
| | | inspectionTaskFormRules:{ |
| | | hazardDep: [{ required: true, message: '责任部门不能为空', trigger: 'change' }], |
| | |
| | | noticeSeconds: 0, |
| | | noticeUid: 0, |
| | | riskControlMeasureIdList: [ |
| | | 0 |
| | | ], |
| | | startTime: "", |
| | | type: 0 |
| | |
| | | created() { |
| | | this.getInspectionTaskData() |
| | | this.getDepartment() |
| | | this.getUser() |
| | | }, |
| | | methods: { |
| | | async getInspectionTaskData(){ |
| | |
| | | }) |
| | | } |
| | | }, |
| | | changeNotice(){ |
| | | if(this.noticeDepartment === '') { |
| | | this.noticeUidList = [] |
| | | this.inspectionTaskForm.noticeUid = '' |
| | | } |
| | | this.noticeUidList = this.userList.filter( item => item.department === this.noticeDepartment) |
| | | }, |
| | | changeExec(){ |
| | | if(this.execDepartment === '') { |
| | | this.execUidList = [] |
| | | this.inspectionTaskForm.execUid = '' |
| | | } |
| | | this.execUidList = this.userList.filter ( item => item.department === this.execDepartment) |
| | | }, |
| | | async getUser(){ |
| | | let res = await safetyInspectionItemName() |
| | | if(res.data.code === '200'){ |
| | | this.userList = res.data.result |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | | type:'warning' |
| | | }) |
| | | } |
| | | }, |
| | | showAnalyseUnitForm(value,type){ |
| | | this.inspectionTaskVisible = true |
| | | this.$nextTick(() =>{ |