heyang 1 ano atrás
pai
commit
b048a416f1

+ 8 - 0
src/api/safetyCheck/index.js

@@ -679,6 +679,14 @@ export function findDeviceList(data) {
     data: data
   })
 }
+//通用接口-设备确定提交
+export function haveHazardInSub(data) {
+  return request({
+    url: '/laboratory/hazard/haveHazardInSub',
+    method: 'post',
+    data: data
+  })
+}
 
 //通用接口-查询检查项再特定实验室发生历史次数
 export function countHazardNum(query) {

+ 5 - 0
src/views/safetyCheck/laboratorySelfTest/selfInspectionManagement/index.vue

@@ -67,6 +67,11 @@
             <template slot-scope="scope">{{scope.row.roomNumber?scope.row.subjectName+'-'+scope.row.roomNumber:scope.row.subjectName}}</template>
           </el-table-column>
           <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="150"/>
+          <el-table-column label="检查类型" align="center" prop="checkRange" show-overflow-tooltip width="120">
+            <template slot-scope="scope">
+              <p>{{scope.row.checkCategory==1?'综合检查':(scope.row.checkCategory==2?'专项检查':'-')}}</p>
+            </template>
+          </el-table-column>
           <el-table-column label="检查状态" align="center" prop="manageStatus" show-overflow-tooltip width="90">
             <template slot-scope="scope">
               <p :class="scope.row.manageStatus==0?'manageStatus-color-1':(scope.row.manageStatus==1?'manageStatus-color-2':(scope.row.manageStatus==2?'manageStatus-color-3':''))">

+ 324 - 4
src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/addDialog.vue

@@ -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;

+ 5 - 0
src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/index.vue

@@ -66,6 +66,11 @@
               <p>{{scope.row.checkRange==1?'全校':(scope.row.checkRange==2?'学院':(scope.row.checkRange==3?'实验室':''))}}</p>
             </template>
           </el-table-column>
+          <el-table-column label="检查类型" align="center" prop="checkRange" show-overflow-tooltip width="120">
+            <template slot-scope="scope">
+              <p>{{scope.row.checkCategory==1?'综合检查':(scope.row.checkCategory==2?'专项检查':'-')}}</p>
+            </template>
+          </el-table-column>
           <el-table-column label="任务周期" align="center" prop="cycleStartTime" show-overflow-tooltip width="260">
             <template slot-scope="scope">
               <p>{{scope.row.cycleStartTime}} 至 {{scope.row.cycleEndTime}}<span style="color:#EE0606;margin-left:15px;" v-if="scope.row.isOverdue==1">已逾期</span></p>

+ 0 - 15
src/views/safetyCheck/schoolInspection/inspectionGroup/addDialog.vue

@@ -23,16 +23,6 @@
         <el-form-item label="巡查组名称:" prop="groupName">
           <el-input :disabled="lookInfoType" v-model="dialogForm.groupName" placeholder="请输入巡查组名称" maxLength="20" style="width:450px;"/>
         </el-form-item>
-        <el-form-item label="巡查层级:" prop="checkLevel">
-          <el-select :disabled="lookInfoType" v-model="dialogForm.checkLevel" placeholder="请选择巡查层级" style="width:450px;">
-            <el-option
-              v-for="item in dialogRangeOptions"
-              :key="item.key"
-              :label="item.label"
-              :value="item.key">
-            </el-option>
-          </el-select>
-        </el-form-item>
       </el-form>
       <div class="dialog-table-box">
         <div class="dialog-table-title-box">
@@ -200,7 +190,6 @@
         dialogForm:{
           enable:1,
           groupName:"",
-          checkLevel:"",
         },
         //层级
         dialogRangeOptions:[{key:1,label:"校级"},{key:2,label:"院级"}],
@@ -242,9 +231,6 @@
             { required: true, message: "请输入巡查组名称", trigger: "change" },
             { required: true, message: "请输入巡查组名称", validator: this.spaceJudgment, trigger: "change" },
           ],
-          checkLevel: [
-            { required: true, message: "请选择巡查层级", trigger: "change" },
-          ],
         },
       }
     },
@@ -268,7 +254,6 @@
           this.$set(this.dialogForm,'id',response.data.id?response.data.id:'');
           this.$set(this.dialogForm,'enable',response.data.enable);
           this.$set(this.dialogForm,'groupName',response.data.groupName);
-          this.$set(this.dialogForm,'checkLevel',response.data.checkLevel);
           this.$set(this,'dialogTableList',response.data.checkGroupMemberList);
         });
       },

+ 0 - 15
src/views/safetyCheck/schoolInspection/inspectionGroup/index.vue

@@ -12,16 +12,6 @@
             style="width: 200px"
           />
         </el-form-item>
-        <el-form-item label="巡查层级" prop="checkLevel">
-          <el-select v-model="queryParams.checkLevel" clearable placeholder="请选择层级" style="width: 150px">
-            <el-option
-              v-for="item in optionsOne"
-              :key="item.key"
-              :label="item.label"
-              :value="item.key">
-            </el-option>
-          </el-select>
-        </el-form-item>
         <el-form-item label="状态" prop="enable" label-width="60px">
           <el-select v-model="queryParams.enable" clearable placeholder="请选择状态" style="width: 150px">
             <el-option
@@ -50,9 +40,6 @@
       <el-table  border :data="tableList" ref="multipleTable">
         <el-table-column label="序号"  width="60" align="center"  type="index"/>
         <el-table-column label="巡查组名称" align="center" prop="groupName" show-overflow-tooltip/>
-        <el-table-column label="巡查层级" align="center" prop="checkLevel" show-overflow-tooltip width="200">
-          <template slot-scope="scope">{{scope.row.checkLevel==1?'校级':(scope.row.checkLevel==2?'院级':'')}}</template>
-        </el-table-column>
         <el-table-column label="成员人数" align="center" prop="peopleNum" show-overflow-tooltip width="150"/>
         <el-table-column label="是否启用" align="center" prop="enable" show-overflow-tooltip width="185">
           <template slot-scope="scope">
@@ -119,7 +106,6 @@
           pageNum:1,
           pageSize:20,
           searchValue:"",
-          checkLevel:"",
           enable:"",
         },
         tableList:[],
@@ -205,7 +191,6 @@
           pageNum:1,
           pageSize:20,
           searchValue:"",
-          checkLevel:"",
           enable:"",
         });
         this.handleQuery();

+ 40 - 30
src/views/safetyCheck/schoolInspection/inspectionPlan/addDialog.vue

@@ -48,25 +48,6 @@
               </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">
@@ -89,6 +70,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="checkDemand">
             <el-input
               :disabled="lookInfoType"
@@ -634,7 +634,7 @@
                       :pager-count="5"
                       :page.sync="deviceQueryParamsRight.pageNum"
                       :limit.sync="deviceQueryParamsRight.pageSize"
-                      @pagination="userGetListRight"/>
+                      @pagination="deviceGetListRight"/>
         </div>
       </div>
     </div>
@@ -656,7 +656,7 @@ import {
   getHistoryPlanTitles, findGroupList, checkGroupFind, findUserList,
   getAllSubNum, isSCollege, conditionCollegeInfo, findSubInfoByDeptIds,
   checkPlanAdd, conditionSubjectInfo, findCheckPlan, checkPlanUpdate,
-  hideHistoryPlanTitle, findDeviceList
+  hideHistoryPlanTitle, findDeviceList,haveHazardInSub
 } from '@/api/safetyCheck/index'
 import { dangerList } from '@/api/gasManage3_0/gasManage'
 export default {
@@ -1099,6 +1099,15 @@ export default {
         this.$set(this.dialogForm,'hazardIds',list.join(','));
         this.$set(this.dialogForm,'hazardNum',self.deviceDialogTableDataList.length);
         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 => {
+
+        });
       }
     },
     /*===================================弹窗相关===================================*/
@@ -1569,7 +1578,10 @@ export default {
           leftObj.selectedHazardIds.push(self.deviceDialogTableDataList[i].id);
         }
       }else{
-        leftObj.selectedHazardIds=self.dialogForm.hazardIds.split(',');
+        if(self.dialogForm.hazardIds){
+          leftObj.selectedHazardIds=self.dialogForm.hazardIds.split(',');
+        }
+
       }
 
       findDeviceList(leftObj).then(response => {
@@ -1602,11 +1614,16 @@ export default {
       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(',');
+        console.log(222)
+        if(self.dialogForm.hazardIds){
+          rightObj.hazardIds=self.dialogForm.hazardIds.split(',');
+        }
+
       }
       findDeviceList(rightObj).then(response => {
         this.deviceTotalRight = response.total;
@@ -1643,13 +1660,6 @@ export default {
           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,