heyang 1 年之前
父節點
當前提交
c3b7b833b5
共有 2 個文件被更改,包括 547 次插入86 次删除
  1. 228 45
      src/views/safetyCheck/components/addPage/addPage.vue
  2. 319 41
      src/views/safetyCheck/startInspection/index.vue

+ 228 - 45
src/views/safetyCheck/components/addPage/addPage.vue

@@ -26,13 +26,16 @@
               <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="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="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="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>
@@ -49,7 +52,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 +65,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 +93,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="请选择检查项"
@@ -153,6 +157,90 @@
           </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}}】专项检查</p>
+<!--              <div class="for-del-box">-->
+<!--                <p class="el-icon-delete"></p>-->
+<!--                <p @click="delCheckHazardDtoList(index)">删除此项</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-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="隐患描述" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.hazardDescribe'" :rules="rules.hazardDescribe" 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>
+        </div>
+
       </el-form>
     </div>
     <div class="bottom-button-max-box">
@@ -228,7 +316,7 @@
     },
     created(){
       this.$set(this,'addPageTitle',this.propsAddData.title);
-      this.checkOptionList();
+
       this.findCheckManage();
     },
     mounted(){},
@@ -238,19 +326,52 @@
         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++){
+                  delete obj.checkHazardDtoList[i].lookType
+                }
+                obj.dangerNum = obj.checkHazardDtoList.length
+              }else{
+                obj.checkHazardDtoList = [];
+              }
+            }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)
+                }
               }
-              for(let i=0;i<obj.checkHazardDtoList.length;i++){
-                delete obj.checkHazardDtoList[i].lookType
+              if(checkFlagList.every(item=>{return item==1})){//符合
+                obj.checkResult=1;
+              }else{//不符合
+                obj.checkResult=0;
               }
-              obj.dangerNum = obj.checkHazardDtoList.length
-            }else{
-              obj.checkHazardDtoList = [];
+              obj.checkHazardInfoVoList=list;
             }
-            obj.manageStatus = type
             checkManageUpdate(obj).then(response => {
               this.msgSuccess(response.msg);
               this.$parent.goAddPage(4);
@@ -261,13 +382,19 @@
       //查询详情
       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:"";
           }
           this.$set(this,'addForm',response.data);
+          this.checkOptionList();//获取检查项
         });
       },
       //返回事件
@@ -320,19 +447,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 +536,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 +561,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 +788,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;

+ 319 - 41
src/views/safetyCheck/startInspection/index.vue

@@ -128,21 +128,8 @@
 
             </div>
           </div>
-          <div class="bottom-form-box" >
-            <div class="bottom-form-title-box">
-              <p>检查项</p>
-              <p>隐患数:{{addForm.checkHazardDtoList.length}}</p>
-            </div>
-            <div class="dept-table-max-box">
-              <el-table ref="leftDeviceTable" border :data="deviceTableList" @selection-change="deviceChange" :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>
-            </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>
@@ -169,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="请选择检查项"
@@ -233,6 +220,109 @@
             </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.checkHazardDtoList.length}}</p>
+            </div>
+            <div class="dept-table-max-box">
+              <div class="device-tip">请选择以下实验室内设备开始检查</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="num" show-overflow-tooltip/>
+                <el-table-column label="型号" align="center" prop="code" show-overflow-tooltip />
+                <el-table-column label="类型" align="center" prop="hazardTypeMode" 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.specialCheckHazardDtoList.length}}</p>
+            </div>
+            <div class="for-max-big-box for-max-big-box-special" v-for="(item,index) in addForm.specialCheckHazardDtoList" :key="index">
+              <div class="for-title-box">
+                <p class="for-title-p">{{index+1}}、【{{item.name}}】{{item.type}}</p>
+                <div class="for-del-box">
+                  <p class="el-icon-delete"></p>
+                  <p @click="delCheckHazardDtoList(index)">删除此项</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-for="(item2,index2) in item.subitem">
+                <el-form-item label="检查项目" :prop="'specialCheckHazardDtoList.'+index+'.hazardCheckPro'" :rules="rules.hazardCheckPro" label-width="123px">
+                  <el-radio-group v-model="item2.checkResult" 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.checkResult==0" label="隐患等级" :prop="'specialCheckHazardDtoList.'+index+'.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.checkResult==0" label="隐患描述" :prop="'specialCheckHazardDtoList.'+index+'.hazardDescribe'" :rules="rules.hazardDescribe" 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.checkResult==0" label="隐患照片" :prop="'specialCheckHazardDtoList.'+index+'.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.checkResult==0" label="" label-width="123px" style="margin-bottom:40px;color:#999;">
+                  <p>支持jpg/png/bmp/gif格式,且不超过2M,最多上传5张</p>
+                </el-form-item>
+              </div>
+              <p class="add-bottom-button" @click="addObjectTow(item)">+新增隐患检查项</p>
+            </div>
+            <p class="add-bottom-button" @click="addObjectDevice()">+新增检查项</p>
+          </div>
         </el-form>
       </div>
       <div class="bottom-button-max-box" v-hasPermi="['safety:checkManage_4:edit']">
@@ -242,6 +332,21 @@
         <p class="null-p"></p>
       </div>
       <lookImgDialog ref="lookImgDialog"></lookImgDialog>
+      <!--设备弹窗-->
+      <el-dialog title="检查项" :visible.sync="dialogVisible" width="730px" append-to-body :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="num" show-overflow-tooltip/>
+          <el-table-column label="型号" align="center" prop="code" show-overflow-tooltip />
+          <el-table-column label="类型" align="center" prop="hazardTypeMode" 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>
 
@@ -293,13 +398,51 @@
           checkType:2,
           dateRange:[],
           rectifyDeadline:"",
+          //综合检查
           checkHazardDtoList:[],
+          //专项检查
+          specialCheckHazardDtoList:[
+            {
+              name:'烘箱-001',
+              type:'专项检查',
+              subitem:[
+                {
+                  checkResult:0,
+                  hazardCheckCode:'',
+                  hazardCheckName:'',
+                  hazardCheckPoint:'',
+                  hazardCheckPro:'',
+                  hazardDescribe:'',
+                  hazardLevel:'',
+                  lookType:true,
+                  uploadDtoList:[],
+                },{
+                  checkResult:0,
+                  hazardCheckCode:'',
+                  hazardCheckName:'',
+                  hazardCheckPoint:'',
+                  hazardCheckPro:'',
+                  hazardDescribe:'',
+                  hazardLevel:'',
+                  lookType:true,
+                  uploadDtoList:[],
+                }
+              ]
+            }
+          ],
         },
+
+
         //检查项出现次数
         hazardCheckCount:0,
         //上传用名称保存
         upDataName:"",
-        deviceTableList:[{}],
+        deviceTableList:[{
+          'chName':'测试',
+          'num':'2',
+          'code':'001',
+          'hazardTypeMode':'冷热设备',
+        }],
         //检查类型
         inspectCategoryList:[{id:'1',name:'综合检查'},{id:'2',name:'专项检查'}],
         // 表单校验
@@ -359,6 +502,9 @@
         adminGentle:false,
         applyGentle:false,
         myApplyGentle:false,
+        /* ==专项检查== */
+        dialogVisible:false,
+        pageType:1,
       }
     },
     created(){
@@ -376,6 +522,27 @@
       },
       deviceChange(selection){
         console.log(selection)
+
+      },
+      handleClick(doType){
+        let self=this;
+        if(doType=='startBtn'){//开始检查
+          this.pageType=2;
+          this.checkOptionList();
+          this.dialogVisible=false;
+          if(this.addForm.specialCheckHazardDtoList.length<10){
+            let obj = {
+              name:'烘箱-001',
+              type:'专项检查',
+              subitem:[]
+            };
+            this.addForm.specialCheckHazardDtoList.push(obj);
+          }
+        }
+      },
+      // 取消按钮
+      cancel() {
+        this.dialogVisible = false;
       },
       //获取权限范围
       getGentle(){
@@ -480,6 +647,28 @@
           this.addForm.checkHazardDtoList.push(obj);
         }
       },
+      //新增隐患项
+      addObjectTow(item){
+        if(item.subitem.length<10){
+          let obj = {
+            checkResult:0,
+            hazardCheckCode:'',
+            hazardCheckName:'',
+            hazardCheckPoint:'',
+            hazardCheckPro:'',
+            hazardDescribe:'',
+            hazardLevel:'',
+            lookType:true,
+            uploadDtoList:[],
+          };
+          item.subitem.push(obj);
+        }
+      },
+      //新增检查项
+      addObjectDevice(item){
+        this.dialogVisible=true;
+
+      },
       //查看图片
       lookImg(list,index){
         for(let i=0;i<list.length;i++){
@@ -541,14 +730,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--
                   }
@@ -561,13 +755,39 @@
                 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
           }
         }
+
       },
       //获取学院列表
       listDepartments(){
@@ -736,25 +956,46 @@
           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){//专项检查
+            self.addForm.specialCheckHazardDtoList.splice(index,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
+          }
+          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);
-        })
       },
+      /*==========专项检查==========*/
+
       //联级选择器数据查询
       getCascaderDataQuery(text,list){
         let self = this;
@@ -790,6 +1031,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;
@@ -950,6 +1217,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;