| | |
| | | // BASE_API: '"http://192.168.0.8:8006"', |
| | | // IMG_API: '"http://192.168.0.8:8006/upload/"', |
| | | // |
| | | BASE_API: '"http://192.168.0.69:8006"', |
| | | IMG_API: '"http://192.168.0.69:8006/upload/"', |
| | | |
| | | // BASE_API: '"http://192.168.0.35:8006"', |
| | | // IMG_API: '"http://192.168.0.35:8006/upload/"', |
| | | // BASE_API: '"http://192.168.0.62:8006"', |
| | | // IMG_API: '"http://192.168.0.62:8006/upload/"', |
| | | BASE_API: '"http://222.92.213.22:8006/zhongtai"', |
| | | IMG_API: '"http://222.92.213.22:8006/zhongtai/upload/"', |
| | | // BASE_API: '"http://222.92.213.22:8006/zhongtai"', |
| | | // IMG_API: '"http://222.92.213.22:8006/zhongtai/upload/"', |
| | | // NANO_API: '"http://222.92.213.22:8006/nanoweb"', |
| | | // ZT_API:'"http://123.56.127.115:8011"' |
| | | // BASE_API: '"http://localhost:8006"', |
| | |
| | | "jquery": "^3.6.0", |
| | | "js-cookie": "2.2.0", |
| | | "jsbarcode": "^3.11.4", |
| | | "json-bigint": "^1.0.0", |
| | | "jsonlint": "1.6.3", |
| | | "jszip": "^3.1.5", |
| | | "mockjs": "1.0.1-beta3", |
对比新文件 |
| | |
| | | import {getToken} from "../utils/auth"; |
| | | import request from '@/utils/request' |
| | | |
| | | export function getCheckUnit(data) { |
| | | return request({ |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/prevent/taskUnit/select/getTaskUnitPage', |
| | | method: 'post', |
| | | data |
| | | }); |
| | | } |
| | | |
| | | |
| | | export function addCheckUnit(data) { |
| | | return request({ |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/prevent/taskUnit/insert/saveTaskUnit', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | | } |
| | | |
| | | export function updateCheckUnit(data) { |
| | | return request({ |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/prevent/taskUnit/update/updateTaskUnit', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | | } |
| | | |
| | | |
| | | export function deleteCheckUnit(data) { |
| | | return request({ |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/prevent/taskUnit/delete/deleteTaskUnit', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | | } |
| | | |
| | | |
| | | export function getAllCheckUnitList() { |
| | | return request({ |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | |
| | | url:process.env.BASE_API + `/prevent/taskUnit/select/listTaskUnit`, |
| | | method: 'post' |
| | | }); |
| | | } |
| | |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/hiddenDanger/report', |
| | | url: process.env.BASE_API+'/prevent/dangerManage/insert/saveDangerManage', |
| | | method: 'post', |
| | | data |
| | | }); |
| | | } |
| | | |
| | | export function modHiddenDangerReport(data) { |
| | | return request({ |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/prevent/dangerManage/update/updateDangerManage', |
| | | method: 'post', |
| | | data |
| | | }); |
| | | } |
| | | |
| | | export function deleteHiddenDangerReport(data) { |
| | | return request({ |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/prevent/dangerManage/delete/deleteDangerManage', |
| | | method: 'post', |
| | | data |
| | | }); |
| | | } |
| | | |
| | | export function deleteHiddenDangerRectify(data) { |
| | | return request({ |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/prevent/dangerRectify/delete/deleteDangerRectify', |
| | | method: 'post', |
| | | data |
| | | }); |
| | |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/hiddenDanger/reportPage', |
| | | url: process.env.BASE_API+'/prevent/dangerManage/select/getDangerManagePage', |
| | | method: 'post', |
| | | data |
| | | }); |
| | | } |
| | | |
| | | export function delayHiddenDangerReport(data) { |
| | | return request({ |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/prevent/dangerRectify/update/timeOutRectify', |
| | | method: 'post', |
| | | data |
| | | }); |
| | | } |
| | | |
| | | export function submitHiddenDangerReport(data) { |
| | | return request({ |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/prevent/dangerRectify/update/applyReport', |
| | | method: 'post', |
| | | data |
| | | }); |
| | | } |
| | | |
| | | export function checkHiddenDangerReport(data) { |
| | | return request({ |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/prevent/dangerRectify/update/reportRectify', |
| | | method: 'post', |
| | | data |
| | | }); |
| | | } |
| | | |
| | | export function hiddenDangerAcceptList(data) { |
| | | return request({ |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/hiddenDanger/acceptPage', |
| | | url: process.env.BASE_API+'/prevent/dangerRectify/select/getRectifyOverPage', |
| | | method: 'post', |
| | | data |
| | | }); |
| | |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/hiddenDanger/rectifyPage', |
| | | url: process.env.BASE_API+'/prevent/dangerRectify/select/getDangerRectifyPage', |
| | | method: 'post', |
| | | data |
| | | }); |
| | |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/safecheck/work/get/list', |
| | | url: process.env.BASE_API+'/prevent/checkWork/select/getCheckWorkPage', |
| | | method: 'post', |
| | | data |
| | | }); |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/safecheck/work/new', |
| | | url: process.env.BASE_API + '/prevent/checkWork/insert/saveCheckWork', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/safecheck/work/update', |
| | | url: process.env.BASE_API + '/prevent/checkWork/update/updateCheckWork', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/safecheck/work/delete?workId=' + data, |
| | | url: process.env.BASE_API + '/prevent/checkWork/delete/deleteCheckWork', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/safecheck/task/get/list', |
| | | url: process.env.BASE_API+'/prevent/checkTask/select/getTaskPage', |
| | | method: 'post', |
| | | data |
| | | }); |
| | | } |
| | | |
| | | export function submitTaskRecord(data) { |
| | | return request({ |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/prevent/checkTask/update/updateTask', |
| | | method: 'post', |
| | | data |
| | | }); |
| | | } |
| | | |
| | | export function taskToUser(data) { |
| | | return request({ |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/prevent/checkTask/update/taskToUser', |
| | | method: 'post', |
| | | data |
| | | }); |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskAnaUnit/page', |
| | | url: process.env.BASE_API + '/prevent/riskAnaUnit/select/getRiskUnitPage', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskAnaUnit/add', |
| | | url: process.env.BASE_API + '/prevent/riskAnaUnit/insert/saveRiskAnaUnit', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskAnaUnit/mod', |
| | | url: process.env.BASE_API + '/prevent/riskAnaUnit/update/updateRiskAnaUnit', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskAnaUnit/del', |
| | | url: process.env.BASE_API + '/prevent/riskAnaUnit/delete/deleteRiskAnaUnit', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | | } |
| | | |
| | | export function getAllSafetyRiskAnalyseUnitList() { |
| | | return request({ |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + `/prevent/riskEvent/select/listRiskUnits`, |
| | | method: 'post' |
| | | }); |
| | | } |
| | | |
| | | export function exportAnalyseUnit() { |
| | | return request({ |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskEvent/page', |
| | | url: process.env.BASE_API + '/prevent/riskEvent/select/getRiskEventPage', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskEvent/add', |
| | | url: process.env.BASE_API + '/prevent/riskEvent/insert/saveRiskEvent', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskEvent/mod', |
| | | url: process.env.BASE_API + '/prevent/riskEvent/update/updateRiskEvent', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskEvent/del', |
| | | url: process.env.BASE_API + '/prevent/riskEvent/delete/deleteRiskEvent', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | | } |
| | | |
| | | export function getAllSafetyRiskEventList() { |
| | | return request({ |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url:process.env.BASE_API + `/prevent/riskEvent/select/getListEvents`, |
| | | method: 'post' |
| | | }); |
| | | } |
| | | |
| | | export function exportRiskEvent() { |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskControlMeasure/page', |
| | | url: process.env.BASE_API + '/prevent/riskControlMeasure/select/getRiskControlMeasurePage', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskControlMeasure/add', |
| | | url: process.env.BASE_API + '/prevent/riskControlMeasure/insert/saveRiskControlMeasure', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskControlMeasure/mod', |
| | | url: process.env.BASE_API + '/prevent/riskControlMeasure/update/updateRiskControlMeasure', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskControlMeasure/del', |
| | | url: process.env.BASE_API + '/prevent/riskControlMeasure/delete/deleteRiskControlMeasure', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskSource/find/list', |
| | | url: process.env.BASE_API + '/prevent/device/select/getDevicePage', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskSource/new', |
| | | url: process.env.BASE_API + '/prevent/device/insert/saveDevice', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskSource/update/one', |
| | | url: process.env.BASE_API + '/prevent/device/update/updateDevice', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskSource/del/one', |
| | | url: process.env.BASE_API + '/prevent/device/delete/deleteDevice', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | |
| | | data |
| | | }) |
| | | } |
| | | export function getAllProductionDeviceList() { |
| | | return request({ |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/prevent/device/select/listDevices', |
| | | method: 'post', |
| | | }) |
| | | } |
| | |
| | | import Router from 'vue-router' |
| | | import router from '../router' |
| | | import Cookies from 'js-cookie' |
| | | import JSONbig from 'json-bigint'; |
| | | |
| | | // create an axios instance |
| | | const service = axios.create({ |
| | |
| | | // 'Content-Type': 'application/json;charset=UTF-8', |
| | | // 'Authorization': getToken() |
| | | }, |
| | | responseType: 'json' |
| | | }) |
| | | |
| | | /* 是否有请求正在刷新token*/ |
| | |
| | | // } |
| | | // ) |
| | | |
| | | service.defaults.transformResponse = [ |
| | | function (data) { |
| | | try { |
| | | // 正常同通过return JSON.parse(data)对数据进行转换 |
| | | // 但是转化完成的数据可能超出安全数据长度 |
| | | // 因此我们定制使用第三包来转化 |
| | | return JSONbig.parse(data); |
| | | } catch (err) { |
| | | console.log(err); |
| | | // 转换失败返回一个空对象 |
| | | return {}; |
| | | } |
| | | } |
| | | ]; |
| | | |
| | | // response interceptor |
| | | service.interceptors.response.use( |
| | | response => response, |
| | |
| | | } |
| | | ) |
| | | |
| | | |
| | | |
| | | |
| | | export default service |
| | |
| | | <template> |
| | | <el-dialog title="验收" :visible.sync="dialogFormVisible" |
| | | :modal-append-to-body="false" :close-on-click-modal="false" width="800px"> |
| | | <el-form ref="dataForm" :rules="dataFormRules" :model="dataForm" label-position="right" label-width="140px" |
| | | style="" element-loading-text="保存中..."> |
| | | |
| | | |
| | | <el-form-item label="隐患级别:"> |
| | | <el-select v-model="dataForm.level" :disabled="isView"> |
| | | <el-option |
| | | v-for="item in levels" |
| | | :key="item.key" |
| | | :label="item.value" |
| | | :value="item.key"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="整改措施:" > |
| | | <el-input |
| | | style="width: 400px" |
| | | type="textarea" |
| | | :rows="3" |
| | | :disabled="isView" |
| | | v-model="dataForm.rectifymeasure"> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="整改期限:" > |
| | | <el-date-picker |
| | | v-model="dataForm.rectifydeadline" |
| | | type="datetime" |
| | | :disabled="isView" |
| | | format="yyyy-MM-dd HH:mm" |
| | | value-format="yyyy-MM-dd HH:mm" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="上报说明:" > |
| | | <el-input |
| | | style="width: 400px" |
| | | type="textarea" |
| | | :rows="3" |
| | | :disabled="isView" |
| | | v-model="dataForm.createnote"> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="上报图片:" v-if="!isView"> |
| | | <el-upload |
| | | ref="upload" |
| | | :action="baseUrl" |
| | | :auto-upload="false" |
| | | :headers="headers" |
| | | :on-change="handleChange" |
| | | name="file" |
| | | :file-list="fileList" |
| | | list-type="picture-card" |
| | | multiple |
| | | > |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="上报图片:" v-if="isView && imgUrls.length > 0" > |
| | | <el-image |
| | | class="upload-img" |
| | | v-for='item in imgUrls' |
| | | :key='item.id' |
| | | :src="item.url" |
| | | :preview-src-list="imgPreviewUrls" |
| | | style="width:100px;height: 100px;margin: 10px;" |
| | | > |
| | | </el-image> |
| | | </el-form-item> |
| | | |
| | | |
| | | <el-form-item label="整改说明:" v-if="isView"> |
| | | <el-input |
| | | style="width: 400px" |
| | | type="textarea" |
| | | :rows="3" |
| | | :disabled="isView" |
| | | v-model="dataForm.rectifynote"> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="整改图片:" v-if="isView && imgUrls2.length> 0"> |
| | | <el-image |
| | | class="upload-img" |
| | | v-for='item in imgUrls2' |
| | | :key='item.id' |
| | | :src="item.url" |
| | | :preview-src-list="imgPreviewUrls2" |
| | | style="width:100px;height: 100px;margin: 10px;" |
| | | > |
| | | </el-image> |
| | | |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="选择:" > |
| | | <el-radio-group v-model="isReject" > |
| | | <el-radio :label="false" border>验收</el-radio> |
| | | <el-radio :label="true" border>驳回</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | |
| | | |
| | | <el-form-item label="驳回理由:" v-if="isReject"> |
| | | <el-input |
| | | style="width: 400px" |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="dataForm.rejectnote"> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-dialog title="验收" :visible.sync="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="checkAcceptDesc"> |
| | | <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> |
| | | |
| | | <div style="margin-top: 30px;margin-left: 140px;" class="dialog-footer" > |
| | | <el-button @click="dialogFormVisible = false">取消</el-button> |
| | | <el-button type="primary" @click="acceptSubmit()" v-if="!isReject" :disabled="submiting">验收</el-button> |
| | | <el-button type="primary" class="el-button el-button--danger" @click="rejectSubmit()" v-if="isReject" :disabled="submiting">驳回</el-button> |
| | | |
| | | <div align="right" class="dialog-footer"> |
| | | <el-button @click="isShowCheckDialog = !isShowCheckDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitCheck" size="default">确 定</el-button> |
| | | </div> |
| | | |
| | | </el-dialog> |
| | | </template> |
| | | |
| | |
| | | <script> |
| | | import { hiddenDangerAccept,hiddenDangerReject} from '@/api/hiddenDanger'; |
| | | import { getToken} from "@/utils/auth"; |
| | | import {checkHiddenDangerReport, submitHiddenDangerReport} from "../../../../../../api/hiddenDanger"; |
| | | |
| | | export default { |
| | | name: "acceptDialog", |
| | |
| | | dialogFormVisible: false, |
| | | dialogStatus:'', |
| | | dataFormRules: {}, |
| | | 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' }] |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | showDialog(row){ |
| | | this.isView = true |
| | | this.dataForm.id = row.id |
| | | this.dataForm.level = row.level; |
| | | this.dataForm.createnote = row.createnote; |
| | | this.dataForm.rectifydeadline = row.rectifydeadline; |
| | | this.dataForm.rectifymeasure = row.rectifymeasure; |
| | | this.dataForm.rectifynote = row.rectifynote; |
| | | this.imgUrls = row.reportResources.map(item=>{return {url:process.env.IMG_API+item.url,name:item.id}}) |
| | | this.imgUrls2 = row.rectifyResources.map(item=>{return {url:process.env.IMG_API+item.url,name:item.id}}) |
| | | this.imgPreviewUrls = row.reportResources.map(item=>{ return process.env.IMG_API + item.url }) |
| | | this.imgPreviewUrls2 = row.rectifyResources.map(item=>{ return process.env.IMG_API + item.url }) |
| | | this.dialogFormVisible = true; |
| | | this.isShowCheckDialog = true; |
| | | const checkForm = JSON.parse(JSON.stringify(row)); |
| | | this.checkForm.id = checkForm.id; |
| | | this.checkForm.dangerManagerId = checkForm.dangerManagerId; |
| | | }, |
| | | acceptSubmit(){ |
| | | let params = {} |
| | | params['id'] = this.dataForm.id |
| | | this.submit(params,hiddenDangerAccept) |
| | | |
| | | submitCheck() { |
| | | this.$refs['checkFormRef'].validate(async (valid) => { |
| | | if (valid) { |
| | | let res = await checkHiddenDangerReport(this.checkForm); |
| | | if (res.data.code === '200') { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '整改提交成功', |
| | | duration: 2000 |
| | | }); |
| | | this.isShowCheckDialog = false; |
| | | this.$emit('refreshCheck'); |
| | | } else { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res.data.message |
| | | }); |
| | | } |
| | | } else { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '请完善基本信息' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | rejectSubmit(){ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div style="margin: 15px"> |
| | | <span class="span-filter-label">单号</span> |
| | | <el-input style="width: 140px" v-model="filter.filter.code" ></el-input> |
| | | <span class="span-filter-label">隐患等级</span> |
| | | <el-select v-model="filter.filter.level" clearable @clear="clearLevel" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in levels" |
| | | :key="item.key" |
| | | :label="item.value" |
| | | :value="item.key"> |
| | | </el-option> |
| | | </el-select> |
| | | <span class="span-filter-label">整改人</span> |
| | | <el-input style="width: 160px" v-model="filter.filter.rectifierName"></el-input> |
| | | <div class="basic_search"> |
| | | <span>验收人:</span> |
| | | <el-select v-model="filter.checkAcceptPersonid" clearable filterable class="analyseUnit_box"> |
| | | <el-option |
| | | v-for="item in userList" |
| | | :key="item.id" |
| | | :label="item.realname" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | |
| | | <span class="span-filter-label">隐患来源</span> |
| | | <el-select v-model="filter.filter.source" clearable placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in sources" |
| | | :key="item.key" |
| | | :label="item.value" |
| | | :value="item.key"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-search" |
| | | @click="queryHandle"/> |
| | | @click="queryHandle">搜索</el-button> |
| | | </div> |
| | | <div class="table_content"> |
| | | <el-table |
| | |
| | | highlight-current-row |
| | | style="width: 100%;" |
| | | > |
| | | <el-table-column type="index" label="序号" align="center" width="80"/> |
| | | <el-table-column label="单号" prop="code" align="center" /> |
| | | <el-table-column label="状态" prop="status" align="center" > |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | | <el-table-column prop="rectifyDesc" label="整改内容说明" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="rectifyTime" label="整改期限" show-overflow-tooltip min-width="200px"> |
| | | <template slot-scope="scope"> |
| | | <span >{{scope.row.status}}</span> |
| | | <span v-if="new Date(scope.row.rectifydeadline) < new Date() && scope.row.status !== '已完成'" class="overdue-img">逾期</span> |
| | | <span>{{ scope.row.rectifyTime }}</span> |
| | | <span v-if="scope.row.dangerStatus === 2" class="overdue-img">逾期</span> |
| | | <span v-if="scope.row.dangerStatus === 9" class="overdue-img">逾期</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="隐患等级" prop="level" align="center" > |
| | | <el-table-column prop="rectifyType" label=" 整改类型" show-overflow-tooltip min-width="150px"> |
| | | <template slot-scope="scope"> |
| | | <el-tag :type="scope.row.level == '重大隐患'?'danger':'warning'">{{scope.row.level}}</el-tag> |
| | | {{ parseNumber(scope.row.rectifyType, '整改类型') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="隐患来源" prop="source" align="center" > |
| | | <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" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{sources.find(item=>item.key === scope.row.source).value}}</span> |
| | | <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 label="上报人" prop="requestor" align="center" /> |
| | | <el-table-column label="上报时间" prop="createtime" align="center" /> |
| | | <el-table-column label="整改人" prop="rectifier" align="center" /> |
| | | <el-table-column label="整改期限" prop="rectifydeadline" align="center" > |
| | | <template slot-scope="scope"> |
| | | <span v-bind:class="{'overdue':new Date(scope.row.rectifydeadline) < new Date() && scope.row.status !== '已完成'}">{{scope.row.rectifydeadline}} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="整改时间" prop="rectifytime" align="center" /> |
| | | |
| | | |
| | | <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip min-width="200px"></el-table-column> |
| | | <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip min-width="200px"></el-table-column> |
| | | <el-table-column label="操作" align="center" width="240" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="viewHandle(scope.row)">查看</el-button> |
| | | <el-button type="text" @click="acceptHandle(scope.row)" v-if="scope.row.status === '整改待验收'">验收</el-button> |
| | | <el-button type="text" @click="viewHandle('查看',scope.row)">查看</el-button> |
| | | <el-button type="text" v-show="scope.row.dangerStatus === 1" @click="checkDialog(scope.row)">验收</el-button> |
| | | <!-- <el-button type="text" style="color:red" @click="deleteById(scope.row)">删除</el-button>--> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | /> |
| | | </div> |
| | | |
| | | <accept-dialog ref="accept" @refreshCheck="hiddenDangerList"></accept-dialog> |
| | | <report-view ref="reportView"></report-view> |
| | | <accept-dialog ref="acceptDialog" @refresh="hiddenDangerList"></accept-dialog> |
| | | |
| | | <rectify-dialog ref="rectifyDialog" @refresh = "hiddenDangerList"></rectify-dialog> |
| | | |
| | | <div style="clear: both;"></div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { checkBtnPermission} from "@/utils/permission"; |
| | | import { hiddenDangerAcceptList} from '@/api/hiddenDanger'; |
| | | import reportView from "../components/reportView"; |
| | | import acceptDialog from "./components/acceptDialog"; |
| | | import { checkBtnPermission} from "@/utils/permission"; |
| | | import { hiddenDangerRectifyList } from '@/api/hiddenDanger'; |
| | | import reportView from "../components/reportView"; |
| | | import rectifyDialog from "../rectify/components/rectifyDialog"; |
| | | import {deleteHiddenDangerReport, hiddenDangerAcceptList} from "../../../../../api/hiddenDanger"; |
| | | import {safetyInspectionItemName} from "../../../../../api/safetySelfInspection"; |
| | | import AcceptDialog from "./components/acceptDialog"; |
| | | |
| | | export default { |
| | | name: "confirm", |
| | | components: { |
| | | reportView, |
| | | acceptDialog, |
| | | }, |
| | | data() { |
| | | return { |
| | | recordTotal: 0, |
| | | tableKey: 0, |
| | | tableData:[], |
| | | listLoading: true, |
| | | levels:[ |
| | | {"key":"URGENT","value":"重大隐患"}, |
| | | {"key":"COMMON","value":"一般隐患"}, |
| | | ], |
| | | sources:[ |
| | | {"key":1,"value":"隐患上报"}, |
| | | {"key":2,"value":"巡检上报"}, |
| | | ], |
| | | dataForm: { |
| | | id:'', |
| | | note: '', |
| | | level:'', |
| | | rejectnote:'', |
| | | }, |
| | | filter:{ |
| | | pageIndex:1, |
| | | pageSize:10, |
| | | filter:{ |
| | | code:'', |
| | | level:null, |
| | | rectifierName:'', |
| | | source:'', |
| | | } |
| | | } |
| | | export default { |
| | | name: "rectify", |
| | | components: { |
| | | AcceptDialog, |
| | | reportView, |
| | | rectifyDialog, |
| | | }, |
| | | data() { |
| | | return { |
| | | recordTotal: 0, |
| | | tableKey: 0, |
| | | tableData:[], |
| | | userList:[], |
| | | listLoading: false, |
| | | departmentList: [], |
| | | rectifyTypeList: [ |
| | | { id: 1, name: '即查即改' }, |
| | | { id: 2, name: '限期整改' } |
| | | ], |
| | | dangerStatusList: [ |
| | | { id: 0, name: '整改中' }, |
| | | { id: 1, name: '待验收' }, |
| | | { id: 2, name: '延期整改' }, |
| | | { id: 4, name: '超期未整改' }, |
| | | { id: 9, name: '已验收' } |
| | | ], |
| | | filter:{ |
| | | pageIndex:1, |
| | | pageSize:10, |
| | | checkAcceptPersonid: null, |
| | | } |
| | | }, |
| | | created() { |
| | | this.hiddenDangerList(); |
| | | }, |
| | | |
| | | methods: { |
| | | queryHandle: function () { |
| | | this.filter.pageIndex = 1 |
| | | this.hiddenDangerList() |
| | | }, |
| | | |
| | | |
| | | viewHandle: function (row) { |
| | | this.$refs.reportView.showDialog("查看",row) |
| | | }, |
| | | |
| | | acceptHandle(row){ |
| | | this.$refs.acceptDialog.showDialog(row) |
| | | } , |
| | | |
| | | handleSizeChange: function (val) { |
| | | this.filter.pageSize = val |
| | | this.filter.pageIndex = 1 |
| | | this.hiddenDangerList() |
| | | }, |
| | | handleCurrentChange: function (val) { |
| | | this.filter.pageIndex = val |
| | | this.hiddenDangerList() |
| | | }, |
| | | getBtnPermission(btnType) { |
| | | return checkBtnPermission(this.userType, btnType) |
| | | }, |
| | | |
| | | downloadHandle(fileurl){ |
| | | window.open(fileurl, '_blank'); |
| | | }, |
| | | |
| | | |
| | | handleChange(file, fileList) { |
| | | this.fileList = fileList |
| | | }, |
| | | |
| | | hiddenDangerList(){ |
| | | this.listLoading = true |
| | | hiddenDangerAcceptList(this.filter) |
| | | .then(res=>{ |
| | | if (res.data.code === '200') { |
| | | this.tableData = res.data.result.records |
| | | this.recordTotal = res.data.result.total |
| | | } |
| | | else{ |
| | | this.$message({message: res.data.message, type: 'warning'}); |
| | | } |
| | | }) |
| | | .catch(err=>{ |
| | | console.log(err) |
| | | this.$message({message: '接口错误', type: 'warning'}); |
| | | }) |
| | | .finally(()=>{ |
| | | this.listLoading = false |
| | | }) |
| | | }, |
| | | clearLevel(){ |
| | | this.filter.filter.level = null |
| | | } |
| | | |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | this.hiddenDangerList(); |
| | | this.getUser() |
| | | }, |
| | | methods: { |
| | | queryHandle: function () { |
| | | this.filter.pageIndex = 1 |
| | | this.hiddenDangerList() |
| | | }, |
| | | checkDialog(row){ |
| | | this.$refs.accept.showDialog(row) |
| | | }, |
| | | viewHandle (type,row) { |
| | | this.$refs.rectifyDialog.showDialog(type,row) |
| | | }, |
| | | rectifyHandle(row){ |
| | | this.$refs.rectifyDialog.show(row) |
| | | }, |
| | | |
| | | handleSizeChange: function (val) { |
| | | this.filter.pageSize = val |
| | | this.filter.pageIndex = 1 |
| | | this.hiddenDangerList() |
| | | }, |
| | | handleCurrentChange: function (val) { |
| | | this.filter.pageIndex = val |
| | | this.hiddenDangerList() |
| | | }, |
| | | getBtnPermission(btnType) { |
| | | return checkBtnPermission(this.userType, btnType) |
| | | }, |
| | | |
| | | |
| | | downloadHandle(fileurl){ |
| | | window.open(fileurl, '_blank'); |
| | | }, |
| | | |
| | | 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' |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | hiddenDangerList(){ |
| | | this.listLoading = true |
| | | hiddenDangerAcceptList(this.filter) |
| | | .then(res=>{ |
| | | if (res.data.code === '200') { |
| | | this.tableData = res.data.data |
| | | this.recordTotal = res.data.count |
| | | } |
| | | else{ |
| | | this.$message({message: res.data.message, type: 'warning'}); |
| | | } |
| | | |
| | | }) |
| | | .catch(err=>{ |
| | | console.log(err) |
| | | this.$message({message: '接口错误', type: 'warning'}); |
| | | |
| | | }) |
| | | .finally(()=>{ |
| | | this.listLoading = false |
| | | }) |
| | | }, |
| | | |
| | | parseNumber (value, type) { |
| | | if (type === '整改类型') { |
| | | return this.rectifyTypeList.find((item) => item.id === value).name; |
| | | } else if (type === '隐患整改状态') { |
| | | return this.dangerStatusList.find((item) => item.id === value).name; |
| | | } |
| | | }, |
| | | |
| | | deleteById(val){ |
| | | this.$confirm('删除此条信息,是否继续','提示',{ |
| | | confirmButtonText:'确定', |
| | | cancelButtonText:'取消', |
| | | type:'warning', |
| | | }).then(()=> { |
| | | deleteHiddenDangerReport({id:val.id}).then( ()=>{ |
| | | this.hiddenDangerList() |
| | | this.$notify({ |
| | | title:'成功', |
| | | message:'删除成功', |
| | | type:'success', |
| | | duration:2000, |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | clearLevel(){ |
| | | this.filter.filter.level = null |
| | | }, |
| | | clearStatus(){ |
| | | this.filter.filter.status = null |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .overdue{ |
| | | color: red; |
| | | } |
| | | .overdue-img{ |
| | | position: absolute; |
| | | background-color: #f56c6c; |
| | | border-radius: 4px; |
| | | color: #fff; |
| | | display: inline-block; |
| | | font-size: 12px; |
| | | height: 21px; |
| | | line-height: 18px; |
| | | text-align: center; |
| | | white-space: nowrap; |
| | | border: 1px solid #fff; |
| | | transform: scale(0.8); |
| | | padding: 1px 3px 0 3px; |
| | | |
| | | } |
| | | .overdue{ |
| | | color: red; |
| | | } |
| | | .overdue-img{ |
| | | position: absolute; |
| | | background-color: #f56c6c; |
| | | border-radius: 4px; |
| | | color: #fff; |
| | | display: inline-block; |
| | | font-size: 12px; |
| | | height: 21px; |
| | | line-height: 18px; |
| | | text-align: center; |
| | | white-space: nowrap; |
| | | border: 1px solid #fff; |
| | | transform: scale(0.8); |
| | | padding: 1px 3px 0 3px; |
| | | |
| | | } |
| | | .basic_search{ |
| | | display:inline-block; |
| | | padding-bottom: 10px; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:90%; |
| | | } |
| | | .analyseUnit_box{ |
| | | width:200px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <el-dialog title="整改" :visible.sync="dialogFormVisible" |
| | | :modal-append-to-body="false" :close-on-click-modal="false" width="800px"> |
| | | <el-form ref="dataForm" :rules="dataFormRules" :model="dataForm" label-position="right" label-width="140px" |
| | | style="" element-loading-text="保存中..."> |
| | | <div> |
| | | <el-dialog title="查看" :visible.sync="dialogFormVisible" |
| | | :modal-append-to-body="false" :close-on-click-modal="false" width="800px"> |
| | | <el-form ref="dataForm" :rules="dataFormRules" :model="dataForm" label-position="right" label-width="140px" |
| | | style="" element-loading-text="保存中..."> |
| | | |
| | | <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="analyseUnit_input" type="textarea" :rows="2" v-model.trim="dataForm.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="analyseUnit_input" v-model="dataForm.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-select v-model="dataForm.rectifyDepId" class="analyseUnit_input" placeholder="请选择所属部门" clearable filterable> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.department" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-form-item label="隐患级别:"> |
| | | <el-select v-model="dataForm.level" placeholder="请选择" :disabled="isView"> |
| | | <el-option |
| | | v-for="item in levels" |
| | | :key="item.key" |
| | | :label="item.value" |
| | | :value="item.key"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="整改责任人" prop="liablePersonId"> |
| | | <el-select class="analyseUnit_input" v-model="dataForm.liablePersonId" placeholder="请选择整改责任人" clearable filterable> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.realname" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-form-item label="整改措施:" > |
| | | <el-input |
| | | style="width: 400px" |
| | | type="textarea" |
| | | :rows="3" |
| | | :disabled="isView" |
| | | placeholder="请输入内容" |
| | | v-model="dataForm.rectifymeasure"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="整改资金" prop="dangerResult"> |
| | | <el-input class="analyseUnit_input" type="number" v-model="dataForm.cost" readonly> </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-form-item label="整改期限:" > |
| | | <el-date-picker |
| | | v-model="dataForm.rectifydeadline" |
| | | type="datetime" |
| | | :disabled="isView" |
| | | format="yyyy-MM-dd HH:mm" |
| | | value-format="yyyy-MM-dd HH:mm" |
| | | placeholder="选择日期时间"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-form-item label="上报说明:" > |
| | | <el-input |
| | | style="width: 400px" |
| | | type="textarea" |
| | | :rows="3" |
| | | :disabled="isView" |
| | | placeholder="请输入内容" |
| | | v-model="dataForm.createnote"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-dialog> |
| | | <el-dialog title="整改" :visible.sync="isShowRectifyDialog" :modal-append-to-body="false" :close-on-click-modal="false" width="600px"> |
| | | <el-form :model="rectifyForm" :rules="rectifyFormRules" 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="rectifyInfo"> |
| | | <el-input class="analyseUnit_input" 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="analyseUnit_input" v-model="rectifyForm.applyTime" placeholder="请选择整改时间" clearable> </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div align="right" class="dialog-footer"> |
| | | <el-button @click="isShowRectifyDialog = !isShowRectifyDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitRectify" size="default">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog title="延期" :visible.sync="isShowDelayDialog" width="600px"> |
| | | <el-form :model="delayForm" :rules="delayFormRules" ref="delayFormRef" 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="timeOutDesc"> |
| | | <el-input class="analyseUnit_input" 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="analyseUnit_input" v-model="delayForm.rectifyTime" placeholder="请选择整改期限" clearable> </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div align="right" class="dialog-footer"> |
| | | <el-button @click="isShowDelayDialog = !isShowDelayDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitDelay" size="default">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | <el-form-item label="上报图片:" v-if="!isView"> |
| | | <el-upload |
| | | ref="upload" |
| | | :action="baseUrl" |
| | | :auto-upload="false" |
| | | :headers="headers" |
| | | :on-change="handleChange" |
| | | name="file" |
| | | :file-list="fileList" |
| | | list-type="picture-card" |
| | | multiple |
| | | > |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="上报图片:" v-if="isView && imgUrls.length > 0" > |
| | | <el-image |
| | | class="upload-img" |
| | | v-for='item in imgUrls' |
| | | :key='item.id' |
| | | :src="item.url" |
| | | :preview-src-list="imgPreviewUrls" |
| | | style="width:100px;height: 100px;margin: 10px 10px 10px 2px;border-radius: 3px" |
| | | > |
| | | </el-image> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="驳回整改说明:" v-if="dataForm.status === '驳回待整改'"> |
| | | <el-input |
| | | style="width: 400px" |
| | | type="textarea" |
| | | :rows="3" |
| | | placeholder="请输入内容" |
| | | :disabled="isView" |
| | | v-model="dataForm.rectifynote"> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="驳回整改图片:" v-if="dataForm.status === '驳回待整改'"> |
| | | <el-image |
| | | class="upload-img" |
| | | v-for='item in imgUrls2' |
| | | :key='item.id' |
| | | :src="item.url" |
| | | :disabled="isView" |
| | | :preview-src-list="imgPreviewUrls2" |
| | | style="width:100px;height: 100px;margin: 10px 15px 10px 2px;border-radius: 3px" |
| | | > |
| | | </el-image> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="驳回原因:" v-if="dataForm.status === '驳回待整改'"> |
| | | <el-input |
| | | style="width: 400px" |
| | | type="textarea" |
| | | :rows="3" |
| | | placeholder="请输入内容" |
| | | :disabled="isView" |
| | | v-model="dataForm.rejectnote"> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | |
| | | |
| | | <el-form-item label="整改说明:" > |
| | | <el-input |
| | | style="width: 400px" |
| | | type="textarea" |
| | | :rows="3" |
| | | placeholder="请输入内容" |
| | | v-model="dataForm.note"> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="整改图片:" > |
| | | <el-upload |
| | | ref="upload" |
| | | :action="baseUrl" |
| | | :auto-upload="false" |
| | | :headers="headers" |
| | | :on-change="handleChange" |
| | | name="file" |
| | | :file-list="fileList" |
| | | list-type="picture-card" |
| | | multiple |
| | | > |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | |
| | | <div style="margin-top: 20px;margin-left: 140px;" class="dialog-footer" > |
| | | <el-button @click="dialogFormVisible = false">取消</el-button> |
| | | <el-button type="primary" @click="trigger2Submit()" :disabled="submiting">整改提交</el-button> |
| | | </div> |
| | | |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import { hiddenDangerRectify } from '@/api/hiddenDanger'; |
| | | import { getToken} from "@/utils/auth"; |
| | | import {getDepartmentList} from "../../../../../../api/departmentManage"; |
| | | import {safetyInspectionItemName} from "../../../../../../api/safetySelfInspection"; |
| | | import {delayHiddenDangerReport, submitHiddenDangerReport} from "../../../../../../api/hiddenDanger"; |
| | | |
| | | export default { |
| | | name: "rectifyDialog", |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | imgUrls:[], |
| | | imgUrls2:[], |
| | | userList:[], |
| | | departmentList:[], |
| | | rectifyTypeList: [ |
| | | { id: 1, name: '即查即改' }, |
| | | { id: 2, name: '限期整改' } |
| | | ], |
| | | imgPreviewUrls:[], |
| | | imgPreviewUrls2:[], |
| | | fileList:[], |
| | |
| | | {"key":"COMMON","value":"一般隐患"}, |
| | | ], |
| | | dataForm: { |
| | | id:'', |
| | | note: '', |
| | | level:'', |
| | | rectifynote:'', |
| | | rectifydeadline:'', |
| | | rectifymeasure:'', |
| | | createnote: '', |
| | | rejectnote:'', |
| | | rectifyType: null, |
| | | rectifyDepId: null, |
| | | liablePersonId: null, |
| | | rectifyTime: null, |
| | | cost: null, |
| | | rectifyDesc: null |
| | | }, |
| | | isShowCheckInfoDialog: false, |
| | | checkInfoForm: { |
| | | rectifyDepId: null, |
| | | liablePersonId: null |
| | | }, |
| | | isShowDelayDialog: false, |
| | | isShowRectifyDialog: false, |
| | | rectifyForm: { |
| | | id: null, |
| | | dangerManagerId: null, |
| | | rectifyInfo: null, |
| | | applyTime: null |
| | | }, |
| | | delayForm: { |
| | | id: null, |
| | | dangerManagerId: null, |
| | | rectifyTime: null, |
| | | timeOutDesc: null |
| | | }, |
| | | rectifyFormRules: { |
| | | rectifyInfo: [{ required: true, message: '请填写整改说明', trigger: 'blur' }], |
| | | applyTime: [{ required: true, message: '请选择整改时间', trigger: 'change' }] |
| | | }, |
| | | delayFormRules: { |
| | | timeOutDesc: [{ required: true, message: '请填写延期说明', trigger: 'blur' }], |
| | | rectifyTime: [{ required: true, message: '请选择整改期限', trigger: 'change' }] |
| | | } |
| | | } |
| | | }, |
| | | created(){ |
| | | this.getDepartmentData(); |
| | | this.getUser(); |
| | | }, |
| | | methods:{ |
| | | resetDataForm(){ |
| | |
| | | this.imgUrls =[] |
| | | this.imgPreviewUrls = [] |
| | | }, |
| | | show(row){ |
| | | this.resetDataForm(); |
| | | this.isView = true |
| | | this.dataForm.id = row.id |
| | | this.dataForm.level = row.level |
| | | this.dataForm.status = row.status |
| | | this.dataForm.createnote = row.createnote |
| | | this.dataForm.rectifydeadline = row.rectifydeadline |
| | | this.dataForm.rectifymeasure = row.rectifymeasure |
| | | this.dataForm.rectifynote = row.rectifynote |
| | | this.dataForm. rejectnote = row.rejectnote |
| | | this.imgUrls = row.reportResources.map(item=>{return {url:process.env.IMG_API+item.url,name:item.id}}) |
| | | this.imgUrls2 = row.rectifyResources.map(item=>{return {url:process.env.IMG_API+item.url,name:item.id}}) |
| | | this.imgPreviewUrls = row.reportResources.map(item=>{ return process.env.IMG_API + item.url }) |
| | | this.imgPreviewUrls2 = row.rectifyResources.map(item=>{ return process.env.IMG_API + item.url }) |
| | | this.dialogFormVisible = true |
| | | showDialog(type,row){ |
| | | if (type === '延期') { |
| | | this.isShowDelayDialog = true; |
| | | const delayForm = JSON.parse(JSON.stringify(row)); |
| | | this.delayForm.id = delayForm.id; |
| | | this.delayForm.dangerManagerId = delayForm.dangerManagerId; |
| | | this.delayForm.timeOutDesc = null; |
| | | this.delayForm.rectifyTime = null; |
| | | }else if(type == '整改'){ |
| | | this.isShowRectifyDialog = true; |
| | | const rectifyForm = JSON.parse(JSON.stringify(row)); |
| | | this.rectifyForm.id = rectifyForm.id; |
| | | this.rectifyForm.dangerManagerId = rectifyForm.dangerManagerId; |
| | | this.rectifyForm.rectifyInfo = null; |
| | | this.rectifyForm.applyTime = null; |
| | | }else{ |
| | | this.dialogFormVisible = true |
| | | this.dataForm = row |
| | | } |
| | | |
| | | }, |
| | | |
| | | submitRectify () { |
| | | this.$refs['rectifyFormRef'].validate( async(valid) => { |
| | | if (valid) { |
| | | let res = await submitHiddenDangerReport(this.rectifyForm); |
| | | if (res.data.code === '200') { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '整改提交成功', |
| | | duration: 2000 |
| | | }); |
| | | this.isShowRectifyDialog = false; |
| | | this.$emit('refreshRectify'); |
| | | } else { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | } else { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '请完善基本信息' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | submitDelay() { |
| | | this.$refs["delayFormRef"].validate(async (valid) => { |
| | | if (valid) { |
| | | let res = await delayHiddenDangerReport(this.delayForm); |
| | | if (res.data.code === '200') { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '隐患延期成功', |
| | | duration: 2000 |
| | | }); |
| | | this.isShowDelayDialog = false; |
| | | this.$emit('refreshRectify'); |
| | | } else { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | } else { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '请完善基本信息' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | trigger2Submit(){ |
| | | let formData = new FormData(); |
| | | formData.append('id',this.dataForm.id) |
| | |
| | | this.submiting = false |
| | | }) |
| | | }, |
| | | |
| | | async getDepartmentData(){ |
| | | let res = await getDepartmentList({pageSize:1000,pageIndex:1}) |
| | | if(res.data.code === '200'){ |
| | | this.departmentList = res.data.result.result |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | | type:'warning' |
| | | }) |
| | | if(res.data.code === '50001'){ |
| | | this.riskSourceData = [] |
| | | } |
| | | } |
| | | }, |
| | | |
| | | 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' |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | handleChange(file, fileList) { |
| | | this.fileList = fileList |
| | | }, |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | .basic_search{ |
| | | display:inline-block; |
| | | padding-bottom: 10px; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:90%; |
| | | } |
| | | .analyseUnit_box{ |
| | | width:200px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div style="margin: 15px"> |
| | | <div class="basic_search"> |
| | | <span>整改类型:</span> |
| | | <el-select class="analyseUnit_box" v-model="filter.rectifyType" placeholder="整改类型" filterable> |
| | | <el-option v-for="item in rectifyTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>整改部门:</span> |
| | | <el-select v-model="filter.rectifyDepId" clearable filterable class="analyseUnit_box"> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :label="item.department" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> </div> |
| | | |
| | | <span class="span-filter-label">单号</span> |
| | | <el-input style="width: 140px" v-model="filter.filter.code" ></el-input> |
| | | |
| | | <span class="span-filter-label">状态</span> |
| | | <el-select |
| | | v-model="filter.filter.status" |
| | | class="filter-item" |
| | | clearable |
| | | @clear="clearStatus" |
| | | style="width:150px;margin-bottom: 10px"> |
| | | <el-option |
| | | v-for="item in reportStatus" |
| | | :key="item.key" |
| | | :label="item.value" |
| | | :value="item.key"> |
| | | </el-option> |
| | | </el-select> |
| | | |
| | | <span class="span-filter-label">隐患等级</span> |
| | | <el-select v-model="filter.filter.level" clearable @clear="clearLevel" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in levels" |
| | | :key="item.key" |
| | | :label="item.value" |
| | | :value="item.key"> |
| | | </el-option> |
| | | </el-select> |
| | | |
| | | <span class="span-filter-label">上报人</span> |
| | | <el-input style="width: 160px" v-model="filter.filter.requestorName"></el-input> |
| | | |
| | | <span class="span-filter-label">隐患来源</span> |
| | | <el-select v-model="filter.filter.source" clearable placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in sources" |
| | | :key="item.key" |
| | | :label="item.value" |
| | | :value="item.key"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-search" |
| | | @click="queryHandle"/> |
| | | @click="queryHandle">搜索</el-button> |
| | | </div> |
| | | <div class="table_content"> |
| | | <el-table |
| | |
| | | highlight-current-row |
| | | style="width: 100%;" |
| | | > |
| | | <el-table-column type="index" label="序号" align="center" width="80"/> |
| | | <el-table-column label="单号" prop="code" align="center" /> |
| | | <el-table-column label="状态" prop="status" align="center" > |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | | <el-table-column prop="rectifyDesc" label="整改内容说明" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="rectifyTime" label="整改期限" show-overflow-tooltip min-width="200px"> |
| | | <template slot-scope="scope"> |
| | | <span >{{scope.row.status}}</span> |
| | | <span v-if="new Date(scope.row.rectifydeadline) < new Date() && scope.row.status !== '已完成'" class="overdue-img">逾期</span> |
| | | <span>{{ scope.row.rectifyTime }}</span> |
| | | <span v-if="scope.row.dangerStatus === 2" class="overdue-img">逾期</span> |
| | | <span v-if="scope.row.dangerStatus === 9" class="overdue-img">逾期</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="隐患等级" prop="level" align="center" > |
| | | <el-table-column prop="rectifyType" label=" 整改类型" show-overflow-tooltip min-width="150px"> |
| | | <template slot-scope="scope"> |
| | | <el-tag :type="scope.row.level == '重大隐患'?'danger':'warning'">{{scope.row.level}}</el-tag> |
| | | {{ parseNumber(scope.row.rectifyType, '整改类型') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="隐患来源" prop="source" align="center" > |
| | | <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" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{sources.find(item=>item.key === scope.row.source).value}}</span> |
| | | <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 label="上报人" prop="requestor" align="center" /> |
| | | <el-table-column label="整改人" prop="rectifier" align="center" /> |
| | | <el-table-column label="整改期限" prop="rectifydeadline" align="center" > |
| | | <template slot-scope="scope"> |
| | | <span v-bind:class="{'overdue':new Date(scope.row.rectifydeadline) < new Date() && scope.row.status !== '已完成'}">{{scope.row.rectifydeadline}} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="创建时间" prop="createtime" align="center" /> |
| | | <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip min-width="200px"></el-table-column> |
| | | <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip min-width="200px"></el-table-column> |
| | | <el-table-column label="操作" align="center" width="240" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="viewHandle(scope.row)">查看</el-button> |
| | | <el-button type="text" @click="rectifyHandle(scope.row)" v-if="scope.row.status === '待整改' || scope.row.status === '驳回待整改'">整改</el-button> |
| | | <el-button type="text" @click="viewHandle('查看',scope.row)">查看</el-button> |
| | | <el-button type="text" v-show="scope.row.dangerStatus === 0 || scope.row.dangerStatus === 2" @click="viewHandle('整改', scope.row)">整改</el-button> |
| | | <el-button type="text" v-show="scope.row.dangerStatus === 0 || scope.row.dangerStatus === 2" @click="viewHandle('延期', scope.row)">延期</el-button> |
| | | <el-button type="text" style="color:red" @click="deleteById(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </div> |
| | | |
| | | <report-view ref="reportView"></report-view> |
| | | <rectify-dialog ref="rectifyDialog" @refresh = "hiddenDangerList"></rectify-dialog> |
| | | <rectify-dialog ref="rectifyDialog" @refreshRectify = "hiddenDangerList"></rectify-dialog> |
| | | |
| | | <div style="clear: both;"></div> |
| | | </div> |
| | |
| | | import { hiddenDangerRectifyList } from '@/api/hiddenDanger'; |
| | | import reportView from "../components/reportView"; |
| | | import rectifyDialog from "./components/rectifyDialog"; |
| | | import {deleteHiddenDangerReport} from "../../../../../api/hiddenDanger"; |
| | | |
| | | export default { |
| | | name: "rectify", |
| | |
| | | tableKey: 0, |
| | | tableData:[], |
| | | listLoading: false, |
| | | levels:[ |
| | | {"key":"URGENT","value":"重大隐患"}, |
| | | {"key":"COMMON","value":"一般隐患"}, |
| | | departmentList: [], |
| | | rectifyTypeList: [ |
| | | { id: 1, name: '即查即改' }, |
| | | { id: 2, name: '限期整改' } |
| | | ], |
| | | sources:[ |
| | | {"key":1,"value":"隐患上报"}, |
| | | {"key":2,"value":"巡检上报"}, |
| | | dangerStatusList: [ |
| | | { id: 0, name: '整改中' }, |
| | | { id: 1, name: '待验收' }, |
| | | { id: 2, name: '延期整改' }, |
| | | { id: 4, name: '超期未整改' }, |
| | | { id: 9, name: '已验收' } |
| | | ], |
| | | reportStatus:[ |
| | | {"key":"TORECTIFY","value":"待整改"}, |
| | | {"key":"TOACCEPT","value":"整改待验收"}, |
| | | {"key":"REJECTED","value":"驳回待整改"}, |
| | | {"key":"COMPLETED","value":"已完成"}, |
| | | ], |
| | | dataForm: { |
| | | id:'', |
| | | note: '', |
| | | level:'', |
| | | rectifynote:'', |
| | | rectifydeadline:'', |
| | | rectifymeasure:'' |
| | | }, |
| | | filter:{ |
| | | pageIndex:1, |
| | | pageSize:10, |
| | | filter:{ |
| | | status:null, |
| | | code:'', |
| | | requestorName:'', |
| | | level:null, |
| | | } |
| | | rectifyType: null, |
| | | rectifyDepId: null, |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.filter.pageIndex = 1 |
| | | this.hiddenDangerList() |
| | | }, |
| | | viewHandle (row) { |
| | | this.$refs.reportView.showDialog("查看",row) |
| | | viewHandle (type,row) { |
| | | this.$refs.rectifyDialog.showDialog(type,row) |
| | | }, |
| | | rectifyHandle(row){ |
| | | this.$refs.rectifyDialog.show(row) |
| | |
| | | hiddenDangerRectifyList(this.filter) |
| | | .then(res=>{ |
| | | if (res.data.code === '200') { |
| | | this.tableData = res.data.result.records |
| | | this.recordTotal = res.data.result.total |
| | | this.tableData = res.data.data |
| | | this.recordTotal = res.data.count |
| | | } |
| | | else{ |
| | | this.$message({message: res.data.message, type: 'warning'}); |
| | |
| | | this.listLoading = false |
| | | }) |
| | | }, |
| | | |
| | | parseNumber (value, type) { |
| | | if (type === '整改类型') { |
| | | return this.rectifyTypeList.find((item) => item.id === value).name; |
| | | } else if (type === '隐患整改状态') { |
| | | return this.dangerStatusList.find((item) => item.id === value).name; |
| | | } |
| | | }, |
| | | |
| | | deleteById(val){ |
| | | this.$confirm('删除此条信息,是否继续','提示',{ |
| | | confirmButtonText:'确定', |
| | | cancelButtonText:'取消', |
| | | type:'warning', |
| | | }).then(()=> { |
| | | deleteHiddenDangerReport({id:val.id}).then( ()=>{ |
| | | this.hiddenDangerList() |
| | | this.$notify({ |
| | | title:'成功', |
| | | message:'删除成功', |
| | | type:'success', |
| | | duration:2000, |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | clearLevel(){ |
| | | this.filter.filter.level = null |
| | | }, |
| | |
| | | padding: 1px 3px 0 3px; |
| | | |
| | | } |
| | | .basic_search{ |
| | | display:inline-block; |
| | | padding-bottom: 10px; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:90%; |
| | | } |
| | | .analyseUnit_box{ |
| | | width:200px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <el-dialog title="新增" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="800px"> |
| | | <el-dialog :title="title" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="50%"> |
| | | <el-form ref="dataForm" :rules="dataFormRules" :model="dataForm" label-position="right" label-width="140px" style="" element-loading-text="保存中..."> |
| | | <el-form-item label="隐患级别:" prop="level"> |
| | | <el-select v-model="dataForm.level" placeholder="请选择" :disabled="isView"> |
| | | <el-option |
| | | v-for="item in levels" |
| | | :key="item.key" |
| | | :label="item.value" |
| | | :value="item.key"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <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="analyseUnit_input" v-model.trim="dataForm.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="analyseUnit_input" v-model.trim="dataForm.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-select v-model="dataForm.depId" class="analyseUnit_input" placeholder="请选择所属部门"> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.department" |
| | | ></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="produceDeviceId"> |
| | | <el-select class="analyseUnit_input" v-model="dataForm.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="analyseUnit_input" v-model.trim="dataForm.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 :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="隐患来源" prop="dangerSource"> |
| | | <el-select class="analyseUnit_input" v-model="dataForm.dangerSource" placeholder="请选择隐患来源" clearable filterable> |
| | | <el-option v-for="item in dangerSourceList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-form-item label="选择整改人:" prop="rectifier"> |
| | | <el-input v-model="dataForm.rectifier" readonly style="width: 205px" placeholder="请选择" > |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="隐患等级" prop="dangerLevel"> |
| | | <el-select class="analyseUnit_input" v-model="dataForm.dangerLevel" placeholder="请选择隐患等级" clearable filterable> |
| | | <el-option v-for="item in dangerLevelList" :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="dangerType"> |
| | | <el-select class="analyseUnit_input" v-model="dataForm.dangerType" placeholder="请选择隐患类型" clearable filterable> |
| | | <el-option v-for="item in dangerTypeList" :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="dangerResult"> |
| | | <el-select class="analyseUnit_input" v-model="dataForm.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="analyseUnit_input" type="textarea" :rows="2" style="padding-bottom: 10px" v-model.trim="dataForm.dangerReason" placeholder="请输入隐患产生原因"></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="rectifyType"> |
| | | <el-select class="analyseUnit_input" v-model="dataForm.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-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="analyseUnit_input" v-model="dataForm.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-select v-model="dataForm.rectifyDepId" class="analyseUnit_input" @change="changeExec" placeholder="请选择所属部门" clearable filterable> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.department" |
| | | ></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="liablePersonId"> |
| | | <el-select class="analyseUnit_input" v-model="dataForm.liablePersonId" placeholder="请选择整改责任人" clearable filterable> |
| | | <el-option v-for="item in execUidList" :key="item.id" :label="item.realname" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-input> |
| | | <el-button style="margin-left: 10px;" type="primary" |
| | | @click="showPersonSelect">选择 |
| | | </el-button> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="整改措施:" prop="rectifymeasure"> |
| | | <el-input |
| | | style="width: 400px" |
| | | type="textarea" |
| | | :rows="3" |
| | | :disabled="isView" |
| | | placeholder="请输入内容" |
| | | v-model="dataForm.rectifymeasure"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="整改期限:" prop="rectifydeadline"> |
| | | <el-date-picker |
| | | v-model="dataForm.rectifydeadline" |
| | | type="datetime" |
| | | format="yyyy-MM-dd HH:mm" |
| | | :picker-options="pickerOptions" |
| | | value-format="yyyy-MM-dd HH:mm" |
| | | placeholder="选择日期时间"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="上报说明:" prop="note"> |
| | | <el-input |
| | | style="width: 400px" |
| | | type="textarea" |
| | | :rows="3" |
| | | :disabled="isView" |
| | | placeholder="请输入内容" |
| | | v-model="dataForm.note"> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="上报图片:" v-if="!isView"> |
| | | <el-upload |
| | | ref="upload" |
| | | :action="baseUrl" |
| | | :auto-upload="false" |
| | | :headers="headers" |
| | | :on-change="handleChange" |
| | | name="file" |
| | | :file-list="fileList" |
| | | list-type="picture-card" |
| | | multiple |
| | | > |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="上报图片:" v-if="isView" > |
| | | <el-image |
| | | class="upload-img" |
| | | v-for='item in imgUrls' |
| | | :key='item.id' |
| | | :src="item.url" |
| | | :preview-src-list="imgPreviewUrls" |
| | | style="width:100px;height: 100px;margin: 10px;" |
| | | > |
| | | </el-image> |
| | | </el-form-item> |
| | | |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="整改资金" prop="cost"> |
| | | <el-input class="analyseUnit_input" type="number" v-model="dataForm.cost" placeholder="请选择整改资金"> </el-input> |
| | | </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="analyseUnit_input" type="textarea" :rows="2" style="padding-bottom: 10px" v-model.trim="dataForm.rectifyDesc" placeholder="请输入整改措施"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | |
| | | </el-form> |
| | | |
| | | <div style="margin-top: 20px;margin-left: 140px;" class="dialog-footer" v-if="!isView"> |
| | | <div align="right" class="dialog-footer" v-if="!isView"> |
| | | <el-button @click="dialogFormVisible = false">取消</el-button> |
| | | <el-button type="primary" @click="trigger2Submit" :disabled="submiting">上报</el-button> |
| | | </div> |
| | |
| | | import personSelect from './personSelect' |
| | | import { hiddenDangerReport } from '@/api/hiddenDanger'; |
| | | import {getToken} from "@/utils/auth"; |
| | | import {modHiddenDangerReport} from "../../../../../../api/hiddenDanger"; |
| | | export default { |
| | | name: "reportDialog", |
| | | data(){ |
| | | return { |
| | | title:'', |
| | | baseUrl: process.env.BASE_API + 'hiddenDanger/report', |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | submiting:false, |
| | | levels:[ |
| | | {"key":"URGENT","value":"重大隐患"}, |
| | | {"key":"COMMON","value":"一般隐患"}, |
| | | departmentList: [], |
| | | userList: [], |
| | | execUidList:[], |
| | | allProduceDeviceData: [], |
| | | allSafetyRiskUnitData: [], |
| | | safetyRiskUnitData: [], |
| | | dangerLevelList: [ |
| | | { id: 1, name: '一般隐患' }, |
| | | { id: 2, name: '重大隐患' } |
| | | ], |
| | | dangerSourceList: [ |
| | | { id: 1, name: '日常排查' }, |
| | | { id: 2, name: '综合性排查' }, |
| | | { id: 3, name: '专业性排查' }, |
| | | { id: 4, name: '季节性排查' }, |
| | | { id: 5, name: '重点时段及节假日前排查' }, |
| | | { id: 6, name: '事故类比排查' }, |
| | | { id: 7, name: '复产复工前排查' }, |
| | | { id: 8, name: '外聘专家诊断式排查' }, |
| | | { id: 9, name: '管控措施失效' }, |
| | | { id: 10, name: '其他' } |
| | | ], |
| | | dangerResultList: [ |
| | | { id: 1, name: '无' }, |
| | | { id: 2, name: '轻伤' }, |
| | | { id: 3, name: '重伤' }, |
| | | { id: 4, name: '死亡' } |
| | | ], |
| | | dangerTypeList: [ |
| | | { id: 1, name: '安全' }, |
| | | { id: 2, name: '工艺' }, |
| | | { id: 3, name: '电气' }, |
| | | { id: 4, name: '仪表' }, |
| | | { id: 5, name: '消防' }, |
| | | { id: 6, name: '总图' }, |
| | | { id: 7, name: '设备' }, |
| | | { id: 8, name: '其他' } |
| | | ], |
| | | rectifyTypeList: [ |
| | | { id: 1, name: '即查即改' }, |
| | | { id: 2, name: '限期整改' } |
| | | ], |
| | | pickerOptions:{ |
| | | disabledDate(now){ |
| | |
| | | }, |
| | | fileList: [], |
| | | dataForm: { |
| | | rectifydeadline:'', |
| | | rectifymeasure:'', |
| | | rectifier:'', |
| | | rectifierid:'', |
| | | note: '', |
| | | level:'' |
| | | dangerDesc: null, |
| | | dangerCode: null, |
| | | depId: null, |
| | | produceDeviceId: null, |
| | | riskUnitId: null, |
| | | dangerSource: null, |
| | | dangerLevel: null, |
| | | dangerType: null, |
| | | dangerReason: null, |
| | | dangerResult: null, |
| | | rectifyType: null, |
| | | rectifyDepId: null, |
| | | liablePersonId: null, |
| | | rectifyTime: null, |
| | | cost: null, |
| | | rectifyDesc: null |
| | | }, |
| | | dataFormRules:{ |
| | | level: [{ required: true, message: '隐患级别不能为空', trigger: 'change' }], |
| | | rectifier: [{ required: true, message: '整改人不能为空', trigger: 'change' }], |
| | | rectifymeasure: [{ required: true, message: '整改措施不能为空', trigger: 'blur' }], |
| | | rectifydeadline: [{ required: true, message: '整改期限不能为空', trigger: 'change' }], |
| | | note: [{ required: true, message: '上报说明不能为空', trigger: 'blur' }], |
| | | dangerDesc: [{ required: true, message: '请填写隐患情况描述', trigger: 'blur' }], |
| | | dangerCode: [{ required: true, message: '请填写隐患名称', trigger: 'blur' }], |
| | | depId: [{ required: true, message: '请选择隐患所属部门', trigger: 'change' }], |
| | | produceDeviceId: [{ required: true, message: '请选择生产装置', trigger: 'change' }], |
| | | riskUnitId: [{ required: true, message: '请选择风险分析单元', trigger: 'change' }], |
| | | dangerSource: [{ required: true, message: '请选择隐患来源', trigger: 'change' }], |
| | | dangerLevel: [{ required: true, message: '请选择隐患等级', trigger: 'change' }], |
| | | dangerType: [{ required: true, message: '请选择隐患类型', trigger: 'change' }], |
| | | dangerReason: [{ required: true, message: '请填写隐患产生原因分析', trigger: 'blur' }], |
| | | dangerResult: [{ required: true, message: '请选择隐患可能后果', trigger: 'change' }], |
| | | rectifyType: [{ required: true, message: '请选择整改类型', trigger: 'change' }], |
| | | rectifyDepId: [{ required: true, message: '请选择整改单位', trigger: 'change' }], |
| | | liablePersonId: [{ required: true, message: '请选择整改责任人', trigger: 'change' }], |
| | | rectifyTime: [{ required: true, message: '请选择整改期限', trigger: 'change' }], |
| | | cost: [{ required: true, message: '请选择整改资金', trigger: 'blur' }], |
| | | rectifyDesc: [{ required: true, message: '请填写整改内容', trigger: 'blur' }] |
| | | }, |
| | | dialogFormVisible: false, |
| | | isView:false, |
| | |
| | | methods:{ |
| | | resetDataForm(){ |
| | | this.dataForm = { |
| | | rectifydeadline:'', |
| | | rectifymeasure:'', |
| | | rectifier:'', |
| | | rectifierid:'', |
| | | note: '', |
| | | level:'' |
| | | dangerDesc: null, |
| | | dangerCode: null, |
| | | depId: null, |
| | | produceDeviceId: null, |
| | | riskUnitId: null, |
| | | dangerSource: null, |
| | | dangerLevel: null, |
| | | dangerType: null, |
| | | dangerReason: null, |
| | | dangerResult: null, |
| | | rectifyType: null, |
| | | rectifyDepId: null, |
| | | liablePersonId: null, |
| | | rectifyTime: null, |
| | | cost: null, |
| | | rectifyDesc: null |
| | | } |
| | | }, |
| | | show(){ |
| | | show(type, value, userList,departmentList, allProduceDeviceData, allSafetyRiskUnitData){ |
| | | this.title = type |
| | | this.dialogFormVisible = true |
| | | this.isView = false |
| | | this.resetDataForm() |
| | | this.userList = JSON.parse(JSON.stringify(userList)) |
| | | this.departmentList = departmentList; |
| | | this.allProduceDeviceData = JSON.parse(JSON.stringify(allProduceDeviceData)); |
| | | this.allSafetyRiskUnitData = allSafetyRiskUnitData; |
| | | if(type === '新增'){ |
| | | this.dataForm = { |
| | | dangerDesc: null, |
| | | dangerCode: null, |
| | | depId: null, |
| | | produceDeviceId: null, |
| | | riskUnitId: null, |
| | | dangerSource: null, |
| | | dangerLevel: null, |
| | | dangerType: null, |
| | | dangerReason: null, |
| | | dangerResult: null, |
| | | rectifyType: null, |
| | | rectifyDepId: null, |
| | | liablePersonId: null, |
| | | rectifyTime: null, |
| | | cost: null, |
| | | rectifyDesc: null |
| | | } |
| | | }else if(type === '修改'){ |
| | | for( let key in this.dataForm){ |
| | | this.dataForm[key] = JSON.parse(JSON.stringify(value))[key] |
| | | } |
| | | this.dataForm.id = JSON.parse(JSON.stringify(value)).id |
| | | } |
| | | |
| | | }, |
| | | trigger2Submit(){ |
| | | this.$refs["dataForm"].validate(valid =>{ |
| | | if(valid){ |
| | | this.submiting = true |
| | | let formData = new FormData() |
| | | formData.append('rectifier', this.dataForm.rectifier) |
| | | formData.append("rectifierid",this.dataForm.rectifierid) |
| | | formData.append("level",this.dataForm.level) |
| | | formData.append("rectifymeasure",this.dataForm.rectifymeasure) |
| | | formData.append("rectifydeadline",this.dataForm.rectifydeadline) |
| | | formData.append("note",this.dataForm.note) |
| | | this.fileList.forEach(file=>{ |
| | | formData.append("files",file.raw) |
| | | }) |
| | | hiddenDangerReport(formData).then(res=>{ |
| | | if (res.data.code === '200') { |
| | | this.dialogFormVisible = false |
| | | if(this.title === '新增'){ |
| | | this.submiting = true |
| | | hiddenDangerReport(this.dataForm).then(res=>{ |
| | | if (res.data.code === '200') { |
| | | this.dialogFormVisible = false |
| | | this.$message({ |
| | | message: '创建成功', |
| | | type: 'success' |
| | | }); |
| | | this.$emit("refresh") |
| | | }else{ |
| | | this.$message({ |
| | | message: res.data.message, |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | this.fileList = [] |
| | | }).catch(err=>{ |
| | | console.log(err) |
| | | this.$message({ |
| | | message: '创建成功', |
| | | type: 'success' |
| | | }); |
| | | this.$emit("refresh") |
| | | }else{ |
| | | this.$message({ |
| | | message: res.data.message, |
| | | message: "接口错误,请联系管理员", |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | this.fileList = [] |
| | | }).catch(err=>{ |
| | | console.log(err) |
| | | this.$message({ |
| | | message: "接口错误,请联系管理员", |
| | | type: 'warning' |
| | | }); |
| | | }).finally(()=>{ |
| | | }).finally(()=>{ |
| | | this.submiting = false |
| | | }) |
| | | }) |
| | | }else{ |
| | | this.submiting = true |
| | | modHiddenDangerReport(this.dataForm).then(res=>{ |
| | | if (res.data.code === '200') { |
| | | this.dialogFormVisible = false |
| | | this.$message({ |
| | | message: '修改成功', |
| | | type: 'success' |
| | | }); |
| | | this.$emit("refresh") |
| | | }else{ |
| | | this.$message({ |
| | | message: res.data.message, |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | this.fileList = [] |
| | | }).catch(err=>{ |
| | | console.log(err) |
| | | this.$message({ |
| | | message: "接口错误,请联系管理员", |
| | | type: 'warning' |
| | | }); |
| | | }).finally(()=>{ |
| | | this.submiting = false |
| | | }) |
| | | } |
| | | |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | |
| | | }) |
| | | |
| | | }, |
| | | |
| | | changeUnit() { |
| | | this.dataForm.riskUnitId = null; |
| | | this.safetyRiskUnitData = this.allSafetyRiskUnitData.filter((item) => item.produceDeviceId === this.dataForm.produceDeviceId); |
| | | }, |
| | | |
| | | changeExec(){ |
| | | if(this.dataForm.rectifyDepId === '') { |
| | | this.execUidList = [] |
| | | } |
| | | this.dataForm.liablePersonId = '' |
| | | this.execUidList = this.userList.filter ( item => item.department === this.dataForm.rectifyDepId) |
| | | }, |
| | | |
| | | showPersonSelect(){ |
| | | this.$refs.selectPerson.show(); |
| | | }, |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | .basic_search{ |
| | | display:inline-block; |
| | | padding-bottom: 10px; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:90%; |
| | | } |
| | | .analyseUnit_box{ |
| | | width:200px; |
| | | } |
| | | .el-picker-panel__footer .el-button--text.el-picker-panel__link-btn { |
| | | display: none; |
| | | } |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div style="margin: 10px"> |
| | | <span class="span-filter-label">单号</span> |
| | | <el-input style="width: 140px" v-model="filter.filter.code" ></el-input> |
| | | <span class="span-filter-label">状态</span> |
| | | <el-select |
| | | v-model="filter.filter.status" |
| | | class="filter-item" |
| | | clearable |
| | | @clear="clearStatus" |
| | | style="width:150px;margin-bottom: 10px"> |
| | | <el-option |
| | | v-for="item in reportStatus" |
| | | :key="item.key" |
| | | :label="item.value" |
| | | :value="item.key"> |
| | | </el-option> |
| | | </el-select> |
| | | <span class="span-filter-label">隐患等级</span> |
| | | <el-select v-model="filter.filter.level" |
| | | clearable |
| | | @clear="clearLevel" |
| | | placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in levels" |
| | | :key="item.key" |
| | | :label="item.value" |
| | | :value="item.key"> |
| | | </el-option> |
| | | </el-select> |
| | | |
| | | <span class="span-filter-label">整改人</span> |
| | | <el-input style="width: 160px" v-model="filter.filter.rectifierName"></el-input> |
| | | |
| | | <span class="span-filter-label">隐患来源</span> |
| | | <el-select v-model="filter.filter.source" clearable placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in sources" |
| | | :key="item.key" |
| | | :label="item.value" |
| | | :value="item.key"> |
| | | </el-option> |
| | | </el-select> |
| | | <div class="basic_search"> |
| | | <span>隐患等级:</span> |
| | | <el-select class="analyseUnit_box" v-model="filter.dangerLevel" placeholder="隐患等级" filterable clearable> |
| | | <el-option v-for="item in dangerLevelList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>隐患来源:</span> |
| | | <el-select class="analyseUnit_box" v-model="filter.dangerSource" placeholder="隐患来源" filterable clearable> |
| | | <el-option v-for="item in dangerSourceList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>隐患状态:</span> |
| | | <el-select class="analyseUnit_box" v-model="filter.dangerStatus" placeholder="隐患状态" filterable clearable> |
| | | <el-option v-for="item in dangerStatusList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>隐患类型:</span> |
| | | <el-select class="analyseUnit_box" v-model="filter.dangerType" placeholder="隐患类型" filterable clearable> |
| | | <el-option v-for="item in dangerTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | |
| | | |
| | | <el-button class="filter-item" style="margin-left: 10px;" type="primary" |
| | | icon="el-icon-plus" @click="showCreateHandle">新增 |
| | | icon="el-icon-plus" @click="showCreateHandle('新增', '')">新增 |
| | | </el-button> |
| | | <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-search" |
| | | @click="queryHandle"/> |
| | |
| | | highlight-current-row |
| | | style="width: 100%;" |
| | | > |
| | | <el-table-column type="index" label="序号" align="center" width="80"/> |
| | | <el-table-column label="单号" prop="code" align="center" /> |
| | | <el-table-column label="状态" prop="status" align="center" > |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | | <el-table-column prop="dangerDesc" label="隐患情况描述" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="produceDeviceName" label="生产装置名称" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="riskUnitName" label="风险分析单元名称" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="dangerSource" label="隐患来源" show-overflow-tooltip min-width="150px"> |
| | | <template slot-scope="scope"> |
| | | <span >{{scope.row.status}}</span> |
| | | <span v-if="new Date(scope.row.rectifydeadline) < new Date() && scope.row.status !== '已完成'" class="overdue-img">逾期</span> |
| | | {{ parseNumber(scope.row.dangerSource, '隐患来源') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="隐患等级" prop="level" align="center" > |
| | | <el-table-column prop="dangerLevel" label="隐患等级" show-overflow-tooltip min-width="150px" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-tag :type="scope.row.level == '重大隐患'?'danger':'warning'">{{scope.row.level}}</el-tag> |
| | | <el-tag :type="scope.row.dangerLevel === 1 ? 'warning' : 'danger'"> |
| | | {{ parseNumber(scope.row.dangerLevel, '隐患等级') }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="隐患来源" prop="source" align="center" > |
| | | <el-table-column prop="dangerType" label="隐患类型" show-overflow-tooltip min-width="150px"> |
| | | <template slot-scope="scope"> |
| | | <span>{{sources.find(item=>item.key === scope.row.source).value}}</span> |
| | | {{ parseNumber(scope.row.dangerType, '隐患类型') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="上报人" prop="requestor" align="center" /> |
| | | <el-table-column label="上报时间" prop="createtime" align="center" /> |
| | | <el-table-column label="整改人" prop="rectifier" align="center" /> |
| | | |
| | | <el-table-column label="整改期限" prop="rectifydeadline" align="center" > |
| | | <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" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span v-bind:class="{'overdue':new Date(scope.row.rectifydeadline) < new Date() && scope.row.status !== '已完成'}">{{scope.row.rectifydeadline}} |
| | | </span> |
| | | <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> |
| | | <el-table-column label="整改时间" prop="rectifytime" align="center" > |
| | | </el-table-column> |
| | | <el-table-column label="验收时间" prop="accepttime" align="center" > |
| | | </el-table-column> |
| | | <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip min-width="200px"></el-table-column> |
| | | <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip min-width="200px"></el-table-column> |
| | | <el-table-column label="操作" align="center" width="240" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="viewHandle(scope.row)">查看</el-button> |
| | | <el-button type="text" @click="showCreateHandle('修改', scope.row)">修改</el-button> |
| | | <el-button type="text" style="color: red" @click="deleteById(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | import {hiddenDangerReportList} from '@/api/hiddenDanger'; |
| | | import reportView from '../components/reportView' |
| | | import reportDialog from './components/reportDialog' |
| | | import {getAllProductionDeviceList} from "../../../../../api/riskSource"; |
| | | import {getAllSafetyRiskAnalyseUnitList} from "../../../../../api/riskLevelManage"; |
| | | import {getDepartmentList} from "../../../../../api/departmentManage"; |
| | | import {safetyInspectionItemName} from "../../../../../api/safetySelfInspection"; |
| | | import {deleteHiddenDangerReport} from "../../../../../api/hiddenDanger"; |
| | | |
| | | export default { |
| | | name: "report", |
| | |
| | | tableKey: 0, |
| | | tableData:[], |
| | | listLoading: true, |
| | | levels:[ |
| | | {"key":"URGENT","value":"重大隐患"}, |
| | | {"key":"COMMON","value":"一般隐患"}, |
| | | departmentList: [], |
| | | dangerLevelList: [ |
| | | { id: 1, name: '一般隐患' }, |
| | | { id: 2, name: '重大隐患' } |
| | | ], |
| | | sources:[ |
| | | {"key":1,"value":"隐患上报"}, |
| | | {"key":2,"value":"巡检上报"}, |
| | | dangerSourceList: [ |
| | | { id: 1, name: '日常排查' }, |
| | | { id: 2, name: '综合性排查' }, |
| | | { id: 3, name: '专业性排查' }, |
| | | { id: 4, name: '季节性排查' }, |
| | | { id: 5, name: '重点时段及节假日前排查' }, |
| | | { id: 6, name: '事故类比排查' }, |
| | | { id: 7, name: '复产复工前排查' }, |
| | | { id: 8, name: '外聘专家诊断式排查' }, |
| | | { id: 9, name: '管控措施失效' }, |
| | | { id: 10, name: '其他' } |
| | | ], |
| | | reportStatus:[ |
| | | {"key":"TORECTIFY","value":"待整改"}, |
| | | {"key":"TOACCEPT","value":"整改待验收"}, |
| | | {"key":"REJECTED","value":"驳回待整改"}, |
| | | {"key":"COMPLETED","value":"已完成"}, |
| | | dangerStatusList: [ |
| | | { id: 0, name: '整改中' }, |
| | | { id: 1, name: '待验收' }, |
| | | { id: 2, name: '延期整改' }, |
| | | { id: 4, name: '超期未整改' }, |
| | | { id: 9, name: '已验收' } |
| | | ], |
| | | dangerTypeList: [ |
| | | { id: 1, name: '安全' }, |
| | | { id: 2, name: '工艺' }, |
| | | { id: 3, name: '电气' }, |
| | | { id: 4, name: '仪表' }, |
| | | { id: 5, name: '消防' }, |
| | | { id: 6, name: '总图' }, |
| | | { id: 7, name: '设备' }, |
| | | { id: 8, name: '其他' } |
| | | ], |
| | | dangerResultList: [ |
| | | { id: 1, name: '无' }, |
| | | { id: 2, name: '轻伤' }, |
| | | { id: 3, name: '重伤' }, |
| | | { id: 4, name: '死亡' } |
| | | ], |
| | | allProduceDeviceData: [], |
| | | allSafetyRiskUnitData: [], |
| | | dataForm: { |
| | | rectifydeadline:'', |
| | | rectifymeasure:'', |
| | |
| | | }, |
| | | isSupervision: '', |
| | | filter:{ |
| | | pageIndex:1, |
| | | pageSize:10, |
| | | filter:{ |
| | | code:'', |
| | | status:null, |
| | | level:null, |
| | | rectifierName:'', |
| | | } |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | dangerLevel: null, |
| | | dangerSource: null, |
| | | dangerStatus: null, |
| | | dangerType: null |
| | | }, |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | this.hiddenDangerList(); |
| | | this.getDepartmentData(); |
| | | this.getUser(); |
| | | this.getAllProduceDeviceData(); |
| | | this.getAllSafetyRiskEventData(); |
| | | }, |
| | | methods: { |
| | | queryHandle: function () { |
| | |
| | | level:'' |
| | | } |
| | | }, |
| | | showCreateHandle() { |
| | | this.$refs.reportDialog.show() |
| | | showCreateHandle(type, value) { |
| | | this.$refs.reportDialog.show(type, value,this.userList, this.departmentList, this.allProduceDeviceData, this.allSafetyRiskUnitData) |
| | | }, |
| | | viewHandle: function (row) { |
| | | this.$refs.reportView.showDialog("查看",row) |
| | |
| | | hiddenDangerReportList(this.filter) |
| | | .then(res=>{ |
| | | if (res.data.code === '200') { |
| | | this.tableData = res.data.result.records |
| | | this.recordTotal = res.data.result.total |
| | | this.tableData = res.data.data |
| | | this.recordTotal = res.data.count |
| | | } |
| | | else{ |
| | | this.$message({message: res.data.message, type: 'warning'}); |
| | |
| | | |
| | | }, |
| | | |
| | | |
| | | clearStatus(){ |
| | | this.filter.filter.status = null |
| | | 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' |
| | | }) |
| | | } |
| | | }, |
| | | clearLevel(){ |
| | | this.filter.filter.level = null |
| | | |
| | | //获取生产装置列表 |
| | | async getAllProduceDeviceData () { |
| | | let res = await getAllProductionDeviceList(); |
| | | if (res.data.code === '200') { |
| | | this.allProduceDeviceData = JSON.parse(JSON.stringify(res.data.data)); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // 获取安全风险分析单元数据 |
| | | async getAllSafetyRiskEventData () { |
| | | let res = await getAllSafetyRiskAnalyseUnitList(); |
| | | if (res.data.code === '200') { |
| | | this.allSafetyRiskUnitData = JSON.parse(JSON.stringify(res.data.data)); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | async getDepartmentData(){ |
| | | let res = await getDepartmentList({pageSize:1000,pageIndex:1}) |
| | | if(res.data.code === '200'){ |
| | | this.departmentList = res.data.result.result |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | | type:'warning' |
| | | }) |
| | | if(res.data.code === '50001'){ |
| | | this.riskSourceData = [] |
| | | } |
| | | } |
| | | }, |
| | | |
| | | deleteById(val){ |
| | | this.$confirm('删除此条信息,是否继续','提示',{ |
| | | confirmButtonText:'确定', |
| | | cancelButtonText:'取消', |
| | | type:'warning', |
| | | }).then(()=> { |
| | | deleteHiddenDangerReport({id:val.id}).then( ()=>{ |
| | | this.hiddenDangerList() |
| | | this.$notify({ |
| | | title:'成功', |
| | | message:'删除成功', |
| | | type:'success', |
| | | duration:2000, |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | parseNumber(value, type){ |
| | | if (type === '隐患来源') { |
| | | return this.dangerSourceList.find((item) => item.id === value).name; |
| | | } else if (type === '隐患等级') { |
| | | return this.dangerLevelList.find((item) => item.id === value).name; |
| | | } else if (type === '隐患类型') { |
| | | return this.dangerTypeList.find((item) => item.id === value).name; |
| | | } else { |
| | | return this.dangerResultList.find((item) => item.id === value).name; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | padding: 1px 3px 0 3px; |
| | | |
| | | } |
| | | .basic_search{ |
| | | display:inline-block; |
| | | padding-bottom: 10px; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:90%; |
| | | } |
| | | .analyseUnit_box{ |
| | | width:200px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-dialog title="巡检记录详情" :visible.sync="inspectionRecordFormVisible" append-to-body :close-on-click-modal="false" width="40%"> |
| | | <el-form ref="inspectionRecordForm" :model="inspectionRecordForm" label-position="right" label-width="120px" readonly> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="任务名称" prop="title"> |
| | | <el-input v-model="inspectionRecordForm.title" class="analyseUnit_input" readonly> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检查类型" prop="type"> |
| | | <el-select v-model="inspectionRecordForm.type" class="analyseUnit_input" readonly> |
| | | <el-option |
| | | v-for="item in typeList" |
| | | :key=item.id |
| | | :label=item.name |
| | | :value=item.id |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="巡检人" prop="execUname"> |
| | | <el-input v-model="inspectionRecordForm.execUname" class="analyseUnit_input" readonly> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="任务状态" prop="status"> |
| | | <el-select v-model="inspectionRecordForm.status" class="analyseUnit_input" readonly> |
| | | <el-option |
| | | v-for="item in statusList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="巡检开始时间" prop="expTime"> |
| | | <el-date-picker v-model="inspectionRecordForm.expTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="巡检开始时间" class="analyseUnit_input" readonly></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="巡检结束时间" prop="endTime"> |
| | | <el-date-picker v-model="inspectionRecordForm.endTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="巡检结束时间" class="analyseUnit_input" readonly></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="巡检提交时间" prop="execTime"> |
| | | <el-date-picker v-model="inspectionRecordForm.execTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="巡检提交时间" class="analyseUnit_input" readonly></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | </el-form> |
| | | </el-dialog> |
| | | <el-dialog :title="titleDetail" :visible.sync="inspectionRecordDetailFormVisible" append-to-body :close-on-click-modal="false" width="500px"> |
| | | <el-form ref="inspectionRecordDetailForm" :rules="inspectionRecordDetailFormRules" :model="inspectionRecordDetailForm" label-position="right" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="巡检结果" prop="result"> |
| | | <el-select v-model="inspectionRecordDetailForm.result" :disabled="ifShow" class="input" @change="ifNormal = (inspectionRecordDetailForm.result === 2 ? true : false)"> |
| | | <el-option |
| | | v-for="item in resultList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <div v-if="ifNormal"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="异常通知部门" prop="noticeDepId"> |
| | | <el-select v-model="inspectionRecordDetailForm.noticeDepId" filterable clearable class="input" @change="changeDepartment('notice')" :disabled="ifShow"> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.department" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="异常通知人员" prop="noticeUid"> |
| | | <el-select v-model="inspectionRecordDetailForm.noticeUid" clearable filterable :disabled="ifShow" class="input"> |
| | | <el-option |
| | | v-for="item in noticeUserList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.realname" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="整改时间" prop="fixTime"> |
| | | <el-date-picker placeholder="选择时间" v-model="inspectionRecordDetailForm.fixTime" class="input" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" :disabled="ifShow"></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="异常整改部门" prop="fixDepId"> |
| | | <el-select v-model="inspectionRecordDetailForm.fixDepId" filterable clearable class="input" :disabled="ifShow" @change="changeDepartment('fix')"> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.department" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row > |
| | | <el-col :span="24"> |
| | | <el-form-item label="整改人" prop="fixUid"> |
| | | <el-select v-model="inspectionRecordDetailForm.fixUid" clearable filterable :disabled="ifShow" class="input"> |
| | | <el-option |
| | | v-for="item in fixUserList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.realname" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="巡检结果备注" prop="info"> |
| | | <el-input type="textarea" :rows="3" v-model="inspectionRecordDetailForm.info" :disabled="ifShow" class="input"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="上报图片" prop="imgInfoList"> |
| | | <el-upload |
| | | accept=".pdf,.jpg,.png" |
| | | :action="fileRoad" |
| | | class="upload-demo" |
| | | ref="upload" |
| | | :headers="header" |
| | | :data="uploadForm" |
| | | list-type="picture-card" |
| | | :file-list="fileList" |
| | | v-model="inspectionRecordDetailForm.imgInfoList" |
| | | :on-change="handleChangeFile" |
| | | :on-success="onFileSuccess" |
| | | :multiple="false" |
| | | :auto-upload="true"> |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | | :src="file.url" alt="" |
| | | > |
| | | <span class="el-upload-list__item-actions"> |
| | | <span |
| | | class="el-upload-list__item-preview" |
| | | @click="handleFile(file)" |
| | | > |
| | | <i class="el-icon-zoom-in"></i> |
| | | </span> |
| | | <span |
| | | v-if="!disabled" |
| | | class="el-upload-list__item-delete" |
| | | @click="handleRemove(file,'one')" |
| | | > |
| | | <i class="el-icon-delete"></i> |
| | | </span> |
| | | </span> |
| | | </div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-dialog title="查看" :visible.sync="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="analyseUnit_input" type="textarea" :rows="3" v-model.trim="recordForm.checkContent" placeholder="检查内容"> </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <div v-if="ifLook"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="异常通知部门" prop="noticeDepId"> |
| | | <el-select v-model="inspectionRecordDetailForm.problem.noticeDepId" filterable clearable class="input" @change="changeDepartment('notice')" readonly> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.department" |
| | | ></el-option> |
| | | </el-dialog> |
| | | <el-dialog title="提交" :visible.sync="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="analyseUnit_input" 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-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="异常通知人员" prop="noticeUid"> |
| | | <el-select v-model="inspectionRecordDetailForm.problem.noticeUid" clearable filterable readonly class="input"> |
| | | <el-option |
| | | v-for="item in noticeUserList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.realname" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="整改时间" prop="fixTime"> |
| | | <el-date-picker placeholder="选择时间" v-model="inspectionRecordDetailForm.problem.fixTime" class="input" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" readonly></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="异常整改部门" prop="fixDepId"> |
| | | <el-select v-model="inspectionRecordDetailForm.problem.fixDepId" filterable clearable class="input" readonly> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.department" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row > |
| | | <el-col :span="24"> |
| | | <el-form-item label="整改人" prop="fixUid"> |
| | | <el-select v-model="inspectionRecordDetailForm.problem.fixUid" clearable filterable readonly class="input"> |
| | | <el-option |
| | | v-for="item in fixUserList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.realname" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="巡检结果备注" prop="info" > |
| | | <el-input type="textarea" :rows="3" v-model="inspectionRecordDetailForm.problem.info" aria-readonly="true" class="input"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="上报图片" prop="imgInfoList"> |
| | | <el-upload |
| | | accept=".pdf,.jpg,.png" |
| | | :action="fileRoad" |
| | | class="upload-demo" |
| | | ref="upload" |
| | | :headers="header" |
| | | :data="uploadForm" |
| | | list-type="picture-card" |
| | | :file-list="fileList" |
| | | v-model="inspectionRecordDetailForm.imgInfoList" |
| | | :on-change="handleChangeFile" |
| | | :on-success="onFileSuccess" |
| | | :auto-upload="true"> |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | | :src="file.url" alt="" |
| | | > |
| | | <span class="el-upload-list__item-actions"> |
| | | <span |
| | | class="el-upload-list__item-preview" |
| | | @click="handleFile(file)" |
| | | > |
| | | <i class="el-icon-zoom-in"></i> |
| | | </span> |
| | | <span |
| | | v-if="!disabled" |
| | | class="el-upload-list__item-delete" |
| | | @click="handleRemove(file,'one')" |
| | | > |
| | | <i class="el-icon-delete"></i> |
| | | </span> |
| | | </span> |
| | | </div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div align="right" class="dialog-footer"> |
| | | <el-button @click="isShowSubmitDialog = !isShowSubmitDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitRecord" size="default">确 定</el-button> |
| | | </div> |
| | | <div style="text-align: center" v-show="ifConfirm"> |
| | | <el-button @click="inspectionRecordDetailFormVisible = false">取消</el-button> |
| | | <el-button type="primary" @click="submitInspectionRecordDetail()">确认</el-button> |
| | | </div> |
| | | </el-form> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="dialogVisible" :append-to-body="true"> |
| | | <img width="100%" :src="dialogImageUrl" alt=""> |
| | | </el-dialog> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Cookies from "js-cookie"; |
| | | import {submitUnitOne} from "../../../../../api/inspectionTask"; |
| | | import {submitTaskRecord, submitUnitOne} from "../../../../../api/inspectionTask"; |
| | | |
| | | export default { |
| | | name: "detail", |
| | |
| | | fixUserList:[], |
| | | departmentList:[], |
| | | fileList:[], |
| | | resultList:[{id:0,name:'未巡检'},{id:1,name:'正常'},{id:2,name:'异常'}], |
| | | typeList:[{id:1,name:'日常检查'},{id:2,name:'周期检查'}], |
| | | statusList:[{id:1,name:'待巡检'},{id:2,name:'巡检中'},{id:3,name:'已完成'},{id:4,name:'超时未巡检'},{id:5,name:'已取消'}], |
| | | 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: '不正常' } |
| | | ] |
| | | } |
| | | }, |
| | | components:{ |
| | | |
| | | }, |
| | | methods:{ |
| | | showInspectionRecordForm(value) { |
| | | this.inspectionRecordFormVisible = true |
| | | this.inspectionRecordForm = JSON.parse(JSON.stringify(value)) |
| | | showInspectionRecordForm(type,value) { |
| | | debugger |
| | | if (type === '查看') { |
| | | this.isShowRecordDialog = true; |
| | | let recordFormValue = JSON.parse(JSON.stringify(value)); |
| | | this.recordForm.taskCode = recordFormValue.taskCode; |
| | | this.recordForm.checkContent = recordFormValue.checkContent; |
| | | } else { |
| | | this.title = '提交'; |
| | | this.isShowSubmitDialog = true; |
| | | this.submitForm.id = JSON.parse(JSON.stringify(value)).checkTaskId; |
| | | this.checkResults.id = JSON.parse(JSON.stringify(value)).id; |
| | | this.checkResults.controlMeasureId = JSON.parse(JSON.stringify(value)).controlMeasureId; |
| | | } |
| | | |
| | | }, |
| | | showInspectionRecordDetailForm(value,type,userList,departmentList) { |
| | | this.inspectionRecordDetailFormVisible = true |
| | | this.$nextTick(() =>{ |
| | | this.$refs["inspectionRecordDetailForm"].clearValidate() |
| | | }) |
| | | this.userList = userList |
| | | this.departmentList = departmentList |
| | | if(type === '查看'){ |
| | | this.titleDetail = '查看单元上报' |
| | | this.ifNormal = false |
| | | this.ifLook = true |
| | | this.ifConfirm = false |
| | | this.inspectionRecordDetailForm = JSON.parse(JSON.stringify(value)) |
| | | if(this.inspectionRecordDetailForm.problem.imageInfoList === null){ |
| | | this.fileList = [] |
| | | }else{ |
| | | this.fileList = this.inspectionRecordDetailForm.problem.imageInfoList.map( item => { return { url : process.env.IMG_API + item.imgPath}}) |
| | | |
| | | async submitRecord(){ |
| | | if (this.checkResults.checkResult !== null) { |
| | | |
| | | this.submitForm.checkResults.push(this.checkResults); |
| | | let res = await submitTaskRecord(this.submitForm); |
| | | if (res.data.code === '200') { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '排查记录提交成功', |
| | | duration: 2000 |
| | | }); |
| | | this.isShowSubmitDialog = false; |
| | | this.$emit('refreshRecord'); |
| | | } else { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | |
| | | } |
| | | }else{ |
| | | this.titleDetail = '巡检单元上报' |
| | | this.ifShow = false |
| | | this.ifNormal = false |
| | | this.ifLook = false |
| | | this.ifConfirm = true |
| | | this.inspectionRecordDetailForm = { |
| | | execUid: Cookies.get('userId'), |
| | | fixTime: null, |
| | | fixUid: null, |
| | | imgInfoList: [], |
| | | info: null, |
| | | noticeUid: null, |
| | | result: null, |
| | | fixDepId:null, |
| | | noticeDepId:null, |
| | | taskId: value.taskId, |
| | | unitId: value.id |
| | | } |
| | | } else { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '请完善基本信息' |
| | | }); |
| | | } |
| | | }, |
| | | submitInspectionRecordDetail() { |
| | |
| | | .input{ |
| | | width:300px; |
| | | } |
| | | .basic_search{ |
| | | display:inline-block; |
| | | padding-bottom: 10px; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:90%; |
| | | } |
| | | .analyseUnit_box{ |
| | | width:200px; |
| | | } |
| | | </style> |
| | |
| | | <div class="app-container"> |
| | | <div class="filter-container"> |
| | | <div class="basic_search"> |
| | | <span>开始时间:</span> |
| | | <el-date-picker v-model="listQuery.startTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="巡检开始时间"></el-date-picker> |
| | | <span>排查结果:</span> |
| | | <el-select class="analyseUnit_box" v-model="listQuery.result" placeholder="排查结果" filterable clearable> |
| | | <el-option v-for="item in resultList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>结束时间:</span> |
| | | <el-date-picker v-model="listQuery.endTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="巡检结束时间"></el-date-picker> |
| | | <span>排查任务状态:</span> |
| | | <el-select class="analyseUnit_box" v-model="listQuery.taskStatus" placeholder="排查任务状态" filterable clearable> |
| | | <el-option v-for="item in taskStatusList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>任务类型:</span> |
| | | <el-select v-model="listQuery.type"> |
| | | <el-option |
| | | v-for="item in typeList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>任务单元状态列表:</span> |
| | | <el-select v-model="listQuery.statusList" filterable clearable multiple> |
| | | <el-option |
| | | v-for="item in statusListList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>巡检任务创建人员:</span> |
| | | <el-select v-model="listQuery.createUid" filterable clearable> |
| | | <el-option |
| | | v-for="item in userList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.realname" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>执行巡检人员:</span> |
| | | <el-select v-model="listQuery.execUid" filterable clearable> |
| | | <el-option |
| | | v-for="item in userList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.realname" |
| | | ></el-option> |
| | | <el-select class="analyseUnit_box" v-model="listQuery.taskType" placeholder="任务类型" filterable clearable> |
| | | <el-option v-for="item in taskTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-refresh" @click="refreshHandle">搜索</el-button> |
| | | </div> |
| | | <div class="table_content"> |
| | | <el-table |
| | | v-loading="listLoading" |
| | | :key="tableKey" |
| | | :data="inspectionRecordData" |
| | | border |
| | | fit |
| | | highlight-current-row |
| | | style="width: 100%;" |
| | | > |
| | | <el-table :data="inspectionRecordData" style="width: 100%"> |
| | | <el-table-column type="expand"> |
| | | <template slot-scope="scope"> |
| | | <el-table |
| | | v-loading="listLoading" |
| | | :key="tableKey" |
| | | :data="scope.row.unitList" |
| | | border |
| | | fit |
| | | highlight-current-row |
| | | style="width: 100%;" |
| | | > |
| | | <el-table-column label="序号" type="index" width="150" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="隐患排查内容" prop="content" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="上报说明" prop="info" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="上报照片" prop="img" align="center"> |
| | | <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="检查结果" prop="checkResult" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="downloadFile(scope.row)">下载</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="状态" prop="status" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.status | parseUnitStatus}} |
| | | <el-tag :type="scope.row.checkResult === 1 ? 'success' : scope.row.checkResult === 2 ? 'danger' : 'info'"> |
| | | {{ parseNumber(scope.row.checkResult, '检查结果') }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" width="280" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="showInspectionRecordDetailForm(scope.row,'上报')" v-show="scope.row.status === 1">上报</el-button> |
| | | <el-button type="text" @click="showInspectionRecordDetailForm(scope.row,'查看')">查看</el-button> |
| | | <el-button size="small" type="text" @click="onOpenDialogRef('查看', scope.row)">查看</el-button> |
| | | <el-button size="small" type="text" @click="onOpenDialogRef('提交', scope.row)">提交</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="任务名称" prop="title" align="center"> |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | | <el-table-column prop="taskCode" label="排查名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="execDep" label="执行部门" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column label="检查类型" prop="type" align="center"> |
| | | <el-table-column prop="taskStatus" label="状态" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.type | parseType}} |
| | | {{ parseNumber(scope.row.taskStatus, '状态') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="巡检人" prop="execUname" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="巡检开始时间" prop="expTime" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="巡检结束时间" prop="endTime" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="巡检提交时间" prop="execTime" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="任务状态" prop="status" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.status | parseStatusList}} |
| | | <el-table-column prop="taskBelong" label="是否认领" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | {{ parseNumber(scope.row.taskBelong, '认领状态') }} |
| | | </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="操作" align="center" width="280" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="submitInspectionRecordForm(scope.row,'上报')">提交</el-button> |
| | | <el-button type="text" @click="showInspectionRecordForm(scope.row,'查看')">查看</el-button> |
| | | <el-button type="text" v-show="(scope.row.taskStatus === 1 || scope.row.taskStatus === 4) && scope.row.taskBelong === 1" @click="onHandleTask(scope.row)">任务认领</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br> |
| | | <el-pagination |
| | | v-show="recordTotal>0" |
| | | :current-page="listQuery.page" |
| | | :current-page="listQuery.pageIndex" |
| | | :page-sizes="[10, 20, 30, 50]" |
| | | :page-size="listQuery.pageSize" |
| | | :total="recordTotal" |
| | |
| | | /> |
| | | <br> |
| | | </div> |
| | | <detail ref="detail" @getList="getInspectionRecordData"></detail> |
| | | <detail ref="detail" @refreshRecord="getInspectionRecordData"></detail> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { getInspectionRecord } from '@/api/inspectionTask' |
| | | import {getAllDepartment, getDepartmentList} from "../../../../api/departmentManage"; |
| | | import {safetyInspectionItemName} from "../../../../api/safetySelfInspection"; |
| | | import {submitTask} from "../../../../api/inspectionTask"; |
| | | import {deleteInspectionTask, submitTask, taskToUser} from "../../../../api/inspectionTask"; |
| | | export default { |
| | | components: { detail }, |
| | | name: 'index', |
| | | filters: { |
| | | parseType(type){ |
| | |
| | | userList:[], |
| | | typeList:[{id:1,name:'日常检查'},{id:2,name:'周期检查'}], |
| | | statusListList:[{id:1,name:'待巡检'},{id:2,name:'巡检中'},{id:3,name:'已完成'},{id:4,name:'超时未巡检'},{id:5,name:'已取消'}], |
| | | resultList: [ |
| | | { id: 1, name: '正常' }, |
| | | { id: 2, name: '存在隐患' }, |
| | | { id: 3, name: '未排查' }, |
| | | { id: 4, name: '其他' } |
| | | ], |
| | | checkResultList: [ |
| | | { id: 1, name: '正常' }, |
| | | { id: 2, name: '异常' }, |
| | | { id: 3, name: '未处理' } |
| | | ], |
| | | taskStatusList: [ |
| | | { id: 1, name: '待排查' }, |
| | | { id: 2, name: '已完成' }, |
| | | { id: 3, name: '超时未排查' }, |
| | | { id: 4, name: '排查中' } |
| | | ], |
| | | taskTypeList: [ |
| | | { id: 1, name: '周期任务' }, |
| | | { id: 2, name: '日常任务' } |
| | | ], |
| | | listLoading: false, |
| | | pageSize: 10, |
| | | recordTotal: 0, |
| | |
| | | |
| | | }, |
| | | listQuery:{ |
| | | createUid: null, |
| | | endTime: null, |
| | | execUid: null, |
| | | execUname: null, |
| | | page: 1, |
| | | pageSize: 10, |
| | | result: null, |
| | | startTime: null, |
| | | statusList: null, |
| | | type: null |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | result: null, |
| | | taskStatus: null, |
| | | taskType: null |
| | | }, |
| | | } |
| | | }, |
| | |
| | | this.listLoading = true |
| | | let res = await getInspectionRecord(this.listQuery) |
| | | if(res.data.code === '200'){ |
| | | this.recordTotal = JSON.parse(res.data.message).total |
| | | this.inspectionRecordData = res.data.result |
| | | this.recordTotal = res.data.count |
| | | this.inspectionRecordData = res.data.data |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | |
| | | }) |
| | | } |
| | | }, |
| | | showInspectionRecordForm(value){ |
| | | this.$refs.detail.showInspectionRecordForm(value) |
| | | |
| | | onHandleTask(val){ |
| | | |
| | | this.$confirm('此操作将认领该任务,是否继续','提示',{ |
| | | confirmButtonText:'确定', |
| | | cancelButtonText:'取消', |
| | | type:'warning', |
| | | }).then(()=> { |
| | | taskToUser({ id: val.id }).then( (res)=>{ |
| | | if(res.data.code === '200'){ |
| | | this.getInspectionRecordData() |
| | | this.$notify({ |
| | | title:'成功', |
| | | message:'认领成功', |
| | | type:'success', |
| | | duration:2000, |
| | | }) |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | }, |
| | | |
| | | onOpenDialogRef(type,value){ |
| | | this.$refs.detail.showInspectionRecordForm(type,value) |
| | | }, |
| | | showInspectionRecordDetailForm(value,type) { |
| | | this.$refs.detail.showInspectionRecordDetailForm(value,type,this.userList,this.departmentList) |
| | |
| | | } |
| | | } |
| | | }, |
| | | |
| | | parseNumber(value, type) { |
| | | if (type === '状态') { |
| | | return this.taskStatusList.find((item) => item.id === value).name; |
| | | }else if (type === '检查结果') { |
| | | return this.checkResultList.find((item) => item.id === value).name; |
| | | } else { |
| | | if (value === 1) { |
| | | return '未认领'; |
| | | } else { |
| | | return '已认领'; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | refreshHandle(){ |
| | | this.getInspectionRecordData() |
| | | }, |
| | |
| | | this.getInspectionRecordData() |
| | | }, |
| | | handleCurrentChange(val){ |
| | | this.listQuery.page = val |
| | | this.listQuery.pageIndex = val |
| | | this.getInspectionRecordData() |
| | | }, |
| | | } |
| | |
| | | padding-left: 10px; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:90%; |
| | | } |
| | | .analyseUnit_box{ |
| | | width:200px; |
| | | } |
| | | </style> |
| | |
| | | <div class="app-container"> |
| | | <div class="filter-container"> |
| | | <div class="basic_search"> |
| | | <span>巡检开始时间:</span> |
| | | <el-date-picker v-model="listQuery.startTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="巡检开始时间"></el-date-picker> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>巡检结束时间:</span> |
| | | <el-date-picker v-model="listQuery.startTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="巡检结束时间"></el-date-picker> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>巡检任务类型:</span> |
| | | <el-select v-model="listQuery.type"> |
| | | <el-option |
| | | v-for="item in typeList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | <span>排查作业类型:</span> |
| | | <el-select class="analyseUnit_box" v-model="listQuery.checkWorkType" placeholder="排查作业类型" filterable clearable> |
| | | <el-option v-for="item in checkWorkTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>巡检任务状态:</span> |
| | | <el-select v-model="listQuery.status" clearable> |
| | | <el-option |
| | | v-for="item in statusList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | <span>排查作业状态:</span> |
| | | <el-select class="analyseUnit_box" v-model="listQuery.checkWorkStatus" placeholder="排查作业状态" filterable clearable> |
| | | <el-option v-for="item in checkWorkStatusList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>巡检任务创建人员:</span> |
| | | <el-select v-model="listQuery.createUid" filterable clearable> |
| | | <el-option |
| | | v-for="item in userList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.realname" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | <!-- <div class="basic_search">--> |
| | | <!-- <span>异常通知人员:</span>--> |
| | | <!-- <el-select v-model="listQuery.noticeUid" filterable clearable>--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in userList"--> |
| | | <!-- :key="item.id"--> |
| | | <!-- :value="item.id"--> |
| | | <!-- :label="item.realname"--> |
| | | <!-- ></el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </div>--> |
| | | <div class="basic_search"> |
| | | <span>执行巡检人员:</span> |
| | | <el-select v-model="listQuery.execUid" filterable clearable> |
| | | <el-option |
| | | v-for="item in userList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.realname" |
| | | ></el-option> |
| | | </el-select> |
| | | <span>排查作业名称:</span> |
| | | <el-input class="analyseUnit_box" v-model="listQuery.checkWorkName" placeholder="排查作业名称" clearable> </el-input> |
| | | </div> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-refresh" @click="refreshHandle">搜索</el-button> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-plus" @click="showAnalyseUnitForm('','新增')">新增</el-button> |
| | |
| | | highlight-current-row |
| | | style="width: 100%;" |
| | | > |
| | | <el-table-column label="任务名称" prop="title" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="检查类型" prop="type" align="center"> |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | | <el-table-column prop="checkWorkName" label="排查名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="checkWorkType" label="排查类型" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <div v-for="item in typeList"> |
| | | <div v-show="item.id === scope.row.type"> |
| | | {{ item.name }} |
| | | </div> |
| | | </div> |
| | | {{ parseNumber(scope.row.checkWorkType, '排查类型') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="检查频次(小时)" prop="intervalSeconds" align="center"> |
| | | <el-table-column prop="taskUnitName" label="任务单元" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="execDep" label="执行部门" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="checkCycle" label="排查周期" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.intervalSeconds | parseHours}} |
| | | <span> |
| | | {{ scope.row.checkCycle }} |
| | | </span> |
| | | <span> |
| | | {{ parseNumber(scope.row.checkCycleUnit, '排查周期') }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="任务开始时间" prop="startTime" align="center"> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="异常通知人" prop="noticeUname" align="center">--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column label="巡检人" prop="execUname" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="创建人" prop="createUname" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="创建时间" prop="createTime" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="状态" prop="createTime" align="center"> |
| | | <el-table-column prop="validTime" label="有效时间" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <div v-for="item in statusList"> |
| | | <div v-show="scope.row.status === item.id"> |
| | | <el-tag :type="scope.row.status === 1 ? 'primary' : (scope.row.status === 2 ? 'warning' : (scope.row.status === 3 ? 'danger' : 'info'))">{{item.name}}</el-tag> |
| | | </div> |
| | | </div> |
| | | <span> |
| | | {{ scope.row.validTime }} |
| | | </span> |
| | | <span> |
| | | {{ parseNumber(scope.row.validTimeUnit, '排查周期') }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="validTime" label="提醒时间" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <span> |
| | | {{ scope.row.noticeTime }} |
| | | </span> |
| | | <span> |
| | | {{ parseNumber(scope.row.noticeTimeUnit, '排查周期') }} |
| | | </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="操作" align="center" width="280" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="showAnalyseUnitForm(scope.row,'编辑')">编辑</el-button> |
| | | <el-button type="text" style="color: red" @click="deleteById(scope.row)">删除</el-button> |
| | | <el-button type="text" @click="openTask(scope.row,'编辑')">开启</el-button> |
| | | <el-button type="text" style="color: red" @click="closeTask(scope.row)">关闭</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br> |
| | | <el-pagination |
| | | v-show="recordTotal>0" |
| | | :current-page="listQuery.page" |
| | | :current-page="listQuery.pageIndex" |
| | | :page-sizes="[10, 20, 30, 50]" |
| | | :page-size="listQuery.pageSize" |
| | | :total="recordTotal" |
| | |
| | | |
| | | <div class="inspectionTask_form"> |
| | | <el-form ref="inspectionTaskForm" :rules="inspectionTaskFormRules" :model="inspectionTaskForm" label-position="right" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="任务名称" prop="title"> |
| | | <el-input v-model="inspectionTaskForm.title" class="analyseUnit_input"> |
| | | </el-input> |
| | | <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="analyseUnit_input" v-model="inspectionTaskForm.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 :span="12"> |
| | | <el-form-item label="巡检任务类型" prop="type"> |
| | | <el-select v-model="inspectionTaskForm.type" class="analyseUnit_input" :disabled="ifShow"> |
| | | <el-option |
| | | v-for="item in typeList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="排查名称" prop="checkWorkName"> |
| | | <el-input class="analyseUnit_input" v-model.trim="inspectionTaskForm.checkWorkName" 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="checkCycle"> |
| | | <el-input class="analyseUnit_input" type="number" v-model.trim="inspectionTaskForm.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-form-item label="时间单位" prop="checkCycleUnit"> |
| | | <el-select class="analyseUnit_input" v-model="inspectionTaskForm.checkCycleUnit" placeholder="请输入时间单位" clearable> |
| | | <el-option v-for="item in timeType" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <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-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="有效时间" prop="validTime"> |
| | | <el-input class="analyseUnit_input" type="number" v-model.trim="inspectionTaskForm.validTime" placeholder="请输入有效时间" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检查频次" prop="intervalSeconds"> |
| | | <el-select v-model="inspectionTaskForm.intervalSeconds" class="analyseUnit_input"> |
| | | <el-option |
| | | v-for="item in intervalSecondsList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="时间单位" prop="validTimeUnit"> |
| | | <el-select class="analyseUnit_input" v-model="inspectionTaskForm.validTimeUnit" placeholder="请输入时间单位" clearable> |
| | | <el-option v-for="item in timeType" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="提前通知时间" prop="noticeSeconds"> |
| | | <el-select v-model="inspectionTaskForm.noticeSeconds" class="analyseUnit_input"> |
| | | <el-option |
| | | v-for="item in noticeSecondsList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="提醒时间" prop="noticeTime"> |
| | | <el-input class="analyseUnit_input" type="number" v-model.trim="inspectionTaskForm.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-form-item label="时间单位" prop="noticeTimeUnit"> |
| | | <el-select class="analyseUnit_input" v-model="inspectionTaskForm.noticeTimeUnit" placeholder="请输入时间单位" clearable> |
| | | <el-option v-for="item in timeType" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="任务有效时间" prop="effectSeconds"> |
| | | <el-select v-model="inspectionTaskForm.effectSeconds" class="analyseUnit_input"> |
| | | <el-option |
| | | v-for="item in effectSecondsList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-row>--> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <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.id"--> |
| | | <!-- :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-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="执行部门" prop="execDepId"> |
| | | <el-select class="analyseUnit_input" v-model="inspectionTaskForm.execDepId" clearable filterable > |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item.department" |
| | | :label="item.department" |
| | | :value="item.id" |
| | | ></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.id" |
| | | :label="item.realname" |
| | | ></el-option> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="任务单元" prop="taskUnitId"> |
| | | <el-select class="analyseUnit_input" v-model="inspectionTaskForm.taskUnitId" placeholder="请输入任务单元" clearable filterable> |
| | | <el-option v-for="item in taskUnitList" :key="item.taskUnitName" :label="item.taskUnitName" :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="firstStartTime"> |
| | | <el-date-picker class="analyseUnit_input" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" v-model="inspectionTaskForm.firstStartTime" placeholder="请选择首次任务开始时间" clearable></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </div> |
| | | |
| | | |
| | | <el-divider></el-divider> |
| | | |
| | | <div class="inspectionTask_point"> |
| | | <el-tabs class="active" v-model="activeName"> |
| | | <el-tab-pane label="检查项信息" name="inspectionPoint"> |
| | | <inspection-point @giveToForm="receiveToForm" ref="inspectionPoint" :title="title" :inspectionTaskForm="inspectionTaskForm"></inspection-point> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | |
| | | <div align="right"> |
| | | <el-button @click="inspectionTaskVisible = false">取消</el-button> |
| | |
| | | } from "../../../../api/inspectionTask"; |
| | | import {getAllDepartment, getDepartmentList} from "../../../../api/departmentManage"; |
| | | import {safetyInspectionItemName} from "../../../../api/safetySelfInspection"; |
| | | import {getAllCheckUnitList} from "../../../../api/checkUnit"; |
| | | export default { |
| | | name: 'index', |
| | | filters: { |
| | |
| | | execDepartment:'', |
| | | inspectionTaskVisible:false, |
| | | inspectionTaskFormRules:{ |
| | | title: [{ required: true, message: '任务名称不能为空', trigger: 'blur' }], |
| | | type: [{ required: true, message: '检查类型不能为空', trigger: 'change' }], |
| | | intervalSeconds: [{ required: true, message: '检查频次不能为空', trigger: 'change' }], |
| | | noticeSeconds: [{ required: true, message: '提前通知时间不能为空', trigger: 'change' }], |
| | | startTime: [{ required: true, message: '周期开始时间不能为空', trigger: 'change' }], |
| | | effectSeconds: [{ required: true, message: '任务有效时间不能为空', trigger: 'change' }], |
| | | noticeUid: [{ required: true, message: '异常通知人员不能为空', trigger: 'change' }], |
| | | execUid: [{ required: true, message: '执行巡检人员不能为空', trigger: 'change' }], |
| | | 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' }] |
| | | }, |
| | | inspectionTaskForm:{ |
| | | type:null, |
| | | createUid: null, |
| | | effectSeconds: null, |
| | | execUid: null, |
| | | intervalSeconds: null, |
| | | noticeSeconds: null, |
| | | // noticeUid: null, |
| | | title:'', |
| | | riskControlMeasureIdList: [ |
| | | ], |
| | | startTime: "", |
| | | checkWorkType: null, |
| | | checkWorkName: null, |
| | | taskUnitId: null, |
| | | execDepId: null, |
| | | checkCycle: null, |
| | | checkCycleUnit: null, |
| | | validTime: null, |
| | | validTimeUnit: null, |
| | | noticeTime: null, |
| | | noticeTimeUnit: null, |
| | | firstStartTime: null |
| | | }, |
| | | listQuery:{ |
| | | createUid: "", |
| | | endTime: "", |
| | | execUid: "", |
| | | startTime: "", |
| | | status:"", |
| | | type: "", |
| | | page: 1, |
| | | checkWorkType: null, |
| | | checkWorkStatus: null, |
| | | checkWorkName: null, |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | |
| | | }, |
| | | checkWorkTypeList: [ |
| | | { id: 1, name: '日常作业' }, |
| | | { id: 2, name: '周期作业' } |
| | | ], |
| | | checkWorkStatusList: [ |
| | | { id: 1, name: '开启' }, |
| | | { id: 2, name: '关闭' } |
| | | ], |
| | | timeType: [ |
| | | { id: 2, name: '小时' }, |
| | | { id: 3, name: '日' }, |
| | | { id: 4, name: '月' }, |
| | | { id: 5, name: '年' } |
| | | ], |
| | | taskUnitList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getInspectionTaskData() |
| | | this.getDepartment() |
| | | this.getUser() |
| | | this.getCheckUnitData() |
| | | }, |
| | | methods: { |
| | | async getInspectionTaskData(){ |
| | | this.listLoading = true |
| | | let res = await getInspectionTask(this.listQuery) |
| | | if(res.data.code === '200'){ |
| | | this.recordTotal = JSON.parse(res.data.message).total |
| | | this.inspectionTaskData = res.data.result |
| | | this.recordTotal = res.data.count |
| | | this.inspectionTaskData = res.data.data |
| | | }else if(res.data.code === '300'){ |
| | | this.inspectionTaskData = [] |
| | | } |
| | |
| | | } |
| | | this.listLoading = false |
| | | }, |
| | | |
| | | async getCheckUnitData(){ |
| | | let res = await getAllCheckUnitList(); |
| | | if (res.data.code === '200') { |
| | | this.taskUnitList = JSON.parse(JSON.stringify(res.data.data)); |
| | | } else { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | async getDepartment(){ |
| | | let res = await getDepartmentList({pageSize:1000,pageIndex:1}) |
| | | if(res.data.code === '200'){ |
| | |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | parseNumber(value, type) { |
| | | if (type === '排查类型') { |
| | | return this.checkWorkTypeList.find((item) => item.id === value).name; |
| | | } else if (type === '排查周期') { |
| | | return this.timeType.find((item) => item.id == value).name; |
| | | } |
| | | }, |
| | | |
| | | showAnalyseUnitForm(value,type){ |
| | | this.inspectionTaskVisible = true |
| | | this.$nextTick(() =>{ |
| | |
| | | if(type === '新增'){ |
| | | this.ifShow = false |
| | | this.title = '新建巡检计划设定' |
| | | // this.noticeDepartment = '' |
| | | this.execDepartment = '' |
| | | this.inspectionTaskForm = { |
| | | type:null, |
| | | createUid: parseInt(Cookies.get('userId')), |
| | | effectSeconds: null, |
| | | execUid: null, |
| | | intervalSeconds: null, |
| | | noticeSeconds: null, |
| | | // noticeUid: null, |
| | | title:'', |
| | | riskControlMeasureIdList: [ |
| | | ], |
| | | startTime: "", |
| | | checkWorkType: null, |
| | | checkWorkName: null, |
| | | taskUnitId: null, |
| | | execDepId: null, |
| | | checkCycle: null, |
| | | checkCycleUnit: null, |
| | | validTime: null, |
| | | validTimeUnit: null, |
| | | noticeTime: null, |
| | | noticeTimeUnit: null, |
| | | firstStartTime: null |
| | | } |
| | | setTimeout(() => { |
| | | this.$refs.inspectionPoint.inspectionPointData = [] |
| | | this.$refs.inspectionPoint.ifEdit = false |
| | | }); |
| | | }else{ |
| | | this.ifShow = true |
| | | this.title = '编辑巡检计划设定' |
| | | // this.noticeDepartment = this.handleDepartment(JSON.parse(JSON.stringify(value)).noticeUid) |
| | | // this.changeNotice() |
| | | this.execDepartment = this.handleDepartment(JSON.parse(JSON.stringify(value)).execUid) |
| | | this.changeExec() |
| | | this.inspectionTaskForm = JSON.parse(JSON.stringify(value)) |
| | | this.inspectionTaskForm.execUid = value.execUid |
| | | // this.inspectionTaskForm.noticeUid = value.noticeUname |
| | | setTimeout(() => { |
| | | this.$refs.inspectionPoint.inspectionPointData = this.inspectionTaskForm.checkContents |
| | | this.$refs.inspectionPoint.ifEdit = true |
| | | }); |
| | | for( let key in this.inspectionTaskForm){ |
| | | this.inspectionTaskForm[key] = JSON.parse(JSON.stringify(value))[key] |
| | | } |
| | | this.inspectionTaskForm.id = JSON.parse(JSON.stringify(value)).id |
| | | } |
| | | }, |
| | | handleDepartment(value){ |
| | |
| | | submitAnalyseUnit(){ |
| | | this.$refs["inspectionTaskForm"].validate((valid) =>{ |
| | | if(valid){ |
| | | if(this.inspectionTaskForm.noticeSeconds >= this.inspectionTaskForm.intervalSeconds){ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:'提前通知时间不能大于检查频次' |
| | | }) |
| | | }else if(this.inspectionTaskForm.intervalSeconds <= this.inspectionTaskForm.effectSeconds){ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:'任务持续时间不能大于检查频次' |
| | | }) |
| | | }else if(this.justifyTime(this.inspectionTaskForm.startTime,this.inspectionTaskForm.noticeSeconds)){ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:'周期开始时间减去当前时间和提前通知时间要大于等于半小时' |
| | | }) |
| | | }else{ |
| | | if(this.title === '新建巡检计划设定'){ |
| | | addInspectionTask(this.inspectionTaskForm).then((res)=>{ |
| | | if(res.data.code === '200'){ |
| | |
| | | } |
| | | }) |
| | | }else{ |
| | | updateInspectionTask({ |
| | | effectSeconds: this.inspectionTaskForm.effectSeconds, |
| | | execUid: this.inspectionTaskForm.execUid, |
| | | intervalSeconds: this.inspectionTaskForm.intervalSeconds, |
| | | noticeSeconds: this.inspectionTaskForm.noticeSeconds, |
| | | // noticeUid: this.inspectionTaskForm.noticeUid, |
| | | startTime: this.inspectionTaskForm.startTime, |
| | | status: this.inspectionTaskForm.status, |
| | | workId: this.inspectionTaskForm.workId, |
| | | title: this.inspectionTaskForm.title |
| | | }).then((res)=>{ |
| | | updateInspectionTask(this.inspectionTaskForm).then((res)=>{ |
| | | if(res.data.code === '200'){ |
| | | this.inspectionTaskVisible = false |
| | | this.getInspectionTaskData() |
| | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | }else{ |
| | | this.$message({ |
| | |
| | | }, |
| | | |
| | | deleteById(val){ |
| | | if(val.status !== 2){ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:'当前状态不可删除' |
| | | }) |
| | | return |
| | | } |
| | | this.$confirm('删除此条信息,是否继续','提示',{ |
| | | confirmButtonText:'确定', |
| | | cancelButtonText:'取消', |
| | | type:'warning', |
| | | }).then(()=> { |
| | | deleteInspectionTask(val.workId).then( (res)=>{ |
| | | deleteInspectionTask({ id: val.id }).then( (res)=>{ |
| | | if(res.data.code === '200'){ |
| | | this.getInspectionTaskData() |
| | | this.$notify({ |
| | |
| | | this.getInspectionTaskData() |
| | | }, |
| | | handleCurrentChange(val){ |
| | | this.listQuery.page = val |
| | | this.listQuery.pageIndex = val |
| | | this.getInspectionTaskData() |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .basic_search{ |
| | | display:inline-block; |
| | | padding-bottom: 10px; |
| | | padding-left: 10px; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:320px; |
| | | } |
| | | .basic_search{ |
| | | display:inline-block; |
| | | padding-bottom: 10px; |
| | | padding-left: 10px; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:90%; |
| | | } |
| | | .analyseUnit_box{ |
| | | width:200px; |
| | | } |
| | | /deep/.el-divider--horizontal { |
| | | margin-top: 0px !important; |
| | | } |
| | |
| | | <div class="filter-container"> |
| | | <div class="basic_search"> |
| | | <span>责任部门:</span> |
| | | <el-select v-model="listQuery.filter.hazardDep" clearable filterable style="width:200px"> |
| | | <el-select v-model="listQuery.liableDepId" clearable filterable style="width:200px"> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :label="item.department" |
| | | :value="item.department" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>责任人:</span> |
| | | <el-select v-model="listQuery.filter.hazardLiablePerson" clearable filterable style="width:200px"> |
| | | <el-select v-model="listQuery.liablePersonId" clearable filterable style="width:200px"> |
| | | <el-option |
| | | v-for="item in userList" |
| | | :key="item.id" |
| | | :label="item.realname" |
| | | :value="item.realname" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>单元名称:</span> |
| | | <el-input v-model="listQuery.filter.riskUnitName" style="width:200px"> |
| | | <el-input v-model="listQuery.riskUnitName" style="width:200px"> |
| | | </el-input> |
| | | </div> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-refresh" @click="refreshHandle">搜索</el-button> |
| | |
| | | highlight-current-row |
| | | style="width: 100%;" |
| | | > |
| | | <el-table-column label="安全风险分析对象编码" prop="hazardCode" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="责任部门" prop="hazardDep" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="责任人" prop="hazardLiablePerson" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="安全风险分析单元名称" prop="riskUnitName" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="创建人" prop="createBy" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="创建时间" prop="createTime" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="最后修改人" prop="updateBy" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="最后修改时间" prop="updateTime" align="center"> |
| | | </el-table-column> |
| | | <el-table-column prop="produceDeviceName" label="生产装置名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="riskUnitName" label="安全风险分析单元名称" width="180" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="riskCode" label="安全风险分析对象编码" width="180" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="liableDep" label="责任部门" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="liablePerson" label="责任人" show-overflow-tooltip></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="操作" align="center" width="280" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="showAnalyseUnitForm(scope.row,'编辑')">编辑</el-button> |
| | |
| | | <br> |
| | | <el-pagination |
| | | v-show="recordTotal>0" |
| | | :current-page="currentPage" |
| | | :current-page="listQuery.pageIndex" |
| | | :page-sizes="[10, 20, 30, 50]" |
| | | :page-size="pageSize" |
| | | :page-size="listQuery.pageSize" |
| | | :total="recordTotal" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | background |
| | |
| | | </div> |
| | | <el-dialog :title="title" :visible.sync="analyseUnitVisible" :modal-append-to-body="false" :close-on-click-modal="false" width="600px"> |
| | | <el-form ref="analyseUnitForm" :rules="analyseUnitFormRules" :model="analyseUnitForm" label-position="right" label-width="165px"> |
| | | <el-form-item label="责任部门" prop="hazardDepId"> |
| | | <el-select v-model="analyseUnitForm.hazardDepId" class="analyseUnit_input" @change="departmentChange" clearable filterable> |
| | | <el-form-item label="安全风险分析对象编码" prop="riskCode"> |
| | | <el-input class="analyseUnit_input" v-model.trim="analyseUnitForm.riskCode" placeholder="请输入安全风险分析对象编码"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="安全风险分析单元名称" prop="riskUnitName"> |
| | | <el-input class="analyseUnit_input" v-model.trim="analyseUnitForm.riskUnitName" placeholder="请输入安全风险分析单元名称"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="生产装置名称" prop="produceDeviceId"> |
| | | <el-select class="analyseUnit_input" v-model="analyseUnitForm.produceDeviceId" placeholder="请输入生产装置名称" clearable filterable> |
| | | <el-option v-for="item in allProduceDeviceData" :key="item.produceDeviceName" :label="item.produceDeviceName" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="责任部门" prop="liableDepId"> |
| | | <el-select v-model="analyseUnitForm.liableDepId" class="analyseUnit_input" @change="changeExec" clearable filterable> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="责任人" prop="hazardLiablePersonId"> |
| | | <el-select v-model="analyseUnitForm.hazardLiablePersonId" class="analyseUnit_input" clearable filterable> |
| | | <el-option |
| | | v-for="item in departmentUserList" |
| | | :key="item.id" |
| | | :label="item.realname" |
| | | :value="item.id" |
| | | ></el-option> |
| | | <el-form-item label="责任人" prop="liablePersonId"> |
| | | <el-select class="analyseUnit_input" v-model="analyseUnitForm.liablePersonId" placeholder="请选择责任人" clearable filterable> |
| | | <el-option v-for="item in execUidList" :key="item.id" :label="item.realname" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="安全风险分析对象编码" prop="hazardCode"> |
| | | <el-input v-model="analyseUnitForm.hazardCode" class="analyseUnit_input"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="安全风险分析单元名称" prop="riskUnitName"> |
| | | <el-input v-model="analyseUnitForm.riskUnitName" class="analyseUnit_input"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div align="right"> |
| | |
| | | import {safetyInspectionItemName} from "../../../../api/safetySelfInspection"; |
| | | import {exportAnalyseUnit, getDepartmentChart, importAnalyseUnit} from "../../../../api/riskLevelManage"; |
| | | import {parseError} from "../../../../utils/messageDialog"; |
| | | import {getAllProductionDeviceList} from "../../../../api/riskSource"; |
| | | const exampleFile = require('@/assets/example/riskAnaUnit.xlsx') |
| | | export default { |
| | | name: 'index', |
| | |
| | | analyseUnitData: [], |
| | | departmentList:[], |
| | | userList:[], |
| | | execUidList:[], |
| | | departmentUserList:[], |
| | | allProduceDeviceData:[], |
| | | listLoading: false, |
| | | pageSize: 10, |
| | | recordTotal: 0, |
| | |
| | | importDialogFormVisible:false, |
| | | analyseUnitVisible:false, |
| | | analyseUnitFormRules:{ |
| | | hazardDepId: [{ required: true, message: '责任部门不能为空', trigger: 'change' }], |
| | | hazardLiablePersonId: [{ required: true, message: '责任人不能为空', trigger: 'blur' }], |
| | | hazardCode: [{ required: true, message: '安全风险分析对象编码不能为空', trigger: 'blur' }], |
| | | riskUnitName: [{ required: true, message: '安全风险分析单元名称不能为空', trigger: 'blur' }], |
| | | riskCode: [{ required: true, message: '请填写安全风险分析对象编码', trigger: 'blur' }], |
| | | riskUnitName: [{ required: true, message: '请填写安全风险分析单元名称', trigger: 'blur' }], |
| | | liableDepId: [{ required: true, message: '请选择责任部门', trigger: 'change' }], |
| | | liablePersonId: [{ required: true, message: '请选择责任人', trigger: 'change' }], |
| | | produceDeviceId: [{ required: true, message: '请选择生产装置', trigger: 'change' }] |
| | | }, |
| | | analyseUnitForm:{ |
| | | id: null, |
| | | hazardCode: "", |
| | | riskUnitName: "", |
| | | createTime: "", |
| | | updateTime: "", |
| | | createBy: "", |
| | | updateBy: "", |
| | | validFlag: null, |
| | | hazardLiablePersonId: null, |
| | | hazardDepId: null |
| | | riskCode: null, |
| | | riskUnitName: null, |
| | | liablePersonId: null, |
| | | liableDepId: null, |
| | | produceDeviceId: null |
| | | }, |
| | | listQuery:{ |
| | | pageIndex:1, |
| | | pageSize:10, |
| | | filter:{ |
| | | hazardLiablePerson:'', |
| | | hazardDep:'', |
| | | riskUnitName:'' |
| | | } |
| | | riskUnitName: null, |
| | | liableDepId: null, |
| | | liablePersonId: null |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | this.getAllProduceDeviceData() |
| | | this.getAnalyseUnitData() |
| | | this.getDepartment() |
| | | this.getUser() |
| | |
| | | this.listLoading = true |
| | | let res = await getAnalyseUnitList(this.listQuery) |
| | | if(res.data.code === '200'){ |
| | | this.recordTotal = res.data.result.total |
| | | this.pageSize = res.data.result.size |
| | | this.pageTotal = computePageCount(res.data.result.total, res.data.result.size) |
| | | this.currentPage = res.data.result.current |
| | | this.analyseUnitData = res.data.result.records |
| | | if(res.data.data.length === 0 && res.data.count > 0){ |
| | | this.listQuery.pageIndex = 1 |
| | | await this.getData() |
| | | }else{ |
| | | this.recordTotal = res.data.count |
| | | this.analyseUnitData = res.data.data |
| | | } |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | | type:'warning' |
| | | }) |
| | | } |
| | | this.listLoading = false |
| | | }, |
| | | async getData(){ |
| | | this.listLoading = true |
| | | let res = await getAnalyseUnitList(this.listQuery) |
| | | if(res.data.code === '200'){ |
| | | this.recordTotal = res.data.count |
| | | this.analyseUnitData = res.data.data |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | async getAllProduceDeviceData(){ |
| | | let res = await getAllProductionDeviceList(); |
| | | if (res.data.code === '200') { |
| | | this.allProduceDeviceData = JSON.parse(JSON.stringify(res.data.data)); |
| | | } else { |
| | | this.$message({ |
| | | message:res.data.msg, |
| | | type:'warning' |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | async getUser(){ |
| | | let res = await safetyInspectionItemName() |
| | | if(res.data.code === '200'){ |
| | |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | changeExec(){ |
| | | if(this.liableDepId === '') { |
| | | this.execUidList = [] |
| | | } |
| | | this.analyseUnitForm.liablePersonId = '' |
| | | this.execUidList = this.userList.filter ( item => item.department === this.analyseUnitForm.liableDepId) |
| | | }, |
| | | |
| | | showDepartmentChart() { |
| | | this.$refs.chart.show() |
| | | }, |
| | |
| | | if(type === '新增'){ |
| | | this.title = '新增' |
| | | this.analyseUnitForm = { |
| | | id: null, |
| | | hazardCode: "", |
| | | riskUnitName: "", |
| | | createTime: "", |
| | | updateTime: "", |
| | | createBy: "", |
| | | updateBy: "", |
| | | validFlag: null, |
| | | hazardLiablePersonId: null, |
| | | hazardDepId: null |
| | | riskCode: null, |
| | | riskUnitName: null, |
| | | liablePersonId: null, |
| | | liableDepId: null, |
| | | produceDeviceId: null |
| | | } |
| | | }else{ |
| | | this.title = '修改' |
| | | this.analyseUnitForm.hazardDepId = value.hazardDepId |
| | | this.departmentChange() |
| | | this.analyseUnitForm = JSON.parse(JSON.stringify(value)) |
| | | this.analyseUnitForm.liableDepId = value.liableDepId |
| | | this.changeExec() |
| | | for( let key in this.analyseUnitForm){ |
| | | this.analyseUnitForm[key] = JSON.parse(JSON.stringify(value))[key] |
| | | } |
| | | this.analyseUnitForm.id = JSON.parse(JSON.stringify(value)).id |
| | | } |
| | | }, |
| | | submitAnalyseUnit(){ |
| | |
| | | padding-bottom: 10px; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:90%; |
| | | } |
| | | .analyseUnit_box{ |
| | | width:200px; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:320px; |
| | | } |
| | | .image{ |
对比新文件 |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="filter-container"> |
| | | <el-button class="filter-item" type="primary" icon="el-icon-plus" @click="showControlAction()">选择风险管控措施</el-button> |
| | | </div> |
| | | <div class="table_content"> |
| | | <el-table |
| | | v-loading="listLoading" |
| | | :key="tableKey" |
| | | :data="inspectionPointData" |
| | | border |
| | | fit |
| | | highlight-current-row |
| | | 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 slot-scope="scope"> |
| | | <!-- <el-button type="text" @click="showMeasureDetail(scope.row)" v-show="ifEdit">详情</el-button>--> |
| | | <el-button type="text" style="color:red;" @click="deleteById(scope.$index,scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog :visible.sync="controlActionVisible" append-to-body :close-on-click-modal="false" width="80%"> |
| | | <control-action ref="controlAction" @closeDialog="closeDialog" @giveRiskControlId="receiveRiskControlId" @keepValue="keepValue"></control-action> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import controlAction from '../../../riskLevelManage/controlAction/index' |
| | | import { addInspectionControlAction, deleteInspectionControlAction ,getInspectionControlAction } from '../../../../../api/inspectionTask' |
| | | export default { |
| | | props:['title','inspectionTaskForm'], |
| | | name: "inpectionPoint", |
| | | data(){ |
| | | return{ |
| | | tableKey:'', |
| | | listLoading:false, |
| | | ifEdit:false, |
| | | ifShowControl:true, |
| | | controlActionVisible:false, |
| | | riskControlMeasureVisible:false, |
| | | riskControlMeasureForm:[], |
| | | inspectionPointData:[], |
| | | keepValueList:[], |
| | | controlActionForm:{ |
| | | workId:'', |
| | | measureId:'', |
| | | } |
| | | } |
| | | }, |
| | | components:{ |
| | | controlAction |
| | | }, |
| | | methods:{ |
| | | showControlAction (){ |
| | | this.controlActionVisible = true |
| | | setTimeout( () => { |
| | | this.$refs.controlAction.ifShowButton(this.inspectionPointData) |
| | | }) |
| | | }, |
| | | showMeasureDetail(val){ |
| | | this.controlActionVisible = true |
| | | setTimeout( () => { |
| | | this.$refs.controlAction.showMeasureDetail(val) |
| | | this.$refs.controlAction.ifShowSelf = false |
| | | }) |
| | | |
| | | }, |
| | | closeDialog(){ |
| | | this.controlActionVisible = false |
| | | }, |
| | | async receiveRiskControlId(value) { |
| | | this.controlActionVisible = false |
| | | if(value){ |
| | | this.inspectionPointData = JSON.parse(JSON.stringify(value.map( item => { |
| | | return { |
| | | id:item.id, |
| | | checkContent:item.checkContent |
| | | } |
| | | }))) |
| | | this.$emit('giveToForm',this.inspectionPointData) |
| | | } |
| | | }, |
| | | deleteById(value,scope){ |
| | | this.inspectionPointData.splice(value,1) |
| | | }, |
| | | async getControlActionList(){ |
| | | let res = await getInspectionControlAction(this.inspectionTaskForm.workId) |
| | | this.inspectionPointData = res.data.result.checkContents |
| | | }, |
| | | keepValue(value){ |
| | | this.keepValueList = value |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | /deep/.filter-container{ |
| | | padding-left: 0px !important; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:200px; |
| | | } |
| | | </style> |
对比新文件 |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="filter-container"> |
| | | <div class="basic_search"> |
| | | <span>任务单元名称:</span> |
| | | <el-input v-model="listQuery.taskUnitName" style="width:200px"> |
| | | </el-input> |
| | | </div> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-refresh" @click="refreshHandle">搜索</el-button> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-plus" @click="showAnalyseUnitForm('','新增')">新增</el-button> |
| | | </div> |
| | | |
| | | <div class="table_content"> |
| | | <el-table |
| | | v-loading="listLoading" |
| | | :key="tableKey" |
| | | :data="inspectionTaskData" |
| | | border |
| | | fit |
| | | highlight-current-row |
| | | style="width: 100%;" |
| | | > |
| | | <el-table-column prop="taskUnitName" label="任务单元名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="note" label="任务单元说明" show-overflow-tooltip></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="操作" align="center" width="280" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="showAnalyseUnitForm(scope.row,'修改', )">修改</el-button> |
| | | <el-button type="text" style="color: red" @click="onDelcheckUnit(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br> |
| | | <el-pagination |
| | | v-show="recordTotal>0" |
| | | :current-page="listQuery.pageIndex" |
| | | :page-sizes="[10, 20, 30, 50]" |
| | | :page-size="listQuery.pageSize" |
| | | :total="recordTotal" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | background |
| | | style="float:right;" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | <br> |
| | | </div> |
| | | |
| | | <el-dialog :title="title" :visible.sync="inspectionTaskVisible" append-to-body :close-on-click-modal="false" width="55%"> |
| | | |
| | | |
| | | <el-divider></el-divider> |
| | | |
| | | <div class="inspectionTask_form"> |
| | | <el-form ref="inspectionTaskForm" :rules="inspectionTaskFormRules" :model="inspectionTaskForm" label-position="right" label-width="120px"> |
| | | <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="inspectionTaskForm.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="inspectionTaskForm.note" placeholder="请输入任务单元说明" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | |
| | | |
| | | <el-divider></el-divider> |
| | | |
| | | <div class="inspectionTask_point"> |
| | | <el-tabs class="active" v-model="activeName"> |
| | | <el-tab-pane label="检查项信息" name="inspectionPoint"> |
| | | <inspection-point @giveToForm="receiveToForm" ref="inspectionPoint" :title="title" :inspectionTaskForm="inspectionTaskForm"></inspection-point> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | |
| | | <div align="right"> |
| | | <el-button @click="inspectionTaskVisible = false">取消</el-button> |
| | | <el-button type="primary" @click="submitAnalyseUnit()">确认</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Cookies from "js-cookie"; |
| | | import { mapGetters } from 'vuex' |
| | | import { computePageCount } from '@/utils' |
| | | import inspectionPoint from './components/inpectionPoint' |
| | | import { |
| | | getInspectionTask, |
| | | addInspectionTask, |
| | | updateInspectionTask, |
| | | deleteInspectionTask, closeInspectionTask, taskToUser |
| | | } from "../../../../api/inspectionTask"; |
| | | import {getAllDepartment, getDepartmentList} from "../../../../api/departmentManage"; |
| | | import {safetyInspectionItemName} from "../../../../api/safetySelfInspection"; |
| | | import {addCheckUnit, deleteCheckUnit, getCheckUnit, updateCheckUnit} from "../../../../api/checkUnit"; |
| | | export default { |
| | | name: 'index', |
| | | components: { |
| | | inspectionPoint |
| | | }, |
| | | data() { |
| | | return { |
| | | tableKey: 0, |
| | | ifShow:true, |
| | | activeName:'inspectionPoint', |
| | | inspectionTaskData: [], |
| | | departmentList:[], |
| | | userList:[], |
| | | // noticeUidList:[], |
| | | execUidList:[], |
| | | listLoading: false, |
| | | pageSize: 10, |
| | | recordTotal: 0, |
| | | currentPage: 1, |
| | | pageTotal: 0, |
| | | title:'', |
| | | company:'', |
| | | code:'', |
| | | // noticeDepartment:'', |
| | | execDepartment:'', |
| | | inspectionTaskVisible:false, |
| | | inspectionTaskFormRules:{ |
| | | taskUnitName: [{ required: true, message: '请填写任务单元名称', trigger: 'blur' }], |
| | | note: [{ required: true, message: '请填写任务单元说明', trigger: 'change' }] |
| | | }, |
| | | inspectionTaskForm:{ |
| | | taskUnitName: null, |
| | | note: null, |
| | | measureList: [ |
| | | ], |
| | | |
| | | }, |
| | | listQuery:{ |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | taskUnitId: null |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | this.getInspectionTaskData() |
| | | this.getDepartment() |
| | | this.getUser() |
| | | }, |
| | | methods: { |
| | | async getInspectionTaskData(){ |
| | | this.listLoading = true |
| | | let res = await getCheckUnit(this.listQuery) |
| | | if(res.data.code === '200'){ |
| | | this.recordTotal = res.data.count |
| | | this.inspectionTaskData = res.data.data |
| | | }else if(res.data.code === '300'){ |
| | | this.inspectionTaskData = [] |
| | | } |
| | | else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | | type:'warning' |
| | | }) |
| | | } |
| | | this.listLoading = false |
| | | }, |
| | | async getDepartment(){ |
| | | let res = await getDepartmentList({pageSize:1000,pageIndex:1}) |
| | | if(res.data.code === '200'){ |
| | | this.departmentList = res.data.result.result |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | | type:'warning' |
| | | }) |
| | | } |
| | | }, |
| | | // 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.departmentname === 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(() =>{ |
| | | this.$refs["inspectionTaskForm"].clearValidate() |
| | | }) |
| | | if(type === '新增'){ |
| | | this.title = '新建隐患排查单元' |
| | | this.inspectionTaskForm = { |
| | | taskUnitName: null, |
| | | note: null, |
| | | measureList: [ |
| | | ], |
| | | } |
| | | setTimeout(() => { |
| | | this.$refs.inspectionPoint.inspectionPointData = [] |
| | | this.$refs.inspectionPoint.ifEdit = false |
| | | }); |
| | | }else{ |
| | | this.title = '编辑隐患排查单元' |
| | | this.inspectionTaskForm.taskUnitName = JSON.parse(JSON.stringify(value)).taskUnitName |
| | | this.inspectionTaskForm.note = JSON.parse(JSON.stringify(value)).note |
| | | this.inspectionTaskForm.id = JSON.parse(JSON.stringify(value)).id |
| | | this.inspectionTaskForm.measureList = [] |
| | | if(value.measureList !== null){ |
| | | this.inspectionTaskForm.measureList = JSON.parse(JSON.stringify(value.measureList.map( item => { |
| | | return { |
| | | id:item.id, |
| | | } |
| | | }))) |
| | | } |
| | | |
| | | // this.inspectionTaskForm.noticeUid = value.noticeUname |
| | | setTimeout(() => { |
| | | this.$refs.inspectionPoint.inspectionPointData = JSON.parse(JSON.stringify(value)).measureList |
| | | }); |
| | | } |
| | | }, |
| | | handleDepartment(value){ |
| | | let department = '' |
| | | for(let i in this.userList){ |
| | | if(this.userList[i].id === value){ |
| | | department = this.userList[i].departmentname |
| | | } |
| | | } |
| | | department = this.departmentList.find(item => item.department === department) |
| | | return department.department |
| | | }, |
| | | submitAnalyseUnit(){ |
| | | this.$refs["inspectionTaskForm"].validate((valid) =>{ |
| | | if(valid){ |
| | | if(this.title === '新建隐患排查单元'){ |
| | | addCheckUnit(this.inspectionTaskForm).then((res)=>{ |
| | | if(res.data.code === '200'){ |
| | | this.inspectionTaskVisible = false |
| | | this.getInspectionTaskData() |
| | | this.$notify({ |
| | | type:'success', |
| | | duration:2000, |
| | | message:'新增成功', |
| | | title:'成功' |
| | | }) |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | }) |
| | | }else{ |
| | | updateCheckUnit(this.inspectionTaskForm).then((res)=>{ |
| | | if(res.data.code === '200'){ |
| | | this.inspectionTaskVisible = false |
| | | this.getInspectionTaskData() |
| | | this.$notify({ |
| | | type:'success', |
| | | duration:2000, |
| | | title:'成功', |
| | | message:'编辑成功' |
| | | }) |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:'请完善基本信息' |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | |
| | | onDelcheckUnit(val){ |
| | | |
| | | this.$confirm('此操作将删除该隐患单元,是否继续','提示',{ |
| | | confirmButtonText:'确定', |
| | | cancelButtonText:'取消', |
| | | type:'warning', |
| | | }).then(()=> { |
| | | deleteCheckUnit({ id: val.id }).then( (res)=>{ |
| | | if(res.data.code === '200'){ |
| | | this.getInspectionTaskData() |
| | | this.$notify({ |
| | | title:'成功', |
| | | message:'认领成功', |
| | | type:'success', |
| | | duration:2000, |
| | | }) |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | }, |
| | | justifyTime(time,interval) { |
| | | let timeStr = new Date(time.replace(/-/g,'/')) |
| | | let date = parseInt(timeStr.getTime()/1000) |
| | | let newTimeStr = new Date() |
| | | let newDate = parseInt(newTimeStr.getTime()/1000) |
| | | if(date - newDate - interval - 1800 >= 0){ |
| | | return false |
| | | }else{ |
| | | return true |
| | | } |
| | | }, |
| | | |
| | | openTask(val,type){ |
| | | if(val.status !== 2){ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:'当前状态不可开启' |
| | | }) |
| | | return |
| | | } |
| | | this.showAnalyseUnitForm(val,type) |
| | | this.inspectionTaskForm.status = 1 |
| | | }, |
| | | |
| | | closeTask(val){ |
| | | if(val.status !== 1){ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:'当前状态不可关闭' |
| | | }) |
| | | return |
| | | } |
| | | this.$confirm('关闭此条任务,是否继续','提示',{ |
| | | confirmButtonText:'确定', |
| | | cancelButtonText:'取消', |
| | | type:'warning', |
| | | }).then(()=> { |
| | | closeInspectionTask(val.workId).then( (res)=>{ |
| | | if(res.data.code === '200'){ |
| | | this.getInspectionTaskData() |
| | | this.$notify({ |
| | | title:'成功', |
| | | message:'关闭成功', |
| | | type:'success', |
| | | duration:2000, |
| | | }) |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | deleteById(val){ |
| | | if(val.status !== 2){ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:'当前状态不可删除' |
| | | }) |
| | | return |
| | | } |
| | | this.$confirm('删除此条信息,是否继续','提示',{ |
| | | confirmButtonText:'确定', |
| | | cancelButtonText:'取消', |
| | | type:'warning', |
| | | }).then(()=> { |
| | | deleteInspectionTask(val.workId).then( (res)=>{ |
| | | if(res.data.code === '200'){ |
| | | this.getInspectionTaskData() |
| | | this.$notify({ |
| | | title:'成功', |
| | | message:'删除成功', |
| | | type:'success', |
| | | duration:2000, |
| | | }) |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | receiveToForm(value) { |
| | | this.inspectionTaskForm.measureList = [] |
| | | this.inspectionTaskForm.measureList = value.map( item => { |
| | | return item.id |
| | | }) |
| | | // this.inspectionTaskForm.riskControlMeasureIdList.push({id:value.id}) |
| | | }, |
| | | refreshHandle(){ |
| | | this.getInspectionTaskData() |
| | | }, |
| | | handleSizeChange(val){ |
| | | this.listQuery.pageSize = val |
| | | this.getInspectionTaskData() |
| | | }, |
| | | handleCurrentChange(val){ |
| | | this.listQuery.pageIndex = val |
| | | this.getInspectionTaskData() |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .basic_search{ |
| | | display:inline-block; |
| | | padding-bottom: 10px; |
| | | padding-left: 10px; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:320px; |
| | | } |
| | | /deep/.el-divider--horizontal { |
| | | margin-top: 0px !important; |
| | | } |
| | | |
| | | /deep/.el-dialog__body { |
| | | padding-top: 10px !important; |
| | | } |
| | | </style> |
| | |
| | | <div class="filter-container"> |
| | | <div class="basic_search"> |
| | | <span>事件名称:</span> |
| | | <el-input v-model="listQuery.filter.riskEventName" style="width:200px"> |
| | | </el-input> |
| | | <el-select clearable style="width:200px" v-model="listQuery.riskEventId" placeholder="安全风险事件" clearable> |
| | | <el-option v-for="item in riskEventList" :key="item.id" :label="item.riskEventName" :value="item.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>管控方式:</span> |
| | | <el-select v-model="listQuery.filter.dataSrc" clearable style="width:200px"> |
| | | <el-select v-model="listQuery.controlType" clearable style="width:200px"> |
| | | <el-option |
| | | v-for="item in DataSrcList" |
| | | v-for="item in controlTypeList" |
| | | :key="item.id" |
| | | :value="item.text" |
| | | :label="item.text" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | |
| | | border |
| | | fit |
| | | ref="table" |
| | | :row-key="getRowKey" |
| | | highlight-current-row |
| | | style="width: 100%;" |
| | | > |
| | | <el-table-column type="selection" :reserve-selection="true" width="55"></el-table-column> |
| | | <el-table-column label="安全风险事件名称" prop="riskEventId" align="center" show-overflow-tooltip> |
| | | <!-- <el-table-column type="selection" :reserve-selection="true" width="55"></el-table-column>--> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | | <el-table-column prop="riskEventName" label="安全风险事件名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="controlMeasureCode" label="风控措施编码" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="controlType" label="管控方式" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <div v-for="item in riskEventList"> |
| | | <div v-if="item.id === scope.row.riskEventId"> |
| | | {{item.riskEventName}} |
| | | </div> |
| | | </div> |
| | | {{ parseNumber(scope.row.controlType, '管控方式') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="管控方式" prop="dataSrc" align="center"> |
| | | <el-table-column prop="checkContent" label="管控内容" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="classify1" label="管控措施分类1" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | {{ parseNumber(scope.row.classify1, '管控措施分类1') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="管控方式描述" prop="riskMeasureDesc" align="center" show-overflow-tooltip> |
| | | <el-table-column prop="classify2" label="管控措施分类2" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | {{ parseNumber(scope.row.classify2, '管控措施分类2') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="管控措施分类1" prop="classify1" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="管控措施分类2" prop="classify2" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="管控措施分类3" prop="classify3" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="隐患排查内容" prop="troubleshootContent" align="center" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column label="检查类型" prop="hazardLiablePerson" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="周期" prop="timeEffect" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="单位" prop="timeUnit" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="创建人" prop="createBy" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="创建时间" prop="createTime" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="最后修改人" prop="updateBy" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="最后修改时间" prop="updateTime" align="center"> |
| | | </el-table-column> |
| | | <el-table-column prop="classify3" label="管控措施分类3" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="measureDesc" label="措施说明" show-overflow-tooltip></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="操作" align="center" width="280" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="giveValue(scope.row,)" v-show="showOther">选择</el-button> |
| | |
| | | <br> |
| | | <el-pagination |
| | | v-show="recordTotal>0" |
| | | :current-page="currentPage" |
| | | :current-page="listQuery.pageIndex" |
| | | :page-sizes="[10, 20, 30, 50]" |
| | | :page-size="pageSize" |
| | | :page-size="listQuery.pageSize" |
| | | :total="recordTotal" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | background |
| | |
| | | <el-dialog :title="title" :visible.sync="riskControlMeasureVisible" append-to-body :close-on-click-modal="false" width="600px"> |
| | | <el-form ref="riskControlMeasureForm" :rules="riskControlMeasureFormRules" :model="riskControlMeasureForm" label-position="right" label-width="160px"> |
| | | <el-form-item label="安全风险事件名称" prop="riskEventId"> |
| | | <el-select v-model="riskControlMeasureForm.riskEventId" class="analyseUnit_input"> |
| | | <el-select v-model="riskControlMeasureForm.riskEventId" class="analyseUnit_box" placeholder="请选择安全风险事件名称"> |
| | | <el-option |
| | | v-for="item in riskEventList" |
| | | :key="item.id" |
| | | :key="item.riskEventName" |
| | | :value="item.id" |
| | | :label="item.riskEventName" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="管控方式" prop="dataSrc"> |
| | | <el-select v-model="riskControlMeasureForm.dataSrc" class="analyseUnit_input"> |
| | | <el-option |
| | | v-for="item in DataSrcList" |
| | | :key="item.id" |
| | | :value="item.text" |
| | | :label="item.text" |
| | | ></el-option> |
| | | <el-form-item label="风险措施编码" prop="controlMeasureCode"> |
| | | <el-input class="analyseUnit_box" v-model.trim="riskControlMeasureForm.controlMeasureCode" placeholder="请输入风险措施编码"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="管控方式" prop="controlType"> |
| | | <el-select class="analyseUnit_box" v-model="riskControlMeasureForm.controlType" placeholder="请选择管控方式" clearable> |
| | | <el-option v-for="item in controlTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="管控方式描述" prop="riskMeasureDesc"> |
| | | <el-input type="textarea" :rows="4" v-model="riskControlMeasureForm.riskMeasureDesc" class="analyseUnit_input"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="管控内容" prop="checkContent"> |
| | | <el-input class="analyseUnit_box" type="textarea" :rows="3" v-model.trim="riskControlMeasureForm.checkContent" placeholder="请输入管控内容" clearable> </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="管控措施分类1" prop="classify1"> |
| | | <el-select v-model="riskControlMeasureForm.classify1" class="analyseUnit_input" @change="changeClassifyTwoList()"> |
| | | <el-select v-model="riskControlMeasureForm.classify1" class="analyseUnit_box" filterable clearable placeholder="请选择管控措施分类1" @change="changeClassifyTwoList()"> |
| | | <el-option |
| | | v-for="item in classifyOneList" |
| | | :key="item.id" |
| | | :value="item.name" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="管控措施分类2" prop="classify2"> |
| | | <el-select v-model="riskControlMeasureForm.classify2" class="analyseUnit_input"> |
| | | <el-select v-model="riskControlMeasureForm.classify2" class="analyseUnit_box" filterable clearable placeholder="请选择管控措施分类2"> |
| | | <el-option |
| | | v-for="item in classifyTwoList" |
| | | :key="item.id" |
| | | :value="item.name" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="管控措施分类3" prop="classify3"> |
| | | <el-input v-model="riskControlMeasureForm.classify3" class="analyseUnit_input"></el-input> |
| | | <el-input v-model="riskControlMeasureForm.classify3" class="analyseUnit_box" placeholder="请填写管控措施分类3"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="隐患排查内容" prop="troubleshootContent"> |
| | | <el-input type="textarea" :rows="4" v-model="riskControlMeasureForm.troubleshootContent" class="analyseUnit_input"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="周期" prop="timeEffect"> |
| | | <el-input v-model="riskControlMeasureForm.timeEffect" type="number" class="analyseUnit_input"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="单位" prop="timeUnit"> |
| | | <el-select v-model="riskControlMeasureForm.timeUnit" class="analyseUnit_input"> |
| | | <el-option |
| | | v-for="item in timeUnitList" |
| | | :key="item.id" |
| | | :value="item.name" |
| | | :label="item.name" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <el-form-item label="措施说明" prop="measureDesc"> |
| | | <el-input class="analyseUnit_box" type="textarea" :rows="3" placeholder="请填写措施说明" v-model.trim="riskControlMeasureForm.measureDesc" clearable> </el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div align="right"> |
| | |
| | | import { computePageCount } from '@/utils' |
| | | import { addRiskControlMeasure, deleteRiskControlMeasure, getRiskControlMeasureList, updateRiskControlMeasure } from '@/api/riskLevelManage' |
| | | import { |
| | | exportRiskControlMeasure, |
| | | exportRiskControlMeasure, getAllSafetyRiskEventList, |
| | | getClassify, |
| | | getRiskEventList, importAnalyseUnit, importRiskControlMeasure |
| | | } from "../../../../api/riskLevelManage"; |
| | |
| | | tableKey: 0, |
| | | riskControlMeasureData: [], |
| | | riskEventList:[], |
| | | DataSrcList:[], |
| | | controlTypeList: [ |
| | | { id: 1, name: '自动化监控' }, |
| | | { id: 2, name: '隐患排查' } |
| | | ], |
| | | classifyOneList:[], |
| | | classifyTwoList:[], |
| | | list:[], |
| | | riskControlMeasureIdList:[], |
| | | timeUnitList:[{id:1,name:'小时'},{id:2,name:'天'},{id:3,name:'周'},{id:4,name:'月'},], |
| | | listLoading: false, |
| | |
| | | importDialogFormVisible:false, |
| | | riskControlMeasureVisible:false, |
| | | riskControlMeasureFormRules:{ |
| | | riskEventId: [{ required: true, message: '安全风险事件名称不能为空', trigger: 'change' }], |
| | | dataSrc: [{ required: true, message: '管控方式不能为空', trigger: 'change' }], |
| | | riskMeasureDesc: [{ required: true, message: '管控方式描述不能为空', trigger: 'blur' }], |
| | | classify1: [{ required: true, message: '管控措施分类1不能为空', trigger: 'change' }], |
| | | classify2: [{ required: true, message: '管控措施分类2不能为空', trigger: 'change' }], |
| | | troubleshootContent: [{ required: true, message: '隐患排查内容不能为空', trigger: 'change' }], |
| | | timeEffect: [{ required: true, message: '周期不能为空', trigger: 'blur' }], |
| | | timeUnit: [{ required: true, message: '单位不能为空', trigger: 'change' }], |
| | | riskEventId: [{ required: true, message: '请选择风险事件', trigger: 'change' }], |
| | | controlMeasureCode: [{ required: true, message: '请填写风险措施编码', trigger: 'blur' }], |
| | | controlType: [{ required: true, message: '请选择管控方式', trigger: 'change' }], |
| | | checkContent: [{ required: true, message: '请填写管控内容', trigger: 'blur' }], |
| | | classify1: [{ required: true, message: '请选择管控措施分类1', trigger: 'change' }], |
| | | classify2: [{ required: true, message: '请选择管控措施分类2', trigger: 'change' }], |
| | | classify3: [{ required: true, message: '请填写管控措施分类3', trigger: 'blur' }], |
| | | measureDesc: [{ required: true, message: '请填写措施说明', trigger: 'blur' }] |
| | | }, |
| | | riskControlMeasureForm:{ |
| | | id: null, |
| | | riskEventId: null, |
| | | dataSrc: "", |
| | | riskMeasureDesc: "", |
| | | classify1: "", |
| | | classify2: "", |
| | | classify3: "", |
| | | troubleshootContent: "", |
| | | validFlag: true, |
| | | createTime: "", |
| | | updateTime: "", |
| | | createBy: "", |
| | | updateBy: "", |
| | | riskEvent: { |
| | | }, |
| | | timeEffect:"", |
| | | timeUnit:"", |
| | | controlMeasureCode: null, |
| | | controlType: null, |
| | | checkContent: null, |
| | | classify1: null, |
| | | classify2: null, |
| | | classify3: null, |
| | | measureDesc: null |
| | | }, |
| | | listQuery:{ |
| | | pageIndex:1, |
| | | pageSize:10, |
| | | filter:{ |
| | | riskEventName:'', |
| | | } |
| | | controlType: null, |
| | | riskEventId: null |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | this.getRiskControlMeasureData() |
| | | this.getRiskEvent() |
| | | this.getDataSrcList() |
| | | this.getClassify() |
| | | }, |
| | | methods: { |
| | |
| | | this.listLoading = true |
| | | let res = await getRiskControlMeasureList(this.listQuery) |
| | | if(res.data.code === '200'){ |
| | | this.recordTotal = res.data.result.total |
| | | this.pageSize = res.data.result.size |
| | | this.pageTotal = computePageCount(res.data.result.total, res.data.result.size) |
| | | this.currentPage = res.data.result.current |
| | | this.riskControlMeasureData = res.data.result.records |
| | | if(res.data.data.length === 0 && res.data.count > 0){ |
| | | this.listQuery.pageIndex = 1 |
| | | await this.getData() |
| | | }else{ |
| | | this.recordTotal = res.data.count |
| | | this.riskControlMeasureData = res.data.data |
| | | } |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | | type:'warning' |
| | | }) |
| | | } |
| | | this.listLoading = false |
| | | |
| | | |
| | | }, |
| | | |
| | | async getData(){ |
| | | this.listLoading = true |
| | | let res = await getRiskControlMeasureList(this.listQuery) |
| | | if(res.data.code === '200'){ |
| | | this.recordTotal = res.data.count |
| | | this.riskControlMeasureData = res.data.data |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | |
| | | } |
| | | this.listLoading = false |
| | | }, |
| | | |
| | | async getRiskEvent(){ |
| | | let res = await getRiskEventList({pageSize:1000,pageIndex:1,filter:{riskEventName:''}}) |
| | | let res = await getAllSafetyRiskEventList() |
| | | if(res.data.code === '200'){ |
| | | this.riskEventList = res.data.result.records |
| | | this.riskEventList = JSON.parse(JSON.stringify(res.data.data)) |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | |
| | | let res = await getClassify({pageSize:1000,pageIndex:1,filter:{riskEventName:''}}) |
| | | if(res.data.code === '200'){ |
| | | this.classifyOneList = res.data.result |
| | | this.list = [] |
| | | this.classifyOneList.forEach(item =>{ |
| | | for(let i in item.subClassify){ |
| | | this.list.push(item.subClassify[i]) |
| | | } |
| | | }) |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | |
| | | }) |
| | | } |
| | | }, |
| | | async getDataSrcList(){ |
| | | const params = {} |
| | | params['dictionaryType'] = '管控方式' |
| | | let res = await dictionaryAllItems(params) |
| | | if (res.data.code === '200') { |
| | | this.DataSrcList = res.data.result |
| | | } else { |
| | | this.$message({ |
| | | type:'warning', |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | changeClassifyTwoList(){ |
| | | if(this.riskControlMeasureForm.classify1 === '工程技术'){ |
| | | this.classifyTwoList = this.classifyOneList[0].subClassify |
| | |
| | | this.riskControlMeasureForm.classify3 = '' |
| | | } |
| | | }, |
| | | |
| | | parseNumber(value, type) { |
| | | if (type === '管控方式') { |
| | | return this.controlTypeList.find((item) => item.id === value).name; |
| | | }else if(type === '管控措施分类1'){ |
| | | return this.classifyOneList.find((item) => item.id === value).name |
| | | }else{ |
| | | return this.list.find((item) => item.id === value).name |
| | | } |
| | | }, |
| | | |
| | | showRiskControlMeasureForm(value,type){ |
| | | this.riskControlMeasureVisible = true |
| | | this.$nextTick(() =>{ |
| | |
| | | if(type === '新增'){ |
| | | this.title = '新增' |
| | | this.riskControlMeasureForm = { |
| | | id: null, |
| | | riskEventId: null, |
| | | dataSrc: "", |
| | | riskMeasureDesc: "", |
| | | classify1: "", |
| | | classify2: "", |
| | | classify3: "", |
| | | troubleshootContent: "", |
| | | validFlag: true, |
| | | createTime: "", |
| | | updateTime: "", |
| | | createBy: "", |
| | | updateBy: "", |
| | | riskEvent: { |
| | | }, |
| | | timeEffect:"", |
| | | timeUnit:"", |
| | | controlMeasureCode: null, |
| | | controlType: null, |
| | | checkContent: null, |
| | | classify1: null, |
| | | classify2: null, |
| | | classify3: null, |
| | | measureDesc: null |
| | | } |
| | | }else{ |
| | | this.title = '修改' |
| | | this.riskControlMeasureForm = value |
| | | for( let key in this.riskControlMeasureForm){ |
| | | this.riskControlMeasureForm[key] = JSON.parse(JSON.stringify(value))[key] |
| | | } |
| | | this.riskControlMeasureForm.id = JSON.parse(JSON.stringify(value)).id |
| | | } |
| | | }, |
| | | submitAnalyseUnit(){ |
| | |
| | | }, |
| | | |
| | | giveValue(value){ |
| | | debugger |
| | | this.$emit('giveRiskControlId',this.riskControlMeasureIdList) |
| | | // this.$emit('giveRiskControlId',value) |
| | | }, |
| | |
| | | padding-bottom: 10px; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:320px; |
| | | width:200px; |
| | | } |
| | | .analyseUnit_box{ |
| | | width:90%; |
| | | } |
| | | </style> |
| | |
| | | <div class="filter-container"> |
| | | <div class="basic_search"> |
| | | <span>事件名称:</span> |
| | | <el-input v-model="listQuery.filter.riskEventName" style="width:200px"> |
| | | </el-input> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>单元名称:</span> |
| | | <el-input v-model="listQuery.filter.riskUnitName" style="width:200px"> |
| | | <el-input v-model="listQuery.riskEventName" style="width:200px"> |
| | | </el-input> |
| | | </div> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-refresh" @click="refreshHandle">搜索</el-button> |
| | |
| | | highlight-current-row |
| | | style="width: 100%;" |
| | | > |
| | | <el-table-column label="安全风险分析单元名称" prop="riskAnaUnit" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{scope.row.riskAnaUnit.riskUnitName}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="安全风险事件名称" prop="riskEventName" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="创建人" prop="createBy" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="创建时间" prop="createTime" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="最后修改人" prop="updateBy" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="最后修改时间" prop="updateTime" align="center"> |
| | | </el-table-column> |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | | <el-table-column prop="riskUnitName" label="安全风险分析单元名称" width="180" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="riskEventName" label="安全风险事件名称" width="180" show-overflow-tooltip></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="操作" align="center" width="280" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="showRiskEvent(scope.row,'编辑')">编辑</el-button> |
| | |
| | | <br> |
| | | <el-pagination |
| | | v-show="recordTotal>0" |
| | | :current-page="currentPage" |
| | | :current-page="listQuery.pageIndex" |
| | | :page-sizes="[10, 20, 30, 50]" |
| | | :page-size="pageSize" |
| | | :page-size="listQuery.pageSize" |
| | | :total="recordTotal" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | background |
| | |
| | | <el-dialog :title="title" :visible.sync="riskEventVisible" :modal-append-to-body="false" :close-on-click-modal="false" width="600px"> |
| | | <el-form ref="riskEventForm" :rules="riskEventFormRules" :model="riskEventForm" label-position="right" label-width="165px"> |
| | | <el-form-item label="安全风险分析单元名称" prop="riskUnitId"> |
| | | <el-select v-model="riskEventForm.riskUnitId" class="analyseUnit_input"> |
| | | <el-select v-model="riskEventForm.riskUnitId" placeholder="请输入安全风险分析单元名称" class="analyseUnit_box"> |
| | | <el-option |
| | | v-for="item in analyseUnitList" |
| | | :key="item.id" |
| | | :key="item.riskUnitName" |
| | | :value="item.id" |
| | | :label="item.riskUnitName" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="安全风险事件名称" prop="riskEventName"> |
| | | <el-input v-model="riskEventForm.riskEventName" class="analyseUnit_input"></el-input> |
| | | <el-input v-model="riskEventForm.riskEventName" placeholder="请输入安全风险事件名称" class="analyseUnit_box"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div align="right"> |
| | |
| | | import { addRiskEvent, deleteRiskEvent, getRiskEventList, updateRiskEvent } from '@/api/riskLevelManage' |
| | | const exampleFile = require('@/assets/example/riskEvent.xlsx') |
| | | import { |
| | | exportRiskEvent, |
| | | exportRiskEvent, getAllSafetyRiskAnalyseUnitList, |
| | | getAnalyseUnitList, |
| | | importRiskEvent |
| | | } from "../../../../api/riskLevelManage"; |
| | |
| | | |
| | | }, |
| | | riskEventForm:{ |
| | | id: "", |
| | | riskUnitId: "", |
| | | riskEventName: "", |
| | | validFlag: true, |
| | | createTime: "", |
| | | createBy: "", |
| | | updateTime: "", |
| | | updateBy: "", |
| | | riskAnaUnit: { |
| | | }, |
| | | riskEventName: null, |
| | | riskUnitId: null |
| | | }, |
| | | listQuery:{ |
| | | pageIndex:1, |
| | | pageSize:10, |
| | | filter:{ |
| | | riskEventName:'', |
| | | } |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | riskEventName: null |
| | | }, |
| | | } |
| | | }, |
| | |
| | | this.listLoading = true |
| | | let res = await getRiskEventList(this.listQuery) |
| | | if(res.data.code === '200'){ |
| | | this.recordTotal = res.data.result.total |
| | | this.pageSize = res.data.result.size |
| | | this.pageTotal = computePageCount(res.data.result.total, res.data.result.size) |
| | | this.currentPage = res.data.result.current |
| | | this.riskEventData = res.data.result.records |
| | | if(res.data.data.length === 0 && res.data.count > 0){ |
| | | this.listQuery.pageIndex = 1 |
| | | await this.getData() |
| | | }else{ |
| | | this.recordTotal = res.data.count |
| | | this.riskEventData = res.data.data |
| | | } |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | | type:'warning' |
| | | }) |
| | | } |
| | | this.listLoading = false |
| | | }, |
| | | async getData(){ |
| | | this.listLoading = true |
| | | let res = await getRiskEventList(this.listQuery) |
| | | if(res.data.code === '200'){ |
| | | this.recordTotal = res.data.count |
| | | this.riskEventData = res.data.data |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | |
| | | this.listLoading = false |
| | | }, |
| | | async getAnalyseUnitData(){ |
| | | let res = await getAnalyseUnitList({pageSize:1000,pageIndex:1,filter:{ riskUnitName:''}}) |
| | | let res = await getAllSafetyRiskAnalyseUnitList() |
| | | if(res.data.code === '200'){ |
| | | this.analyseUnitList = res.data.result.records |
| | | this.analyseUnitList = JSON.parse(JSON.stringify(res.data.data)) |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | |
| | | if(type === '新增'){ |
| | | this.title = '新增' |
| | | this.riskEventForm = { |
| | | id: "", |
| | | riskUnitId: "", |
| | | riskEventName: "", |
| | | validFlag: true, |
| | | createTime: "", |
| | | createBy: "", |
| | | updateTime: "", |
| | | updateBy: "", |
| | | riskAnaUnit: { |
| | | riskUnitName:"" |
| | | }, |
| | | } |
| | | }else{ |
| | | this.title = '修改' |
| | | this.riskEventForm = value |
| | | for( let key in this.riskEventForm){ |
| | | this.riskEventForm[key] = JSON.parse(JSON.stringify(value))[key] |
| | | } |
| | | this.riskEventForm.id = JSON.parse(JSON.stringify(value)).id |
| | | } |
| | | }, |
| | | submitRiskEvent(){ |
| | |
| | | padding-bottom: 10px; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:320px; |
| | | width:200px; |
| | | } |
| | | .analyseUnit_box{ |
| | | width:90%; |
| | | } |
| | | </style> |
| | |
| | | <!-- </div>--> |
| | | <div class="basic_search"> |
| | | <span>生产装置名称:</span> |
| | | <el-input v-model="listQuery.name" class="analyseUnit_input"> |
| | | <el-input v-model="listQuery.produceDeviceName" class="analyseUnit_box"> |
| | | </el-input> |
| | | </div> |
| | | <div class="basic_search"> |
| | |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>状态:</span> |
| | | <el-select v-model="listQuery.status"> |
| | | <el-option |
| | | v-for="item in statusList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | <!-- <div class="basic_search">--> |
| | | <!-- <span>状态:</span>--> |
| | | <!-- <el-select v-model="listQuery.status">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in statusList"--> |
| | | <!-- :key="item.id"--> |
| | | <!-- :value="item.id"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- ></el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </div>--> |
| | | <div class="basic_search"> |
| | | <span>所属部门名称:</span> |
| | | <el-select v-model="listQuery.depId"> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item.department" |
| | | :value="item.id" |
| | | :label="item.department" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>区域位置:</span> |
| | | <el-input v-model="listQuery.location" class="analyseUnit_input"> |
| | | </el-input> |
| | | </div> |
| | | <!-- <div class="basic_search">--> |
| | | <!-- <span>区域位置:</span>--> |
| | | <!-- <el-input v-model="listQuery.location" class="analyseUnit_box">--> |
| | | <!-- </el-input>--> |
| | | <!-- </div>--> |
| | | |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-refresh" @click="refreshHandle">搜索</el-button> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-plus" @click="showRiskSourceForm('','新增')">新增</el-button> |
| | |
| | | highlight-current-row |
| | | style="width: 100%;" |
| | | > |
| | | <el-table-column label="生产装置名称" prop="name" align="center"> |
| | | <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 label="风险等级" prop="level" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.level | parseLevel}} |
| | | <el-table-column prop="riskLevel" label="风险等级" show-overflow-tooltip> |
| | | <template slot-scope="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 label="可能导致的主要事故类型" prop="accidentDesc" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="区域位置" prop="location" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="所属单位" prop="depName" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="创建人" prop="createUname" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="创建时间" prop="createTime" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="最后修改人" prop="editUname" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="最后修改时间" prop="editTime" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="状态" prop="status" align="center"> |
| | | <el-table-column prop="location" label="区域位置" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="status" label="状态" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <div v-for="item in statusList"> |
| | | <div v-show="item.id === scope.row.status"> |
| | | <el-tag :type="scope.row.status === 1 ? 'success' : (scope.row.status === 2 ? 'warning' : 'danger')">{{item.name}}</el-tag> |
| | | </div> |
| | | </div> |
| | | </template>> |
| | | <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="操作" align="center" width="280" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="showRiskSourceForm(scope.row,'编辑')">编辑</el-button> |
| | |
| | | </div> |
| | | <el-dialog :title="title" :visible.sync="riskSourceVisible" :modal-append-to-body="false" :close-on-click-modal="false" width="600px"> |
| | | <el-form ref="riskSourceForm" :rules="riskSourceFormRules" :model="riskSourceForm" label-position="right" label-width="165px"> |
| | | <el-form-item label="生产装置名称" prop="name"> |
| | | <el-input v-model="riskSourceForm.name" class="analyseUnit_input"> |
| | | <el-form-item label="生产装置名称" prop="produceDeviceName"> |
| | | <el-input v-model="riskSourceForm.produceDeviceName" class="analyseUnit_input" placeholder="请输入生产装置名称"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="风险等级" prop="level"> |
| | | <el-select v-model="riskSourceForm.level" class="analyseUnit_input"> |
| | | <el-form-item label="所属部门" prop="depId"> |
| | | <el-select v-model="riskSourceForm.depId" class="analyseUnit_input" placeholder="请选择所属部门"> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.department" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="风险等级" prop="riskLevel"> |
| | | <el-select v-model="riskSourceForm.riskLevel" class="analyseUnit_input" placeholder="请选择风险等级"> |
| | | <el-option |
| | | v-for="item in levelList" |
| | | :key="item.id" |
| | |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="可能导致事故的主要原因" prop="accidentDesc"> |
| | | <el-input v-model="riskSourceForm.accidentDesc" class="analyseUnit_input"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="区域位置" prop="location"> |
| | | <el-input v-model="riskSourceForm.location" class="analyseUnit_input"></el-input> |
| | | <el-input v-model="riskSourceForm.location" class="analyseUnit_input" placeholder="请填写区域位置"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="所属部门" prop="depId"> |
| | | <el-select v-model="riskSourceForm.depId" class="analyseUnit_input"> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.department" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | <div align="right"> |
| | | <el-button @click="riskSourceVisible = false">取消</el-button> |
| | |
| | | importDialogFormVisible:false, |
| | | riskSourceVisible:false, |
| | | riskSourceFormRules:{ |
| | | name: [{ required: true, message: '风险源名称不能为空', trigger: 'blur' }], |
| | | level: [{ required: true, message: '风险等级不能为空', trigger: 'change' }], |
| | | accidentDesc: [{ required: true, message: '可能导致事故的主要原因不能为空', trigger: 'blur' }], |
| | | location: [{ required: true, message: '区域位置不能为空', trigger: 'blur' }], |
| | | depId: [{ required: true, message: '所属部门不能为空', trigger: 'change' }], |
| | | produceDeviceName: [{ required: true, message: '请填写生产装置名称', trigger: 'blur' }], |
| | | depId: [{ required: true, message: '请选择部门', trigger: 'change' }], |
| | | riskLevel: [{ required: true, message: '请选择风险等级', trigger: 'change' }], |
| | | location: [{ required: true, message: '请填写区域位置', trigger: 'blur' }] |
| | | }, |
| | | riskSourceForm:{ |
| | | accidentDesc: "", |
| | | produceDeviceName: '', |
| | | depId: null, |
| | | editUid: null, |
| | | id: null, |
| | | level: null, |
| | | location: "", |
| | | name: "", |
| | | riskLevel: null, |
| | | location: '' |
| | | }, |
| | | listQuery:{ |
| | | startTime:'', |
| | | endTime:'', |
| | | status:'', |
| | | level:'', |
| | | depId:'', |
| | | depName:'', |
| | | location:'', |
| | | pageIndex:1, |
| | | pageSize:10, |
| | | name:'', |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | riskLevel: null, |
| | | status: 1, |
| | | depId:null, |
| | | produceDeviceName: null |
| | | }, |
| | | } |
| | | }, |
| | |
| | | this.listLoading = true |
| | | let res = await getRiskSourceList(this.listQuery) |
| | | if(res.data.code === '200'){ |
| | | this.recordTotal = JSON.parse(res.data.message).totalCount |
| | | this.riskSourceData = res.data.result |
| | | this.recordTotal = res.data.count |
| | | this.riskSourceData = res.data.data |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | |
| | | } |
| | | } |
| | | }, |
| | | parseNumber (value,type) { |
| | | if (type === '风险等级') { |
| | | return this.levelList.find((item) => item.id === value).name; |
| | | } else if (type === '状态') { |
| | | return this.statusList.find((item) => item.id === value).name; |
| | | } |
| | | }, |
| | | showRiskSourceForm(value,type){ |
| | | this.riskSourceVisible = true |
| | | this.$nextTick(() =>{ |
| | |
| | | if(type === '新增'){ |
| | | this.title = '新增' |
| | | this.riskSourceForm = { |
| | | accidentDesc: "", |
| | | produceDeviceName: '', |
| | | depId: null, |
| | | editUid: null, |
| | | id: null, |
| | | level: null, |
| | | location: "", |
| | | name: "", |
| | | riskLevel: null, |
| | | location: '' |
| | | } |
| | | }else{ |
| | | this.title = '编辑' |
| | | for( let key in this.riskSourceForm){ |
| | | this.riskSourceForm[key] = JSON.parse(JSON.stringify(value))[key] |
| | | } |
| | | this.riskSourceForm.id = JSON.parse(JSON.stringify(value)).id |
| | | } |
| | | }, |
| | | submitRiskSourceForm(){ |
| | |
| | | padding-bottom: 10px; |
| | | } |
| | | .analyseUnit_input{ |
| | | width:90%; |
| | | } |
| | | .analyseUnit_box{ |
| | | width:200px; |
| | | } |
| | | </style> |
| | |
| | | _this.loading = true |
| | | loginByUsername(loginForm) |
| | | .then((response) => { |
| | | debugger |
| | | const res = response.data |
| | | if (res.code == 200) { |
| | | sessionStorage.setItem('isdepartment',res.result.isdepartment) |