heyang 1 year ago
parent
commit
64e3c07c7c
22 changed files with 4059 additions and 1805 deletions
  1. 16 16
      src/views/safetyCheck/checkItemLibrary/index.vue
  2. 244 50
      src/views/safetyCheck/components/addPage/addPage.vue
  3. 3 2
      src/views/safetyCheck/components/infoDialog/infoDialog.vue
  4. 207 3
      src/views/safetyCheck/components/infoPage/infoPage.vue
  5. 3 1
      src/views/safetyCheck/dataStatistics/checkIndexStatistics.vue
  6. 8 1
      src/views/safetyCheck/dataStatistics/index.vue
  7. 92 34
      src/views/safetyCheck/laboratorySelfTest/selfInspectionManagement/index.vue
  8. 372 6
      src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/addDialog.vue
  9. 93 22
      src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/index.vue
  10. 68 0
      src/views/safetyCheck/rectificationReport/index.vue
  11. 100 13
      src/views/safetyCheck/safetyHazard/cannotListPage.vue
  12. 96 18
      src/views/safetyCheck/safetyHazard/departmentListPage.vue
  13. 96 18
      src/views/safetyCheck/safetyHazard/schoolListPage.vue
  14. 0 15
      src/views/safetyCheck/schoolInspection/inspectionGroup/addDialog.vue
  15. 0 15
      src/views/safetyCheck/schoolInspection/inspectionGroup/index.vue
  16. 88 31
      src/views/safetyCheck/schoolInspection/inspectionManagement/index.vue
  17. 1774 1416
      src/views/safetyCheck/schoolInspection/inspectionPlan/addDialog.vue
  18. 92 22
      src/views/safetyCheck/schoolInspection/inspectionPlan/index.vue
  19. 5 0
      src/views/safetyCheck/schoolInspection/inspectionPlan/listPage.vue
  20. 97 30
      src/views/safetyCheck/snapshotManagement/index.vue
  21. 599 85
      src/views/safetyCheck/startInspection/index.vue
  22. 6 7
      src/views/safetyCheck/worktable/toDoListBox.vue

+ 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{

+ 92 - 34
src/views/safetyCheck/laboratorySelfTest/selfInspectionManagement/index.vue

@@ -6,21 +6,18 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
           <div class="form-button-max-big-box">
             <div class="form-button-big-box" style="margin-left:10px;">
-              <div :class="queryParams.manageStatus=='-1'?'checkDiv':''" @click="topLeftClickType('-1')">
-                <p class="text-p">全部</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus=='-1'"></p>
-              </div>
-              <div :class="queryParams.manageStatus==0?'checkDiv':''" @click="topLeftClickType(0)">
-                <p class="text-p">待检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus==0"></p>
-              </div>
-              <div :class="queryParams.manageStatus==1?'checkDiv':''" @click="topLeftClickType(1)">
-                <p class="text-p">检查中</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus==1"></p>
-              </div>
-              <div :class="queryParams.manageStatus==2?'checkDiv':''" @click="topLeftClickType(2)">
-                <p class="text-p">已检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus==2"></p>
+              <p class="text-p" :class="queryParams.manageStatus=='-1'?'checkDiv':''" @click="topLeftClickType('-1')">全部</p>
+              <p class="text-p" :class="queryParams.manageStatus=='0'?'checkDiv':''" @click="topLeftClickType('0')">待检查</p>
+              <p class="text-p" :class="queryParams.manageStatus=='1'?'checkDiv':''" @click="topLeftClickType('1')">检查中</p>
+              <p class="text-p" :class="queryParams.manageStatus=='2'?'checkDiv':''" @click="topLeftClickType('2')">已检查</p>
+            </div>
+          </div>
+          <!--与我相关-->
+          <div class="form-button-max-big-box-me">
+            <div class="form-button-big-box-me">
+              <div :class="queryParams.myRelated==1?'checkDiv-me':''" @click="topRightClickType">
+                <p class="text-p-me">与我有关{{correlationNum}}</p>
+                <p class="el-icon-check icon-p-me" v-if="queryParams.myRelated==1"></p>
               </div>
             </div>
           </div>
@@ -60,14 +57,6 @@
             <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
             <p class="reset-button-one" @click="resetQuery">重置</p>
           </el-form-item>
-          <div class="form-button-max-big-box">
-            <div class="form-button-big-box">
-              <div :class="queryParams.isSelf==1?'checkDiv':''" style="width:100px;" @click="topRightClickType">
-                <p class="text-p">本人发起</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.isSelf==1"></p>
-              </div>
-            </div>
-          </div>
         </el-form>
       </div>
       <div class="content-box">
@@ -78,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':''))">
@@ -169,11 +163,12 @@
           checkTimeSort:0,
           searchValue:"",
           deptId:"",
-          isSelf:0,
+          myRelated:1,
         },
         dateRange:[],
         tableList:[],
         total:0,
+        correlationNum:'',
       }
     },
     created(){
@@ -186,6 +181,28 @@
       this.getList();
     },
     methods:{
+      //获取相关数量
+      getCorrelationNum(){
+        checkManageList({
+          pageNum:1,
+          pageSize:20,
+          checkType:2,
+          checkTimeSort:0,
+          myRelated:1,
+          manageStatus:this.queryParams.manageStatus,
+          searchValue:this.queryParams.searchValue,
+          deptId:this.queryParams.deptId,
+          startTime:this.dateRange[0]?this.dateRange[0]:'',
+          endTime:this.dateRange[1]?this.dateRange[1]:'',
+        }).then(response => {
+          this.$set(this,'correlationNum',response.data.total>999?' 999+':(response.data.total<1?'':' '+response.data.total));
+        });
+      },
+      //与我相关按钮
+      topRightClickType(){
+        this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
+        this.handleQuery();
+      },
       //开始检查
       goAddPage(type,id){
         if(this.pageType != type){
@@ -224,10 +241,6 @@
           this.handleQuery();
         }
       },
-      topRightClickType(){
-        this.$set(this.queryParams,'isSelf',this.queryParams.isSelf==1?0:1);
-        this.handleQuery();
-      },
       //获取数据列表
       getList(){
         let obj = JSON.parse(JSON.stringify(this.queryParams))
@@ -241,6 +254,7 @@
         }else{
           obj.endTime = "";
         }
+        this.getCorrelationNum();
         checkManageList(obj).then(response => {
           this.total = response.data.total;
           this.tableList = response.data.records;
@@ -262,7 +276,7 @@
           checkTimeSort:0,
           searchValue:"",
           deptId:"",
-          isSelf:0,
+          myRelated:1,
         });
         this.handleQuery();
       },
@@ -340,12 +354,56 @@
         border-bottom:1px solid #dedede;
         .form-button-max-big-box{
           display: inline-block;
+          margin-left:10px;
           .form-button-big-box{
             display: flex;
+            p:nth-child(1){
+              border-top-left-radius: 4px;
+              border-bottom-left-radius: 4px;
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(2){
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(3){
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(4){
+              border-top-right-radius: 4px;
+              border-bottom-right-radius: 4px;
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+              border-right:1px solid #E0E0E0;
+            }
+            p{
+              height:40px;
+              width:80px;
+              line-height: 40px;
+              text-align: center;
+              color:#666666;
+              font-size:14px;
+              font-weight:500;
+              cursor: pointer;
+              border-left:1px solid #E0E0E0;
+            }
+            .checkDiv{
+              color:#fff!important;
+              border:1px solid #0183FA!important;
+              background-color: #0183FA;
+            }
+          }
+        }
+        .form-button-max-big-box-me{
+          display: inline-block;
+          .form-button-big-box-me{
+            display: flex;
             div{
               position: relative;
               height:40px;
-              width:80px;
+              width:130px;
               line-height: 40px;
               text-align: center;
               color:#999;
@@ -355,7 +413,7 @@
               margin-left:10px;
               font-weight:500;
               cursor: pointer;
-              .icon-p{
+              .icon-p-me{
                 width:15px;
                 height:15px;
                 line-height:15px;
@@ -368,9 +426,9 @@
                 border-top-left-radius:4px;
               }
             }
-            .checkDiv{
-              color:#0183FA;
-              border:1px solid #0183FA;
+            .checkDiv-me{
+              color:#0183FA!important;
+              border:1px solid #0183FA!important;
             }
           }
         }

+ 372 - 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="getDeviceRowKeys">
+            <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="getDeviceRowKeys">
+            <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){
@@ -1043,6 +1398,9 @@
       getSubRowKeys(row) {
         return row.subId
       },
+      getDeviceRowKeys(row) {
+        return row.id
+      },
       deptChange(selection){
         let self = this;
         this.deptNumLeft = selection.length;
@@ -1079,6 +1437,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;

+ 93 - 22
src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/index.vue

@@ -6,21 +6,18 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
           <div class="form-button-max-big-box">
             <div class="form-button-big-box" style="margin-left:10px;">
-              <div :class="queryParams.checkStatus==0?'checkDiv':''" @click="topLeftClickType(0)">
-                <p class="text-p">全部</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==0"></p>
-              </div>
-              <div :class="queryParams.checkStatus==1?'checkDiv':''" @click="topLeftClickType(1)">
-                <p class="text-p">未开始</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==1"></p>
-              </div>
-              <div :class="queryParams.checkStatus==2?'checkDiv':''" @click="topLeftClickType(2)">
-                <p class="text-p">进行中</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==2"></p>
-              </div>
-              <div :class="queryParams.checkStatus==3?'checkDiv':''" @click="topLeftClickType(3)">
-                <p class="text-p">已结束</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==3"></p>
+              <p class="text-p" :class="queryParams.checkStatus=='0'?'checkDiv':''" @click="topLeftClickType('0')">全部</p>
+              <p class="text-p" :class="queryParams.checkStatus=='1'?'checkDiv':''" @click="topLeftClickType('1')">未开始</p>
+              <p class="text-p" :class="queryParams.checkStatus=='2'?'checkDiv':''" @click="topLeftClickType('2')">进行中</p>
+              <p class="text-p" :class="queryParams.checkStatus=='3'?'checkDiv':''" @click="topLeftClickType('3')">已结束</p>
+            </div>
+          </div>
+          <!--与我相关-->
+          <div class="form-button-max-big-box-me">
+            <div class="form-button-big-box-me">
+              <div :class="queryParams.myRelated==1?'checkDiv-me':''" @click="topRightClickType">
+                <p class="text-p-me">与我有关{{correlationNum}}</p>
+                <p class="el-icon-check icon-p-me" v-if="queryParams.myRelated==1"></p>
               </div>
             </div>
           </div>
@@ -69,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>
@@ -89,11 +91,11 @@
                 <p class="table-button-p" v-hasPermi="['security:checkPlan_1:query']"
                    v-show="scope.row.checkStatus!=1" @click="addDialogOpen(3,scope.row)">详情</p>
                 <p class="table-button-p" v-hasPermiAnd="['security:checkPlan_1:query','security:checkPlan_1:edit']"
-                   v-show="scope.row.checkStatus==1" @click="addDialogOpen(2,scope.row)">编辑</p>
+                   v-show="scope.row.checkStatus==1&&scope.row.isSelfData == 1" @click="addDialogOpen(2,scope.row)">编辑</p>
                 <p class="table-button-p" v-hasPermi="['security:checkManage_3:list']"
                    @click="goPage(2,scope.row)">自查管理</p>
                 <p class="table-button-p" v-hasPermi="['security:checkPlan_1:remove']"
-                   v-show="scope.row.checkStatus==1" @click="deleteObj(scope.row)">删除</p>
+                   v-show="scope.row.checkStatus==1&&scope.row.isSelfData == 1" @click="deleteObj(scope.row)">删除</p>
                 <p class="table-button-p" v-show="scope.row.isAttachment == 1" @click="lookDocumentListButton(1,scope.row)">查看附件</p>
                 <p class="table-button-null"></p>
               </div>
@@ -143,10 +145,12 @@
           createTimeSort:0,
           searchValue:"",
           checkType:2,
+          myRelated:1,
         },
         dateRange:[],
         tableList:[],
         total:0,
+        correlationNum:'',
       }
     },
     created(){
@@ -156,6 +160,27 @@
       this.getList();
     },
     methods:{
+      //获取相关数量
+      getCorrelationNum(){
+        checkPlanList({
+          pageNum:1,
+          pageSize:20,
+          createTimeSort:0,
+          checkType:2,
+          myRelated:1,
+          checkStatus:this.queryParams.checkStatus,
+          searchValue:this.queryParams.searchValue,
+          cycleStartTime:this.dateRange[0]?this.dateRange[0]:'',
+          cycleEndTime:this.dateRange[1]?this.dateRange[1]:'',
+        }).then(response => {
+          this.$set(this,'correlationNum',response.data.total>999?' 999+':(response.data.total<1?'':' '+response.data.total));
+        });
+      },
+      //与我相关按钮
+      topRightClickType(){
+        this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
+        this.handleQuery();
+      },
       //切换页面
       goPage(type,data){
         if(this.pageType != type){
@@ -229,6 +254,7 @@
         }else{
           obj.cycleEndTime = "";
         }
+        this.getCorrelationNum();
         checkPlanList(obj).then(response => {
           this.total = response.data.total;
           this.tableList = response.data.records;
@@ -249,6 +275,7 @@
           createTimeSort:0,
           searchValue:"",
           checkType:2,
+          myRelated:1,
         });
         this.handleQuery();
       },
@@ -309,12 +336,56 @@
         border-bottom:1px solid #dedede;
         .form-button-max-big-box{
           display: inline-block;
+          margin-left:10px;
           .form-button-big-box{
             display: flex;
+            p:nth-child(1){
+              border-top-left-radius: 4px;
+              border-bottom-left-radius: 4px;
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(2){
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(3){
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(4){
+              border-top-right-radius: 4px;
+              border-bottom-right-radius: 4px;
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+              border-right:1px solid #E0E0E0;
+            }
+            p{
+              height:40px;
+              width:80px;
+              line-height: 40px;
+              text-align: center;
+              color:#666666;
+              font-size:14px;
+              font-weight:500;
+              cursor: pointer;
+              border-left:1px solid #E0E0E0;
+            }
+            .checkDiv{
+              color:#fff!important;
+              border:1px solid #0183FA!important;
+              background-color: #0183FA;
+            }
+          }
+        }
+        .form-button-max-big-box-me{
+          display: inline-block;
+          .form-button-big-box-me{
+            display: flex;
             div{
               position: relative;
               height:40px;
-              width:80px;
+              width:130px;
               line-height: 40px;
               text-align: center;
               color:#999;
@@ -324,7 +395,7 @@
               margin-left:10px;
               font-weight:500;
               cursor: pointer;
-              .icon-p{
+              .icon-p-me{
                 width:15px;
                 height:15px;
                 line-height:15px;
@@ -337,9 +408,9 @@
                 border-top-left-radius:4px;
               }
             }
-            .checkDiv{
-              color:#0183FA;
-              border:1px solid #0183FA;
+            .checkDiv-me{
+              color:#0183FA!important;
+              border:1px solid #0183FA!important;
             }
           }
         }

+ 68 - 0
src/views/safetyCheck/rectificationReport/index.vue

@@ -3,6 +3,15 @@
     <div class="rectificationReport-page" v-if="pageType == 1">
       <div class="title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
+          <!--与我相关-->
+          <div class="form-button-max-big-box-me" style="margin-left:10px;">
+            <div class="form-button-big-box-me">
+              <div :class="queryParams.myRelated==1?'checkDiv-me':''" @click="topRightClickType">
+                <p class="text-p-me">与我有关{{correlationNum}}</p>
+                <p class="el-icon-check icon-p-me" v-if="queryParams.myRelated==1"></p>
+              </div>
+            </div>
+          </div>
           <el-form-item label="关键字" prop="searchValue">
             <el-input
               maxLength="30"
@@ -112,12 +121,14 @@
           pageSize:20,
           deptId:'',
           searchValue:'',
+          myRelated:1,
         },
         dateRange:[],
         tableList:[],
         total:0,
         selectedNum:0,
         ids:[],
+        correlationNum:'',
       }
     },
     created(){
@@ -128,6 +139,25 @@
       this.getList();
     },
     methods:{
+      //获取相关数量
+      getCorrelationNum(){
+        checkRectifyList({
+          pageNum:1,
+          pageSize:20,
+          myRelated:1,
+          deptId:this.queryParams.deptId,
+          searchValue:this.queryParams.searchValue,
+          beginTime:this.dateRange[0]?this.dateRange[0]:'',
+          endTime:this.dateRange[1]?this.dateRange[1]:'',
+        }).then(response => {
+          this.$set(this,'correlationNum',response.data.total>999?' 999+':(response.data.total<1?'':' '+response.data.total));
+        });
+      },
+      //与我相关按钮
+      topRightClickType(){
+        this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
+        this.handleQuery();
+      },
       // 批量下载
       allDownload(){
         let self = this;
@@ -185,6 +215,7 @@
         }else{
           obj.endTime = ""
         }
+        this.getCorrelationNum();
         checkRectifyList(obj).then(response => {
           this.total = response.data.total;
           this.tableList = response.data.records;
@@ -203,6 +234,7 @@
           pageSize:20,
           deptId:'',
           searchValue:'',
+          myRelated:1,
         });
         this.handleQuery();
       },
@@ -266,6 +298,42 @@
             }
           }
         }
+        .form-button-max-big-box-me{
+          display: inline-block;
+          .form-button-big-box-me{
+            display: flex;
+            div{
+              position: relative;
+              height:40px;
+              width:130px;
+              line-height: 40px;
+              text-align: center;
+              color:#999;
+              font-size:14px;
+              border:1px solid #999;
+              border-radius:4px;
+              margin-left:10px;
+              font-weight:500;
+              cursor: pointer;
+              .icon-p-me{
+                width:15px;
+                height:15px;
+                line-height:15px;
+                text-align: center;
+                position: absolute;
+                right:0;
+                bottom:0;
+                color:#fff;
+                background: #0183fa;
+                border-top-left-radius:4px;
+              }
+            }
+            .checkDiv-me{
+              color:#0183FA!important;
+              border:1px solid #0183FA!important;
+            }
+          }
+        }
       }
       .content-box{
         flex: 1;

+ 100 - 13
src/views/safetyCheck/safetyHazard/cannotListPage.vue

@@ -5,11 +5,16 @@
       <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
         <div class="form-button-max-big-box">
           <div class="form-button-big-box" style="margin-left:10px;">
-            <div :class="queryParams.hazardType==1?'checkDiv':''" @click="topLeftClickType(1)">
-              <p class="text-p">校院巡查</p>
-            </div>
-            <div :class="queryParams.hazardType==2?'checkDiv':''" @click="topLeftClickType(2)">
-              <p class="text-p">实验室自查</p>
+            <p class="text-p" :class="queryParams.hazardType=='1'?'checkDiv':''" @click="topLeftClickType('1')">校院巡查</p>
+            <p class="text-p" :class="queryParams.hazardType=='2'?'checkDiv':''" @click="topLeftClickType('2')">实验室自查</p>
+          </div>
+        </div>
+        <!--与我相关-->
+        <div class="form-button-max-big-box-me">
+          <div class="form-button-big-box-me">
+            <div :class="queryParams.myRelated==1?'checkDiv-me':''" @click="topRightClickType">
+              <p class="text-p-me">与我有关{{correlationNum}}</p>
+              <p class="el-icon-check icon-p-me" v-if="queryParams.myRelated==1"></p>
             </div>
           </div>
         </div>
@@ -45,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"/>
@@ -96,10 +111,12 @@
           hazardType:1,
           searchValue:"",
           checkTimeOrder:"",
+          myRelated:1,
         },
         dateRange:[],
         tableList:[],
         total:0,
+        correlationNum:'',
       }
     },
     created(){},
@@ -107,6 +124,27 @@
       this.getList();
     },
     methods:{
+      //获取相关数量
+      getCorrelationNum(){
+        unableRectifyList({
+          pageNum:1,
+          pageSize:20,
+          rectifyStatus:4,
+          checkTimeOrder:"",
+          myRelated:1,
+          hazardType:this.queryParams.hazardType,
+          searchValue:this.queryParams.searchValue,
+          beginTime:this.dateRange[0]?this.dateRange[0]:'',
+          endTime:this.dateRange[1]?this.dateRange[1]:'',
+        }).then(response => {
+          this.$set(this,'correlationNum',response.data.total>999?' 999+':(response.data.total<1?'':' '+response.data.total));
+        });
+      },
+      //与我相关按钮
+      topRightClickType(){
+        this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
+        this.handleQuery();
+      },
       //开关详情页面
       addDialogOpen(type,data){
         if(this.infoDialogType != type){
@@ -151,6 +189,7 @@
         }else{
           obj.endTime = "";
         }
+        this.getCorrelationNum();
         unableRectifyList(obj).then(response => {
           this.total = response.data.total;
           this.tableList = response.data.records;
@@ -171,6 +210,7 @@
           hazardType:1,
           searchValue:"",
           checkTimeOrder:"",
+          myRelated:1,
         });
         this.handleQuery();
       },
@@ -188,26 +228,73 @@
       padding-top:20px;
       .form-button-max-big-box{
         display: inline-block;
+        margin-left:10px;
         .form-button-big-box{
           display: flex;
+          p:nth-child(1){
+            border-top-left-radius: 4px;
+            border-bottom-left-radius: 4px;
+            border-top:1px solid #E0E0E0;
+            border-bottom:1px solid #E0E0E0;
+          }
+          p:nth-child(2){
+            border-top-right-radius: 4px;
+            border-bottom-right-radius: 4px;
+            border-top:1px solid #E0E0E0;
+            border-bottom:1px solid #E0E0E0;
+            border-right:1px solid #E0E0E0;
+          }
+          p{
+            height:40px;
+            width:100px;
+            line-height: 40px;
+            text-align: center;
+            color:#666666;
+            font-size:14px;
+            font-weight:500;
+            cursor: pointer;
+            border-left:1px solid #E0E0E0;
+          }
+          .checkDiv{
+            color:#fff!important;
+            border:1px solid #0183FA!important;
+            background-color: #0183FA;
+          }
+        }
+      }
+      .form-button-max-big-box-me{
+        display: inline-block;
+        .form-button-big-box-me{
+          display: flex;
           div{
             position: relative;
             height:40px;
-            width:100px;
+            width:130px;
             line-height: 40px;
             text-align: center;
-            color:#0045AF;
+            color:#999;
             font-size:14px;
-            border:1px solid #0045AF;
+            border:1px solid #999;
             border-radius:4px;
             margin-left:10px;
             font-weight:500;
             cursor: pointer;
+            .icon-p-me{
+              width:15px;
+              height:15px;
+              line-height:15px;
+              text-align: center;
+              position: absolute;
+              right:0;
+              bottom:0;
+              color:#fff;
+              background: #0183fa;
+              border-top-left-radius:4px;
+            }
           }
-          .checkDiv{
-            color:#fff;
-            background-color:#0045AF;
-            border:1px solid #0045AF;
+          .checkDiv-me{
+            color:#0183FA!important;
+            border:1px solid #0183FA!important;
           }
         }
       }

+ 96 - 18
src/views/safetyCheck/safetyHazard/departmentListPage.vue

@@ -6,17 +6,17 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
           <div class="form-button-max-big-box">
             <div class="form-button-big-box" style="margin-left:10px;">
-              <div :class="queryParams.rectifyStatus==2?'checkDiv':''" @click="topLeftClickType(2)">
-                <p class="text-p">待整改</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus==2"></p>
-              </div>
-              <div :class="queryParams.rectifyStatus==3?'checkDiv':''" @click="topLeftClickType(3)">
-                <p class="text-p">待复核</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus==3"></p>
-              </div>
-              <div :class="queryParams.rectifyStatus==1?'checkDiv':''" @click="topLeftClickType(1)">
-                <p class="text-p">已完成</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus==1"></p>
+              <p class="text-p" :class="queryParams.rectifyStatus=='2'?'checkDiv':''" @click="topLeftClickType('2')">待整改</p>
+              <p class="text-p" :class="queryParams.rectifyStatus=='3'?'checkDiv':''" @click="topLeftClickType('3')">待复核</p>
+              <p class="text-p" :class="queryParams.rectifyStatus=='1'?'checkDiv':''" @click="topLeftClickType('1')">已完成</p>
+            </div>
+          </div>
+          <!--与我相关-->
+          <div class="form-button-max-big-box-me">
+            <div class="form-button-big-box-me">
+              <div :class="queryParams.myRelated==1?'checkDiv-me':''" @click="topRightClickType">
+                <p class="text-p-me">与我有关{{correlationNum}}</p>
+                <p class="el-icon-check icon-p-me" v-if="queryParams.myRelated==1"></p>
               </div>
             </div>
           </div>
@@ -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">
@@ -146,11 +156,13 @@
           searchValue:"",
           checkTimeOrder:"",
           zgTimeOrder:"",
-          zgTermOrder:""
+          zgTermOrder:"",
+          myRelated:1,
         },
         dateRange:[],
         tableList:[],
         total:0,
+        correlationNum:'',
       }
     },
     created(){},
@@ -158,6 +170,30 @@
       this.getList();
     },
     methods:{
+      //获取相关数量
+      getCorrelationNum(){
+        rectifyList({
+          pageNum:1,
+          pageSize:20,
+          hazardType:2,
+          checkTimeOrder:"",
+          zgTimeOrder:"",
+          zgTermOrder:"",
+          myRelated:1,
+          rectifyStatus:this.queryParams.rectifyStatus,
+          examineResult:this.queryParams.examineResult,
+          searchValue:this.queryParams.searchValue,
+          beginTime:this.dateRange[0]?this.dateRange[0]:'',
+          endTime:this.dateRange[1]?this.dateRange[1]:'',
+        }).then(response => {
+          this.$set(this,'correlationNum',response.data.total>999?' 999+':(response.data.total<1?'':' '+response.data.total));
+        });
+      },
+      //与我相关按钮
+      topRightClickType(){
+        this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
+        this.handleQuery();
+      },
       //开关详情页面
       addDialogOpen(type,data){
         if(this.infoDialogType != type){
@@ -229,6 +265,7 @@
         }else{
           obj.endTime = "";
         }
+        this.getCorrelationNum();
         if(this.queryParams.rectifyStatus == 2){
           rectifyList(obj).then(response => {
             this.total = response.data.total;
@@ -263,7 +300,8 @@
           searchValue:"",
           checkTimeOrder:"",
           zgTimeOrder:"",
-          zgTermOrder:""
+          zgTermOrder:"",
+          myRelated:1,
         });
         this.handleQuery();
       },
@@ -286,12 +324,52 @@
         padding-top:20px;
         .form-button-max-big-box{
           display: inline-block;
+          margin-left:10px;
           .form-button-big-box{
             display: flex;
+            p:nth-child(1){
+              border-top-left-radius: 4px;
+              border-bottom-left-radius: 4px;
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(2){
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(3){
+              border-top-right-radius: 4px;
+              border-bottom-right-radius: 4px;
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+              border-right:1px solid #E0E0E0;
+            }
+            p{
+              height:40px;
+              width:80px;
+              line-height: 40px;
+              text-align: center;
+              color:#666666;
+              font-size:14px;
+              font-weight:500;
+              cursor: pointer;
+              border-left:1px solid #E0E0E0;
+            }
+            .checkDiv{
+              color:#fff!important;
+              border:1px solid #0183FA!important;
+              background-color: #0183FA;
+            }
+          }
+        }
+        .form-button-max-big-box-me{
+          display: inline-block;
+          .form-button-big-box-me{
+            display: flex;
             div{
               position: relative;
               height:40px;
-              width:80px;
+              width:130px;
               line-height: 40px;
               text-align: center;
               color:#999;
@@ -301,7 +379,7 @@
               margin-left:10px;
               font-weight:500;
               cursor: pointer;
-              .icon-p{
+              .icon-p-me{
                 width:15px;
                 height:15px;
                 line-height:15px;
@@ -314,9 +392,9 @@
                 border-top-left-radius:4px;
               }
             }
-            .checkDiv{
-              color:#0183FA;
-              border:1px solid #0183FA;
+            .checkDiv-me{
+              color:#0183FA!important;
+              border:1px solid #0183FA!important;
             }
           }
         }

+ 96 - 18
src/views/safetyCheck/safetyHazard/schoolListPage.vue

@@ -6,17 +6,17 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
           <div class="form-button-max-big-box">
             <div class="form-button-big-box" style="margin-left:10px;">
-              <div :class="queryParams.rectifyStatus==2?'checkDiv':''" @click="topLeftClickType(2)">
-                <p class="text-p">待整改</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus==2"></p>
-              </div>
-              <div :class="queryParams.rectifyStatus==3?'checkDiv':''" @click="topLeftClickType(3)">
-                <p class="text-p">待复核</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus==3"></p>
-              </div>
-              <div :class="queryParams.rectifyStatus==1?'checkDiv':''" @click="topLeftClickType(1)">
-                <p class="text-p">已完成</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus==1"></p>
+              <p class="text-p" :class="queryParams.rectifyStatus=='2'?'checkDiv':''" @click="topLeftClickType('2')">待整改</p>
+              <p class="text-p" :class="queryParams.rectifyStatus=='3'?'checkDiv':''" @click="topLeftClickType('3')">待复核</p>
+              <p class="text-p" :class="queryParams.rectifyStatus=='1'?'checkDiv':''" @click="topLeftClickType('1')">已完成</p>
+            </div>
+          </div>
+          <!--与我相关-->
+          <div class="form-button-max-big-box-me">
+            <div class="form-button-big-box-me">
+              <div :class="queryParams.myRelated==1?'checkDiv-me':''" @click="topRightClickType">
+                <p class="text-p-me">与我有关{{correlationNum}}</p>
+                <p class="el-icon-check icon-p-me" v-if="queryParams.myRelated==1"></p>
               </div>
             </div>
           </div>
@@ -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">
@@ -146,11 +156,13 @@
           searchValue:"",
           checkTimeOrder:"",
           zgTimeOrder:"",
-          zgTermOrder:""
+          zgTermOrder:"",
+          myRelated:1,
         },
         dateRange:[],
         tableList:[],
         total:0,
+        correlationNum:'',
       }
     },
     created(){},
@@ -158,6 +170,30 @@
       this.getList();
     },
     methods:{
+      //获取相关数量
+      getCorrelationNum(){
+        rectifyList({
+          pageNum:1,
+          pageSize:20,
+          hazardType:1,
+          checkTimeOrder:"",
+          zgTimeOrder:"",
+          zgTermOrder:"",
+          myRelated:1,
+          rectifyStatus:this.queryParams.rectifyStatus,
+          examineResult:this.queryParams.examineResult,
+          searchValue:this.queryParams.searchValue,
+          beginTime:this.dateRange[0]?this.dateRange[0]:'',
+          endTime:this.dateRange[1]?this.dateRange[1]:'',
+        }).then(response => {
+          this.$set(this,'correlationNum',response.data.total>999?' 999+':(response.data.total<1?'':' '+response.data.total));
+        });
+      },
+      //与我相关按钮
+      topRightClickType(){
+        this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
+        this.handleQuery();
+      },
       //开关详情页面
       addDialogOpen(type,data){
         if(this.infoDialogType != type){
@@ -229,6 +265,7 @@
         }else{
           obj.endTime = "";
         }
+        this.getCorrelationNum();
         if(this.queryParams.rectifyStatus == 2){
           rectifyList(obj).then(response => {
             this.total = response.data.total;
@@ -263,7 +300,8 @@
           searchValue:"",
           checkTimeOrder:"",
           zgTimeOrder:"",
-          zgTermOrder:""
+          zgTermOrder:"",
+          myRelated:1,
         });
         this.handleQuery();
       },
@@ -286,12 +324,52 @@
         padding-top:20px;
         .form-button-max-big-box{
           display: inline-block;
+          margin-left:10px;
           .form-button-big-box{
             display: flex;
+            p:nth-child(1){
+              border-top-left-radius: 4px;
+              border-bottom-left-radius: 4px;
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(2){
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(3){
+              border-top-right-radius: 4px;
+              border-bottom-right-radius: 4px;
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+              border-right:1px solid #E0E0E0;
+            }
+            p{
+              height:40px;
+              width:80px;
+              line-height: 40px;
+              text-align: center;
+              color:#666666;
+              font-size:14px;
+              font-weight:500;
+              cursor: pointer;
+              border-left:1px solid #E0E0E0;
+            }
+            .checkDiv{
+              color:#fff!important;
+              border:1px solid #0183FA!important;
+              background-color: #0183FA;
+            }
+          }
+        }
+        .form-button-max-big-box-me{
+          display: inline-block;
+          .form-button-big-box-me{
+            display: flex;
             div{
               position: relative;
               height:40px;
-              width:80px;
+              width:130px;
               line-height: 40px;
               text-align: center;
               color:#999;
@@ -301,7 +379,7 @@
               margin-left:10px;
               font-weight:500;
               cursor: pointer;
-              .icon-p{
+              .icon-p-me{
                 width:15px;
                 height:15px;
                 line-height:15px;
@@ -314,9 +392,9 @@
                 border-top-left-radius:4px;
               }
             }
-            .checkDiv{
-              color:#0183FA;
-              border:1px solid #0183FA;
+            .checkDiv-me{
+              color:#0183FA!important;
+              border:1px solid #0183FA!important;
             }
           }
         }

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

+ 88 - 31
src/views/safetyCheck/schoolInspection/inspectionManagement/index.vue

@@ -6,21 +6,18 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
           <div class="form-button-max-big-box">
             <div class="form-button-big-box" style="margin-left:10px;">
-              <div :class="queryParams.manageStatus=='-1'?'checkDiv':''" @click="topLeftClickType('-1')">
-                <p class="text-p">全部</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus=='-1'"></p>
-              </div>
-              <div :class="queryParams.manageStatus==0?'checkDiv':''" @click="topLeftClickType(0)">
-                <p class="text-p">待检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus==0"></p>
-              </div>
-              <div :class="queryParams.manageStatus==1?'checkDiv':''" @click="topLeftClickType(1)">
-                <p class="text-p">检查中</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus==1"></p>
-              </div>
-              <div :class="queryParams.manageStatus==2?'checkDiv':''" @click="topLeftClickType(2)">
-                <p class="text-p">已检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus==2"></p>
+              <p class="text-p" :class="queryParams.manageStatus=='-1'?'checkDiv':''" @click="topLeftClickType('-1')">全部</p>
+              <p class="text-p" :class="queryParams.manageStatus=='0'?'checkDiv':''" @click="topLeftClickType('0')">待检查</p>
+              <p class="text-p" :class="queryParams.manageStatus=='1'?'checkDiv':''" @click="topLeftClickType('1')">检查中</p>
+              <p class="text-p" :class="queryParams.manageStatus=='2'?'checkDiv':''" @click="topLeftClickType('2')">已检查</p>
+            </div>
+          </div>
+          <!--与我相关-->
+          <div class="form-button-max-big-box-me">
+            <div class="form-button-big-box-me">
+              <div :class="queryParams.myRelated==1?'checkDiv-me':''" @click="topRightClickType">
+                <p class="text-p-me">与我相关{{correlationNum}}</p>
+                <p class="el-icon-check icon-p-me" v-if="queryParams.myRelated==1"></p>
               </div>
             </div>
           </div>
@@ -60,14 +57,6 @@
             <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
             <p class="reset-button-one" @click="resetQuery">重置</p>
           </el-form-item>
-          <div class="form-button-max-big-box">
-            <div class="form-button-big-box">
-              <div :class="queryParams.isSelf==1?'checkDiv':''" style="width:100px;" @click="topRightClickType">
-                <p class="text-p">本人发起</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.isSelf==1"></p>
-              </div>
-            </div>
-          </div>
         </el-form>
       </div>
       <div class="content-box">
@@ -78,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>
@@ -167,12 +161,12 @@
           checkTimeSort:0,
           searchValue:"",
           deptId:"",
-          isSelf:0,
           myRelated:1,
         },
         dateRange:[],
         tableList:[],
         total:0,
+        correlationNum:'',
       }
     },
     created(){
@@ -185,6 +179,23 @@
       this.getList();
     },
     methods:{
+      //获取相关数量
+      getCorrelationNum(){
+        checkManageList({
+          pageNum:1,
+          pageSize:20,
+          checkType:1,
+          checkTimeSort:0,
+          myRelated:1,
+          manageStatus:this.queryParams.manageStatus,
+          searchValue:this.queryParams.searchValue,
+          deptId:this.queryParams.deptId,
+          startTime:this.dateRange[0]?this.dateRange[0]:'',
+          endTime:this.dateRange[1]?this.dateRange[1]:'',
+        }).then(response => {
+          this.$set(this,'correlationNum',response.data.total>999?' 999+':(response.data.total<1?'':' '+response.data.total));
+        });
+      },
       //开始检查
       goAddPage(type,id){
         if(this.pageType != type){
@@ -223,8 +234,9 @@
           this.handleQuery();
         }
       },
+      //与我相关按钮
       topRightClickType(){
-        this.$set(this.queryParams,'isSelf',this.queryParams.isSelf==1?0:1);
+        this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
         this.handleQuery();
       },
       //获取数据列表
@@ -240,6 +252,7 @@
         }else{
           obj.endTime = "";
         }
+        this.getCorrelationNum();
         checkManageList(obj).then(response => {
           this.total = response.data.total;
           this.tableList = response.data.records;
@@ -261,7 +274,7 @@
           checkTimeSort:0,
           searchValue:"",
           deptId:"",
-          isSelf:0,
+          myRelated:1,
         });
         this.handleQuery();
       },
@@ -339,12 +352,56 @@
         border-bottom:1px solid #dedede;
         .form-button-max-big-box{
           display: inline-block;
+          margin-left:10px;
           .form-button-big-box{
             display: flex;
+            p:nth-child(1){
+              border-top-left-radius: 4px;
+              border-bottom-left-radius: 4px;
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(2){
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(3){
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(4){
+              border-top-right-radius: 4px;
+              border-bottom-right-radius: 4px;
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+              border-right:1px solid #E0E0E0;
+            }
+            p{
+              height:40px;
+              width:80px;
+              line-height: 40px;
+              text-align: center;
+              color:#666666;
+              font-size:14px;
+              font-weight:500;
+              cursor: pointer;
+              border-left:1px solid #E0E0E0;
+            }
+            .checkDiv{
+              color:#fff!important;
+              border:1px solid #0183FA!important;
+              background-color: #0183FA;
+            }
+          }
+        }
+        .form-button-max-big-box-me{
+          display: inline-block;
+          .form-button-big-box-me{
+            display: flex;
             div{
               position: relative;
               height:40px;
-              width:80px;
+              width:130px;
               line-height: 40px;
               text-align: center;
               color:#999;
@@ -354,7 +411,7 @@
               margin-left:10px;
               font-weight:500;
               cursor: pointer;
-              .icon-p{
+              .icon-p-me{
                 width:15px;
                 height:15px;
                 line-height:15px;
@@ -367,9 +424,9 @@
                 border-top-left-radius:4px;
               }
             }
-            .checkDiv{
-              color:#0183FA;
-              border:1px solid #0183FA;
+            .checkDiv-me{
+              color:#0183FA!important;
+              border:1px solid #0183FA!important;
             }
           }
         }

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


+ 92 - 22
src/views/safetyCheck/schoolInspection/inspectionPlan/index.vue

@@ -6,21 +6,18 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
           <div class="form-button-max-big-box">
             <div class="form-button-big-box" style="margin-left:10px;">
-              <div :class="queryParams.checkStatus==0?'checkDiv':''" @click="topLeftClickType(0)">
-                <p class="text-p">全部</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==0"></p>
-              </div>
-              <div :class="queryParams.checkStatus==1?'checkDiv':''" @click="topLeftClickType(1)">
-                <p class="text-p">未开始</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==1"></p>
-              </div>
-              <div :class="queryParams.checkStatus==2?'checkDiv':''" @click="topLeftClickType(2)">
-                <p class="text-p">进行中</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==2"></p>
-              </div>
-              <div :class="queryParams.checkStatus==3?'checkDiv':''" @click="topLeftClickType(3)">
-                <p class="text-p">已结束</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==3"></p>
+              <p class="text-p" :class="queryParams.checkStatus=='0'?'checkDiv':''" @click="topLeftClickType('0')">全部</p>
+              <p class="text-p" :class="queryParams.checkStatus=='1'?'checkDiv':''" @click="topLeftClickType('1')">未开始</p>
+              <p class="text-p" :class="queryParams.checkStatus=='2'?'checkDiv':''" @click="topLeftClickType('2')">进行中</p>
+              <p class="text-p" :class="queryParams.checkStatus=='3'?'checkDiv':''" @click="topLeftClickType('3')">已结束</p>
+            </div>
+          </div>
+          <!--与我相关-->
+          <div class="form-button-max-big-box-me">
+            <div class="form-button-big-box-me">
+              <div :class="queryParams.myRelated==1?'checkDiv-me':''" @click="topRightClickType">
+                <p class="text-p-me">与我有关{{correlationNum}}</p>
+                <p class="el-icon-check icon-p-me" v-if="queryParams.myRelated==1"></p>
               </div>
             </div>
           </div>
@@ -69,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>
@@ -89,11 +91,11 @@
                 <p class="table-button-p" v-hasPermi="['security:checkPlan:query']"
                    v-show="scope.row.checkStatus!=1" @click="addDialogOpen(3,scope.row)">详情</p>
                 <p class="table-button-p" v-hasPermiAnd="['security:checkPlan:query','security:checkPlan:edit']"
-                   v-show="scope.row.checkStatus==1" @click="addDialogOpen(2,scope.row)">编辑</p>
+                   v-show="scope.row.checkStatus==1&&scope.row.isSelfData == 1" @click="addDialogOpen(2,scope.row)">编辑</p>
                 <p class="table-button-p" v-hasPermi="['security:checkManage_2:list']"
                    @click="goPage(2,scope.row)">巡查管理</p>
                 <p class="table-button-p" v-hasPermi="['security:checkPlan:remove']"
-                   v-show="scope.row.checkStatus==1" @click="deleteObj(scope.row)">删除</p>
+                   v-show="scope.row.checkStatus==1&&scope.row.isSelfData == 1" @click="deleteObj(scope.row)">删除</p>
                 <p class="table-button-p" v-show="scope.row.isAttachment == 1" @click="lookDocumentListButton(1,scope.row)">查看附件</p>
                 <p class="table-button-null"></p>
               </div>
@@ -148,6 +150,7 @@
         dateRange:[],
         tableList:[],
         total:0,
+        correlationNum:'',
       }
     },
     created(){
@@ -157,6 +160,27 @@
       this.getList();
     },
     methods:{
+      //获取相关数量
+      getCorrelationNum(){
+        checkPlanList({
+          pageNum:1,
+          pageSize:20,
+          createTimeSort:0,
+          checkType:1,
+          myRelated:1,
+          checkStatus:this.queryParams.checkStatus,
+          searchValue:this.queryParams.searchValue,
+          cycleStartTime:this.dateRange[0]?this.dateRange[0]:'',
+          cycleEndTime:this.dateRange[1]?this.dateRange[1]:'',
+        }).then(response => {
+          this.$set(this,'correlationNum',response.data.total>999?' 999+':(response.data.total<1?'':' '+response.data.total));
+        });
+      },
+      //与我相关按钮
+      topRightClickType(){
+        this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
+        this.handleQuery();
+      },
       //切换页面
       goPage(type,data){
         if(this.pageType != type){
@@ -230,6 +254,7 @@
         }else{
           obj.cycleEndTime = "";
         }
+        this.getCorrelationNum();
         checkPlanList(obj).then(response => {
           this.total = response.data.total;
           this.tableList = response.data.records;
@@ -250,6 +275,7 @@
           createTimeSort:0,
           searchValue:"",
           checkType:1,
+          myRelated:1,
         });
         this.handleQuery();
       },
@@ -310,12 +336,56 @@
         border-bottom:1px solid #dedede;
         .form-button-max-big-box{
           display: inline-block;
+          margin-left:10px;
           .form-button-big-box{
             display: flex;
+            p:nth-child(1){
+              border-top-left-radius: 4px;
+              border-bottom-left-radius: 4px;
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(2){
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(3){
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(4){
+              border-top-right-radius: 4px;
+              border-bottom-right-radius: 4px;
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+              border-right:1px solid #E0E0E0;
+            }
+            p{
+              height:40px;
+              width:80px;
+              line-height: 40px;
+              text-align: center;
+              color:#666666;
+              font-size:14px;
+              font-weight:500;
+              cursor: pointer;
+              border-left:1px solid #E0E0E0;
+            }
+            .checkDiv{
+              color:#fff!important;
+              border:1px solid #0183FA!important;
+              background-color: #0183FA;
+            }
+          }
+        }
+        .form-button-max-big-box-me{
+          display: inline-block;
+          .form-button-big-box-me{
+            display: flex;
             div{
               position: relative;
               height:40px;
-              width:80px;
+              width:130px;
               line-height: 40px;
               text-align: center;
               color:#999;
@@ -325,7 +395,7 @@
               margin-left:10px;
               font-weight:500;
               cursor: pointer;
-              .icon-p{
+              .icon-p-me{
                 width:15px;
                 height:15px;
                 line-height:15px;
@@ -338,9 +408,9 @@
                 border-top-left-radius:4px;
               }
             }
-            .checkDiv{
-              color:#0183FA;
-              border:1px solid #0183FA;
+            .checkDiv-me{
+              color:#0183FA!important;
+              border:1px solid #0183FA!important;
             }
           }
         }

+ 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>

+ 97 - 30
src/views/safetyCheck/snapshotManagement/index.vue

@@ -2,24 +2,21 @@
   <div class="app-container snapshotManagement">
     <div class="snapshotManagement-page" v-if="pageType == 1">
       <div class="title-box">
-        <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
+        <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="70px">
           <div class="form-button-max-big-box">
             <div class="form-button-big-box" style="margin-left:10px;">
-              <div :class="queryParams.rectifyStatus===''?'checkDiv':''" @click="topLeftClickType('')">
-                <p class="text-p">全部</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===''"></p>
-              </div>
-              <div :class="queryParams.rectifyStatus===0?'checkDiv':''" @click="topLeftClickType(0)">
-                <p class="text-p">待整改</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===0"></p>
-              </div>
-              <div :class="queryParams.rectifyStatus===1?'checkDiv':''" @click="topLeftClickType(1)">
-                <p class="text-p">已整改</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===1"></p>
-              </div>
-              <div :class="queryParams.rectifyStatus===2?'checkDiv':''" @click="topLeftClickType(2)">
-                <p class="text-p">暂无法整改</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus===2"></p>
+              <p class="text-p" :class="queryParams.rectifyStatus==''?'checkDiv':''" @click="topLeftClickType('')">全部</p>
+              <p class="text-p" :class="queryParams.rectifyStatus=='0'?'checkDiv':''" @click="topLeftClickType('0')">待整改</p>
+              <p class="text-p" :class="queryParams.rectifyStatus=='1'?'checkDiv':''" @click="topLeftClickType('1')">已整改</p>
+              <p class="text-p" :class="queryParams.rectifyStatus=='2'?'checkDiv':''" @click="topLeftClickType('2')">暂无法整改</p>
+            </div>
+          </div>
+          <!--与我相关-->
+          <div class="form-button-max-big-box-me">
+            <div class="form-button-big-box-me">
+              <div :class="queryParams.myRelated==1?'checkDiv-me':''" @click="topRightClickType">
+                <p class="text-p-me">与我有关{{correlationNum}}</p>
+                <p class="el-icon-check icon-p-me" v-if="queryParams.myRelated==1"></p>
               </div>
             </div>
           </div>
@@ -31,8 +28,8 @@
               clearable
               style="width: 180px"/>
           </el-form-item>
-          <el-form-item label="学院" prop="deptId" label-width="50px">
-            <el-select v-model="queryParams.deptId" clearable placeholder="学院" style="width: 150px">
+          <el-form-item label="学院" prop="deptId" label-width="40px">
+            <el-select v-model="queryParams.deptId" clearable placeholder="学院" style="width: 130px">
               <el-option
                 v-for="item in deptSelectList"
                 :key="item.deptId"
@@ -41,7 +38,7 @@
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="上报时间" prop="dateRange" style="margin-left:10px;" label-width="70px">
+          <el-form-item label="上报时间" prop="dateRange"  label-width="70px">
             <el-date-picker
               :clearable="false"
               v-model="dateRange"
@@ -61,15 +58,15 @@
           <el-form-item style="float: right;" v-hasPermi="['safety:rectifyClap:add']">
             <el-col :span="1.5">
               <p class="inquire-button-one"
-                 style="width:100px;margin-right:0;"
+                 style="width:70px;margin-right:0;"
                  @click="addButton"
-              ><i class="el-icon-plus"></i> 随手拍</p>
+              >随手拍</p>
             </el-col>
           </el-form-item>
           <el-form-item style="float: right;">
             <el-col :span="1.5">
               <p class="add-button-one-90"
-                 style="width:100px;"
+                 style="width:80px;"
                  @click="goPage(2)"
               >上报记录</p>
             </el-col>
@@ -194,7 +191,7 @@
 
 <script>
   import { securityCheckClapList,checkClapAdd } from '@/api/safetyCheck/index'
-  import { getNoAdminSubjectListNopage } from "@/api/laboratory/subject";
+  import { getSubjectDictByViolation } from "@/api/laboratory/violation";
   import { listDepartments } from "@/api/system/dept";
   import listPage from './listPage.vue'
   import infoPage from './infoPage.vue'
@@ -222,10 +219,12 @@
           rectifyStatus:'',
           upTimeOrder:"",
           zgTimeOrder:"",
+          myRelated:1,
         },
         dateRange:[],
         tableList:[],
         total:0,
+        correlationNum:'',
         //新增窗口
         addDialogType:false,
         addDialogForm:{
@@ -264,6 +263,28 @@
       this.getList();
     },
     methods:{
+      //获取相关数量
+      getCorrelationNum(){
+        securityCheckClapList({
+          pageNum:1,
+          pageSize:20,
+          upTimeOrder:"",
+          zgTimeOrder:"",
+          myRelated:1,
+          deptId:this.queryParams.deptId,
+          searchValue:this.queryParams.searchValue,
+          rectifyStatus:this.queryParams.rectifyStatus,
+          beginTime:this.dateRange[0]?this.dateRange[0]:'',
+          endTime:this.dateRange[1]?this.dateRange[1]:'',
+        }).then(response => {
+          this.$set(this,'correlationNum',response.data.total>999?' 999+':(response.data.total<1?'':' '+response.data.total));
+        });
+      },
+      //与我相关按钮
+      topRightClickType(){
+        this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
+        this.handleQuery();
+      },
       goPage(type,data){
         if(this.pageType != type){
           if (type==1){
@@ -311,6 +332,7 @@
         }else{
           obj.endTime = ""
         }
+        this.getCorrelationNum();
         securityCheckClapList(obj).then(response => {
           this.total = response.data.total;
           this.tableList = response.data.records;
@@ -332,6 +354,7 @@
           rectifyStatus:'',
           upTimeOrder:"",
           zgTimeOrder:"",
+          myRelated:1,
         });
         this.handleQuery();
       },
@@ -413,7 +436,7 @@
         let obj = {
           deptId:val,
         }
-        getNoAdminSubjectListNopage(obj).then(response => {
+        getSubjectDictByViolation(obj).then(response => {
           this.$set(this,'dialogSubListData',response.data);
           this.$set(this,'dialogSubList',response.data);
           for(let i=0;i<self.deptSelectList.length;i++){
@@ -471,22 +494,66 @@
         border-bottom:1px solid #dedede;
         .form-button-max-big-box{
           display: inline-block;
+          margin-left:10px;
           .form-button-big-box{
             display: flex;
+            p:nth-child(1){
+              border-top-left-radius: 4px;
+              border-bottom-left-radius: 4px;
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(2){
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(3){
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+            }
+            p:nth-child(4){
+              border-top-right-radius: 4px;
+              border-bottom-right-radius: 4px;
+              border-top:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+              border-right:1px solid #E0E0E0;
+            }
+            p{
+              height:40px;
+              width:80px;
+              line-height: 40px;
+              text-align: center;
+              color:#666666;
+              font-size:14px;
+              font-weight:500;
+              cursor: pointer;
+              border-left:1px solid #E0E0E0;
+            }
+            .checkDiv{
+              color:#fff!important;
+              border:1px solid #0183FA!important;
+              background-color: #0183FA;
+            }
+          }
+        }
+        .form-button-max-big-box-me{
+          margin-left:10px;
+          display: inline-block;
+          .form-button-big-box-me{
+            display: flex;
             div{
               position: relative;
               height:40px;
-              width:80px;
+              width:130px;
               line-height: 40px;
               text-align: center;
               color:#999;
               font-size:14px;
               border:1px solid #999;
               border-radius:4px;
-              margin-left:10px;
               font-weight:500;
               cursor: pointer;
-              .icon-p{
+              .icon-p-me{
                 width:15px;
                 height:15px;
                 line-height:15px;
@@ -499,9 +566,9 @@
                 border-top-left-radius:4px;
               }
             }
-            .checkDiv{
-              color:#0183FA;
-              border:1px solid #0183FA;
+            .checkDiv-me{
+              color:#0183FA!important;
+              border:1px solid #0183FA!important;
             }
           }
         }

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

@@ -19,7 +19,7 @@
                 </el-select>
               </el-form-item>
               <el-form-item label="楼栋" prop="buildId">
-                <el-select v-model="addForm.buildId" placeholder="请选择学院"
+                <el-select disabled v-model="addForm.buildId" placeholder="请选择学院"
                            @change="buildingsChange" style="width: 500px">
                   <el-option
                     v-for="item in buildingsSelectList"
@@ -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="请选择检查项"
@@ -156,7 +170,7 @@
                       <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>
+                  <p class="hazard-check-count-p" v-if="item.hazardCheckCount>0">此检查项在当前实验室累计出现 <span>{{item.hazardCheckCount}}</span> 次隐患</p>
                 </el-form-item>
                 <el-form-item label="检查要点" label-width="123px">
                   <el-input
@@ -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,index,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="item2.hazardCheckCount>0">此检查项在当前实验室累计出现 <span>{{item2.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,59 @@
         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,index2){
         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.addForm.checkHazardDtoList[index],'hazardCheckCount',response.data);
+          })
+        }else if(this.addForm.checkCategory==2){//专项检查
+          if(!obj){
+            this.$set(this.addForm.checkHazardInfoVoList[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.addForm.checkHazardInfoVoList[index].checkHazardDtoList[index2],'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 +1211,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 +1397,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;

+ 6 - 7
src/views/safetyCheck/worktable/toDoListBox.vue

@@ -25,8 +25,7 @@
       <div  class="for-list-box"
             v-for="(item,index) in tableList" :key="index">
         <div class="for-name-box">
-          <p class="name-p" v-if="queryParams.manageStatus != 2">{{item.subjectName}}-{{item.roomNumber}}</p>
-          <p class="name-p" v-if="queryParams.manageStatus == 2">{{item.subRoom}}</p>
+          <p class="name-p">{{item.subjectName}}-{{item.roomNumber}}</p>
           <p class="type-p" v-if="item.isOverdue == 1">已逾期</p>
           <p class="null-p"></p>
           <img v-if="item.isAttachment == 1" @click="lookDocumentListButton(1,item)"
@@ -42,10 +41,10 @@
         </div>
         <div class="for-time-box">
           <p>计划周期:{{item.cycleStartTime}} 至 {{item.cycleEndTime}}</p>
-          <p v-if="queryParams.manageStatus == 0 && item.isCheck == 1" @click="goPage(item)">开始检查</p>
-          <p v-if="queryParams.manageStatus == 0 && item.isCheck != 1" class="noButton" @click="goPage(item)">计划未开始</p>
-          <p v-if="queryParams.manageStatus == 1" @click="goPage(item)">编辑</p>
-          <p v-if="queryParams.manageStatus == 2 && item.applyGentle" @click="addDialogOpen(true,item)">复核</p>
+          <p v-if="item.manageStatus == 0 && item.checkIsStatus" @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>
         <img class="position-img" v-if="item.checkRange == 1" src="@/assets/ZDimages/safetyCheck/icon_xyxc_qx.png">
         <img class="position-img" v-if="item.checkRange == 2" src="@/assets/ZDimages/safetyCheck/icon_xyxc_xy.png">
@@ -155,7 +154,7 @@
         if(this.infoDialogType != type){
           if(type){
             let obj = {
-              id:data.id
+              id:data.hazardId
             }
             this.$set(this,'propsInfoDialogData',obj);
             this.$set(this,'infoDialogType',type);