heyang před 1 rokem
rodič
revize
31e77bff0a

+ 7 - 0
src/views/safetyCheck/components/addPage/addPage.vue

@@ -388,6 +388,13 @@
           }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.checkHazardDtoList.forEach(function(item2) {
+                  item2.hazardCheckCode=item2.code
+                })
+              })
+            }
           }
           this.$set(this,'addForm',response.data);
           this.checkOptionList();//获取检查项

+ 19 - 1
src/views/safetyCheck/startInspection/index.vue

@@ -593,6 +593,9 @@
                     list.push(obj)
                   }
                 }
+                if(this.multipleSelection[0]){
+                  obj.hazardIds=this.multipleSelection.join(',')
+                }
                 if(checkFlagList.every(item=>{return item==1})){//符合
                   obj.checkResult=1;
                 }else{//不符合
@@ -938,9 +941,16 @@
             this.deviceTableList=response.data;
         });
       },
-      //根据实验室ID查询实验室设备
+      //根据设备id生成检查项
       getHazardInfo(id,hazardIds){
         getHazardInfo({subId:id,hazardIds:hazardIds}).then(response => {
+            if(response.data[0]){
+              response.data.forEach(function(item) {
+                item.checkHazardDtoList.forEach(function(item2) {
+                  item2.hazardCheckCode=item2.code
+                })
+              })
+            }
             this.addForm.checkHazardInfoVoList=response.data
         });
       },
@@ -987,6 +997,13 @@
             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.checkHazardDtoList.forEach(function(item2) {
+                  item2.hazardCheckCode=item2.code
+                })
+              })
+            }
             this.pageType=2
           }
           this.buildBySubList(response.data.buildId,1);
@@ -1089,6 +1106,7 @@
             this.msgError('未找到相关项目')
             return
           }
+          console.log(obj)
           item.hazardCheckCode=obj.code;
           item.hazardCheckName=obj.name;
           countHazardNum({subId:this.addForm.subId, hazardCheckPro:val}).then( response => {