| | |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | |
| | | export function getDepartmentChart() { |
| | | return request({ |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskAnaUnit/department-analysis', |
| | | method: 'post', |
| | | }) |
| | | } |
| | |
| | | <template> |
| | | <div class="container"> |
| | | <div class="images"> |
| | | <img |
| | | v-for="image in images" |
| | | :key="image.url" |
| | | :src="image.url" |
| | | @click="clickCreateHandle(image.url)" |
| | | /> |
| | | <!-- <img--> |
| | | <!-- v-for="image in images"--> |
| | | <!-- :key="image.url"--> |
| | | <!-- :src="image.url"--> |
| | | <!-- @click="clickCreateHandle(image.url)"--> |
| | | <!-- />--> |
| | | </div> |
| | | <div class="model-panel-list"> |
| | | <el-row :gutter="10"> |
| | |
| | | ifNormal:false, |
| | | userList:[], |
| | | fileList:[], |
| | | resultList:[{id:1,name:'正常'},{id:2,name:'异常'}], |
| | | 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:'已取消'}], |
| | | } |
| | |
| | | this.titleDetail = '巡检单元查看' |
| | | this.ifShow = true |
| | | this.inspectionRecordDetailForm = JSON.parse(JSON.stringify(value)) |
| | | if(value.result === 2){ |
| | | if(value.result !== 1){ |
| | | this.ifNormal = true |
| | | this.fileList = [] |
| | | this.fileList.push({url:process.env.IMG_API + value.img}) |
| | | this.fileList =(value.img === null ? [] : [ {url:process.env.IMG_API + value.img} ]) |
| | | } |
| | | }else{ |
| | | this.titleDetail = '巡检单元上报' |
| | |
| | | if(valid){ |
| | | submitUnitOne(this.inspectionRecordDetailForm).then( res =>{ |
| | | if(res.data.code === '200'){ |
| | | this.inspectionRecordDetailFormVisible = false |
| | | |
| | | this.$message({ |
| | | type:'success', |
| | | message:'上报成功', |
| | |
| | | type:'warning' |
| | | }) |
| | | } |
| | | this.inspectionRecordDetailFormVisible = false |
| | | }) |
| | | }else{ |
| | | this.$message({ |
| | |
| | | </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> |
| | | <el-date-picker v-model="listQuery.endTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="巡检结束时间"></el-date-picker> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <span>任务类型:</span> |
| | |
| | | <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" |
| | |
| | | if(type === '新增'){ |
| | | this.ifShow = false |
| | | this.title = '新建巡检计划设定' |
| | | this.noticeDepartment = '' |
| | | // this.noticeDepartment = '' |
| | | this.execDepartment = '' |
| | | this.inspectionTaskForm = { |
| | | type:null, |
| | |
| | | }else{ |
| | | this.ifShow = true |
| | | this.title = '编辑巡检计划设定' |
| | | debugger |
| | | // this.noticeDepartment = this.handleDepartment(JSON.parse(JSON.stringify(value)).noticeUid) |
| | | // this.changeNotice() |
| | | this.execDepartment = this.handleDepartment(JSON.parse(JSON.stringify(value)).execUid) |
| | |
| | | } |
| | | }, |
| | | handleDepartment(value){ |
| | | debugger |
| | | let department = '' |
| | | for(let i in this.userList){ |
| | | if(this.userList[i].id === value){ |
对比新文件 |
| | |
| | | <template> |
| | | <el-dialog title="各部门风险分析单元" :visible.sync="chartsVisible" :modal-append-to-body="false" :close-on-click-modal="false" width="600px"> |
| | | <div id="departmentChart" style="width:90%;height:360px;margin: 0 auto;"> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getDepartmentChart} from "../../../../../api/riskLevelManage"; |
| | | |
| | | export default { |
| | | name: "departmentChart", |
| | | data() { |
| | | return { |
| | | numData:[], |
| | | departmentData:[], |
| | | myChart:'', |
| | | chartsVisible:false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | methods : { |
| | | show(){ |
| | | this.chartsVisible = true |
| | | this.getChart() |
| | | }, |
| | | async getChart() { |
| | | let res = await getDepartmentChart() |
| | | if(res.data.code === '200') { |
| | | debugger |
| | | this.numData = res.data.result.map(item =>{ |
| | | return item["count"] |
| | | }) |
| | | this.departmentData = res.data.result.map(item =>{ |
| | | return item.department |
| | | }) |
| | | this.myChart = this.$echarts.init(document.getElementById('departmentChart')) |
| | | this.myChart.setOption({ |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | legend: { |
| | | top: '5%', |
| | | left: 'center', |
| | | orient:'vertical' |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: this.departmentData |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | data: this.numData, |
| | | type: 'bar', |
| | | itemStyle: { |
| | | normal: { |
| | | color: function(params) { |
| | | // 给出颜⾊组 |
| | | var colorList = ['#fac858','#5470c6','#91cc75','#fac858','#ee6666','#73c0de','#fc8452','#3ba272','#9a60b4','#ea7ccc']; |
| | | return colorList[params.dataIndex] |
| | | }, |
| | | } |
| | | }, |
| | | showBackground: true, |
| | | backgroundStyle: { |
| | | color: '#5470c6' |
| | | } |
| | | }] |
| | | }) |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:res.data.message |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | <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="hazardDep"> |
| | | <el-select v-model="analyseUnitForm.hazardDep" value-key="item" class="analyseUnit_input" @change="departmentChange" @clear="departmentClear"> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item" |
| | | :label="item.department" |
| | | ></el-option> |
| | | </el-select> |
| | | <el-row> |
| | | <el-col :span="21"> |
| | | <el-select v-model="analyseUnitForm.hazardDep" value-key="item" class="analyseUnit_input" @change="departmentChange" @clear="departmentClear"> |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item" |
| | | :label="item.department" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <img src="../../../../assets/map.png" class="image" @click="showDepartmentChart"></img> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | |
| | | </el-form-item> |
| | | <el-form-item label="责任人" prop="hazardLiablePerson"> |
| | | <el-select v-model="analyseUnitForm.hazardLiablePerson" value-key="item" class="analyseUnit_input"@change="personChange" @clear="personClear" > |
| | |
| | | <el-button type="primary" @click="submitAnalyseUnit()">确认</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <department-chart ref="chart"></department-chart> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import departmentChart from "./components/departmentChart"; |
| | | import { mapGetters } from 'vuex' |
| | | import { computePageCount } from '@/utils' |
| | | import { addAnalyseUnit, deleteAnalyseUnit, getAnalyseUnitList, updateAnalyseUnit } from '@/api/riskLevelManage' |
| | | import {getAllDepartment, getDepartmentList} from "../../../../api/departmentManage"; |
| | | import {safetyInspectionItemName} from "../../../../api/safetySelfInspection"; |
| | | import {getDepartmentChart} from "../../../../api/riskLevelManage"; |
| | | export default { |
| | | name: 'index', |
| | | filters: { |
| | |
| | | ...mapGetters([ |
| | | 'userType' |
| | | ]) |
| | | }, |
| | | components :{ |
| | | departmentChart |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | type:'warning' |
| | | }) |
| | | } |
| | | }, |
| | | showDepartmentChart() { |
| | | this.$refs.chart.show() |
| | | }, |
| | | showAnalyseUnitForm(value,type){ |
| | | this.analyseUnitVisible = true |
| | |
| | | .analyseUnit_input{ |
| | | width:320px; |
| | | } |
| | | .image{ |
| | | width:70%; |
| | | height:70%; |
| | | } |
| | | </style> |
| | |
| | | status: null |
| | | }, |
| | | listQuery:{ |
| | | eid:'', |
| | | status:0, |
| | | }, |
| | | } |
| | |
| | | async getSafetyRiskSpaceData(){ |
| | | this.listLoading = true |
| | | let params = {} |
| | | params["eid"] = (this.listQuery.eid === '' ? Cookies.get('companyid') : this.listQuery.eid) |
| | | params["status"] = this.listQuery.status |
| | | let res = await getSafetyRiskSpaceList(params) |
| | | if(res.data.code === '200'){ |
| | |
| | | if(type === '新增'){ |
| | | this.title = '新增' |
| | | this.safetyRiskSpaceForm = { |
| | | createUid: Cookies.get('userId'), |
| | | createUid: parseInt(Cookies.get('userId')), |
| | | descInfo: null, |
| | | img: null, |
| | | } |
| | |
| | | if(response.code === '200'){ |
| | | debugger |
| | | this.safetyRiskSpaceForm.img = response.result.path |
| | | this.fileList = [] |
| | | this.fileList.push({url:process.env.IMG_API + response.result.path}) |
| | | this.$notify({ |
| | | type:'success', |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <el-form-item label="作业地点:" prop="area"> |
| | | <el-input v-model="taskBasicForm.area"></el-input> |
| | | <el-col :span="8"> |
| | | <el-form-item label="吨位类型:" prop="etype" > |
| | | <el-select v-model="taskBasicForm.etype" clearable class="taskBasic_select"> |
| | | <el-option |
| | | v-for="item in etypeList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | |
| | | <el-col :span="8"> |
| | | <el-form-item label="是否节假日:" prop="isholiday" > |
| | | <el-select v-model="taskBasicForm.isholiday" clearable class="taskBasic_select"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业地点:" prop="area"> |
| | | <el-input v-model="taskBasicForm.area"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业内容:" prop="description"> |
| | | <el-input v-model="taskBasicForm.description"></el-input> |
| | | </el-form-item> |
| | |
| | | description:'', |
| | | isanalysis:'', |
| | | analysisarea:'', |
| | | analysismedium:'' |
| | | analysismedium:'', |
| | | etype:'', |
| | | }, |
| | | activeNames:['0'], |
| | | companyList:[], |
| | | fireTypeList:[], |
| | | hazardList:[], |
| | | userList:[], |
| | | etypeList:[{id:1,name:'60万吨'},{id:2,name:'130万吨'}], |
| | | list:[{id:0,name:'否'},{id:1,name:'是'}], |
| | | levelList:[{id:2,name:'特级'},{id:1,name:'一级'},{id:0,name:'二级'},], |
| | | spaceCategoryList:[{id:0,name:'密闭设备:如船舱、贮罐、车载槽罐、反应塔(釜)、冷藏箱、压力容器、管道、烟道、锅炉等'},{id:1,name:'地下有限空间:如地下管道、地下室、地下仓库、地下工程、暗沟、隧道、涵洞、地坑、废井、地窖、污水池(井)、沼气池、化粪池、下水道等'},{id:2,name:'地上有限空间:如储藏室、酒糟池、发酵池、垃圾站、温室、冷库、粮仓、料仓等'},], |
| | |
| | | description:[{ required: true, message: '作业内容不能为空', trigger: 'blur' }], |
| | | isanalysis:[{ required: true, message: '是否需要气体检测不能为空', trigger: 'change' }], |
| | | analysisarea:[{ required: true, message: '分析地点不能为空', trigger: 'blur' }], |
| | | analysismedium:[{ required: true, message: '分析介质不能为空', trigger: 'blur' }] |
| | | analysismedium:[{ required: true, message: '分析介质不能为空', trigger: 'blur' }], |
| | | etype:[{ required: true, message: '吨位类型不能为空', trigger: 'change' }] |
| | | }, |
| | | ifIncludeArea:null, |
| | | ifHoisting:null, |
| | |
| | | description:'', |
| | | isanalysis:'', |
| | | analysisarea:'', |
| | | analysismedium:'' |
| | | analysismedium:'', |
| | | etype:'', |
| | | } |
| | | this.$refs.taskBasic.ifIncludeArea = null |
| | | this.$refs.taskBasic.ifHoisting = null |