heyang 1 rok pred
rodič
commit
fda0f13a03
22 zmenil súbory, kde vykonal 1611 pridanie a 4042 odobranie
  1. 16 16
      src/views/safetyCheck/checkItemLibrary/index.vue
  2. 50 244
      src/views/safetyCheck/components/addPage/addPage.vue
  3. 2 3
      src/views/safetyCheck/components/infoDialog/infoDialog.vue
  4. 3 207
      src/views/safetyCheck/components/infoPage/infoPage.vue
  5. 1 3
      src/views/safetyCheck/dataStatistics/checkIndexStatistics.vue
  6. 1 8
      src/views/safetyCheck/dataStatistics/index.vue
  7. 0 333
      src/views/safetyCheck/dataStatistics/inspectContent.vue
  8. 0 427
      src/views/safetyCheck/equipmentConfig/index.vue
  9. 0 5
      src/views/safetyCheck/laboratorySelfTest/selfInspectionManagement/index.vue
  10. 6 372
      src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/addDialog.vue
  11. 0 5
      src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/index.vue
  12. 1 11
      src/views/safetyCheck/safetyHazard/cannotListPage.vue
  13. 0 10
      src/views/safetyCheck/safetyHazard/departmentListPage.vue
  14. 0 10
      src/views/safetyCheck/safetyHazard/schoolListPage.vue
  15. 15 0
      src/views/safetyCheck/schoolInspection/inspectionGroup/addDialog.vue
  16. 15 0
      src/views/safetyCheck/schoolInspection/inspectionGroup/index.vue
  17. 0 5
      src/views/safetyCheck/schoolInspection/inspectionManagement/index.vue
  18. 1416 1774
      src/views/safetyCheck/schoolInspection/inspectionPlan/addDialog.vue
  19. 0 5
      src/views/safetyCheck/schoolInspection/inspectionPlan/index.vue
  20. 0 5
      src/views/safetyCheck/schoolInspection/inspectionPlan/listPage.vue
  21. 84 598
      src/views/safetyCheck/startInspection/index.vue
  22. 1 1
      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="240"/>
+        <el-table-column label="序号" prop="code" width="140"/>
         <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 != 4" v-hasPermi="['check:option:add']"
+              <p class="table-button-p" v-if="scope.row.level != 3" 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 || list[i].level == 2){
+          if(list[i].level == 0 || list[i].level == 1){
             self.getCascaderData(list[i].children)
           }else{
             delete list[i].children

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

@@ -24,17 +24,15 @@
             </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="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-form-item label="检查结果" prop="checkResult">
               <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 || addForm.checkCategory==2">
+            <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>
@@ -42,7 +40,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">
@@ -51,7 +49,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 || addForm.checkCategory==2">
+            <el-form-item label="整改期限" prop="rectifyDeadline" v-if="addForm.checkResult === 0">
               <el-date-picker
                 style="width: 450px"
                 v-model="addForm.rectifyDeadline"
@@ -64,8 +62,7 @@
             </el-form-item>
           </div>
         </div>
-        <!--综合检查-->
-        <div class="bottom-form-box" v-if="addForm.checkResult === 0 && addForm.checkCategory==1">
+        <div class="bottom-form-box" v-if="addForm.checkResult === 0">
           <div class="bottom-form-title-box">
             <p>不符合项</p>
             <p>隐患数:{{addForm.checkHazardDtoList.length}}</p>
@@ -92,7 +89,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="请选择检查项"
@@ -135,7 +132,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"
@@ -156,86 +153,6 @@
           </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">
@@ -311,7 +228,7 @@
     },
     created(){
       this.$set(this,'addPageTitle',this.propsAddData.title);
-
+      this.checkOptionList();
       this.findCheckManage();
     },
     mounted(){},
@@ -321,53 +238,19 @@
         this.$refs["addForm"].validate(valid => {
           if (valid) {
             let obj = JSON.parse(JSON.stringify(this.addForm));
-            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 = [];
+            if(obj.checkResult === 0){
+              if(!obj.checkHazardDtoList[0]){
+                this.msgError('请添加隐患检查项')
+                return
               }
-            }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)
-                }
-              }
-              if(checkFlagList.every(item=>{return item==1})){//符合
-                obj.checkResult=1;
-              }else{//不符合
-                obj.checkResult=0;
+              for(let i=0;i<obj.checkHazardDtoList.length;i++){
+                delete obj.checkHazardDtoList[i].lookType
               }
-              obj.checkHazardDtoList=list;
+              obj.dangerNum = obj.checkHazardDtoList.length
+            }else{
+              obj.checkHazardDtoList = [];
             }
+            obj.manageStatus = type
             checkManageUpdate(obj).then(response => {
               this.msgSuccess(response.msg);
               this.$parent.goAddPage(4);
@@ -378,27 +261,13 @@
       //查询详情
       findCheckManage(){
         findCheckManage({id:this.propsAddData.id}).then(response => {
-          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
-                })
-              })
-            }
+          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;
           }
           this.$set(this,'addForm',response.data);
-          this.checkOptionList();//获取检查项
         });
       },
       //返回事件
@@ -406,19 +275,12 @@
         this.$parent.goAddPage(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);
-        }
-
+      delImg(index,imgIndex){
+        this.addForm.checkHazardDtoList[index].uploadDtoList.splice(imgIndex,1);
       },
       //收起/展开
       dataLookButton(item){
         item.lookType = !item.lookType
-
       },
       //检查结果选中
       checkResultChange(val){
@@ -458,33 +320,19 @@
         }).catch(() => {});
       },
       //检查项选中
-      cascaderChange(val,item,index){
+      cascaderChange(val,index){
         let obj = this.getCascaderDataQuery(val,this.options);
-        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);
-          })
+        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);
+        })
       },
       //查看图片
       lookImg(list,index){
@@ -547,47 +395,14 @@
       //联级选择器数据处理
       getCascaderData(list){
         let self = this;
-        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--
-                  }
-                }else{
-                  list.splice(i,1)
-                  i--
-                }
-              }else{
-                list.splice(i,1)
-                i--
-              }
-            }else{
-              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{
+        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--
                   }
@@ -600,13 +415,15 @@
                 i--
               }
             }else{
-              delete list[i].children
+              list.splice(i,1)
+              i--
             }
+          }else{
+            delete list[i].children
           }
         }
-
       },
-      //获取学院列表
+      //联级选择器数据查询
       getCascaderDataQuery(text,list){
         let self = this;
         for(let i=0;i<list.length;i++){
@@ -799,17 +616,6 @@
         }
       }
     }
-    /*专项检查*/
-    .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;

+ 2 - 3
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,8 +120,7 @@
         <p class="table-top-title-p">不符合项</p>
         <div class="info-dialog-content-info-bottom">
           <div class="table-box">
-            <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>
+            <p class="table-title-p">隐患项</p>
             <div class="table-min">
               <div class="left-box">
                 <p></p>

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

@@ -14,9 +14,6 @@
             <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"/>
@@ -47,7 +44,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">
@@ -66,8 +63,7 @@
             </el-form-item>
           </div>
         </div>
-        <!--综合检查-->
-        <div class="bottom-form-box" v-if="addForm.checkResult==0 && addForm.checkCategory==1">
+        <div class="bottom-form-box" v-if="addForm.checkResult==0">
           <div class="bottom-form-title-box">
             <p>不符合项</p>
             <p>隐患数:{{addForm.dangerNum}}</p>
@@ -158,74 +154,6 @@
             </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>
@@ -236,12 +164,11 @@
 </template>
 
 <script>
-import { checkOptionList, findCheckManage, getFindByCheckPlanId } from '@/api/safetyCheck/index'
+  import { 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:{
@@ -255,10 +182,6 @@ import { getToken } from '@/utils/auth'
     },
     data(){
       return{
-        uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
-        headers: {
-          Authorization: "Bearer " + getToken(),
-        },
         //子组件数据
         lookDocumentType:false,
         propsLookDocumentData:{},
@@ -269,26 +192,16 @@ import { getToken } from '@/utils/auth'
         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);
         });
       },
@@ -307,45 +220,6 @@ import { getToken } from '@/utils/auth'
           }
         }
       },
-      //获取检查项
-      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);
@@ -542,18 +416,6 @@ import { getToken } from '@/utils/auth'
           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;
@@ -661,72 +523,6 @@ import { getToken } from '@/utils/auth'
         }
       }
     }
-    .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{

+ 1 - 3
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.level4}},占比 {{numData.percent4}}
+      共搜索到隐患总数 {{numData.sumTotal}},一级指标隐患总数 {{numData.level1}},占比 {{numData.percent1}},二级指标隐患总数 {{numData.level2}},占比 {{numData.percent2}},三级指标隐患总数 {{numData.level3}},占比 {{numData.percent3}}
     </div>
     <el-table  border :data="tableList" ref="multipleTable"
                :row-key="getRowKeys"
@@ -80,8 +80,6 @@
       <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"

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

@@ -13,15 +13,10 @@
         <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>
 
@@ -29,14 +24,12 @@
   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,
-      inspectContent
+      checkIndexStatistics
     },
     data(){
       return{

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

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

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

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

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

@@ -67,11 +67,6 @@
             <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':''))">

+ 6 - 372
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,25 +70,6 @@
               </div>
             </div>
           </el-form-item>
-          <el-form-item label="检查类型:" prop="inspectCategory">
-            <div class="dialog-range-max-box">
-              <div class="dialog-range-select-box">
-                <el-select  :disabled="lookInfoType" @change="inspectCategoryChange"
-                            v-model="dialogForm.checkCategory" placeholder="请选择检查类型" style="width:450px;">
-                  <el-option
-                    v-for="item in inspectCategoryList"
-                    :key="item.id"
-                    :label="item.name"
-                    :value="item.id">
-                  </el-option>
-                </el-select>
-              </div>
-              <div class="dialog-range-text-box" v-if="dialogForm.checkCategory==2">
-                <p class="inquire-button-one button-p"  @click="dialogClickType(6)">选择检查内容</p>
-                <p class="text-p">已选择{{dialogForm.hazardNum}}种</p>
-              </div>
-            </div>
-          </el-form-item>
           <el-form-item label="检查要求:" prop="checkDemand">
             <el-input
               :disabled="lookInfoType"
@@ -406,104 +387,6 @@
         :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>
@@ -518,13 +401,10 @@
   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, findDeviceList,haveHazardInSub
-  } from '@/api/safetyCheck/index'
-  import { dangerList } from '@/api/gasManage3_0/gasManage'
+  import { getHistoryPlanTitles,checkGroupFind,findUserList,
+    getAllSubNum,isSCollege,conditionCollegeInfo,findSubInfoByDeptIds,
+    checkPlanAdd,conditionSubjectInfo,findCheckPlan,checkPlanUpdate,
+    hideHistoryPlanTitle } from '@/api/safetyCheck/index'
   export default {
     name: 'addDialog',
     props:{
@@ -574,11 +454,8 @@
         //提交数据
         dialogForm:{
           title:"",//奥体
-          checkType:"2",//检查组织
+          checkType:"2",//检查类型
           dateRange:[],//时间
-          checkCategory:'1',//检查类型
-          hazardIds:'',//危险源ids
-          hazardNum:'0',// 危险源数量
           checkRange:"",//检查范围
           checkDemand:"",//检查要点
           schoolSubCheckNum:0,//学校实验室数量
@@ -595,9 +472,6 @@
             { 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" },
           ],
@@ -659,35 +533,6 @@
         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:"",
         /*===================================弹窗相关结束===================================*/
@@ -699,8 +544,6 @@
     },
     mounted(){
       this.initializationInterface();
-      this.dangerList();
-      this.deviceGetList();//查询所有设备
     },
     methods:{
       //初始化接口
@@ -737,9 +580,6 @@
               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,
@@ -766,10 +606,6 @@
           });
         }
       },
-      //选中检查类型
-      inspectCategoryChange(val){
-
-      },
       //选中检查范围
       rangeChange(val){
         if(val == 1){
@@ -798,21 +634,11 @@
                   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:(
@@ -867,29 +693,6 @@
           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);
-            }
-          });
         }
       },
       /*===================================弹窗相关===================================*/
@@ -911,24 +714,6 @@
           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);
@@ -1201,146 +986,6 @@
           }
         }
       },
-      /*===================================设备相关相关===================================*/
-      //获取危险源类型
-      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){
@@ -1398,9 +1043,6 @@
       getSubRowKeys(row) {
         return row.subId
       },
-      getDeviceRowKeys(row) {
-        return row.id
-      },
       deptChange(selection){
         let self = this;
         this.deptNumLeft = selection.length;
@@ -1437,14 +1079,6 @@
         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;

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

@@ -66,11 +66,6 @@
               <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>

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

@@ -50,22 +50,12 @@
       <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"/>

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

@@ -72,16 +72,6 @@
           <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip/>
           <el-table-column label="隐患描述" align="center" prop="hazardDescribe" show-overflow-tooltip width="220"/>
           <el-table-column label="实验室" align="center" prop="subRoom" show-overflow-tooltip width="170"/>
-          <el-table-column label="检查类型" align="center" prop="checkRange" show-overflow-tooltip width="120">
-            <template slot-scope="scope">
-              <p>{{scope.row.checkCategory==1?'综合检查':(scope.row.checkCategory==2?'专项检查':'-')}}</p>
-            </template>
-          </el-table-column>
-          <el-table-column label="检查内容" align="center" prop="checkRange" show-overflow-tooltip width="120">
-            <template slot-scope="scope">
-              <p>{{scope.row.hazardName?scope.row.hazardName:'-'}}</p>
-            </template>
-          </el-table-column>
           <el-table-column label="检查时间" sortable="custom" align="center" prop="checkTime" show-overflow-tooltip width="160"/>
           <el-table-column label="整改人" align="center" prop="rectifyName" show-overflow-tooltip width="90"/>
           <el-table-column label="整改期限" sortable="custom" align="center" prop="rectifyDeadline" show-overflow-tooltip width="180">

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

@@ -72,16 +72,6 @@
           <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">

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

@@ -23,6 +23,16 @@
         <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">
@@ -190,6 +200,7 @@
         dialogForm:{
           enable:1,
           groupName:"",
+          checkLevel:"",
         },
         //层级
         dialogRangeOptions:[{key:1,label:"校级"},{key:2,label:"院级"}],
@@ -231,6 +242,9 @@
             { required: true, message: "请输入巡查组名称", trigger: "change" },
             { required: true, message: "请输入巡查组名称", validator: this.spaceJudgment, trigger: "change" },
           ],
+          checkLevel: [
+            { required: true, message: "请选择巡查层级", trigger: "change" },
+          ],
         },
       }
     },
@@ -254,6 +268,7 @@
           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);
         });
       },

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

@@ -12,6 +12,16 @@
             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
@@ -40,6 +50,9 @@
       <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">
@@ -106,6 +119,7 @@
           pageNum:1,
           pageSize:20,
           searchValue:"",
+          checkLevel:"",
           enable:"",
         },
         tableList:[],
@@ -191,6 +205,7 @@
           pageNum:1,
           pageSize:20,
           searchValue:"",
+          checkLevel:"",
           enable:"",
         });
         this.handleQuery();

+ 0 - 5
src/views/safetyCheck/schoolInspection/inspectionManagement/index.vue

@@ -67,11 +67,6 @@
             <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>

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1416 - 1774
src/views/safetyCheck/schoolInspection/inspectionPlan/addDialog.vue


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

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

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

@@ -73,11 +73,6 @@
             <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>

+ 84 - 598
src/views/safetyCheck/startInspection/index.vue

@@ -36,17 +36,6 @@
                 <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="请选择计划"
@@ -62,18 +51,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="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 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>
-
             </div>
             <div class="top-form-right-box">
               <el-form-item label="学院" prop="deptId">
@@ -87,8 +76,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"
@@ -113,23 +102,20 @@
                   end-placeholder="结束日期"
                 ></el-date-picker>
               </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: 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 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>
-
             </div>
           </div>
-          <!--综合检查-->
-          <div class="bottom-form-box" v-if="addForm.checkResult === 0 && addForm.checkCategory==1">
+          <div class="bottom-form-box" v-if="addForm.checkResult === 0">
             <div class="bottom-form-title-box">
               <p>不符合项</p>
               <p>隐患数:{{addForm.checkHazardDtoList.length}}</p>
@@ -139,7 +125,7 @@
                 <p class="for-title-p">第{{index+1}}隐患项</p>
                 <div class="for-del-box">
                   <p class="el-icon-delete"></p>
-                  <p @click="delCheckHazardDtoList(index,'',1)">删除此项</p>
+                  <p @click="delCheckHazardDtoList(index)">删除此项</p>
                 </div>
                 <div class="for-button-box" @click="dataLookButton(item)">
                   <p :class="item.lookType?'el-icon-arrow-up':'el-icon-arrow-down'"></p>
@@ -156,7 +142,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="请选择检查项"
@@ -170,7 +156,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="item.hazardCheckCount>0">此检查项在当前实验室累计出现 <span>{{item.hazardCheckCount}}</span> 次隐患</p>
+                  <p class="hazard-check-count-p" v-if="hazardCheckCount>0">此检查项在当前实验室累计出现 <span>{{hazardCheckCount}}</span> 次隐患</p>
                 </el-form-item>
                 <el-form-item label="检查要点" label-width="123px">
                   <el-input
@@ -220,112 +206,6 @@
             </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']">
@@ -335,20 +215,6 @@
         <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>
 
@@ -357,18 +223,8 @@
   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,
-    getHazardInfoBySubId,
-    getHazardInfo, getHazardInfoByJoinIds
-  } from '@/api/safetyCheck/index'
+  import { buildBySubList,getCheckPlanBySubId,findCheckManage,checkOptionList,
+           checkManageUpdate,checkManageAdd,countHazardNum,getGentle } from "@/api/safetyCheck/index";
   export default {
     name: 'index',
     components: {
@@ -387,7 +243,7 @@
             return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择今天的
           }
         },
-        //检查组织
+        //检查类型
         checkTypeList:[{ key:1, label:"校院巡查", },{ key:2, label:"实验室自查", }],
         //学院列表
         deptSelectList:[],
@@ -406,24 +262,15 @@
           title:"",
           checkResult:"",
           rectifyNotice:"",
-          checkCategory:'1',
           checkType:2,
           dateRange:[],
           rectifyDeadline:"",
-          //综合检查
           checkHazardDtoList:[],
-          //专项检查
-          checkHazardInfoVoList:[],
         },
-
-
         //检查项出现次数
         hazardCheckCount:0,
         //上传用名称保存
         upDataName:"",
-        deviceTableList:[],
-        //检查类型
-        inspectCategoryList:[{id:'1',name:'综合检查'},{id:'2',name:'专项检查'}],
         // 表单校验
         rules: {
           subId: [
@@ -436,9 +283,6 @@
             { required: true, message: "请选择学院", trigger: "blur" },
           ],
           checkType: [
-            { required: true, message: "请选择检查组织", trigger: "blur" },
-          ],
-          checkCategory: [
             { required: true, message: "请选择检查类型", trigger: "blur" },
           ],
           dateRange: [
@@ -481,11 +325,6 @@
         adminGentle:false,
         applyGentle:false,
         myApplyGentle:false,
-        /* ==专项检查== */
-        dialogVisible:false,
-        pageType:0,
-        multipleSelection:[],
-
       }
     },
     created(){
@@ -498,34 +337,6 @@
       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 => {
@@ -547,77 +358,24 @@
             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();
@@ -625,64 +383,22 @@
             }if(this.planType == 2){
               //已有计划修改
               let obj = JSON.parse(JSON.stringify(this.addForm));
-              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]){
+              if(obj.checkResult === 0){
+                if(!obj.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(checkFlagList.every(item=>{return item==1})){//符合
-                  obj.checkResult=1;
-                }else{//不符合
-                  obj.checkResult=0;
+                for(let i=0;i<obj.checkHazardDtoList.length;i++){
+                  delete obj.checkHazardDtoList[i].lookType
                 }
-                obj.checkHazardDtoList=list;
+                obj.dangerNum = obj.checkHazardDtoList.length
+              }else{
+                obj.checkHazardDtoList = [];
               }
+              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();
@@ -724,46 +440,6 @@
           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++){
@@ -825,59 +501,14 @@
       //联级选择器数据处理
       getCascaderData(list){
         let self = this;
-        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--
-                  }
-                }else{
-                  list.splice(i,1)
-                  i--
-                }
-              }else{
-                list.splice(i,1)
-                i--
-              }
-            }else{
-              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{
+        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--
                   }
@@ -890,11 +521,13 @@
                 i--
               }
             }else{
-              delete list[i].children
+              list.splice(i,1)
+              i--
             }
+          }else{
+            delete list[i].children
           }
         }
-
       },
       //获取学院列表
       listDepartments(){
@@ -941,7 +574,6 @@
             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
           }
         }
@@ -971,49 +603,6 @@
           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;
@@ -1034,10 +623,7 @@
             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:"实验室自查", }]);
         }
@@ -1045,28 +631,12 @@
       //查询详情
       findCheckManage(id){
         findCheckManage({id:id}).then(response => {
-          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
+          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;
           }
           this.buildBySubList(response.data.buildId,1);
           this.$set(this,'addForm',{
@@ -1079,15 +649,10 @@
             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();//获取检查项
-
         });
       },
       //初始化数据
@@ -1123,59 +688,32 @@
         this.$set(this,'planList',[]);
       },
       //删除检查项
-      delCheckHazardDtoList(index,index2,type){//type 1综合检查 2专项检查设备项 3专项检查检查项
-
+      delCheckHazardDtoList(index){
         let self = this;
         this.$confirm('是否确认删除?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
         }).then(function() {
-          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);
-            }
-
-          }
-
+          self.addForm.checkHazardDtoList.splice(index,1);
         }).then(() => {
         }).catch(() => {});
       },
       //检查项选中
-      cascaderChange(val,item,index,index2){
+      cascaderChange(val,index){
         let obj = this.getCascaderDataQuery(val,this.options);
-
-        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);
-          })
+        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);
+        })
       },
-      /*==========专项检查==========*/
-
       //联级选择器数据查询
       getCascaderDataQuery(text,list){
         let self = this;
@@ -1211,32 +749,6 @@
     ::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;
@@ -1397,32 +909,6 @@
         }
       }
     }
-    /*专项检查*/
-    .for-max-big-box-special{
-      margin-bottom: 20px;
-      .for-big-box-special{
-        border-bottom: 1px dotted #D8D8D8;
-        margin:30px;
-        display: flex;
-        justify-content: flex-start;
-        .for-big-box-special-l{
-          width: 30px;
-          height: 30px;
-          background: #0183FA;
-          border-radius: 6px 6px 6px 6px;
-          font-size: 16px;
-          font-family: Microsoft YaHei-Regular, Microsoft YaHei;
-          font-weight: 400;
-          color: #FFFFFF;
-          line-height: 30px;
-          text-align: center;
-        }
-        .for-big-box-special-r{}
-      }
-      .for-big-box-special:last-of-type{
-        border-bottom: none;
-      }
-    }
     .bottom-button-max-box{
       height:80px;
       display: flex;

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

@@ -42,7 +42,7 @@
         <div class="for-time-box">
           <p>计划周期:{{item.cycleStartTime}} 至 {{item.cycleEndTime}}</p>
           <p v-if="item.manageStatus == 0 && item.checkIsStatus" @click="goPage(item)">开始检查</p>
-          <p v-if="item.manageStatus == 0 && !item.checkIsStatus" class="noButton">计划未开始</p>
+          <p v-if="item.manageStatus == 0 && !item.checkIsStatus" class="noButton" @click="goPage(item)">计划未开始</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>