heyang 1 year ago
parent
commit
747242d765
36 changed files with 4187 additions and 1626 deletions
  1. 2 1
      .env.production
  2. 4 2
      README.md
  3. 113 1
      src/api/safetyCheck/index.js
  4. 3 3
      src/api/trainingCourse/index.js
  5. 1 1
      src/views/comprehensive/laboratoryManagement/subject/associationConfiguration.vue
  6. 2 1
      src/views/comprehensive/system/handheldEquipmentUsers/index.vue
  7. 10 1
      src/views/hazardManagement/hazard/addLaboratory.vue
  8. 1 1
      src/views/medicUniversity-3_1/chemicalManagement/InventoryManagement/InventoryDetails/index.vue
  9. 6 1
      src/views/medicUniversity-3_1/chemicalManagement/chemicalProcurement/purchaseRequisition/addPage.vue
  10. 1 1
      src/views/medicUniversity-3_1/chemicalManagement/deviceManagement/IntelligentTerminal/index.vue
  11. 16 16
      src/views/safetyCheck/checkItemLibrary/index.vue
  12. 244 50
      src/views/safetyCheck/components/addPage/addPage.vue
  13. 3 2
      src/views/safetyCheck/components/infoDialog/infoDialog.vue
  14. 207 3
      src/views/safetyCheck/components/infoPage/infoPage.vue
  15. 3 1
      src/views/safetyCheck/dataStatistics/checkIndexStatistics.vue
  16. 8 1
      src/views/safetyCheck/dataStatistics/index.vue
  17. 333 0
      src/views/safetyCheck/dataStatistics/inspectContent.vue
  18. 427 0
      src/views/safetyCheck/equipmentConfig/index.vue
  19. 5 0
      src/views/safetyCheck/laboratorySelfTest/selfInspectionManagement/index.vue
  20. 369 6
      src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/addDialog.vue
  21. 5 0
      src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/index.vue
  22. 11 1
      src/views/safetyCheck/safetyHazard/cannotListPage.vue
  23. 10 0
      src/views/safetyCheck/safetyHazard/departmentListPage.vue
  24. 10 0
      src/views/safetyCheck/safetyHazard/schoolListPage.vue
  25. 0 15
      src/views/safetyCheck/schoolInspection/inspectionGroup/addDialog.vue
  26. 0 15
      src/views/safetyCheck/schoolInspection/inspectionGroup/index.vue
  27. 5 0
      src/views/safetyCheck/schoolInspection/inspectionManagement/index.vue
  28. 1774 1416
      src/views/safetyCheck/schoolInspection/inspectionPlan/addDialog.vue
  29. 5 0
      src/views/safetyCheck/schoolInspection/inspectionPlan/index.vue
  30. 5 0
      src/views/safetyCheck/schoolInspection/inspectionPlan/listPage.vue
  31. 599 83
      src/views/safetyCheck/startInspection/index.vue
  32. 1 1
      src/views/safetyCheck/worktable/toDoListBox.vue
  33. 1 1
      src/views/safetyEducationExam/trainingCourse/addDialog.vue
  34. 1 1
      src/views/safetyEducationExam/trainingCourse/index.vue
  35. 1 1
      src/views/safetyEducationExam/trainingCourse/infoDialog.vue
  36. 1 0
      src/views/studentViews/chemicalManagement/studentChemicalInfo/addPage.vue

+ 2 - 1
.env.production

@@ -12,7 +12,7 @@ ENV = 'production'
 
 # ####################外网接口配置####################
 
-VUE_APP_BASE_API = 'lab.sxitdlc.com/labAppTest'
+VUE_APP_BASE_API = 'lab.zjznai.com/labAppTest'
 
 
 
@@ -20,3 +20,4 @@ VUE_APP_BASE_API = 'lab.sxitdlc.com/labAppTest'
 
 VUE_APP_BASE_LOCAL_API = '192.168.1.43/labSystem'
 
+

+ 4 - 2
README.md

@@ -145,8 +145,10 @@
     
 ### 2.功能标识表
 
-| 功能标识 | 功能名称 | 备注 |
-|  ---- | ---- |  ---- | 
+| 功能标识      | 功能名称 | 备注 |
+|-----------| -- |  ---- | 
+| type == 10 | 实验室危险源 | 前端生成 |
+| type == 9 | 化学品 | 前端生成 |
 | type == 8 | 化学品柜 | 前端生成 |
 | type == 7 | 培训课程 | 前端生成 |
 | type == 6 | 专项检查 | 前端生成 |

+ 113 - 1
src/api/safetyCheck/index.js

@@ -99,6 +99,54 @@ export function collegCheckHiddenCountByType(query) {
     params: query
   })
 }
+/***************************设备检查配置***************************/
+//设备检查配置-新增检查内容列表
+export function inspectContentList(query) {
+  return request({
+    url: '/security/checkDevice/getHazardList',
+    method: 'get',
+    params: query
+  })
+}
+//设备检查配置-列表
+export function checkDeviceList(query) {
+  return request({
+    url: '/security/checkDevice/list',
+    method: 'get',
+    params: query
+  })
+}
+//设备检查配置-详情
+export function checkDeviceDetail(query) {
+  return request({
+    url: '/security/checkDevice/findById',
+    method: 'get',
+    params: query
+  })
+}
+//设备检查配置-提交
+export function checkDeviceAdd(data) {
+  return request({
+    url: '/security/checkDevice/add',
+    method: 'post',
+    data: data
+  })
+}
+//设备检查配置-编辑
+export function checkDeviceEdit(data) {
+  return request({
+    url: '/security/checkDevice/edit',
+    method: 'post',
+    data: data
+  })
+}
+export function checkDeviceDelete(id) {
+  return request({
+    url: '/security/checkDevice/'+id,
+    method: 'delete'
+  })
+}
+
 
 /***************************随手拍***************************/
 
@@ -597,7 +645,22 @@ export function dataStatisticsItemsList(query) {
   })
 }
 
-
+//数据统计-按检查内容查询列表
+export function dataStatisticsContentList(query) {
+  return request({
+    url: '/zd-security/DataStatistics/contentList',
+    method: 'get',
+    params: query
+  })
+}
+//数据统计-按检查内容头部数据汇总
+export function dataStatisticsContentListTop(query) {
+  return request({
+    url: '/zd-security/DataStatistics/hazardContentTop',
+    method: 'get',
+    params: query
+  })
+}
 
 
 
@@ -623,6 +686,22 @@ export function findUserList(data) {
     data: data
   })
 }
+//通用接口-设备查询(过滤已选/未选)
+export function findDeviceList(data) {
+  return request({
+    url: '/laboratory/hazard/queryHazardList',
+    method: 'post',
+    data: data
+  })
+}
+//通用接口-设备确定提交
+export function haveHazardInSub(data) {
+  return request({
+    url: '/laboratory/hazard/haveHazardInSub',
+    method: 'post',
+    data: data
+  })
+}
 
 //通用接口-查询检查项再特定实验室发生历史次数
 export function countHazardNum(query) {
@@ -652,6 +731,39 @@ export function buildBySubList(query) {
   })
 }
 
+//通用接口-根据实验室id分类查询实验室内设备
+export function getHazardListBySub(query) {
+  return request({
+    url: '/laboratory/hazard/getHazardListBySub',
+    method: 'get',
+    params: query
+  })
+}
+//通用接口-根据实验室id分类查询实验室内设备
+export function getHazardInfoBySubId(query) {
+  return request({
+    url: '/laboratory/hazard/getHazardInfoBySubId',
+    method: 'get',
+    params: query
+  })
+}
+//通用接口-根据选择的设备id生成检查项
+export function getHazardInfo(query) {
+  return request({
+    url: '/zd-security/checkManage/getHazardInfo',
+    method: 'get',
+    params: query
+  })
+}
+//通用接口-根据选择的设备id生成检查项
+export function getHazardInfoByJoinIds(query) {
+  return request({
+    url: '/zd-security/checkManage/getHazardInfoByJoinIds',
+    method: 'get',
+    params: query
+  })
+}
+
 //开展检查-提交
 export function checkManageAdd(data) {
   return request({

+ 3 - 3
src/api/trainingCourse/index.js

@@ -91,7 +91,7 @@ export function findUserList(data) {
 //手持用户管理列表
 export function pdaUserList(query) {
   return request({
-    url: '/laboratory/pdaUser/list',
+    url: '/system/pdaUser/list',
     method: 'get',
     params: query
   })
@@ -100,7 +100,7 @@ export function pdaUserList(query) {
 //手持用户新增
 export function pdaUser(data) {
   return request({
-    url: '/laboratory/pdaUser/',
+    url: '/system/pdaUser/',
     method: 'post',
     data: data
   })
@@ -109,7 +109,7 @@ export function pdaUser(data) {
 //手持用户删除
 export function pdaUserDel(id) {
   return request({
-    url: '/laboratory/pdaUser/'+id,
+    url: '/system/pdaUser/'+id,
     method: 'delete',
   })
 }

+ 1 - 1
src/views/comprehensive/laboratoryManagement/subject/associationConfiguration.vue

@@ -330,7 +330,7 @@
       qrCodeDialogButton(type,id,name){
         if(type == 1){
           this.$set(this,'qrCodeDialogData',{
-            type:'7',          //二维码类型 用于区分二维码功能类型
+            type:'10',          //二维码类型 用于区分二维码功能类型
             parameter:id,                     //二维码参数
             name:name,                        //二维码名称用于下载时命名
           });

+ 2 - 1
src/views/comprehensive/system/handheldEquipmentUsers/index.vue

@@ -15,7 +15,7 @@
         <p class="reset-button-one" @click="resetQuery">重置</p>
       </el-form-item>
       <el-form-item style="float: right;">
-        <p class="inquire-button-one" style="width:80px;margin-right:0!important;" @click="addButton">新增</p>
+        <p class="inquire-button-one" v-hasPermi="['system:pda:add']" style="width:80px;margin-right:0!important;" @click="addButton">新增</p>
       </el-form-item>
     </el-form>
     <el-table v-loading="loading" border :data="dataList" >
@@ -28,6 +28,7 @@
           <div class="table-button-box">
             <p class="table-button-null"></p>
             <p class="table-button-p"
+               v-hasPermi="['system:pda:remove']"
                @click="delButton(scope.row)"
             >移除</p>
             <p class="table-button-null"></p>

+ 10 - 1
src/views/hazardManagement/hazard/addLaboratory.vue

@@ -22,7 +22,7 @@
         />
       </el-form-item>
       <el-form-item label="危险源类型:" prop="hazardTypeMode">
-        <el-select v-model="form.hazardTypeMode" placeholder="请选择">
+        <el-select v-model="form.hazardTypeMode" placeholder="请选择" @change="hazardTypeChange()">
           <el-option :label="item.dictLabel" :value="item.dictValue" v-for="(item,index) in materialTypeList" :key="index"></el-option>
         </el-select>
       </el-form-item>
@@ -176,6 +176,14 @@ export default {
     })
   },
   methods: {
+    hazardTypeChange(){
+      let self=this;
+      this.materialTypeList.forEach(function(item) {
+          if(self.form.hazardTypeMode==item.dictValue){
+            self.form.hazardTypeModeName=item.dictLabel
+          }
+      })
+    },
     //预览
     previewButton(){
       this.$set(this.form,'content',this.$refs.UEditor.text);
@@ -213,6 +221,7 @@ export default {
       getHazard(this.form.id).then(response => {
         this.form = response.data;
         this.form.hazardTypeMode=response.data.hazardTypeMode+''
+        this.form.hazardTypeModeName=response.data.hazardTypeModeName
         this.form.content = unescape(response.data.content);
         this.getType = true;
       });

+ 1 - 1
src/views/medicUniversity-3_1/chemicalManagement/InventoryManagement/InventoryDetails/index.vue

@@ -270,7 +270,7 @@
             delete this.queryParams.timeTwo
           }
           this.queryParams.pageNum = 1;
-          this.queryParams.pageSize = 10;
+          this.queryParams.pageSize = 20;
           this.getList();
         }else if(type == 2){ //type  1.重置
           this.queryParams = {

+ 6 - 1
src/views/medicUniversity-3_1/chemicalManagement/chemicalProcurement/purchaseRequisition/addPage.vue

@@ -54,7 +54,9 @@
           </div>
           <div class="form-list-data-box" v-for="(item,index) in formData.maxList" :key="index">
             <div class="form-list-data-title">
-              <p>{{item.chemicalName}}</p>
+              <el-tooltip :content="item.chemicalName" placement="top">
+                <p >{{item.chemicalName}}</p>
+              </el-tooltip>
             </div>
             <div class="form-list-data-for-max-box">
               <div class="form-list-data-for" v-for="(minItem,minIndex) in item.list" :key="minIndex">
@@ -404,6 +406,9 @@
               align-self: center;
               margin-top:-20px;
               margin-left:58px;
+              white-space:nowrap;
+              overflow:hidden;
+              text-overflow:ellipsis;
             }
           }
           .form-list-data-for-max-box{

+ 1 - 1
src/views/medicUniversity-3_1/chemicalManagement/deviceManagement/IntelligentTerminal/index.vue

@@ -125,7 +125,7 @@
                :close-on-click-modal="false">
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-form-item label="设备编号:" prop="hardwareNum">
-          <el-input v-model="form.hardwareNum" placeholder="最大20个字符,包含大小写字母、数字" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" maxlength="20" style="width:360px;"/>
+          <el-input v-model="form.hardwareNum" placeholder="最大30个字符,包含大小写字母、数字" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" maxlength="30" style="width:360px;"/>
         </el-form-item>
         <el-form-item label="实验室:" prop="subjectId">
           <el-select

+ 16 - 16
src/views/safetyCheck/checkItemLibrary/index.vue

@@ -59,14 +59,14 @@
                 @select-all="selectAll"
                 :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
         <el-table-column type="selection" width="50" align="center"/>
-        <el-table-column label="序号" prop="code" width="140"/>
+        <el-table-column label="序号" prop="code" width="240"/>
         <el-table-column label="检查项目" prop="name"/>
-        <el-table-column label="检查要点" prop="mainPoint" width="700" show-overflow-tooltip/>
+<!--        <el-table-column label="检查要点" prop="mainPoint" width="700" show-overflow-tooltip/>-->
         <el-table-column label="操作" width="180">
           <template slot-scope="scope">
             <div class="table-button-box">
               <p class="table-button-null"></p>
-              <p class="table-button-p" v-if="scope.row.level != 3" v-hasPermi="['check:option:add']"
+              <p class="table-button-p" v-if="scope.row.level != 4" v-hasPermi="['check:option:add']"
                  @click="addDialogOpen(2,scope.row)">新增</p>
               <p class="table-button-p" @click="addDialogOpen(3,scope.row)" v-hasPermi="['check:option:edit']">编辑</p>
               <p class="table-button-p" @click="delItem(scope.row)" v-hasPermi="['check:option:remove']">删除</p>
@@ -149,18 +149,18 @@
             style="width:548px;">
           </el-input>
         </el-form-item>
-        <el-form-item label="检查要点" prop="mainPoint" v-if="addDialogLevel>1">
-          <el-input
-            type="textarea"
-            :autosize="{ minRows: 8, maxRows: 8}"
-            placeholder="请输入检查检查要点:"
-            v-model="addDialogForm.mainPoint"
-            maxlength="300"
-            resize="none"
-            show-word-limit
-            style="width:548px;">
-          </el-input>
-        </el-form-item>
+<!--        <el-form-item label="检查要点" prop="mainPoint" v-if="addDialogLevel>1">-->
+<!--          <el-input-->
+<!--            type="textarea"-->
+<!--            :autosize="{ minRows: 8, maxRows: 8}"-->
+<!--            placeholder="请输入检查检查要点:"-->
+<!--            v-model="addDialogForm.mainPoint"-->
+<!--            maxlength="300"-->
+<!--            resize="none"-->
+<!--            show-word-limit-->
+<!--            style="width:548px;">-->
+<!--          </el-input>-->
+<!--        </el-form-item>-->
       </el-form>
       <div slot="footer" class="dialog-footer dialog-footer-box" style="display: flex">
         <p class="dialog-footer-button-null"></p>
@@ -531,7 +531,7 @@
         let self = this;
         for(let i=0;i<list.length;i++){
           list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
-          if(list[i].level == 0 || list[i].level == 1){
+          if(list[i].level == 0 || list[i].level == 1 || list[i].level == 2){
             self.getCascaderData(list[i].children)
           }else{
             delete list[i].children

+ 244 - 50
src/views/safetyCheck/components/addPage/addPage.vue

@@ -24,15 +24,17 @@
             </div>
             <el-form-item label="检查要求" prop="checkDemand">
               <p style="background-color: #f5f5f5;color:#333;border-radius:4px;width:690px;padding:10px 15px;font-size:14px;line-height:20px;min-height:40px;">{{addForm.checkDemand}}<span v-if="!addForm.checkDemand" style="color:#999;">未输入</span></p>
-              <!--<el-input disabled v-model="addForm.checkDemand" placeholder="未填写" style="width: 690px"/>-->
             </el-form-item>
-            <el-form-item label="检查结果" prop="checkResult">
+            <el-form-item label="检查类型" prop="checkCategory">
+              <p style="background-color: #f5f5f5;width:690px;padding:0 15px;line-height:40px;border-radius:4px;">{{addForm.checkCategory==1?'综合检查':(addForm.checkCategory==2?'专项检查':'')}}</p>
+            </el-form-item>
+            <el-form-item label="检查结果" prop="checkResult" v-if="addForm.checkCategory==1">
               <el-select v-model="addForm.checkResult" @change="checkResultChange" placeholder="请选择检查结果" style="width: 690px">
                 <el-option :key="0" label="不符合" :value="0"></el-option>
                 <el-option :key="1" label="符合" :value="1"></el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="整改通知" prop="rectifyNotice" v-if="addForm.checkResult === 0">
+            <el-form-item label="整改通知" prop="rectifyNotice" v-if="addForm.checkResult === 0 || addForm.checkCategory==2">
               <el-radio-group v-model="addForm.rectifyNotice" style="margin-top:5px;">
                 <el-radio :label="1">整改告知书</el-radio>
                 <el-radio :label="2">整改通知书</el-radio>
@@ -40,7 +42,7 @@
             </el-form-item>
           </div>
           <div class="top-form-right-box">
-            <el-form-item label="检查类型" prop="checkType">
+            <el-form-item label="检查组织" prop="checkType">
               <p style="background-color: #f5f5f5;width:450px;padding:0 15px;line-height:40px;border-radius:4px;">{{addForm.checkType==1?'校院巡查':(addForm.checkType==2?'实验室自查':'')}}</p>
             </el-form-item>
             <el-form-item label="楼栋" prop="buildName">
@@ -49,7 +51,7 @@
             <el-form-item :label="addForm.checkType==1?'计划周期':(addForm.checkType==2?'任务周期':'')" prop="data9">
               <el-input disabled v-model="addForm.cycleStartTime+' 至 '+addForm.cycleEndTime" placeholder="未填写" maxLength="10" style="width: 450px"/>
             </el-form-item>
-            <el-form-item label="整改期限" prop="rectifyDeadline" v-if="addForm.checkResult === 0">
+            <el-form-item label="整改期限" prop="rectifyDeadline" v-if="addForm.checkResult === 0 || addForm.checkCategory==2">
               <el-date-picker
                 style="width: 450px"
                 v-model="addForm.rectifyDeadline"
@@ -62,7 +64,8 @@
             </el-form-item>
           </div>
         </div>
-        <div class="bottom-form-box" v-if="addForm.checkResult === 0">
+        <!--综合检查-->
+        <div class="bottom-form-box" v-if="addForm.checkResult === 0 && addForm.checkCategory==1">
           <div class="bottom-form-title-box">
             <p>不符合项</p>
             <p>隐患数:{{addForm.checkHazardDtoList.length}}</p>
@@ -89,7 +92,7 @@
               </el-form-item>
               <el-form-item label="检查项目" :prop="'checkHazardDtoList.'+index+'.hazardCheckPro'" :rules="rules.hazardCheckPro" label-width="123px">
                 <el-cascader
-                  @change="(val)=>cascaderChange(val,index)"
+                  @change="(val)=>cascaderChange(val,'',index)"
                   v-model="item.hazardCheckPro"
                   style="width: 898px"
                   placeholder="请选择检查项"
@@ -132,7 +135,7 @@
               <el-form-item label="隐患照片" :prop="'checkHazardDtoList.'+index+'.uploadDtoList'" :rules="rules.uploadDtoList" label-width="123px">
                 <div class="for-img-box" v-for="(img,imgIndex) in item.uploadDtoList" :key="imgIndex">
                   <img class="for-img" :src="img.fileUrl" @click="lookImg(item.uploadDtoList,imgIndex)">
-                  <p class="for-del-button el-icon-circle-close" @click="delImg(index,imgIndex)"></p>
+                  <p class="for-del-button el-icon-circle-close" @click="delImg('',index,imgIndex)"></p>
                 </div>
                 <el-upload
                   style="display: inline-block;overflow: hidden"
@@ -153,6 +156,86 @@
           </div>
           <p class="add-bottom-button" @click="addObject">+新增隐患检查项</p>
         </div>
+        <!--专项检查项-->
+        <div class="bottom-form-box" v-if="addForm.checkCategory==2">
+          <div class="bottom-form-title-box">
+            <p>检查项</p>
+            <p>检查项:{{addForm.checkHazardInfoVoList.length}}</p>
+          </div>
+          <div class="for-max-big-box for-max-big-box-special" v-for="(item,index) in addForm.checkHazardInfoVoList" :key="index">
+            <div class="for-title-box">
+              <p class="for-title-p">{{index+1}}、【{{item.hazardName}}-{{item.code}}】专项检查</p>
+              <div class="for-button-box" @click="dataLookButton(item)">
+                <p :class="item.lookType?'el-icon-arrow-up':'el-icon-arrow-down'"></p>
+                <p>{{item.lookType?'收起':'展开'}}</p>
+              </div>
+            </div>
+            <div class="for-big-box for-big-box-special"  v-if="item.lookType" v-for="(item2,index2) in item.checkHazardDtoList">
+              <el-form-item label="检查项目" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.hazardCheckPro'" :rules="rules.hazardCheckPro" label-width="123px">
+                <el-radio-group v-model="item2.checkFlag" style="margin-right: 20px;">
+                  <el-radio :label="1">符合</el-radio>
+                  <el-radio :label="0">不符合</el-radio>
+                </el-radio-group>
+                <el-cascader
+                  @change="(val)=>cascaderChange(val,item2,index2)"
+                  v-model="item2.hazardCheckPro"
+                  style="width: 730px"
+                  placeholder="请选择检查项"
+                  :options="options"
+                  :props="{ checkStrictly: false, value: 'id', label: 'labelName',emitPath:false }"
+                  filterable>
+                  <template slot-scope="{data}">
+                    <el-tooltip :content="data.labelName" v-if="data.labelName.length>22">
+                      <p style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
+                    </el-tooltip>
+                    <p v-else style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
+                  </template>
+                </el-cascader>
+                <p class="hazard-check-count-p" v-if="hazardCheckCount>0">此检查项在当前实验室累计出现 <span>{{hazardCheckCount}}</span> 次隐患</p>
+              </el-form-item>
+              <el-form-item v-if="item2.checkFlag==0" label="隐患等级" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.hazardLevel'" :rules="rules.hazardLevel" label-width="123px">
+                <el-select v-model="item2.hazardLevel" clearable placeholder="请选择隐患等级" style="width: 408px">
+                  <el-option :key="2" label="一般隐患" :value="2"></el-option>
+                  <el-option :key="1" label="重大隐患" :value="1"></el-option>
+                  <el-option :key="3" label="管理问题" :value="3"></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item v-if="item2.checkFlag==0" label="隐患描述"  label-width="123px">
+                <el-input
+                  style="width: 898px"
+                  type="textarea"
+                  :autosize="{ minRows: 4, maxRows: 4}"
+                  placeholder="请输入隐患描述"
+                  resize="none"
+                  maxlength="100"
+                  show-word-limit
+                  v-model="item2.hazardDescribe">
+                </el-input>
+              </el-form-item>
+              <el-form-item v-if="item2.checkFlag==0" label="隐患照片" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.uploadDtoList'" :rules="rules.uploadDtoList" label-width="123px">
+                <div class="for-img-box" v-for="(img,imgIndex) in item2.uploadDtoList" :key="imgIndex">
+                  <img class="for-img" :src="img.fileUrl" @click="lookImg(item2.uploadDtoList,imgIndex)">
+                  <p class="for-del-button el-icon-circle-close" @click="delImg(item2,index,imgIndex)"></p>
+                </div>
+                <el-upload
+                  v-if="item2.uploadDtoList.length<5"
+                  style="display: inline-block;overflow: hidden"
+                  class="avatar-uploader"
+                  :action="uploadImgUrl"
+                  :show-file-list="false"
+                  :on-success="(res)=>handleAvatarSuccess(res,item2)"
+                  :headers="headers"
+                  :before-upload="(res)=>beforeAvatarUpload(res,item2)">
+                  <p class="el-icon-plus up-img-p" style="display: inline-block"></p>
+                </el-upload>
+              </el-form-item>
+              <el-form-item v-if="item2.checkFlag==0" label="" label-width="123px" style="margin-bottom:40px;color:#999;">
+                <p>支持jpg/png/bmp/gif格式,且不超过2M,最多上传5张</p>
+              </el-form-item>
+            </div>
+          </div>
+        </div>
+
       </el-form>
     </div>
     <div class="bottom-button-max-box">
@@ -228,7 +311,7 @@
     },
     created(){
       this.$set(this,'addPageTitle',this.propsAddData.title);
-      this.checkOptionList();
+
       this.findCheckManage();
     },
     mounted(){},
@@ -238,19 +321,53 @@
         this.$refs["addForm"].validate(valid => {
           if (valid) {
             let obj = JSON.parse(JSON.stringify(this.addForm));
-            if(obj.checkResult === 0){
-              if(!obj.checkHazardDtoList[0]){
-                this.msgError('请添加隐患检查项')
-                return
+            obj.manageStatus = type
+            if(this.addForm.checkCategory==1){//综合检查
+              if(obj.checkResult === 0){
+                if(!obj.checkHazardDtoList[0]){
+                  this.msgError('请添加隐患检查项')
+                  return
+                }
+                for(let i=0;i<obj.checkHazardDtoList.length;i++){
+                  obj.checkHazardDtoList[i].checkCategory=this.addForm.checkCategory
+                  delete obj.checkHazardDtoList[i].lookType
+                }
+                obj.dangerNum = obj.checkHazardDtoList.length
+              }else{
+                obj.checkHazardDtoList = [];
               }
-              for(let i=0;i<obj.checkHazardDtoList.length;i++){
-                delete obj.checkHazardDtoList[i].lookType
+            }else if(this.addForm.checkCategory==2){//专项检查
+              let list=[]
+              let checkFlagList=[];
+              for(let i=0;i<this.addForm.checkHazardInfoVoList.length;i++){
+                for(let b=0;b<this.addForm.checkHazardInfoVoList[i].checkHazardDtoList.length;b++){
+                  checkFlagList.push(this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag)
+                  let obj={
+                    checkFlag:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag,
+                    checkCategory:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkCategory,
+                    hazardCheckCode:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckCode,
+                    hazardCheckName:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckName,
+                    hazardCheckPro:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckPro,
+                    hazardDescribe:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardDescribe,
+                    hazardLevel:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardLevel,
+                    uploadDtoList:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].uploadDtoList,
+                    code:this.addForm.checkHazardInfoVoList[i].code,
+                    hazardId:this.addForm.checkHazardInfoVoList[i].hazardId,
+                    hazardName:this.addForm.checkHazardInfoVoList[i].hazardName,
+                    hazardTypeMode:this.addForm.checkHazardInfoVoList[i].hazardTypeMode,
+                    hazardTypeModeName:this.addForm.checkHazardInfoVoList[i].hazardTypeModeName,
+                    joinHazardId:this.addForm.checkHazardInfoVoList[i].joinHazardId,
+                  }
+                  list.push(obj)
+                }
               }
-              obj.dangerNum = obj.checkHazardDtoList.length
-            }else{
-              obj.checkHazardDtoList = [];
+              if(checkFlagList.every(item=>{return item==1})){//符合
+                obj.checkResult=1;
+              }else{//不符合
+                obj.checkResult=0;
+              }
+              obj.checkHazardDtoList=list;
             }
-            obj.manageStatus = type
             checkManageUpdate(obj).then(response => {
               this.msgSuccess(response.msg);
               this.$parent.goAddPage(4);
@@ -261,13 +378,27 @@
       //查询详情
       findCheckManage(){
         findCheckManage({id:this.propsAddData.id}).then(response => {
-          response.data.checkResult = response.data.checkResult === 0 || response.data.checkResult === 1?response.data.checkResult:"";
-          response.data.rectifyNotice = response.data.rectifyNotice?response.data.rectifyNotice:"";
-          response.data.rectifyDeadline = response.data.rectifyDeadline?response.data.rectifyDeadline:"";
-          for(let i=0;i<response.data.checkHazardDtoList.length;i++){
-            response.data.checkHazardDtoList[i].lookType = true;
+          if(response.data.checkCategory==1){//综合检查
+            response.data.checkResult = response.data.checkResult === 0 || response.data.checkResult === 1?response.data.checkResult:"";
+            response.data.rectifyNotice = response.data.rectifyNotice?response.data.rectifyNotice:"";
+            response.data.rectifyDeadline = response.data.rectifyDeadline?response.data.rectifyDeadline:"";
+            for(let i=0;i<response.data.checkHazardDtoList.length;i++){
+              response.data.checkHazardDtoList[i].lookType = true;
+            }
+          }else if(response.data.checkCategory==2){//专项检查
+            response.data.rectifyNotice = response.data.rectifyNotice?response.data.rectifyNotice:"";
+            response.data.rectifyDeadline = response.data.rectifyDeadline?response.data.rectifyDeadline:"";
+            if(response.data.checkHazardInfoVoList[0]){
+              response.data.checkHazardInfoVoList.forEach(function(item) {
+                item.lookType = true;
+                item.checkHazardDtoList.forEach(function(item2) {
+                  item2.hazardCheckCode=item2.code
+                })
+              })
+            }
           }
           this.$set(this,'addForm',response.data);
+          this.checkOptionList();//获取检查项
         });
       },
       //返回事件
@@ -275,12 +406,19 @@
         this.$parent.goAddPage(1);
       },
       // 删除图片
-      delImg(index,imgIndex){
-        this.addForm.checkHazardDtoList[index].uploadDtoList.splice(imgIndex,1);
+      delImg(item,index,imgIndex){
+        console.log(item)
+        if(this.addForm.checkCategory==1){//综合检查
+          this.addForm.checkHazardDtoList[index].uploadDtoList.splice(imgIndex,1);
+        }else if(this.addForm.checkCategory==2){//专项检查
+          item.uploadDtoList.splice(imgIndex,1);
+        }
+
       },
       //收起/展开
       dataLookButton(item){
         item.lookType = !item.lookType
+
       },
       //检查结果选中
       checkResultChange(val){
@@ -320,19 +458,33 @@
         }).catch(() => {});
       },
       //检查项选中
-      cascaderChange(val,index){
+      cascaderChange(val,item,index){
         let obj = this.getCascaderDataQuery(val,this.options);
-        if(!obj){
-          this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckPro','');
-          this.msgError('未找到相关项目')
-          return
+        console.log(item.hazardCheckPro)
+        if(this.addForm.checkCategory==1){//综合检查
+          if(!obj){
+            this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckPro','');
+            this.msgError('未找到相关项目')
+            return
+          }
+          this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckCode',obj.code);
+          this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckName',obj.name);
+          this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckPoint',obj.mainPoint);
+          countHazardNum({subId:this.addForm.subId, hazardCheckPro:val}).then( response => {
+            this.$set(this,'hazardCheckCount',response.data);
+          })
+        }else if(this.addForm.checkCategory==2){//专项检查
+          if(!obj){
+            this.$set(this.addForm.specialCheckHazardDtoList[index],'hazardCheckPro','');
+            this.msgError('未找到相关项目')
+            return
+          }
+          item.hazardCheckCode=obj.code;
+          item.hazardCheckName=obj.name;
+          countHazardNum({subId:this.addForm.subId, hazardCheckPro:val}).then( response => {
+            this.$set(this,'hazardCheckCount',response.data);
+          })
         }
-        this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckCode',obj.code);
-        this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckName',obj.name);
-        this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckPoint',obj.mainPoint);
-        countHazardNum({subId:this.addForm.subId, hazardCheckPro:val}).then( response => {
-          this.$set(this,'hazardCheckCount',response.data);
-        })
       },
       //查看图片
       lookImg(list,index){
@@ -395,14 +547,19 @@
       //联级选择器数据处理
       getCascaderData(list){
         let self = this;
-        for(let i=0;i<list.length;i++){
-          list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
-          if(list[i].level == 0 || list[i].level == 1 || list[i].level == 2){
-            if(list[i].children){
-              if(list[i].children[0]){
-                self.getCascaderData(list[i].children)
-                if(list[i].children){
-                  if(!list[i].children[0]){
+        if(this.addForm.checkCategory==1){//综合检查
+          for(let i=0;i<list.length;i++){
+            list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
+            if(list[i].level == 0 || list[i].level == 1 || list[i].level == 2){
+              if(list[i].children){
+                if(list[i].children[0]){
+                  self.getCascaderData(list[i].children)
+                  if(list[i].children){
+                    if(!list[i].children[0]){
+                      list.splice(i,1)
+                      i--
+                    }
+                  }else{
                     list.splice(i,1)
                     i--
                   }
@@ -415,15 +572,41 @@
                 i--
               }
             }else{
-              list.splice(i,1)
-              i--
+              delete list[i].children
+            }
+          }
+        }else if(this.addForm.checkCategory==2){//专项检查
+          for(let i=0;i<list.length;i++){
+            list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
+            if(list[i].level == 0 || list[i].level == 1 || list[i].level == 2 || list[i].level == 3){
+              if(list[i].children){
+                if(list[i].children[0]){
+                  self.getCascaderData(list[i].children)
+                  if(list[i].children){
+                    if(!list[i].children[0]){
+                      list.splice(i,1)
+                      i--
+                    }
+                  }else{
+                    list.splice(i,1)
+                    i--
+                  }
+                }else{
+                  list.splice(i,1)
+                  i--
+                }
+              }else{
+                list.splice(i,1)
+                i--
+              }
+            }else{
+              delete list[i].children
             }
-          }else{
-            delete list[i].children
           }
         }
+
       },
-      //联级选择器数据查询
+      //获取学院列表
       getCascaderDataQuery(text,list){
         let self = this;
         for(let i=0;i<list.length;i++){
@@ -616,6 +799,17 @@
         }
       }
     }
+    /*专项检查*/
+    .for-max-big-box-special{
+      margin-bottom: 20px;
+      .for-big-box-special{
+        border-bottom: 1px dotted #D8D8D8;
+        margin:30px;
+      }
+      .for-big-box-special:last-of-type{
+        border-bottom: none;
+      }
+    }
     .bottom-button-max-box{
       height:80px;
       display: flex;

+ 3 - 2
src/views/safetyCheck/components/infoDialog/infoDialog.vue

@@ -63,7 +63,7 @@
           </div>
           <div class="text-box-two-box">
             <div>
-              <p>检查类型</p>
+              <p>检查组织</p>
               <p>{{infoDialogData.checkType==1?'校院巡查':(infoDialogData.checkType==2?'实验室自查':'')}}</p>
             </div>
             <div>
@@ -120,7 +120,8 @@
         <p class="table-top-title-p">不符合项</p>
         <div class="info-dialog-content-info-bottom">
           <div class="table-box">
-            <p class="table-title-p">隐患项</p>
+            <p class="table-title-p" v-if="infoDialogData.checkHazardApplyDto.checkCategory==1">隐患项</p>
+            <p class="table-title-p" v-if="infoDialogData.checkHazardApplyDto.checkCategory==2">【{{infoDialogData.checkHazardApplyDto.hazardName}}】 专项检查</p>
             <div class="table-min">
               <div class="left-box">
                 <p></p>

+ 207 - 3
src/views/safetyCheck/components/infoPage/infoPage.vue

@@ -14,6 +14,9 @@
             <el-form-item label="计划标题" prop="title">
               <el-input disabled v-model="addForm.title" placeholder="未填写" style="width: 690px"/>
             </el-form-item>
+            <el-form-item label="检查组织" prop="checkType">
+              <p style="background-color: #f5f5f5;color:#333;border-radius:4px;width:690px;padding:0 15px;">{{addForm.checkCategory==1?'综合检查':(addForm.checkCategory==2?'专项检查':'')}}</p>
+            </el-form-item>
             <div style="display: flex">
               <el-form-item label="学院" prop="collegeName">
                 <el-input disabled v-model="addForm.collegeName" placeholder="未填写" style="width: 300px"/>
@@ -44,7 +47,7 @@
             </div>
           </div>
           <div class="top-form-right-box">
-            <el-form-item label="检查类型" prop="checkType">
+            <el-form-item label="检查组织" prop="checkType">
               <p style="background-color: #f5f5f5;color:#333;border-radius:4px;width:450px;padding:0 15px;">{{addForm.checkType==1?'校院巡查':(addForm.checkType==2?'实验室自查':'')}}</p>
             </el-form-item>
             <el-form-item label="楼栋" prop="buildName">
@@ -63,7 +66,8 @@
             </el-form-item>
           </div>
         </div>
-        <div class="bottom-form-box" v-if="addForm.checkResult==0">
+        <!--综合检查-->
+        <div class="bottom-form-box" v-if="addForm.checkResult==0 && addForm.checkCategory==1">
           <div class="bottom-form-title-box">
             <p>不符合项</p>
             <p>隐患数:{{addForm.dangerNum}}</p>
@@ -154,6 +158,74 @@
             </div>
           </div>
         </div>
+        <!--专项检查项-->
+        <div class="bottom-form-box" v-if="(addForm.checkResult==0||addForm.checkResult==1) && addForm.checkCategory==2">
+          <div class="bottom-form-title-box">
+            <p>检查项</p>
+            <p>检查项:{{addForm.checkHazardInfoVoList.length}}</p>
+          </div>
+          <div class="for-max-big-box for-max-big-box-special" v-for="(item,index) in addForm.checkHazardInfoVoList" :key="index">
+            <div class="for-title-box">
+              <p class="for-title-p">{{index+1}}、【{{item.hazardName}}{{item.hazardName}}】专项检查</p>
+              <div class="for-button-box" @click="dataLookButton(item)">
+                <p :class="item.lookType?'el-icon-arrow-up':'el-icon-arrow-down'"></p>
+                <p>{{item.lookType?'收起':'展开'}}</p>
+              </div>
+            </div>
+            <div class="for-big-box for-big-box-special" v-if="item.lookType" v-for="(item2,index2) in item.checkHazardDtoList">
+              <el-form-item label="检查项目"  label-width="123px">
+                <el-radio-group v-model="item2.checkFlag" style="margin-right: 20px;" disabled>
+                  <el-radio :label="1">符合</el-radio>
+                  <el-radio :label="0">不符合</el-radio>
+                </el-radio-group>
+                <el-cascader
+                  disabled
+                  @change="(val)=>cascaderChange(val,item2,index2)"
+                  v-model="item2.hazardCheckPro"
+                  style="width: 730px"
+                  placeholder="请选择检查项"
+                  :options="options"
+                  :props="{ checkStrictly: false, value: 'id', label: 'labelName',emitPath:false }"
+                  filterable>
+                  <template slot-scope="{data}">
+                    <el-tooltip :content="data.labelName" v-if="data.labelName.length>22">
+                      <p style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
+                    </el-tooltip>
+                    <p v-else style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
+                  </template>
+                </el-cascader>
+                <p class="button-p" v-if="item2.checkFlag==0" @click="addDialogOpen(true,item2)">{{item2.rectifyStatus==1?'已完成':(item2.rectifyStatus==2?'待整改':(item2.rectifyStatus==3?'待复核':(item2.rectifyStatus==4?'暂无法整改':'')))}} <i class="el-icon-d-arrow-right"></i></p>
+              </el-form-item>
+              <el-form-item v-if="item2.checkFlag==0" label="隐患等级"  label-width="123px">
+                <el-select v-model="item2.hazardLevel" clearable placeholder="请选择隐患等级" style="width: 408px" disabled>
+                  <el-option :key="2" label="一般隐患" :value="2"></el-option>
+                  <el-option :key="1" label="重大隐患" :value="1"></el-option>
+                  <el-option :key="3" label="管理问题" :value="3"></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item v-if="item2.checkFlag==0" label="隐患描述"  label-width="123px" >
+                <el-input
+                  disabled
+                  style="width: 898px"
+                  type="textarea"
+                  :autosize="{ minRows: 4, maxRows: 4}"
+                  placeholder="请输入隐患描述"
+                  resize="none"
+                  maxlength="100"
+                  show-word-limit
+                  v-model="item2.hazardDescribe">
+                </el-input>
+              </el-form-item>
+              <el-form-item v-if="item2.checkFlag==0" label="隐患照片"  label-width="123px">
+                <div class="for-img-box" v-for="(img,imgIndex) in item2.uploadDtoList" :key="imgIndex">
+                  <img class="for-img" :src="img.fileUrl" @click="lookImg(item2.uploadDtoList,imgIndex)">
+                  <p class="for-del-button el-icon-circle-close" @click="delImg(index,imgIndex)"></p>
+                </div>
+              </el-form-item>
+            </div>
+          </div>
+        </div>
+
       </el-form>
     </div>
     <lookImgDialog ref="lookImgDialog"></lookImgDialog>
@@ -164,11 +236,12 @@
 </template>
 
 <script>
-  import { findCheckManage,getFindByCheckPlanId } from '@/api/safetyCheck/index'
+import { checkOptionList, findCheckManage, getFindByCheckPlanId } from '@/api/safetyCheck/index'
   import lookImgDialog from '@/components/lookImgDialog/lookImgDialog.vue'
   import lookDocumentDataDialog from '@/components/lookDocumentDialog/lookDocumentDataDialog.vue'
   import lookDocumentListDialog from '@/components/lookDocumentDialog/lookDocumentListDialog.vue'
   import infoDialog from '@/views/safetyCheck/components/infoDialog/infoDialog.vue'
+import { getToken } from '@/utils/auth'
   export default {
     name: 'infoPage',
     props:{
@@ -182,6 +255,10 @@
     },
     data(){
       return{
+        uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
+        headers: {
+          Authorization: "Bearer " + getToken(),
+        },
         //子组件数据
         lookDocumentType:false,
         propsLookDocumentData:{},
@@ -192,16 +269,26 @@
         imgType:1,
         infoDialogType:false,
         addForm:{},
+        options:[],
       }
     },
     created(){},
     mounted(){
+      this.checkOptionList();
       this.findCheckManage();
     },
     methods:{
       //查询详情
       findCheckManage(){
         findCheckManage({id:this.propsInfoData.id}).then(response => {
+          if(response.data.checkHazardInfoVoList[0]){
+            response.data.checkHazardInfoVoList.forEach(function(item) {
+              item.lookType = true;
+              item.checkHazardDtoList.forEach(function(item2) {
+                item2.hazardCheckCode=item2.code
+              })
+            })
+          }
           this.$set(this,'addForm',response.data);
         });
       },
@@ -220,6 +307,45 @@
           }
         }
       },
+      //获取检查项
+      checkOptionList(){
+        checkOptionList().then( response => {
+          this.$set(this,'options',response.data);
+          this.getCascaderData(this.options);
+        })
+      },
+      //联级选择器数据处理
+      getCascaderData(list){
+        let self = this;
+        for(let i=0;i<list.length;i++){
+          list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
+          if(list[i].level == 0 || list[i].level == 1 || list[i].level == 2 || list[i].level == 3){
+            if(list[i].children){
+              if(list[i].children[0]){
+                self.getCascaderData(list[i].children)
+                if(list[i].children){
+                  if(!list[i].children[0]){
+                    list.splice(i,1)
+                    i--
+                  }
+                }else{
+                  list.splice(i,1)
+                  i--
+                }
+              }else{
+                list.splice(i,1)
+                i--
+              }
+            }else{
+              list.splice(i,1)
+              i--
+            }
+          }else{
+            delete list[i].children
+          }
+        }
+
+      },
       //返回事件
       outButton(){
         this.$parent.goAddPage(1);
@@ -416,6 +542,18 @@
           margin-left: 30px;
           flex:1;
         }
+        .for-button-box{
+          color:#0183FA;
+          margin-left:46px;
+          margin-right:43px;
+          cursor: pointer;
+          display: flex;
+          p{
+            font-size:14px;
+            line-height:50px;
+            margin-right:8px;
+          }
+        }
       }
       .for-content-box{
         display: flex;
@@ -523,6 +661,72 @@
         }
       }
     }
+    .for-big-box{
+      padding-top:27px;
+      .up-img-p{
+        height:80px;
+        width:80px;
+        line-height:80px;
+        text-align: center;
+        font-size:16px;
+        border-radius:4px;
+        border:1px dashed #E0E0E0;
+      }
+      .for-img-box{
+        width:80px;
+        height:80px;
+        border-radius:4px;
+        display: inline-block;
+        overflow: hidden;
+        margin-right:20px;
+        position: relative;
+        .for-img{
+          width:80px;
+          height:80px;
+          display: inline-block;
+          overflow: hidden;
+          cursor: pointer;
+        }
+        .for-del-button{
+          background: rgba(0,0,0,0.7);
+          width:20px;
+          height:20px;
+          line-height: 20px;
+          text-align: center;
+          color:#fff;
+          border-bottom-left-radius:4px;
+          cursor: pointer;
+          position: absolute;
+          top:0;
+          right:0;
+        }
+      }
+      .button-p{
+        display: inline-block;
+        margin-left: 20px;
+        width:200px;
+        color:#0183FA;
+        font-size:16px;
+        min-height:40px;
+        line-height:40px;
+        margin-left:39px;
+        cursor: pointer;
+        i{
+          font-size:14px;
+        }
+      }
+    }
+    /*专项检查*/
+    .for-max-big-box-special{
+      margin-bottom: 20px;
+      .for-big-box-special{
+        border-bottom: 1px dotted #D8D8D8;
+        margin:30px;
+      }
+      .for-big-box-special:last-of-type{
+        border-bottom: none;
+      }
+    }
   }
   ::v-deep .is-disabled{
     .el-input__inner{

+ 3 - 1
src/views/safetyCheck/dataStatistics/checkIndexStatistics.vue

@@ -63,7 +63,7 @@
       </el-form-item>
     </el-form>
     <div class="num-data-box">
-      共搜索到隐患总数 {{numData.sumTotal}},一级指标隐患总数 {{numData.level1}},占比 {{numData.percent1}},二级指标隐患总数 {{numData.level2}},占比 {{numData.percent2}},三级指标隐患总数 {{numData.level3}},占比 {{numData.percent3}}
+      共搜索到隐患总数 {{numData.sumTotal}},一级指标隐患总数 {{numData.level1}},占比 {{numData.percent1}},二级指标隐患总数 {{numData.level2}},占比 {{numData.percent2}},三级指标隐患总数 {{numData.level3}},占比 {{numData.percent3}},四级指标隐患总数 {{numData.level4}},占比 {{numData.percent4}}
     </div>
     <el-table  border :data="tableList" ref="multipleTable"
                :row-key="getRowKeys"
@@ -80,6 +80,8 @@
       <el-table-column label="二级指标占比" align="center" prop="percent2" show-overflow-tooltip width="130"/>
       <el-table-column label="三级指标隐患数" align="center" prop="itemsTotal3" show-overflow-tooltip width="130"/>
       <el-table-column label="三级指标占比" align="center" prop="percent3" show-overflow-tooltip width="130"/>
+      <el-table-column label="四级指标隐患数" align="center" prop="itemsTotal4" show-overflow-tooltip width="130"/>
+      <el-table-column label="四级指标占比" align="center" prop="percent4" show-overflow-tooltip width="130"/>
     </el-table>
     <pagination :page-sizes="[20, 30, 40, 50]"
                 v-show="total>0"

+ 8 - 1
src/views/safetyCheck/dataStatistics/index.vue

@@ -13,10 +13,15 @@
         <p>按检查指标</p>
         <p></p>
       </div>
+      <div :class="pageType == 4?'checkTitle':''" @click="checkTitleButton(4)">
+        <p>按检查内容</p>
+        <p></p>
+      </div>
     </div>
     <laboratoryStatistics v-if="pageType == 1"></laboratoryStatistics>
     <safetyHazardStatistics v-if="pageType == 2"></safetyHazardStatistics>
     <checkIndexStatistics v-if="pageType == 3" :propsData="propsData"></checkIndexStatistics>
+    <inspectContent v-if="pageType == 4" ></inspectContent>
   </div>
 </template>
 
@@ -24,12 +29,14 @@
   import laboratoryStatistics from './laboratoryStatistics.vue'
   import safetyHazardStatistics from './safetyHazardStatistics.vue'
   import checkIndexStatistics from './checkIndexStatistics.vue'
+  import inspectContent from './inspectContent.vue'
   export default {
     name: 'index',
     components: {
       laboratoryStatistics,
       safetyHazardStatistics,
-      checkIndexStatistics
+      checkIndexStatistics,
+      inspectContent
     },
     data(){
       return{

+ 333 - 0
src/views/safetyCheck/dataStatistics/inspectContent.vue

@@ -0,0 +1,333 @@
+<!--检查内容统计列表-->
+<template>
+  <div class="safetyHazardStatistics">
+    <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true">
+      <el-form-item label="" prop="rectifyStatus">
+        <el-select v-model="queryParams.hazardTypeMode" clearable placeholder="全部检查内容">
+          <el-option
+            v-for="item in materialTypeList"
+            :key="item.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="" prop="deptId" label-width="50px">
+        <el-select v-model="queryParams.deptId" @change="handleNodeClick" clearable placeholder="全部学院">
+          <el-option
+            v-for="item in deptSelectList"
+            :key="item.deptId"
+            :label="item.deptName"
+            :value="item.deptId">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="" prop="subId" label-width="58px">
+        <el-select v-model="queryParams.subId" placeholder="请选择实验室">
+          <el-option
+            v-for="item in subjectOptions"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="" prop="dateRange" label-width="70px">
+        <el-date-picker
+          :clearable="false"
+          v-model="dateRange"
+          size="small"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
+        <p class="reset-button-one" @click="resetQuery">重置</p>
+      </el-form-item>
+      <el-form-item style="float: right;" v-hasPermi="['safety:dataSub:export']">
+        <el-dropdown @command="exportButton">
+          <div class="form-dropdown-box">
+            <img src="@/assets/ZDimages/personnelManagement/icon_jzgxx_sc.png">
+            <p>导出</p>
+            <img src="@/assets/ZDimages/personnelManagement/icon_jzggl_xljt.png">
+          </div>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;color:#333;" :command="{command:1}">导出全部数据</el-dropdown-item>
+            <el-dropdown-item style="margin:0 10px;color:#333;" :command="{command:2}">导出选中数据</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </el-form-item>
+    </el-form>
+    <div class="num-data-box">
+      共搜索到隐患总数 {{numData.numData}},已整改数 {{numData.sumYzg}}, 未整改数 {{numData.sumWzg}},整改率 {{numData.rate}}
+    </div>
+    <el-table  border :data="tableList" ref="multipleTable"
+               :row-key="getRowKeys"
+               @select="select" @select-all="selectAll">
+      <el-table-column type="selection" width="50" align="center" fixed/>
+      <el-table-column label="序号" align="center"  type="index" width="60" fixed/>
+      <el-table-column label="检查内容" align="center" prop="hazardName" show-overflow-tooltip width="200" fixed/>
+      <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="200" fixed/>
+      <el-table-column label="实验室" align="center" prop="subjectName" show-overflow-tooltip width="180"/>
+      <el-table-column label="隐患总数" align="center" prop="sumTotal" show-overflow-tooltip width="100"/>
+      <el-table-column label="隐患占比" align="center" prop="percent" show-overflow-tooltip width="180"/>
+      <el-table-column label="已整改" align="center" prop="sumYzg" show-overflow-tooltip width="180"/>
+      <el-table-column label="未整改" align="center" prop="sumWzg" show-overflow-tooltip width="180"/>
+      <el-table-column label="整改率" align="center" prop="percent2" show-overflow-tooltip width="180"/>
+    </el-table>
+    <pagination :page-sizes="[20, 30, 40, 50]"
+                v-show="total>0"
+                :total="total"
+                :page.sync="queryParams.pageNum"
+                :limit.sync="queryParams.pageSize"
+                @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+  import { listDepartments } from "@/api/system/dept";
+  import { dataStatisticsContentList,dataStatisticsContentListTop } from "@/api/safetyCheck/index";
+  import { dangerList } from '@/api/gasManage3_0/gasManage'
+  import { subjectDictList } from '@/api/laboratory/record'
+  export default {
+    name: 'safetyHazardStatistics',
+    data(){
+      return{
+        deptSelectList:[],
+        materialTypeList:[],
+        subjectOptions:[],
+        levelList:[{label:"一般隐患",key:"2"},{label:"重大隐患",key:"1"},{label:"管理问题",key:"3"}],
+        dateRange:[],
+        queryParams:{
+          pageNum:1,
+          pageSize:20,
+          hazardTypeMode:"",
+          deptId:"",
+          subId:"",
+        },
+        setChildren:"",
+        numData:{},
+        tableList:[],
+        total:0,
+      }
+    },
+    created(){
+
+    },
+    mounted(){
+      this.dangerList();
+      this.initializationInterface();
+      this.getList();
+    },
+    methods:{
+      initializationInterface(){
+        //获取学院列表
+        listDepartments().then(response => {
+          this.deptSelectList = response.data;
+        });
+      },
+      //获取危险源类型
+      dangerList(){
+        let _this=this;
+        dangerList().then( response => {
+          let res=response.rows;
+          _this.materialTypeList=res;
+        });
+      },
+      // 节点单击事件
+      handleNodeClick(data) {
+        this.queryParams.deptId = data;
+        this.getSubjectDictList(data);
+      },
+      /** 查询实验室字典列表 */
+      getSubjectDictList (deptId) {
+        this.subjectOptions = null;
+        this.loading = true;
+        let params = {};
+        params.deptId = deptId;
+        this.queryParams.subId = "";
+        subjectDictList(params).then(response => {
+          this.subjectOptions = response.data;
+          this.loading = false;
+        });
+      },
+      //获取数据列表
+      getList(){
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.beginTime = this.dateRange[0];
+        }else{
+          obj.beginTime = "";
+        }
+        if(this.dateRange[1]){
+          obj.endTime = this.dateRange[1];
+        }else{
+          obj.endTime = "";
+        }
+        dataStatisticsContentList(obj).then(response => {
+          this.total = response.data.total;
+          this.tableList = response.data.records;
+        });
+        dataStatisticsContentListTop(obj).then(response => {
+          this.$set(this,'numData',response.data);
+        });
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.$set(this.queryParams,'pageNum',1);
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.$set(this,'dateRange',[]);
+        this.$set(this,'queryParams',{
+          pageNum:1,
+          pageSize:20,
+          hazardTypeMode:"",
+          deptId:"",
+          subId:"",
+        });
+        this.handleQuery();
+      },
+      /** 导出按钮操作 */
+      exportButton(item) {
+        let self = this;
+        if(item.command == 1){
+          self.$confirm(`确认导出全部数据?`, "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(async () => {
+            self.download('/zd-security/DataStatistics/contentExport/', {}, '检查内容统计.xlsx')
+          }).catch(() => {})
+        }else if(item.command == 2){
+          let list = self.$refs.multipleTable.selection;
+          let ids = [];
+          for(let i=0;i<list.length;i++){
+            ids.push(list[i].id)
+          }
+          if(ids.length>0) {
+            self.$confirm(`确认导出选中数据?`, "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(async () => {
+              self.download(`/zd-security/DataStatistics/contentExport/?ids=`+ids,{}, '检查内容统计.xlsx')
+              this.$refs.multipleTable.clearSelection();
+            }).catch(() => {})
+          }else {
+            this.msgError('请选择要导出的数据')
+          }
+        }
+      },
+      /*===记录勾选数据===
+        需要再el-table 添加  :row-key="getRowKeys"
+        需要在selection 添加 :reserve-selection="true"
+      */
+      getRowKeys(row) {
+        return row.id
+      },
+      // 单选
+      select (selection, row) {
+        if (selection.some(el => { return row.id === el.id })) {
+          if (row.children) {
+            this.setChildren(row.children, true)
+          }
+        } else {
+          if (row.children) {
+            this.setChildren(row.children, false)
+          }
+        }
+      },
+      // 全选
+      selectAll (selection) {
+        const isSelect = selection.some(el => {
+          const tableDataIds = this.tableData.map(j => j.id)
+          return tableDataIds.includes(el.id)
+        })
+        const isCancel = !this.tableData.every(el => {
+          const selectIds = selection.map(j => j.id)
+          return selectIds.includes(el.id)
+        })
+        if (isSelect) {
+          selection.map(el => {
+            if (el.children) {
+              this.setChildren(el.children, true)
+            }
+          })
+        }
+        if (isCancel) {
+          this.tableData.map(el => {
+            if (el.children) {
+              this.setChildren(el.children, false)
+            }
+          })
+        }
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  ::v-deep .el-table__body-wrapper{
+    padding-bottom: 8px;
+  }
+  ::v-deep .el-table__fixed{
+    margin-top:-1px;
+    margin-left:-1px;
+    height:calc(100% - 8px)!important;
+  }
+  ::v-deep .el-table__fixed-body-wrapper{
+    height: calc(100% - 48px);
+    overflow-y: auto;
+  }
+  .safetyHazardStatistics{
+    flex:1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+    padding:20px;
+    .form-box{
+      .form-dropdown-box{
+        display: flex;
+        margin:0;
+        padding:0 10px;
+        cursor: pointer;
+        height:40px;
+        img:nth-child(1){
+          width:16px;
+          height:16px;
+          margin-top:12px;
+        }
+        p{
+          width:47px;
+          text-align: center;
+          font-size:14px;
+          margin:0;
+          line-height:40px;
+        }
+        img:nth-child(3){
+          width:10px;
+          height:6px;
+          margin-top:17px;
+        }
+      }
+    }
+    .num-data-box{
+      background: rgba(1,131,250,0.2);
+      color:#0183FA;
+      font-size:14px;
+      line-height:40px;
+      padding:0 20px;
+      border-radius:4px;
+      margin-bottom:20px;
+    }
+
+  }
+</style>

+ 427 - 0
src/views/safetyCheck/equipmentConfig/index.vue

@@ -0,0 +1,427 @@
+<!--设备检查配置-->
+<template>
+  <div class="app-container approval_handle">
+    <div class="approval_handle-page" v-if="pageType == 1">
+      <el-form :model="queryParams" ref="queryForm" style="margin-top:20px;" :inline="true">
+        <el-form-item label="类型:" prop="checkLevel">
+          <el-select  v-model="queryParams.hazardType" placeholder="请选择类型">
+            <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="name">
+          <el-input
+            v-model="queryParams.searchValue"
+            placeholder="名称/型号"
+            clearable
+            maxLength="30"
+            size="small"
+          />
+        </el-form-item>
+        <el-form-item>
+          <p class="inquire-button-one" @click="handleQuery">查询</p>
+          <p class="reset-button-one" @click="resetQuery">重置</p>
+        </el-form-item>
+        <el-form-item style="float: right;">
+          <p class="inquire-button-one" v-hasPermi="['check:device:add']" style="width:120px;" @click="handleClick('','','add')">+ 新增检查内容</p>
+        </el-form-item>
+      </el-form>
+      <el-table border v-loading="loading" :data="tableData">
+        <el-table-column label="序号"  width="100" align="left"  type="index"/>
+        <el-table-column label="类型" align="left" prop="dictLabel"/>
+        <el-table-column label="名称" align="left" prop="anotherName"></el-table-column>
+        <el-table-column label="型号" align="left" prop="anotherCode"></el-table-column>
+        <el-table-column label="检查项目数" align="left" prop="checkNum"></el-table-column>
+        <el-table-column label="编辑人" align="left" prop="createName"></el-table-column>
+        <el-table-column label="编辑时间" align="left" prop="createTimeStr"></el-table-column>
+        <el-table-column label="操作" width="180">
+          <template slot-scope="scope">
+            <div class="table-button-box">
+              <p class="table-button-null"></p>
+              <p class="table-button-p" v-hasPermi="['check:device:query']" @click="handleClick('',scope.row,'detail')">详情</p>
+              <p class="table-button-p" v-hasPermi="['check:device:edit']" @click="handleClick('',scope.row,'edit')">编辑</p>
+              <p class="table-button-p" v-hasPermi="['check:device:remove']" @click="handleClick('',scope.row,'delete')">删除</p>
+              <p class="table-button-null"></p>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :page-sizes="[20, 30, 40, 50]"
+                  :total="total"
+                  layout="total, prev, pager, next, sizes, jumper"
+                  :page.sync="queryParams.pageNum"
+                  :limit.sync="queryParams.pageSize"
+                  @pagination="getList"
+      />
+    </div>
+    <!--添加窗口-->
+    <el-dialog :title="addDialogTitle" :visible.sync="addDialogType" @close="addDialogOff" width="780px" append-to-body class="checkItemLibrary-dialog-box"
+               :close-on-click-modal="false">
+      <el-form ref="addDialogForm" :model="addDialogForm" :rules="rules" label-width="120px">
+        <el-form-item label="检查内容:" prop="joinHazardReid">
+          <el-select  v-model="addDialogForm.joinHazardReid" clearable placeholder="请选择检查项" :disabled="isDetail" style="width:548px;">
+            <el-option
+              v-for="item in materialTypeList"
+              :key="item.id"
+              :label="item.anotherName"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <div class="small_title">对应检查项目</div>
+        <el-form-item label="检查类目" prop="joinCheckOpList" v-if="!isDetail">
+          <el-cascader
+            style="width:548px;"
+            v-model="addDialogForm.joinCheckOpList"
+            :options="cascaderData"
+            :props="{ multiple: true, value: 'id', label: 'labelName',emitPath:false }"
+            @change="cascaderCheck">
+            <template slot-scope="{data}">
+              <el-tooltip :content="data.labelName" v-if="data.labelName.length>22">
+                <p style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
+              </el-tooltip>
+              <p v-else style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
+            </template>
+          </el-cascader>
+        </el-form-item>
+        <div style="height: 300px;overflow-y: auto">
+          <el-form-item label="">
+            <el-tree
+              ref="tree"
+              :data="cascaderTreeData"
+              :props="defaultProps"
+              show-checkbox
+              node-key="id"
+              default-expand-all
+              :default-checked-keys="cascaderCheckedData"
+              >
+            </el-tree>
+          </el-form-item>
+        </div>
+
+      </el-form>
+      <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">取消</p>
+        <p class="dialog-footer-button-primary" @click="upDataButton">确定</p>
+        <p class="dialog-footer-button-null"></p>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { dangerList, gasApplyDetail, gasApplyList } from '@/api/gasManage3_0/gasManage'
+import { getToken } from "@/utils/auth";
+import {
+  checkOptionAdd,
+  checkOptionList,
+  checkOptionUpdate,
+  checkDeviceList,
+  checkDeviceAdd,
+  inspectContentList, checkDeviceDetail, checkDeviceEdit, checkDeviceDelete, checkOptionDelete
+} from '@/api/safetyCheck'
+import { delCertificate } from '@/api/exam/certificate'
+import { delHxpChemicalInfo } from '@/api/medicUniversity-3_1'
+export default {
+  name: "Approval",
+  components: {
+
+  },
+  data() {
+    return {
+      //页面状态
+      pageType:1,
+      loading:false,
+      headers: {
+        Authorization: "Bearer " + getToken()
+      },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize:20,
+        hazardType:'',
+        searchValue:'',
+      },
+      total:0,
+      tableData:[{}],
+      dateRange:[],
+      pageData2:{},
+      addDialogTitle:'新增检查项',
+      addDialogType:false,
+      addDialogForm:{
+        joinHazardReid:'',
+        joinCheckOpList:[],
+      },
+      //检查项
+      cascaderData:[],
+      cascaderTreeData:[],
+      cascaderDataPrimitive:[],
+      dangerArr:[],//危险源类型
+      materialTypeList:[],//检查内容
+      // 表单校验
+      rules: {
+        joinCheckOpList: [
+          { required: true, message: "请选择", trigger: "blur" },
+          { required: true, message: "请选择", validator: this.spaceJudgment, trigger: "blur" }
+        ],
+        joinHazardReid: [
+          { required: true, message: "请输入检查项目内容", trigger: "blur" },
+          { required: true, message: "请输入检查项目内容", validator: this.spaceJudgment, trigger: "blur" }
+        ],
+      },
+
+      defaultProps: {
+        children: 'children',
+        label: 'labelName'
+      },
+      cascaderCheckedData:[],//检查类目树回显
+      isDetail:false,
+    }
+
+  },
+  methods: {
+
+    handleClick(index,row,doType){
+      let _this=this;
+      if(doType=='add'){//新增
+        this.isDetail=false;
+        this.$set(this,'addDialogType',true);
+        this.$set(this,'addDialogTitle','新增检查项');
+        this.inspectContentList()//检查内容
+        this.$nextTick(function () {
+          //Dom更新完毕
+          this.$refs.tree.setCheckedKeys([]);
+        });
+      }else if(doType=='detail'){//详情
+        this.isDetail=true;
+        this.$set(this,'addDialogType',true);
+        this.$set(this,'addDialogTitle','编辑检查项');
+        this.getInfo(row.id)
+        this.inspectContentList(row.id)//检查内容
+        this.$nextTick(function () {
+          //Dom更新完毕
+          this.$refs.tree.setCheckedKeys([]);
+        });
+      }else if(doType=='edit'){//编辑
+        this.isDetail=false;
+        this.$set(this,'addDialogType',true);
+        this.$set(this,'addDialogTitle','编辑检查项');
+        this.getInfo(row.id)
+        this.inspectContentList(row.id)//检查内容
+        this.$nextTick(function () {
+          //Dom更新完毕
+          this.$refs.tree.setCheckedKeys([]);
+        });
+
+      }else if(doType=='delete'){//删除
+        this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          checkDeviceDelete(row.id).then(response => {
+            if(response.code == 200){
+              this.getList();
+              this.msgSuccess("删除成功");
+            }
+          });
+        }).catch(() => {});
+      }
+    },
+    //添加页面关闭
+    addDialogOff(){
+      this.$set(this.addDialogForm,'joinCheckOpList',null);
+      this.$set(this.addDialogForm,'joinHazardReid','');
+      this.$set(this,'addDialogType',false);
+    },
+    //联级选中
+    cascaderCheck(val){
+
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.queryParams.searchValue = "";
+      this.queryParams.hazardType='',
+        this.handleQuery();
+    },
+    /** 查询检查项选项列表 */
+    checkOptionList() {
+      this.loading = true;
+      checkOptionList(this.queryParams).then( response => {
+        let list=JSON.parse(JSON.stringify(response.data))
+        this.$set(this,'cascaderData',list);
+        this.$set(this,'cascaderTreeData',JSON.parse(JSON.stringify(list)));
+        this.$set(this,'cascaderDataPrimitive',JSON.parse(JSON.stringify(list)));
+        this.getCascaderData(this.cascaderData);
+        this.getCascaderTreeData(this.cascaderTreeData);
+        this.loading = false;
+      });
+    },
+    //联级选择器数据处理
+    getCascaderData(list){
+      let self = this;
+      for(let i=0;i<list.length;i++){
+        list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
+        if(list[i].level == 1 || list[i].level == 2 || list[i].level == 3){
+          self.getCascaderData(list[i].children)
+        }else{
+          delete list[i].children
+        }
+      }
+    },
+    //树形选择器数据处理
+    getCascaderTreeData(list){
+      let self = this;
+      for(let i=0;i<list.length;i++){
+        list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
+        list[i].disabled = true;
+        if(list[i].level == 1 || list[i].level == 2 || list[i].level == 3){
+          self.getCascaderTreeData(list[i].children)
+        }else{
+          delete list[i].children
+        }
+      }
+    },
+    //获取危险源类型
+    dangerList(){
+      let _this=this;
+      dangerList().then( response => {
+        let res=response.rows;
+        _this.dangerArr=res;
+      });
+    },
+    //检查内容
+    inspectContentList(joinHazardReid){
+      let _this=this;
+      if(joinHazardReid){//编辑的时候
+        inspectContentList({joinHazardReid:joinHazardReid}).then( response => {
+          let res=response.data;
+          _this.materialTypeList=res;
+        });
+      }else{//新增的时候
+        inspectContentList().then( response => {
+          let res=response.data;
+          _this.materialTypeList=res;
+        });
+      }
+
+    },
+    //详情
+    getInfo(id){
+      let _this=this;
+      checkDeviceDetail(({id:id})).then( response => {
+        let res=response.data;
+        if(response.code==200){
+          let list=[];
+          this.addDialogForm.joinHazardReOldid=res.hazardId;
+          this.addDialogForm.joinHazardReid=res.hazardId;
+          res.checkList.forEach(function(item) {
+            list.push(item.joinCheckOpid)
+          })
+          this.addDialogForm.joinCheckOpList=list
+          this.cascaderCheckedData=list
+        }
+      });
+    },
+    //列表
+    getList(){
+      let _this=this;
+      checkDeviceList(_this.queryParams).then( response => {
+        let res=response.data.records;
+        _this.tableData=res;
+        _this.total=response.data.total;
+      });
+    },
+    //新增编辑
+    upDataButton(){
+      this.$refs["addDialogForm"].validate(valid => {
+        if (valid) {
+          if(this.addDialogForm.joinHazardReOldid){
+            //编辑
+            let obj={
+              joinHazardReOldid:JSON.parse(JSON.stringify(this.addDialogForm)).joinHazardReOldid,
+              joinHazardReid:JSON.parse(JSON.stringify(this.addDialogForm)).joinHazardReid,
+              joinCheckOpList:JSON.parse(JSON.stringify(this.addDialogForm)).joinCheckOpList,
+            }
+            checkDeviceEdit(obj).then( response => {
+              this.msgSuccess(response.msg)
+              this.addDialogOff();
+              this.getList();
+              this.inspectContentList()
+            })
+          }else{
+            //新增
+            let obj={
+              joinHazardReid:JSON.parse(JSON.stringify(this.addDialogForm)).joinHazardReid,
+              joinCheckOpList:JSON.parse(JSON.stringify(this.addDialogForm)).joinCheckOpList,
+            }
+            checkDeviceAdd(obj).then( response => {
+              this.msgSuccess(response.msg)
+              this.addDialogOff();
+              this.getList();
+              this.inspectContentList()
+            })
+          }
+        }
+      })
+    },
+  },
+  mounted() {
+    this.checkOptionList();
+    this.inspectContentList()
+    this.dangerList()
+    this.getList()
+  }
+};
+</script>
+
+<style scoped lang="scss">
+.approval_handle {
+  display: flex!important;
+  flex-direction: column;
+  .goods-category-cascader-stocking-page .el-cascader-menu:nth-of-type(1) .el-checkbox__input {
+    display: none !important;
+  }
+  .approval_handle-page{
+    flex:1;
+    display: flex!important;
+    flex-direction: column;
+    box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
+    padding:20px 20px 20px!important;
+    border-radius:10px;
+
+    .button-box{
+      width:200px;
+      display: flex;
+    }
+
+  }
+
+}
+.el-dialog__body{
+  padding: 20px 0!important;
+}
+
+.small_title{
+  width: 100%;
+  height: 40px;
+  background: #F5F5F5;
+  font-size: 16px;
+  font-family: Microsoft YaHei-Regular, Microsoft YaHei;
+  font-weight: 400;
+  color: #0045AF;
+  line-height: 40px;
+  padding-left: 50px;
+  margin-bottom:20px;
+}
+</style>

+ 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':''))">

+ 369 - 6
src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/addDialog.vue

@@ -22,7 +22,7 @@
           <el-form-item label="计划标题:" prop="title">
             <el-input :disabled="lookInfoType" v-model="dialogForm.title" placeholder="请输入计划标题" maxLength="30" style="width:450px;"/>
           </el-form-item>
-          <el-form-item label="检查类型:">
+          <el-form-item label="检查组织:">
             <p style="width:450px;background:#f5f5f5;border-radius:4px;padding:0 15px;">实验室自查</p>
           </el-form-item>
           <el-form-item label="任务周期:" prop="dateRange">
@@ -70,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"
@@ -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,haveHazardInSub
+  } from '@/api/safetyCheck/index'
+  import { dangerList } from '@/api/gasManage3_0/gasManage'
   export default {
     name: 'addDialog',
     props:{
@@ -454,8 +574,11 @@
         //提交数据
         dialogForm:{
           title:"",//奥体
-          checkType:"2",//检查类型
+          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,35 @@
         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:[],
+        deviceDialogList:[],//存储所有的设备
+        dangerArr:[],
+        deviceIsEmpty:false,//如果是专项检查-判断是否选择检查范围和检查内容
         /*===================================文档预览===================================*/
         iframeSrc:"",
         /*===================================弹窗相关结束===================================*/
@@ -544,6 +699,8 @@
     },
     mounted(){
       this.initializationInterface();
+      this.dangerList();
+      this.deviceGetList();//查询所有设备
     },
     methods:{
       //初始化接口
@@ -580,6 +737,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 +766,10 @@
           });
         }
       },
+      //选中检查类型
+      inspectCategoryChange(val){
+
+      },
       //选中检查范围
       rangeChange(val){
         if(val == 1){
@@ -634,11 +798,21 @@
                   return
                 }
               }
+              if(this.dialogForm.checkCategory==2){
+                if(this.dialogForm.hazardNum==0){
+                  this.msgError('请选择检查内容')
+                  return
+                }
+              }
+
               let obj = {
                 title:this.dialogForm.title,
                 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 +867,29 @@
           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',list.length);
+
+          //实验室是否有当前设备
+          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.dialogClickType(1);
+            }else{
+              this.$set(this.dialogForm,'hazardIds','');
+              this.$set(this.dialogForm,'hazardNum',0);
+            }
+          });
         }
       },
       /*===================================弹窗相关===================================*/
@@ -714,6 +911,24 @@
           console.log('item',item);
           this.$set(this,'iframeSrc',this.urlJudge(item.fileUrl));
           this.$set(this,'addDialogBoxType',type);
+        }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.deviceResetQueryRight();
+          this.$set(this,'addDialogBoxType',type);
         }else if(type == 2){
           //选择学院
           this.$set(this,'addDialogBoxType',type);
@@ -986,6 +1201,146 @@
           }
         }
       },
+      /*===================================设备相关相关===================================*/
+      //获取危险源类型
+      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 = [];
+        for(let i=0;i<self.deviceDialogTableDataList.length;i++){
+          leftObj.selectedHazardIds.push(self.deviceDialogTableDataList[i].id);
+        }
+
+        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();
+      },
+      //查询所有的设备
+      deviceGetList(){
+        let obj={
+          pageNum: 1,
+          pageSize: 200,
+          hazardTypeMode:"",
+          searchValue:"",
+          filtType:""
+        }
+        findDeviceList(obj).then(response => {
+          this.deviceDialogList=response.rows
+        });
+      },
+      //查询接口
+      deviceGetListRight(){
+        let self = this;
+        let rightObj = JSON.parse(JSON.stringify(this.deviceQueryParamsRight));
+        rightObj.hazardIds = [];
+        for(let i=0;i<self.deviceDialogTableDataList.length;i++){
+          rightObj.hazardIds.push(self.deviceDialogTableDataList[i].id);
+        }
+        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 +1434,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>

+ 11 - 1
src/views/safetyCheck/safetyHazard/cannotListPage.vue

@@ -50,12 +50,22 @@
       <el-table  border :data="tableList" ref="multipleTable" @sort-change="sortChange">
         <el-table-column label="序号" align="center"  type="index" width="60" />
         <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip/>
-        <el-table-column label="检查类型" align="center" prop="deptName" show-overflow-tooltip width="180">
+        <el-table-column label="检查组织" align="center" prop="deptName" show-overflow-tooltip width="180">
           <template slot-scope="scope">
             {{scope.row.hazardType == 1?'校院巡查':(scope.row.hazardType == 2?'实验室自查':'')}}
           </template>
         </el-table-column>
         <el-table-column label="实验室" align="center" prop="subRoom" show-overflow-tooltip width="240"/>
+        <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="checkRange" show-overflow-tooltip width="120">
+          <template slot-scope="scope">
+            <p>{{scope.row.hazardName?scope.row.hazardName:'-'}}</p>
+          </template>
+        </el-table-column>
         <el-table-column label="检查时间" sortable align="center" prop="checkTime" show-overflow-tooltip width="160"/>
         <el-table-column label="处理人" align="center" prop="rectifyName" show-overflow-tooltip width="90"/>
         <el-table-column label="原因描述" align="center" prop="rectifyMeasure" show-overflow-tooltip width="435"/>

+ 10 - 0
src/views/safetyCheck/safetyHazard/departmentListPage.vue

@@ -72,6 +72,16 @@
           <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip/>
           <el-table-column label="隐患描述" align="center" prop="hazardDescribe" show-overflow-tooltip width="220"/>
           <el-table-column label="实验室" align="center" prop="subRoom" show-overflow-tooltip width="170"/>
+          <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="checkRange" show-overflow-tooltip width="120">
+            <template slot-scope="scope">
+              <p>{{scope.row.hazardName?scope.row.hazardName:'-'}}</p>
+            </template>
+          </el-table-column>
           <el-table-column label="检查时间" sortable="custom" align="center" prop="checkTime" show-overflow-tooltip width="160"/>
           <el-table-column label="整改人" align="center" prop="rectifyName" show-overflow-tooltip width="90"/>
           <el-table-column label="整改期限" sortable="custom" align="center" prop="rectifyDeadline" show-overflow-tooltip width="180">

+ 10 - 0
src/views/safetyCheck/safetyHazard/schoolListPage.vue

@@ -72,6 +72,16 @@
           <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip/>
           <el-table-column label="隐患描述" align="center" prop="hazardDescribe" show-overflow-tooltip width="220"/>
           <el-table-column label="实验室" align="center" prop="subRoom" show-overflow-tooltip width="170"/>
+          <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="checkRange" show-overflow-tooltip width="120">
+            <template slot-scope="scope">
+              <p>{{scope.row.hazardName?scope.row.hazardName:'-'}}</p>
+            </template>
+          </el-table-column>
           <el-table-column label="检查时间" sortable="custom" align="center" prop="checkTime" show-overflow-tooltip width="160"/>
           <el-table-column label="整改人" align="center" prop="rectifyName" show-overflow-tooltip width="90"/>
           <el-table-column label="整改期限" sortable="custom" align="center" prop="rectifyDeadline" show-overflow-tooltip width="180">

+ 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();

+ 5 - 0
src/views/safetyCheck/schoolInspection/inspectionManagement/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':''))">{{scope.row.manageStatus==0?'待检查':(scope.row.manageStatus==1?'检查中':(scope.row.manageStatus==2?'已检查':''))}}</p>

File diff suppressed because it is too large
+ 1774 - 1416
src/views/safetyCheck/schoolInspection/inspectionPlan/addDialog.vue


+ 5 - 0
src/views/safetyCheck/schoolInspection/inspectionPlan/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>

+ 5 - 0
src/views/safetyCheck/schoolInspection/inspectionPlan/listPage.vue

@@ -73,6 +73,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':''))">{{scope.row.manageStatus==0?'待检查':(scope.row.manageStatus==1?'检查中':(scope.row.manageStatus==2?'已检查':''))}}</p>

+ 599 - 83
src/views/safetyCheck/startInspection/index.vue

@@ -36,6 +36,17 @@
                 <p class="inquire-button-one" @click="planButton(2)"
                    style="font-size:14px;margin-left:20px;width:100px;" v-if="planList[0]">选择计划</p>
               </div>
+              <el-form-item label="检查类型" prop="checkCategory" >
+                <el-select :disabled="planType==2" v-model="addForm.checkCategory" @change="checkCategoryChange" placeholder="请选择检查类型"
+                           style="width: 500px;height: 40px;">
+                  <el-option
+                    v-for="item in inspectCategoryList"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id">
+                  </el-option>
+                </el-select>
+              </el-form-item>
               <div style="display: flex" v-if="planType == 2">
                 <el-form-item label="计划" prop="id">
                   <el-select v-model="addForm.id" placeholder="请选择计划"
@@ -51,18 +62,18 @@
                 <p class="inquire-button-one" @click="planButton(1)"
                    style="font-size:14px;margin-left:20px;width:100px;">自定义输入</p>
               </div>
-              <el-form-item label="检查结果" prop="checkResult">
-                <el-select v-model="addForm.checkResult" @change="checkResultChange" placeholder="请选择检查结果" style="width: 500px">
-                  <el-option :key="0" label="不符合" :value="0"></el-option>
-                  <el-option :key="1" label="符合" :value="1"></el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item label="整改通知" prop="rectifyNotice" v-if="addForm.checkResult === 0">
-                <el-radio-group v-model="addForm.rectifyNotice" style="margin-top:5px;">
-                  <el-radio :label="1">整改告知书</el-radio>
-                  <el-radio :label="2">整改通知书</el-radio>
-                </el-radio-group>
+              <el-form-item label="整改期限" prop="rectifyDeadline" v-if="addForm.checkResult === 0 || addForm.checkCategory==2">
+                <el-date-picker
+                  style="width: 500px"
+                  v-model="addForm.rectifyDeadline"
+                  type="date"
+                  value-format="yyyy-MM-dd"
+                  :picker-options="pickerOptions"
+                  :clearable="false"
+                  placeholder="请选择整改期限">
+                </el-date-picker>
               </el-form-item>
+
             </div>
             <div class="top-form-right-box">
               <el-form-item label="学院" prop="deptId">
@@ -76,8 +87,8 @@
                   </el-option>
                 </el-select>
               </el-form-item>
-              <el-form-item label="检查类型" prop="checkType">
-                <el-select v-model="addForm.checkType" placeholder="请选择检查类型"
+              <el-form-item label="检查组织" prop="checkType">
+                <el-select v-model="addForm.checkType" placeholder="请选择检查组织"
                            disabled style="width: 500px">
                   <el-option
                     v-for="item in checkTypeList"
@@ -102,20 +113,23 @@
                   end-placeholder="结束日期"
                 ></el-date-picker>
               </el-form-item>
-              <el-form-item label="整改期限" prop="rectifyDeadline" v-if="addForm.checkResult === 0">
-                <el-date-picker
-                  style="width: 500px"
-                  v-model="addForm.rectifyDeadline"
-                  type="date"
-                  value-format="yyyy-MM-dd"
-                  :picker-options="pickerOptions"
-                  :clearable="false"
-                  placeholder="请选择整改期限">
-                </el-date-picker>
+              <el-form-item label="检查结果" prop="checkResult" v-if="addForm.checkCategory==1">
+                <el-select v-model="addForm.checkResult" @change="checkResultChange" placeholder="请选择检查结果" style="width: 500px">
+                  <el-option :key="0" label="不符合" :value="0"></el-option>
+                  <el-option :key="1" label="符合" :value="1"></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="整改通知" prop="rectifyNotice" v-if="addForm.checkResult === 0 || addForm.checkCategory==2">
+                <el-radio-group v-model="addForm.rectifyNotice" style="margin-top:5px;">
+                  <el-radio :label="1">整改告知书</el-radio>
+                  <el-radio :label="2">整改通知书</el-radio>
+                </el-radio-group>
               </el-form-item>
+
             </div>
           </div>
-          <div class="bottom-form-box" v-if="addForm.checkResult === 0">
+          <!--综合检查-->
+          <div class="bottom-form-box" v-if="addForm.checkResult === 0 && addForm.checkCategory==1">
             <div class="bottom-form-title-box">
               <p>不符合项</p>
               <p>隐患数:{{addForm.checkHazardDtoList.length}}</p>
@@ -125,7 +139,7 @@
                 <p class="for-title-p">第{{index+1}}隐患项</p>
                 <div class="for-del-box">
                   <p class="el-icon-delete"></p>
-                  <p @click="delCheckHazardDtoList(index)">删除此项</p>
+                  <p @click="delCheckHazardDtoList(index,'',1)">删除此项</p>
                 </div>
                 <div class="for-button-box" @click="dataLookButton(item)">
                   <p :class="item.lookType?'el-icon-arrow-up':'el-icon-arrow-down'"></p>
@@ -142,7 +156,7 @@
                 </el-form-item>
                 <el-form-item label="检查项目" :prop="'checkHazardDtoList.'+index+'.hazardCheckPro'" :rules="rules.hazardCheckPro" label-width="123px">
                   <el-cascader
-                    @change="(val)=>cascaderChange(val,index)"
+                    @change="(val)=>cascaderChange(val,'',index)"
                     v-model="item.hazardCheckPro"
                     style="width: 898px"
                     placeholder="请选择检查项"
@@ -206,6 +220,112 @@
             </div>
             <p class="add-bottom-button" @click="addObject">+新增隐患检查项</p>
           </div>
+          <!--专项检查-->
+          <div class="bottom-form-box" v-if="addForm.checkCategory==2 && pageType==1">
+            <div class="bottom-form-title-box">
+              <p>检查项</p>
+              <p>检查项:{{addForm.checkHazardInfoVoList.length}}</p>
+            </div>
+            <div class="dept-table-max-box">
+              <div class="device-tip">请选择以下实验室内设备开始检查</div>
+              <el-table  border :data="deviceTableList" @selection-change="deviceChange" :row-key="getRowKeys" height="350">
+                <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 />
+                <el-table-column label="类型" align="center" prop="hazardTypeModeName" show-overflow-tooltip/>
+              </el-table>
+            </div>
+            <div class="start_btn" @click="handleClick('startBtn')">开始检查</div>
+          </div>
+          <!--专项检查项-->
+          <div class="bottom-form-box" v-if="addForm.checkCategory==2 && pageType==2">
+            <div class="bottom-form-title-box">
+              <p>检查项</p>
+              <p>检查项:{{addForm.checkHazardInfoVoList.length}}</p>
+            </div>
+            <div class="for-max-big-box for-max-big-box-special" v-for="(item,index) in addForm.checkHazardInfoVoList" :key="index">
+              <div class="for-title-box">
+                <p class="for-title-p">{{index+1}}、【{{item.hazardName}}-{{item.code}}】专项检查</p>
+                <div class="for-del-box" v-if="planType==1">
+                  <p class="el-icon-delete"></p>
+                  <p @click="delCheckHazardDtoList(index,'',2)">删除此项</p>
+                </div>
+                <div class="for-button-box" @click="dataLookButton(item)">
+                  <p :class="item.lookType?'el-icon-arrow-up':'el-icon-arrow-down'"></p>
+                  <p>{{item.lookType?'收起':'展开'}}</p>
+                </div>
+              </div>
+              <div class="for-big-box-special" v-if="item.lookType" v-for="(item2,index2) in item.checkHazardDtoList">
+                <div class="for-big-box-special-l">{{index+1}}.{{index2+1}}</div>
+                <div class="for-big-box for-big-box-special-r">
+                  <el-form-item label="检查项目" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.hazardCheckPro'" :rules="rules.hazardCheckPro" label-width="123px">
+                    <el-radio-group v-model="item2.checkFlag" style="margin-right: 20px;">
+                      <el-radio :label="1">符合</el-radio>
+                      <el-radio :label="0">不符合</el-radio>
+                    </el-radio-group>
+                    <el-cascader
+                      @change="(val)=>cascaderChange(val,item2,index2)"
+                      v-model="item2.hazardCheckPro"
+                      style="width: 730px"
+                      placeholder="请选择检查项"
+                      :options="options"
+                      :props="{ checkStrictly: false, value: 'id', label: 'labelName',emitPath:false }"
+                      filterable>
+                      <template slot-scope="{data}">
+                        <el-tooltip :content="data.labelName" v-if="data.labelName.length>22">
+                          <p style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
+                        </el-tooltip>
+                        <p v-else style="max-width:300px;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;">{{data.labelName}}</p>
+                      </template>
+                    </el-cascader>
+                    <i class="el-icon-delete" v-if="planType==1"  @click="delCheckHazardDtoList(index,index2,3)" style="color: #0183FA;margin-left: 20px;cursor: pointer;"></i>
+                    <p class="hazard-check-count-p" v-if="hazardCheckCount>0">此检查项在当前实验室累计出现 <span>{{hazardCheckCount}}</span> 次隐患</p>
+                  </el-form-item>
+                  <el-form-item v-if="item2.checkFlag==0" label="隐患等级" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.hazardLevel'" :rules="rules.hazardLevel" label-width="123px">
+                    <el-select v-model="item2.hazardLevel" clearable placeholder="请选择隐患等级" style="width: 408px">
+                      <el-option :key="2" label="一般隐患" :value="2"></el-option>
+                      <el-option :key="1" label="重大隐患" :value="1"></el-option>
+                      <el-option :key="3" label="管理问题" :value="3"></el-option>
+                    </el-select>
+                  </el-form-item>
+                  <el-form-item v-if="item2.checkFlag==0" label="隐患描述"  label-width="123px">
+                    <el-input
+                      style="width: 898px"
+                      type="textarea"
+                      :autosize="{ minRows: 4, maxRows: 4}"
+                      placeholder="请输入隐患描述"
+                      resize="none"
+                      maxlength="100"
+                      show-word-limit
+                      v-model="item2.hazardDescribe">
+                    </el-input>
+                  </el-form-item>
+                  <el-form-item v-if="item2.checkFlag==0" label="隐患照片" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.uploadDtoList'" :rules="rules.uploadDtoList" label-width="123px">
+                    <div class="for-img-box" v-for="(img,imgIndex) in item2.uploadDtoList" :key="imgIndex">
+                      <img class="for-img" :src="img.fileUrl" @click="lookImg(item2.uploadDtoList,imgIndex)">
+                      <p class="for-del-button el-icon-circle-close" @click="delImg(index,imgIndex)"></p>
+                    </div>
+                    <el-upload
+                      v-if="item2.uploadDtoList.length<5"
+                      style="display: inline-block;overflow: hidden"
+                      class="avatar-uploader"
+                      :action="uploadImgUrl"
+                      :show-file-list="false"
+                      :on-success="(res)=>handleAvatarSuccess(res,item2)"
+                      :headers="headers"
+                      :before-upload="(res)=>beforeAvatarUpload(res,item2)">
+                      <p class="el-icon-plus up-img-p" style="display: inline-block"></p>
+                    </el-upload>
+                  </el-form-item>
+                  <el-form-item v-if="item2.checkFlag==0" label="" label-width="123px" style="margin-bottom:40px;color:#999;">
+                    <p>支持jpg/png/bmp/gif格式,且不超过2M,最多上传5张</p>
+                  </el-form-item>
+                </div>
+              </div>
+              <p class="add-bottom-button" v-if="planType == 1" @click="addObjectTow(item)">+新增隐患检查项</p>
+            </div>
+            <p class="add-bottom-button" v-if="planType == 1" @click="addObjectDevice()">+新增检查项</p>
+          </div>
         </el-form>
       </div>
       <div class="bottom-button-max-box" v-hasPermi="['safety:checkManage_4:edit']">
@@ -215,6 +335,20 @@
         <p class="null-p"></p>
       </div>
       <lookImgDialog ref="lookImgDialog"></lookImgDialog>
+      <!--设备弹窗-->
+      <el-dialog title="检查项" v-if="dialogVisible" :visible.sync="dialogVisible" width="730px" :append-to-body="false" :modal-append-to-body="false" :close-on-click-modal="false">
+        <div style="margin-bottom:20px ">请选择以下实验室内设备开始检查</div>
+        <el-table ref="deviceTable"  border :data="deviceTableList" @selection-change="deviceChange" :row-key="getRowKeys" height="350">
+          <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 />
+          <el-table-column label="类型" align="center" prop="hazardTypeModeName" show-overflow-tooltip/>
+        </el-table>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="cancel">取 消</el-button>
+          <el-button type="primary" @click="handleClick('startBtn')">确 定</el-button>
+        </div>
+      </el-dialog>
     </div>
 </template>
 
@@ -223,8 +357,18 @@
   import lookImgDialog from '@/components/lookImgDialog/lookImgDialog.vue'
   import { listDepartments } from "@/api/system/dept";
   import { buildFloorGetlist } from "@/api/laboratory/building";
-  import { buildBySubList,getCheckPlanBySubId,findCheckManage,checkOptionList,
-           checkManageUpdate,checkManageAdd,countHazardNum,getGentle } from "@/api/safetyCheck/index";
+  import {
+    buildBySubList,
+    getCheckPlanBySubId,
+    findCheckManage,
+    checkOptionList,
+    checkManageUpdate,
+    checkManageAdd,
+    countHazardNum,
+    getGentle,
+    getHazardInfoBySubId,
+    getHazardInfo, getHazardInfoByJoinIds
+  } from '@/api/safetyCheck/index'
   export default {
     name: 'index',
     components: {
@@ -243,7 +387,7 @@
             return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择今天的
           }
         },
-        //检查类型
+        //检查组织
         checkTypeList:[{ key:1, label:"校院巡查", },{ key:2, label:"实验室自查", }],
         //学院列表
         deptSelectList:[],
@@ -262,15 +406,24 @@
           title:"",
           checkResult:"",
           rectifyNotice:"",
+          checkCategory:'1',
           checkType:2,
           dateRange:[],
           rectifyDeadline:"",
+          //综合检查
           checkHazardDtoList:[],
+          //专项检查
+          checkHazardInfoVoList:[],
         },
+
+
         //检查项出现次数
         hazardCheckCount:0,
         //上传用名称保存
         upDataName:"",
+        deviceTableList:[],
+        //检查类型
+        inspectCategoryList:[{id:'1',name:'综合检查'},{id:'2',name:'专项检查'}],
         // 表单校验
         rules: {
           subId: [
@@ -283,6 +436,9 @@
             { required: true, message: "请选择学院", trigger: "blur" },
           ],
           checkType: [
+            { required: true, message: "请选择检查组织", trigger: "blur" },
+          ],
+          checkCategory: [
             { required: true, message: "请选择检查类型", trigger: "blur" },
           ],
           dateRange: [
@@ -325,6 +481,11 @@
         adminGentle:false,
         applyGentle:false,
         myApplyGentle:false,
+        /* ==专项检查== */
+        dialogVisible:false,
+        pageType:0,
+        multipleSelection:[],
+
       }
     },
     created(){
@@ -337,6 +498,34 @@
       this.buildFloorGetlist();
     },
     methods:{
+      getRowKeys(row) {
+        return row.joinHazardId
+      },
+      //选中设备
+      deviceChange(val){
+        console.log('1',val)
+        this.multipleSelection=val
+      },
+      handleClick(doType){
+        let self=this;
+        if(doType=='startBtn'){//开始检查
+          let joinHazardIds=[];
+          if(this.multipleSelection[0]){
+            this.checkOptionList();
+            this.dialogVisible=false;
+            for(let i=0;i<this.multipleSelection.length;i++){
+              joinHazardIds.push(this.multipleSelection[i].joinHazardId)
+            }
+            this.getHazardInfoByJoinIds(this.addForm.subId,joinHazardIds.join(','))
+          }else{
+            this.msgError('请先选择实验室内设备!')
+          }
+        }
+      },
+      // 取消按钮
+      cancel() {
+        this.dialogVisible = false;
+      },
       //获取权限范围
       getGentle(){
         getGentle().then(response => {
@@ -358,24 +547,77 @@
             if(this.planType == 1){
               //新计划
               let obj = JSON.parse(JSON.stringify(this.addForm));
-              if(obj.checkResult === 0){
-                if(!obj.checkHazardDtoList[0]){
-                  this.msgError('请添加隐患检查项')
-                  return
-                }
-                for(let i=0;i<obj.checkHazardDtoList.length;i++){
-                  delete obj.checkHazardDtoList[i].lookType
-                }
-                obj.dangerNum = obj.checkHazardDtoList.length
-              }else{
-                obj.checkHazardDtoList = [];
-              }
               obj.manageStatus = type
               obj.cycleStartTime = obj.dateRange[0]
               obj.cycleEndTime = obj.dateRange[1]
               obj.subIds = obj.subId;
               delete obj.subId;
               delete obj.dateRange
+              if(this.addForm.checkCategory==1){//综合检查
+                if(obj.checkResult === 0){
+                  if(!obj.checkHazardDtoList[0]){
+                    this.msgError('请添加隐患检查项')
+                    return
+                  }
+                  for(let i=0;i<obj.checkHazardDtoList.length;i++){
+                    obj.checkHazardDtoList[i].checkCategory=this.addForm.checkCategory;
+                    delete obj.checkHazardDtoList[i].lookType
+                  }
+                  obj.dangerNum = obj.checkHazardDtoList.length
+                }else{
+                  obj.checkHazardDtoList = [];
+                }
+
+              }else if(this.addForm.checkCategory==2){//专项检查
+                if(!obj.checkHazardInfoVoList[0]){
+                  this.msgError('请添加隐患检查项')
+                  return
+                }
+                if(!obj.checkHazardInfoVoList[0].checkHazardDtoList[0]){
+                  this.msgError('请添加隐患检查项')
+                  return
+                }
+                let list=[]
+                let checkFlagList=[];
+                for(let i=0;i<this.addForm.checkHazardInfoVoList.length;i++){
+                  for(let b=0;b<this.addForm.checkHazardInfoVoList[i].checkHazardDtoList.length;b++){
+                    checkFlagList.push(this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag)
+                    let obj={
+                      checkFlag:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag,
+                      checkCategory:this.addForm.checkCategory,
+                      hazardCheckCode:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckCode,
+                      hazardCheckName:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckName,
+                      hazardCheckPro:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckPro,
+                      hazardDescribe:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardDescribe,
+                      hazardLevel:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardLevel,
+                      uploadDtoList:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].uploadDtoList,
+                      code:this.addForm.checkHazardInfoVoList[i].code,
+                      hazardId:this.addForm.checkHazardInfoVoList[i].hazardId,
+                      hazardName:this.addForm.checkHazardInfoVoList[i].hazardName,
+                      hazardTypeMode:this.addForm.checkHazardInfoVoList[i].hazardTypeMode,
+                      hazardTypeModeName:this.addForm.checkHazardInfoVoList[i].hazardTypeModeName,
+                      joinHazardId:this.addForm.checkHazardInfoVoList[i].joinHazardId,
+                    }
+                    list.push(obj)
+                  }
+                }
+                if(this.multipleSelection[0]){
+                  let hazardIds=[];
+                  let joinHazardIds=[];
+                  for(let i=0;i<this.multipleSelection.length;i++){
+                    hazardIds.push(this.multipleSelection[i].hazardId)
+                    joinHazardIds.push(this.multipleSelection[i].joinHazardId)
+                  }
+                  obj.hazardIds=hazardIds.join(',')
+                  obj.joinHazardIds=joinHazardIds.join(',')
+                }
+                if(checkFlagList.every(item=>{return item==1})){//符合
+                  obj.checkResult=1;
+                }else{//不符合
+                  obj.checkResult=0;
+                }
+                obj.checkHazardDtoList=list;
+              }
               checkManageAdd(obj).then(response => {
                 this.msgSuccess(response.msg);
                 this.initializationAddData();
@@ -383,22 +625,64 @@
             }if(this.planType == 2){
               //已有计划修改
               let obj = JSON.parse(JSON.stringify(this.addForm));
-              if(obj.checkResult === 0){
-                if(!obj.checkHazardDtoList[0]){
+              obj.manageStatus = type
+              obj.cycleStartTime = obj.dateRange[0]
+              obj.cycleEndTime = obj.dateRange[1]
+              delete obj.dateRange
+              if(this.addForm.checkCategory==1){//综合检查
+                if(obj.checkResult === 0){
+                  if(!obj.checkHazardDtoList[0]){
+                    this.msgError('请添加隐患检查项')
+                    return
+                  }
+                  for(let i=0;i<obj.checkHazardDtoList.length;i++){
+                    obj.checkHazardDtoList[i].checkCategory=this.addForm.checkCategory;
+                    delete obj.checkHazardDtoList[i].lookType
+                  }
+                  obj.dangerNum = obj.checkHazardDtoList.length
+                }else{
+                  obj.checkHazardDtoList = [];
+                }
+              }else if(this.addForm.checkCategory==2){//专项检查
+                if(!obj.checkHazardInfoVoList[0]){
+                  this.msgError('请添加隐患检查项')
+                  return
+                }
+                if(!obj.checkHazardInfoVoList[0].checkHazardDtoList[0]){
                   this.msgError('请添加隐患检查项')
                   return
                 }
-                for(let i=0;i<obj.checkHazardDtoList.length;i++){
-                  delete obj.checkHazardDtoList[i].lookType
+                let list=[]
+                let checkFlagList=[];
+                for(let i=0;i<this.addForm.checkHazardInfoVoList.length;i++){
+                  for(let b=0;b<this.addForm.checkHazardInfoVoList[i].checkHazardDtoList.length;b++){
+                    checkFlagList.push(this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag)
+                    let obj={
+                      checkFlag:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag,
+                      checkCategory:this.addForm.checkCategory,
+                      hazardCheckCode:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckCode,
+                      hazardCheckName:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckName,
+                      hazardCheckPro:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckPro,
+                      hazardDescribe:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardDescribe,
+                      hazardLevel:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardLevel,
+                      uploadDtoList:this.addForm.checkHazardInfoVoList[i].checkHazardDtoList[b].uploadDtoList,
+                      code:this.addForm.checkHazardInfoVoList[i].code,
+                      hazardId:this.addForm.checkHazardInfoVoList[i].hazardId,
+                      hazardName:this.addForm.checkHazardInfoVoList[i].hazardName,
+                      hazardTypeMode:this.addForm.checkHazardInfoVoList[i].hazardTypeMode,
+                      hazardTypeModeName:this.addForm.checkHazardInfoVoList[i].hazardTypeModeName,
+                      joinHazardId:this.addForm.checkHazardInfoVoList[i].joinHazardId,
+                    }
+                    list.push(obj)
+                  }
                 }
-                obj.dangerNum = obj.checkHazardDtoList.length
-              }else{
-                obj.checkHazardDtoList = [];
+                if(checkFlagList.every(item=>{return item==1})){//符合
+                  obj.checkResult=1;
+                }else{//不符合
+                  obj.checkResult=0;
+                }
+                obj.checkHazardDtoList=list;
               }
-              obj.manageStatus = type
-              obj.cycleStartTime = obj.dateRange[0]
-              obj.cycleEndTime = obj.dateRange[1]
-              delete obj.dateRange
               checkManageUpdate(obj).then(response => {
                 this.msgSuccess(response.msg);
                 this.initializationAddData();
@@ -440,6 +724,46 @@
           this.addForm.checkHazardDtoList.push(obj);
         }
       },
+      //新增隐患项
+      addObjectTow(item){
+        if(item.checkHazardDtoList.length<10){
+          let obj = {
+            checkFlag:0,
+            hazardCheckCode:'',
+            hazardCheckName:'',
+            hazardCheckPoint:'',
+            hazardCheckPro:'',
+            hazardDescribe:'',
+            hazardLevel:'',
+            lookType:true,
+            uploadDtoList:[],
+          };
+          item.checkHazardDtoList.push(obj);
+        }
+      },
+      //新增检查项
+      addObjectDevice(item){
+        let self=this;
+        this.dialogVisible=true;
+        let list=JSON.parse(JSON.stringify(self.multipleSelection))
+        setTimeout(function(){
+          self.$refs.deviceTable.clearSelection();
+          if(list[0]){
+            self.deviceTableList.forEach(row => {
+              list.forEach(function(item) {
+                if(row.joinHazardId==item.joinHazardId){
+                  self.$refs.deviceTable.toggleRowSelection(row,true);
+                }
+              })
+            });
+          }else{
+            if(self.$refs.deviceTable){
+              self.$refs.deviceTable.clearSelection();
+            }
+          }
+        },100);
+
+      },
       //查看图片
       lookImg(list,index){
         for(let i=0;i<list.length;i++){
@@ -501,14 +825,19 @@
       //联级选择器数据处理
       getCascaderData(list){
         let self = this;
-        for(let i=0;i<list.length;i++){
-          list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
-          if(list[i].level == 0 || list[i].level == 1 || list[i].level == 2){
-            if(list[i].children){
-              if(list[i].children[0]){
-                self.getCascaderData(list[i].children)
-                if(list[i].children){
-                  if(!list[i].children[0]){
+        if(this.addForm.checkCategory==1){//综合检查
+          for(let i=0;i<list.length;i++){
+            list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
+            if(list[i].level == 0 || list[i].level == 1 || list[i].level == 2){
+              if(list[i].children){
+                if(list[i].children[0]){
+                  self.getCascaderData(list[i].children)
+                  if(list[i].children){
+                    if(!list[i].children[0]){
+                      list.splice(i,1)
+                      i--
+                    }
+                  }else{
                     list.splice(i,1)
                     i--
                   }
@@ -521,13 +850,51 @@
                 i--
               }
             }else{
-              list.splice(i,1)
-              i--
+              if(list[i].level == 3){
+                if(list[i].children[0]){
+                  let mainPoint=[]
+                  for(let b=0;b<list[i].children.length;b++){
+                    mainPoint.push(list[i].children[b].name)
+                    list[i].mainPoint=mainPoint.join(',')
+                  }
+                }else{
+                  list[i].mainPoint='';
+                }
+              }
+
+              delete list[i].children
+            }
+          }
+        }else if(this.addForm.checkCategory==2){//专项检查
+          for(let i=0;i<list.length;i++){
+            list[i].labelName = list[i].code? list[i].code +' '+ list[i].name:list[i].name
+            if(list[i].level == 0 || list[i].level == 1 || list[i].level == 2 || list[i].level == 3){
+              if(list[i].children){
+                if(list[i].children[0]){
+                  self.getCascaderData(list[i].children)
+                  if(list[i].children){
+                    if(!list[i].children[0]){
+                      list.splice(i,1)
+                      i--
+                    }
+                  }else{
+                    list.splice(i,1)
+                    i--
+                  }
+                }else{
+                  list.splice(i,1)
+                  i--
+                }
+              }else{
+                list.splice(i,1)
+                i--
+              }
+            }else{
+              delete list[i].children
             }
-          }else{
-            delete list[i].children
           }
         }
+
       },
       //获取学院列表
       listDepartments(){
@@ -574,6 +941,7 @@
             this.$set(this.addForm,'deptId',self.subSelectList[i].deptId);
             this.$set(this.addForm,'buildId',self.subSelectList[i].buildId);
             this.getCheckPlanBySubId(val);
+            this.getHazardInfoBySubId(val);
             return
           }
         }
@@ -603,6 +971,49 @@
           this.$set(this,'planList',list);
         });
       },
+      //根据实验室ID查询实验室设备
+      getHazardInfoBySubId(id){
+        getHazardInfoBySubId({subId:id}).then(response => {
+            this.deviceTableList=response.data;
+        });
+      },
+      //根据设备id生成检查项
+      getHazardInfoByJoinIds(id,joinHazardIds){
+        getHazardInfoByJoinIds({joinHazardIds:joinHazardIds}).then(response => {
+            if(response.data[0]){
+              let dataList=JSON.parse(JSON.stringify(response.data))
+              for(let i=0;i<dataList.length;i++){
+                dataList[i].lookType=true;
+                for(let b=0;b<dataList[i].checkHazardDtoList.length;b++){
+                  //把最外层的code填充到内层
+                  dataList[i].checkHazardDtoList[b].hazardCheckCode=dataList[i].code
+                }
+                //判断新旧数据是否相等,如果相等旧数据填充新数据
+                console.log(this.addForm.checkHazardInfoVoList)
+                if(this.addForm.checkHazardInfoVoList[0]){
+                  for(let k=0;k<this.addForm.checkHazardInfoVoList.length;k++){
+                    if(dataList[i].joinHazardId==this.addForm.checkHazardInfoVoList[k].joinHazardId){
+                      dataList[i]=this.addForm.checkHazardInfoVoList[k]
+                    }
+                  }
+                }
+              }
+              this.$set(this.addForm,'checkHazardInfoVoList',dataList);
+              this.pageType=2;
+            }
+
+        });
+      },
+      //专项检查选中
+      checkCategoryChange(){
+        console.log(this.addForm.checkCategory)
+        if(this.addForm.checkCategory==1){
+          this.pageType=0;
+        }else if(this.addForm.checkCategory==2){
+          this.pageType=1;
+        }
+
+      },
       //计划列表选中
       planChange(val){
         let self = this;
@@ -623,7 +1034,10 @@
             key:2,
             label:"实验室自查",
           }]);
+          this.pageType=1;
+          this.addForm.checkHazardInfoVoList=[];
         }else if(type == 2){
+          this.pageType=0;
           this.$set(this.addForm,'checkType',null);
           this.$set(this,'checkTypeList',[{ key:1, label:"校院巡查", },{ key:2, label:"实验室自查", }]);
         }
@@ -631,12 +1045,28 @@
       //查询详情
       findCheckManage(id){
         findCheckManage({id:id}).then(response => {
-          response.data.checkResult = response.data.checkResult === 0 || response.data.checkResult === 1?response.data.checkResult:"";
-          response.data.rectifyNotice = response.data.rectifyNotice?response.data.rectifyNotice:"";
-          response.data.rectifyDeadline = response.data.rectifyDeadline?response.data.rectifyDeadline:"";
-          response.data.dateRange = [response.data.cycleStartTime,response.data.cycleEndTime];
-          for(let i=0;i<response.data.checkHazardDtoList.length;i++){
-            response.data.checkHazardDtoList[i].lookType = true;
+          if(response.data.checkCategory==1){//综合检查
+            response.data.checkResult = response.data.checkResult === 0 || response.data.checkResult === 1?response.data.checkResult:"";
+            response.data.rectifyNotice = response.data.rectifyNotice?response.data.rectifyNotice:"";
+            response.data.rectifyDeadline = response.data.rectifyDeadline?response.data.rectifyDeadline:"";
+            response.data.dateRange = [response.data.cycleStartTime,response.data.cycleEndTime];
+            for(let i=0;i<response.data.checkHazardDtoList.length;i++){
+              response.data.checkHazardDtoList[i].lookType = true;
+            }
+
+          }else if(response.data.checkCategory==2){//专项检查
+            response.data.rectifyNotice = response.data.rectifyNotice?response.data.rectifyNotice:"";
+            response.data.rectifyDeadline = response.data.rectifyDeadline?response.data.rectifyDeadline:"";
+            response.data.dateRange = [response.data.cycleStartTime,response.data.cycleEndTime];
+            if(response.data.checkHazardInfoVoList[0]){
+              response.data.checkHazardInfoVoList.forEach(function(item) {
+                item.lookType = true;
+                item.checkHazardDtoList.forEach(function(item2) {
+                  item2.hazardCheckCode=item2.code
+                })
+              })
+            }
+            this.pageType=2
           }
           this.buildBySubList(response.data.buildId,1);
           this.$set(this,'addForm',{
@@ -649,10 +1079,15 @@
             rectifyNotice:response.data.rectifyNotice,
             deptId:response.data.deptId,
             checkType:response.data.checkType,
+            checkCategory:response.data.checkCategory+'',
             dateRange:response.data.dateRange,
             rectifyDeadline:response.data.rectifyDeadline,
             checkHazardDtoList:response.data.checkHazardDtoList,
+            checkHazardInfoVoList:response.data.checkHazardInfoVoList,
+
           });
+          this.checkOptionList();//获取检查项
+
         });
       },
       //初始化数据
@@ -688,32 +1123,61 @@
         this.$set(this,'planList',[]);
       },
       //删除检查项
-      delCheckHazardDtoList(index){
+      delCheckHazardDtoList(index,index2,type){//type 1综合检查 2专项检查设备项 3专项检查检查项
+
         let self = this;
         this.$confirm('是否确认删除?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
         }).then(function() {
-          self.addForm.checkHazardDtoList.splice(index,1);
+          if(self.addForm.checkCategory==1){//综合检查
+            self.addForm.checkHazardDtoList.splice(index,1);
+          }else if(self.addForm.checkCategory==2){//专项检查
+            if(type==2){//检查设备
+              self.addForm.checkHazardInfoVoList.splice(index,1);
+            }else if(type==3){//检查项
+              self.addForm.checkHazardInfoVoList[index].checkHazardDtoList.splice(index2,1);
+            }
+
+          }
+
         }).then(() => {
         }).catch(() => {});
       },
       //检查项选中
-      cascaderChange(val,index){
+      cascaderChange(val,item,index){
         let obj = this.getCascaderDataQuery(val,this.options);
-        if(!obj){
-          this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckPro','');
-          this.msgError('未找到相关项目')
-          return
+
+        if(this.addForm.checkCategory==1){//综合检查
+          if(!obj){
+            this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckPro','');
+            this.msgError('未找到相关项目')
+            return
+          }
+          console.log(obj)
+          this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckCode',obj.code);
+          this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckName',obj.name);
+          this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckPoint',obj.mainPoint);
+          countHazardNum({subId:this.addForm.subId, hazardCheckPro:val}).then( response => {
+            this.$set(this,'hazardCheckCount',response.data);
+          })
+        }else if(this.addForm.checkCategory==2){//专项检查
+          if(!obj){
+            this.$set(this.addForm.checkHazardInfoVoList[index],'hazardCheckPro','');
+            this.msgError('未找到相关项目')
+            return
+          }
+          console.log(obj)
+          item.hazardCheckCode=obj.code;
+          item.hazardCheckName=obj.name;
+          countHazardNum({subId:this.addForm.subId, hazardCheckPro:val}).then( response => {
+            this.$set(this,'hazardCheckCount',response.data);
+          })
         }
-        this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckCode',obj.code);
-        this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckName',obj.name);
-        this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckPoint',obj.mainPoint);
-        countHazardNum({subId:this.addForm.subId, hazardCheckPro:val}).then( response => {
-          this.$set(this,'hazardCheckCount',response.data);
-        })
       },
+      /*==========专项检查==========*/
+
       //联级选择器数据查询
       getCascaderDataQuery(text,list){
         let self = this;
@@ -749,6 +1213,32 @@
     ::v-deep .el-range-editor--small .el-range-separator{
       line-height:32px;
     }
+    .dept-table-max-box{
+      padding: 0 20px;
+      box-sizing: border-box;
+        .device-tip{
+          font-size: 16px;
+          font-family: Microsoft YaHei-Regular, Microsoft YaHei;
+          font-weight: 400;
+          color: #333333;
+          line-height: 16px;
+          margin-bottom: 20px;
+        }
+    }
+    .start_btn{
+      font-size: 16px;
+      font-family: Microsoft YaHei-Regular, Microsoft YaHei;
+      font-weight: 400;
+      color: #0183FA;
+      line-height: 40px;
+      text-align: center;
+      width: 500px;
+      height: 40px;
+      border-radius: 4px 4px 4px 4px;
+      opacity: 1;
+      border: 1px dotted #0183FA;
+      margin:40px auto;
+    }
     .title-max-box{
       position: relative;
       height:90px;
@@ -909,6 +1399,32 @@
         }
       }
     }
+    /*专项检查*/
+    .for-max-big-box-special{
+      margin-bottom: 20px;
+      .for-big-box-special{
+        border-bottom: 1px dotted #D8D8D8;
+        margin:30px;
+        display: flex;
+        justify-content: flex-start;
+        .for-big-box-special-l{
+          width: 30px;
+          height: 30px;
+          background: #0183FA;
+          border-radius: 6px 6px 6px 6px;
+          font-size: 16px;
+          font-family: Microsoft YaHei-Regular, Microsoft YaHei;
+          font-weight: 400;
+          color: #FFFFFF;
+          line-height: 30px;
+          text-align: center;
+        }
+        .for-big-box-special-r{}
+      }
+      .for-big-box-special:last-of-type{
+        border-bottom: none;
+      }
+    }
     .bottom-button-max-box{
       height:80px;
       display: flex;

+ 1 - 1
src/views/safetyCheck/worktable/toDoListBox.vue

@@ -42,7 +42,7 @@
         <div class="for-time-box">
           <p>计划周期:{{item.cycleStartTime}} 至 {{item.cycleEndTime}}</p>
           <p v-if="item.manageStatus == 0 && item.checkIsStatus" @click="goPage(item)">开始检查</p>
-          <p v-if="item.manageStatus == 0 && !item.checkIsStatus" class="noButton" @click="goPage(item)">计划未开始</p>
+          <p v-if="item.manageStatus == 0 && !item.checkIsStatus" class="noButton">计划未开始</p>
           <p v-if="item.manageStatus == 1 && item.isUpdate" @click="goPage(item)">编辑</p>
           <p v-if="item.manageStatus == 2 && item.isCheck" @click="addDialogOpen(true,item)">复核</p>
         </div>

+ 1 - 1
src/views/safetyEducationExam/trainingCourse/addDialog.vue

@@ -400,7 +400,7 @@
             this.$set(this,'secondaryTeacherOptions',secondaryTeacherList);
           }
           //处理实验室数据&手动输入场地
-          if(this.addDialogData.subId){
+          if(this.addDialogData.subId && this.addDialogData.subId!=-1){
             obj.subId = this.addDialogData.subId;
             obj.position = "";
             obj.selectType = 1;

+ 1 - 1
src/views/safetyEducationExam/trainingCourse/index.vue

@@ -44,7 +44,7 @@
         <el-table-column label="学院" prop="place" width="180" show-overflow-tooltip/>
         <el-table-column label="上课地点" prop="position" width="100" show-overflow-tooltip>
           <template slot-scope="scope">
-            {{scope.row.subId?scope.row.subName+'-'+scope.row.subRoom:scope.row.position}}
+            {{(scope.row.subId && scope.row.subId !=-1)?scope.row.subName+'-'+scope.row.subRoom:scope.row.position}}
           </template>
         </el-table-column>
         <el-table-column label="主讲老师" prop="lecturerName" width="100" show-overflow-tooltip/>

+ 1 - 1
src/views/safetyEducationExam/trainingCourse/infoDialog.vue

@@ -203,7 +203,7 @@
           lecturerName:this.infoDialogData.lecturerName,
           tutorName:this.infoDialogData.tutorName,
           userIds:this.infoDialogData.userIds,
-          place:this.infoDialogData.subId?this.infoDialogData.place+' , '+this.infoDialogData.subName:this.infoDialogData.place+' , '+this.infoDialogData.position,
+          place:(this.infoDialogData.subId && this.infoDialogData.subId!=-1)?this.infoDialogData.place+' , '+this.infoDialogData.subName:this.infoDialogData.place+' , '+this.infoDialogData.position,
           courseDate:this.infoDialogData.coStartDate,
           courseTime:this.infoDialogData.coStartTime+'至'+this.infoDialogData.coEndTime,
           content:this.infoDialogData.content,

+ 1 - 0
src/views/studentViews/chemicalManagement/studentChemicalInfo/addPage.vue

@@ -259,6 +259,7 @@
           callback();
         }
       };
+
       return {
         //限制时间范围
         pickerBeginOption: {