|
@@ -48,6 +48,25 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="检查类型:" prop="inspectCategory">
|
|
|
+ <div class="dialog-range-max-box">
|
|
|
+ <div class="dialog-range-select-box">
|
|
|
+ <el-select :disabled="lookInfoType" @change="inspectCategoryChange"
|
|
|
+ v-model="dialogForm.checkCategory" placeholder="请选择检查类型" style="width:450px;">
|
|
|
+ <el-option
|
|
|
+ v-for="item in inspectCategoryList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="dialog-range-text-box" v-if="dialogForm.checkCategory==2">
|
|
|
+ <p class="inquire-button-one button-p" @click="dialogClickType(6)">选择检查内容</p>
|
|
|
+ <p class="text-p">已选择{{dialogForm.hazardNum}}种</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="检查范围:" prop="checkRange">
|
|
|
<div class="dialog-range-max-box">
|
|
|
<div class="dialog-range-select-box">
|
|
@@ -387,6 +406,104 @@
|
|
|
:src="iframeSrc" scrolling="auto" frameborder="0">
|
|
|
</iframe>
|
|
|
</div>
|
|
|
+ <div class="inspectionPlan-dialog-user-box" v-show="addDialogBoxType==6">
|
|
|
+ <div class="left-max-box">
|
|
|
+ <div class="dept-table-title-box">
|
|
|
+ <p>待选</p>
|
|
|
+ <p>{{deviceNumLeft}}/{{deviceTotalLeft}}</p>
|
|
|
+ </div>
|
|
|
+ <div class="dept-table-max-box">
|
|
|
+ <el-form :model="deviceQueryParamsLeft" class="form-box" ref="queryForm" :inline="true" label-width="50px">
|
|
|
+ <el-form-item label="" prop="deptId">
|
|
|
+ <el-select v-model="deviceQueryParamsLeft.hazardTypeMode" clearable placeholder="选择类型" style="width: 110px">
|
|
|
+ <el-option
|
|
|
+ v-for="item in dangerArr"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="" prop="searchValue" class="form-index">
|
|
|
+ <el-input
|
|
|
+ maxLength="20"
|
|
|
+ v-model="deviceQueryParamsLeft.searchValue"
|
|
|
+ placeholder="搜索设备名称"
|
|
|
+ clearable
|
|
|
+ style="width: 240px">
|
|
|
+ <p class="el-icon-search" slot="append" @click="deviceHandleQueryLeft"></p>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item style="margin-right:0;">
|
|
|
+ <p class="reset-button-one" @click="deviceResetQueryLeft" style="width:60px;">重置</p>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-table ref="leftDeviceTable" border :data="deviceTableListLeft" @selection-change="deviceChangeLeft" :row-key="getRowKeys">
|
|
|
+ <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
|
+ <el-table-column label="名称" align="center" prop="chName" show-overflow-tooltip/>
|
|
|
+ <el-table-column label="型号" align="center" prop="code" show-overflow-tooltip width="150"/>
|
|
|
+ <el-table-column label="类型" align="center" prop="hazardTypeMode" show-overflow-tooltip width="168"/>
|
|
|
+ </el-table>
|
|
|
+ <pagination layout="total, prev, pager, next, jumper"
|
|
|
+ v-show="deviceTotalLeft>0"
|
|
|
+ :total="deviceTotalLeft"
|
|
|
+ :pager-count="5"
|
|
|
+ :page.sync="deviceQueryParamsLeft.pageNum"
|
|
|
+ :limit.sync="deviceQueryParamsLeft.pageSize"
|
|
|
+ @pagination="deviceGetListLeft"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="center-box">
|
|
|
+ <p class="el-icon-arrow-left" @click="deviceArrowButton(1)"></p>
|
|
|
+ <p class="el-icon-arrow-right" @click="deviceArrowButton(2)"></p>
|
|
|
+ </div>
|
|
|
+ <div class="right-max-box">
|
|
|
+ <div class="dept-table-title-box">
|
|
|
+ <p>已选</p>
|
|
|
+ <p>{{deviceNumRight}}/{{deviceTotalRight}}</p>
|
|
|
+ </div>
|
|
|
+ <div class="dept-table-max-box">
|
|
|
+ <el-form :model="deviceQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
|
|
|
+ <el-form-item label="" prop="deptId">
|
|
|
+ <el-select v-model="deviceQueryParamsRight.hazardTypeMode" clearable placeholder="选择类型" style="width: 110px">
|
|
|
+ <el-option
|
|
|
+ v-for="item in dangerArr"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="" prop="searchValue" class="form-index">
|
|
|
+ <el-input
|
|
|
+ maxLength="20"
|
|
|
+ v-model="deviceQueryParamsRight.searchValue"
|
|
|
+ placeholder="搜索设备名称"
|
|
|
+ clearable
|
|
|
+ style="width: 240px">
|
|
|
+ <p class="el-icon-search" slot="append" @click="deviceHandleQueryRight"></p>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item style="margin-right:0;">
|
|
|
+ <p class="reset-button-one" @click="deviceResetQueryRight" style="width:60px;">重置</p>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-table ref="rightDeviceTable" border :data="deviceTableListRight" @selection-change="deviceChangeRight" :row-key="getRowKeys">
|
|
|
+ <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
|
+ <el-table-column label="名称" align="center" prop="chName" show-overflow-tooltip/>
|
|
|
+ <el-table-column label="型号" align="center" prop="code" show-overflow-tooltip width="150"/>
|
|
|
+ <el-table-column label="类型" align="center" prop="hazardTypeMode" show-overflow-tooltip width="168"/>
|
|
|
+ </el-table>
|
|
|
+ <pagination layout="total, prev, pager, next, jumper"
|
|
|
+ v-show="deviceTotalRight>0"
|
|
|
+ :total="deviceTotalRight"
|
|
|
+ :pager-count="5"
|
|
|
+ :page.sync="deviceQueryParamsRight.pageNum"
|
|
|
+ :limit.sync="deviceQueryParamsRight.pageSize"
|
|
|
+ @pagination="deviceGetListRight"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div slot="footer" class="dialog-footer dialog-footer-box" style="display: flex">
|
|
|
<p class="dialog-footer-button-null"></p>
|
|
|
<p class="dialog-footer-button-info" @click="addDialogOff">{{addDialogBoxType==1?'取消':'返回'}}</p>
|
|
@@ -401,10 +518,13 @@
|
|
|
import { listDepartments } from "@/api/system/dept";
|
|
|
import { listClassifiedAll } from "@/api/laboratory/classified";
|
|
|
import { listClasstypeAll } from "@/api/laboratory/classtype";
|
|
|
- import { getHistoryPlanTitles,checkGroupFind,findUserList,
|
|
|
- getAllSubNum,isSCollege,conditionCollegeInfo,findSubInfoByDeptIds,
|
|
|
- checkPlanAdd,conditionSubjectInfo,findCheckPlan,checkPlanUpdate,
|
|
|
- hideHistoryPlanTitle } from '@/api/safetyCheck/index'
|
|
|
+ import {
|
|
|
+ getHistoryPlanTitles, checkGroupFind, findUserList,
|
|
|
+ getAllSubNum, isSCollege, conditionCollegeInfo, findSubInfoByDeptIds,
|
|
|
+ checkPlanAdd, conditionSubjectInfo, findCheckPlan, checkPlanUpdate,
|
|
|
+ hideHistoryPlanTitle, findDeviceList
|
|
|
+ } from '@/api/safetyCheck/index'
|
|
|
+ import { dangerList } from '@/api/gasManage3_0/gasManage'
|
|
|
export default {
|
|
|
name: 'addDialog',
|
|
|
props:{
|
|
@@ -456,6 +576,9 @@
|
|
|
title:"",//奥体
|
|
|
checkType:"2",//检查组织
|
|
|
dateRange:[],//时间
|
|
|
+ checkCategory:'1',//检查类型
|
|
|
+ hazardIds:'',//危险源ids
|
|
|
+ hazardNum:'0',// 危险源数量
|
|
|
checkRange:"",//检查范围
|
|
|
checkDemand:"",//检查要点
|
|
|
schoolSubCheckNum:0,//学校实验室数量
|
|
@@ -472,6 +595,9 @@
|
|
|
{ required: true, message: "请输入计划标题", trigger: "change" },
|
|
|
{ required: true, message: "请输入计划标题", validator: this.spaceJudgment, trigger: "change" },
|
|
|
],
|
|
|
+ checkCategory: [
|
|
|
+ { required: true, message: "请选择检查类型", trigger: "change" },
|
|
|
+ ],
|
|
|
dateRange: [
|
|
|
{ required: true, message: "请选择任务周期", trigger: "change" },
|
|
|
],
|
|
@@ -533,6 +659,33 @@
|
|
|
subIdsRight:[],
|
|
|
dialogTableSubList:[],
|
|
|
dialogTableSubDataList:[],
|
|
|
+ /*===================================设备相关===================================*/
|
|
|
+ //检查类型
|
|
|
+ inspectCategoryList:[{id:'1',name:'综合检查'},{id:'2',name:'专项检查'}],
|
|
|
+ deviceQueryParamsLeft:{
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ searchValue:"",
|
|
|
+ hazardTypeMode:"",
|
|
|
+ filtType:1//1是过滤,2是不过滤
|
|
|
+ },
|
|
|
+ deviceTableListLeft:[],
|
|
|
+ deviceTotalLeft:0,
|
|
|
+ deviceNumLeft:0,
|
|
|
+ deviceIdsLeft:[],
|
|
|
+ deviceQueryParamsRight:{
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ searchValue:"",
|
|
|
+ hazardTypeMode:"",
|
|
|
+ filtType:2
|
|
|
+ },
|
|
|
+ deviceTableListRight:[],
|
|
|
+ deviceTotalRight:0,
|
|
|
+ deviceNumRight:0,
|
|
|
+ deviceIdsRight:[],
|
|
|
+ deviceDialogTableDataList:[],
|
|
|
+ dangerArr:[],
|
|
|
/*===================================文档预览===================================*/
|
|
|
iframeSrc:"",
|
|
|
/*===================================弹窗相关结束===================================*/
|
|
@@ -580,6 +733,9 @@
|
|
|
id:response.data.id,
|
|
|
title:response.data.title,
|
|
|
checkType:response.data.checkType,
|
|
|
+ checkCategory:response.data.checkCategory+'',
|
|
|
+ hazardIds:response.data.hazardIds,
|
|
|
+ hazardNum:response.data.hazardNum,
|
|
|
dateRange:[response.data.cycleStartTime,response.data.cycleEndTime],
|
|
|
checkRange:response.data.checkRange,
|
|
|
schoolSubCheckNum:response.data.checkRange == 1?response.data.subjectNum:0,
|
|
@@ -606,6 +762,10 @@
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ //选中检查类型
|
|
|
+ inspectCategoryChange(val){
|
|
|
+
|
|
|
+ },
|
|
|
//选中检查范围
|
|
|
rangeChange(val){
|
|
|
if(val == 1){
|
|
@@ -639,6 +799,9 @@
|
|
|
checkType:this.dialogForm.checkType,
|
|
|
cycleStartTime:this.dialogForm.dateRange[0],
|
|
|
cycleEndTime:this.dialogForm.dateRange[1],
|
|
|
+ checkCategory:this.dialogForm.checkCategory,//检查类型
|
|
|
+ hazardIds:this.dialogForm.hazardIds,//危险源ids
|
|
|
+ hazardNum:this.dialogForm.hazardNum,// 危险源数量
|
|
|
checkRange:this.dialogForm.checkRange,//检查范围
|
|
|
subjectNum:this.dialogForm.checkRange == 1?this.dialogForm.schoolSubCheckNum:(
|
|
|
this.dialogForm.checkRange == 2?this.dialogForm.collegeSubNum:(
|
|
@@ -693,6 +856,14 @@
|
|
|
this.$set(this.dialogForm,'subCheckNum',list.length);
|
|
|
this.$set(this,'dialogTableSubList',list);
|
|
|
this.dialogClickType(1);
|
|
|
+ }else if(this.addDialogBoxType == 6){
|
|
|
+ let list=[]
|
|
|
+ for(let i=0;i<self.deviceDialogTableDataList.length;i++){
|
|
|
+ list.push(self.deviceDialogTableDataList[i].id)
|
|
|
+ }
|
|
|
+ this.$set(this.dialogForm,'hazardIds',list.join(','));
|
|
|
+ this.$set(this.dialogForm,'hazardNum',self.deviceDialogTableDataList.length);
|
|
|
+ this.dialogClickType(1);
|
|
|
}
|
|
|
},
|
|
|
/*===================================弹窗相关===================================*/
|
|
@@ -714,6 +885,11 @@
|
|
|
console.log('item',item);
|
|
|
this.$set(this,'iframeSrc',this.urlJudge(item.fileUrl));
|
|
|
this.$set(this,'addDialogBoxType',type);
|
|
|
+ }else if(type == 6){//检查设备
|
|
|
+ //设备
|
|
|
+ this.deviceResetQueryLeft();
|
|
|
+ this.deviceResetQueryRight();
|
|
|
+ this.$set(this,'addDialogBoxType',type);
|
|
|
}else if(type == 2){
|
|
|
//选择学院
|
|
|
this.$set(this,'addDialogBoxType',type);
|
|
@@ -986,6 +1162,142 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ /*===================================设备相关相关===================================*/
|
|
|
+ //获取危险源类型
|
|
|
+ dangerList(){
|
|
|
+ let _this=this;
|
|
|
+ dangerList().then( response => {
|
|
|
+ let res=response.rows;
|
|
|
+ _this.dangerArr=res;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //查询
|
|
|
+ deviceHandleQueryLeft(){
|
|
|
+ this.$set(this.deviceQueryParamsLeft,'pageNum',1);
|
|
|
+ this.$set(this,'deviceNumLeft',0);
|
|
|
+ this.$set(this,'deviceIdsLeft',[]);
|
|
|
+ this.$refs.leftDeviceTable.clearSelection();
|
|
|
+ this.deviceGetListLeft();
|
|
|
+ },
|
|
|
+ //重置
|
|
|
+ deviceResetQueryLeft(){
|
|
|
+ this.$set(this,'deviceQueryParamsLeft',{
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ hazardTypeMode:"",
|
|
|
+ searchValue:"",
|
|
|
+ filtType:1
|
|
|
+ });
|
|
|
+ this.deviceHandleQueryLeft();
|
|
|
+ },
|
|
|
+ //查询接口
|
|
|
+ deviceGetListLeft(){
|
|
|
+ let self = this;
|
|
|
+ let leftObj = JSON.parse(JSON.stringify(this.deviceQueryParamsLeft));
|
|
|
+ leftObj.selectedHazardIds = [];
|
|
|
+
|
|
|
+ if(self.deviceDialogTableDataList[0]){
|
|
|
+ for(let i=0;i<self.deviceDialogTableDataList.length;i++){
|
|
|
+ leftObj.selectedHazardIds.push(self.deviceDialogTableDataList[i].id);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ leftObj.selectedHazardIds=self.dialogForm.hazardIds.split(',');
|
|
|
+ }
|
|
|
+
|
|
|
+ findDeviceList(leftObj).then(response => {
|
|
|
+ this.deviceTotalLeft = response.total;
|
|
|
+ this.deviceTableListLeft = response.rows;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //查询
|
|
|
+ deviceHandleQueryRight(){
|
|
|
+ this.$set(this.deviceQueryParamsRight,'pageNum',1);
|
|
|
+ this.$set(this,'deviceNumRight',0);
|
|
|
+ this.$set(this,'deviceIdsRight',[]);
|
|
|
+ this.$refs.rightDeviceTable.clearSelection();
|
|
|
+ this.deviceGetListRight();
|
|
|
+ },
|
|
|
+ //重置
|
|
|
+ deviceResetQueryRight(){
|
|
|
+ this.$set(this,'deviceQueryParamsRight',{
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ hazardTypeMode:"",
|
|
|
+ searchValue:"",
|
|
|
+ filtType:2
|
|
|
+ });
|
|
|
+ this.deviceHandleQueryRight();
|
|
|
+ },
|
|
|
+ //查询接口
|
|
|
+ deviceGetListRight(){
|
|
|
+ let self = this;
|
|
|
+ let rightObj = JSON.parse(JSON.stringify(this.deviceQueryParamsRight));
|
|
|
+ rightObj.hazardIds = [];
|
|
|
+ if(self.deviceDialogTableDataList[0]){
|
|
|
+ for(let i=0;i<self.deviceDialogTableDataList.length;i++){
|
|
|
+ rightObj.hazardIds.push(self.deviceDialogTableDataList[i].id);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ rightObj.hazardIds=self.dialogForm.hazardIds.split(',');
|
|
|
+ }
|
|
|
+ findDeviceList(rightObj).then(response => {
|
|
|
+ this.deviceTotalRight = response.total;
|
|
|
+ this.deviceTableListRight = response.rows;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //设备穿梭按钮
|
|
|
+ deviceArrowButton(type){
|
|
|
+ let self = this;
|
|
|
+ if(type == 1){
|
|
|
+ //右至左
|
|
|
+ if(this.$refs.rightDeviceTable.selection[0]){
|
|
|
+ let list = JSON.parse(JSON.stringify(this.deviceDialogTableDataList));
|
|
|
+ let deviceIdsRight = JSON.parse(JSON.stringify(this.$refs.rightDeviceTable.selection))
|
|
|
+ for(let i=0;i<deviceIdsRight.length;i++){
|
|
|
+ for(let s=0;s<list.length;s++){
|
|
|
+ if(deviceIdsRight[i].id == list[s].id){
|
|
|
+ list.splice(s,1);
|
|
|
+ s--
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$set(this,'deviceDialogTableDataList',list);
|
|
|
+ this.$refs.rightDeviceTable.clearSelection();
|
|
|
+ this.deviceHandleQueryLeft();
|
|
|
+ this.deviceHandleQueryRight();
|
|
|
+ }else{
|
|
|
+ this.msgError('请先勾选右侧列表')
|
|
|
+ }
|
|
|
+ }else if(type == 2){
|
|
|
+ //左至右
|
|
|
+ if(this.deviceIdsLeft[0]){
|
|
|
+ let list = JSON.parse(JSON.stringify(this.deviceDialogTableDataList));
|
|
|
+ let deviceIdsLeft = JSON.parse(JSON.stringify(this.$refs.leftDeviceTable.selection))
|
|
|
+ for(let i=0;i<deviceIdsLeft.length;i++){
|
|
|
+ let obj = {
|
|
|
+ // userId:deviceIdsLeft[i].userId,
|
|
|
+ // name:deviceIdsLeft[i].nickName,
|
|
|
+ // jobNum:deviceIdsLeft[i].userName,
|
|
|
+ // deptName:deviceIdsLeft[i].deptName,
|
|
|
+ // deptId:deviceIdsLeft[i].deptId,
|
|
|
+ // userType:deviceIdsLeft[i].userType,
|
|
|
+
|
|
|
+ chName:deviceIdsLeft[i].chName,
|
|
|
+ code:deviceIdsLeft[i].code,
|
|
|
+ hazardTypeMode:deviceIdsLeft[i].hazardTypeMode,
|
|
|
+ id:deviceIdsLeft[i].id,
|
|
|
+ }
|
|
|
+ list.push(obj);
|
|
|
+ }
|
|
|
+ this.$set(this,'deviceDialogTableDataList',list);
|
|
|
+ this.$refs.leftDeviceTable.clearSelection();
|
|
|
+ this.deviceHandleQueryLeft();
|
|
|
+ this.deviceHandleQueryRight();
|
|
|
+ }else{
|
|
|
+ this.msgError('请先勾选左侧列表')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
/*===================================弹窗相关结束===================================*/
|
|
|
// 单个下载按钮
|
|
|
downloadButton(item){
|
|
@@ -1079,6 +1391,14 @@
|
|
|
this.subNumRight = selection.length;
|
|
|
this.subIdsRight = selection.map(item => item.subId);
|
|
|
},
|
|
|
+ deviceChangeLeft(selection){
|
|
|
+ this.deviceNumLeft = selection.length;
|
|
|
+ this.deviceIdsLeft = selection.map(item => item.id);
|
|
|
+ },
|
|
|
+ deviceChangeRight(selection){
|
|
|
+ this.deviceNumRight = selection.length;
|
|
|
+ this.deviceIdsRight = selection.map(item => item.id);
|
|
|
+ },
|
|
|
//加法
|
|
|
accAdd(arg1,arg2){
|
|
|
var r1,r2,m;
|