heyang пре 1 година
родитељ
комит
0bcbcef8db

+ 7 - 7
src/views/safetyCheck/startInspection/index.vue

@@ -139,7 +139,7 @@
                 <p class="for-title-p">第{{index+1}}隐患项</p>
                 <div class="for-del-box">
                   <p class="el-icon-delete"></p>
-                  <p @click="delCheckHazardDtoList(index,'')">删除此项</p>
+                  <p @click="delCheckHazardDtoList(index,'',1)">删除此项</p>
                 </div>
                 <div class="for-button-box" @click="dataLookButton(item)">
                   <p :class="item.lookType?'el-icon-arrow-up':'el-icon-arrow-down'"></p>
@@ -249,7 +249,7 @@
                 <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,'')">删除此项</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>
@@ -279,7 +279,7 @@
                         <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)" style="color: #0183FA;margin-left: 20px;cursor: pointer;"></i>
+                    <i class="el-icon-delete" v-if="planType==1"  @click="delCheckHazardDtoList(index,index2,3)" style="color: #0183FA;margin-left: 20px;cursor: pointer;"></i>
                     <p class="hazard-check-count-p" v-if="hazardCheckCount>0">此检查项在当前实验室累计出现 <span>{{hazardCheckCount}}</span> 次隐患</p>
                   </el-form-item>
                   <el-form-item v-if="item2.checkFlag==0" label="隐患等级" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.hazardLevel'" :rules="rules.hazardLevel" label-width="123px">
@@ -1091,7 +1091,7 @@
         this.$set(this,'planList',[]);
       },
       //删除检查项
-      delCheckHazardDtoList(index,index2){
+      delCheckHazardDtoList(index,index2,type){//type 1综合检查 2专项检查设备项 3专项检查检查项
 
         let self = this;
         this.$confirm('是否确认删除?', "警告", {
@@ -1102,10 +1102,10 @@
           if(self.addForm.checkCategory==1){//综合检查
             self.addForm.checkHazardDtoList.splice(index,1);
           }else if(self.addForm.checkCategory==2){//专项检查
-            if(index2>=0){//小检查项
-              self.addForm.checkHazardInfoVoList[index].checkHazardDtoList.splice(index2,1);
-            }else{//检查设备
+            if(type==2){//检查设备
               self.addForm.checkHazardInfoVoList.splice(index,1);
+            }else if(type==3){//检查项
+              self.addForm.checkHazardInfoVoList[index].checkHazardDtoList.splice(index2,1);
             }
 
           }

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

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