|
@@ -48,25 +48,6 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</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">
|
|
<el-form-item label="检查范围:" prop="checkRange">
|
|
<div class="dialog-range-max-box">
|
|
<div class="dialog-range-max-box">
|
|
<div class="dialog-range-select-box">
|
|
<div class="dialog-range-select-box">
|
|
@@ -89,6 +70,25 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</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="checkDemand">
|
|
<el-form-item label="检查要求:" prop="checkDemand">
|
|
<el-input
|
|
<el-input
|
|
:disabled="lookInfoType"
|
|
:disabled="lookInfoType"
|
|
@@ -522,7 +522,7 @@
|
|
getHistoryPlanTitles, checkGroupFind, findUserList,
|
|
getHistoryPlanTitles, checkGroupFind, findUserList,
|
|
getAllSubNum, isSCollege, conditionCollegeInfo, findSubInfoByDeptIds,
|
|
getAllSubNum, isSCollege, conditionCollegeInfo, findSubInfoByDeptIds,
|
|
checkPlanAdd, conditionSubjectInfo, findCheckPlan, checkPlanUpdate,
|
|
checkPlanAdd, conditionSubjectInfo, findCheckPlan, checkPlanUpdate,
|
|
- hideHistoryPlanTitle, findDeviceList
|
|
|
|
|
|
+ hideHistoryPlanTitle, findDeviceList,haveHazardInSub
|
|
} from '@/api/safetyCheck/index'
|
|
} from '@/api/safetyCheck/index'
|
|
import { dangerList } from '@/api/gasManage3_0/gasManage'
|
|
import { dangerList } from '@/api/gasManage3_0/gasManage'
|
|
export default {
|
|
export default {
|
|
@@ -685,7 +685,9 @@
|
|
deviceNumRight:0,
|
|
deviceNumRight:0,
|
|
deviceIdsRight:[],
|
|
deviceIdsRight:[],
|
|
deviceDialogTableDataList:[],
|
|
deviceDialogTableDataList:[],
|
|
|
|
+ deviceDialogList:[],//存储所有的设备
|
|
dangerArr:[],
|
|
dangerArr:[],
|
|
|
|
+ deviceIsEmpty:false,//如果是专项检查-判断是否选择检查范围和检查内容
|
|
/*===================================文档预览===================================*/
|
|
/*===================================文档预览===================================*/
|
|
iframeSrc:"",
|
|
iframeSrc:"",
|
|
/*===================================弹窗相关结束===================================*/
|
|
/*===================================弹窗相关结束===================================*/
|
|
@@ -697,6 +699,8 @@
|
|
},
|
|
},
|
|
mounted(){
|
|
mounted(){
|
|
this.initializationInterface();
|
|
this.initializationInterface();
|
|
|
|
+ this.dangerList();
|
|
|
|
+ this.deviceGetList();//查询所有设备
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
//初始化接口
|
|
//初始化接口
|
|
@@ -794,6 +798,10 @@
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if(this.dialogForm.checkCategory == 2 && !this.deviceIsEmpty){
|
|
|
|
+ this.msgError('请选择检查内容')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
let obj = {
|
|
let obj = {
|
|
title:this.dialogForm.title,
|
|
title:this.dialogForm.title,
|
|
checkType:this.dialogForm.checkType,
|
|
checkType:this.dialogForm.checkType,
|
|
@@ -862,8 +870,22 @@
|
|
list.push(self.deviceDialogTableDataList[i].id)
|
|
list.push(self.deviceDialogTableDataList[i].id)
|
|
}
|
|
}
|
|
this.$set(this.dialogForm,'hazardIds',list.join(','));
|
|
this.$set(this.dialogForm,'hazardIds',list.join(','));
|
|
- this.$set(this.dialogForm,'hazardNum',self.deviceDialogTableDataList.length);
|
|
|
|
|
|
+ this.$set(this.dialogForm,'hazardNum',list.length);
|
|
this.dialogClickType(1);
|
|
this.dialogClickType(1);
|
|
|
|
+ //实验室是否有当前设备
|
|
|
|
+ let obj={
|
|
|
|
+ "checkRange":this.dialogForm.checkRange,
|
|
|
|
+ "collegeIds":this.dialogForm.checkRange==2?this.dialogForm.collegeIds+'':'',//学院ID转换字符串
|
|
|
|
+ "subIds":this.dialogForm.checkRange == 3?this.subCheckData.subIds+'':'',//实验室ID
|
|
|
|
+ "hazardIds":this.dialogForm.hazardIds,
|
|
|
|
+ }
|
|
|
|
+ haveHazardInSub(obj).then(response => {
|
|
|
|
+ if(response.code==200){
|
|
|
|
+ this.deviceIsEmpty=true;
|
|
|
|
+ }else{
|
|
|
|
+ this.deviceIsEmpty=false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
/*===================================弹窗相关===================================*/
|
|
/*===================================弹窗相关===================================*/
|
|
@@ -887,6 +909,19 @@
|
|
this.$set(this,'addDialogBoxType',type);
|
|
this.$set(this,'addDialogBoxType',type);
|
|
}else if(type == 6){//检查设备
|
|
}else if(type == 6){//检查设备
|
|
//设备
|
|
//设备
|
|
|
|
+ let list=[];
|
|
|
|
+ let list2=[];
|
|
|
|
+ if(this.dialogForm.hazardIds){
|
|
|
|
+ list=this.dialogForm.hazardIds.split(',')
|
|
|
|
+ for(let i=0;i<this.deviceDialogList.length;i++){
|
|
|
|
+ for(let b=0;b<list.length;b++){
|
|
|
|
+ if(list[b]==this.deviceDialogList[i].id){
|
|
|
|
+ list2.push(this.deviceDialogList[i])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.$set(self,'deviceDialogTableDataList',list2);
|
|
this.deviceResetQueryLeft();
|
|
this.deviceResetQueryLeft();
|
|
this.deviceResetQueryRight();
|
|
this.deviceResetQueryRight();
|
|
this.$set(this,'addDialogBoxType',type);
|
|
this.$set(this,'addDialogBoxType',type);
|
|
@@ -1195,13 +1230,8 @@
|
|
let self = this;
|
|
let self = this;
|
|
let leftObj = JSON.parse(JSON.stringify(this.deviceQueryParamsLeft));
|
|
let leftObj = JSON.parse(JSON.stringify(this.deviceQueryParamsLeft));
|
|
leftObj.selectedHazardIds = [];
|
|
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(',');
|
|
|
|
|
|
+ for(let i=0;i<self.deviceDialogTableDataList.length;i++){
|
|
|
|
+ leftObj.selectedHazardIds.push(self.deviceDialogTableDataList[i].id);
|
|
}
|
|
}
|
|
|
|
|
|
findDeviceList(leftObj).then(response => {
|
|
findDeviceList(leftObj).then(response => {
|
|
@@ -1228,17 +1258,26 @@
|
|
});
|
|
});
|
|
this.deviceHandleQueryRight();
|
|
this.deviceHandleQueryRight();
|
|
},
|
|
},
|
|
|
|
+ //查询所有的设备
|
|
|
|
+ deviceGetList(){
|
|
|
|
+ let obj={
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 200,
|
|
|
|
+ hazardTypeMode:"",
|
|
|
|
+ searchValue:"",
|
|
|
|
+ filtType:""
|
|
|
|
+ }
|
|
|
|
+ findDeviceList(obj).then(response => {
|
|
|
|
+ this.deviceDialogList=response.rows
|
|
|
|
+ });
|
|
|
|
+ },
|
|
//查询接口
|
|
//查询接口
|
|
deviceGetListRight(){
|
|
deviceGetListRight(){
|
|
let self = this;
|
|
let self = this;
|
|
let rightObj = JSON.parse(JSON.stringify(this.deviceQueryParamsRight));
|
|
let rightObj = JSON.parse(JSON.stringify(this.deviceQueryParamsRight));
|
|
rightObj.hazardIds = [];
|
|
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(',');
|
|
|
|
|
|
+ for(let i=0;i<self.deviceDialogTableDataList.length;i++){
|
|
|
|
+ rightObj.hazardIds.push(self.deviceDialogTableDataList[i].id);
|
|
}
|
|
}
|
|
findDeviceList(rightObj).then(response => {
|
|
findDeviceList(rightObj).then(response => {
|
|
this.deviceTotalRight = response.total;
|
|
this.deviceTotalRight = response.total;
|