heyang преди 1 година
родител
ревизия
f65237db3e

+ 5 - 3
src/views/safetyCheck/components/addPage/addPage.vue

@@ -164,13 +164,13 @@
           </div>
           <div class="for-max-big-box for-max-big-box-special" v-for="(item,index) in addForm.checkHazardInfoVoList" :key="index">
             <div class="for-title-box">
-              <p class="for-title-p">{{index+1}}、【{{item.hazardName}}】专项检查</p>
+              <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-for="(item2,index2) in item.checkHazardDtoList">
+            <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>
@@ -200,7 +200,7 @@
                   <el-option :key="3" label="管理问题" :value="3"></el-option>
                 </el-select>
               </el-form-item>
-              <el-form-item v-if="item2.checkFlag==0" label="隐患描述" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.hazardDescribe'" :rules="rules.hazardDescribe" label-width="123px">
+              <el-form-item v-if="item2.checkFlag==0" label="隐患描述"  label-width="123px">
                 <el-input
                   style="width: 898px"
                   type="textarea"
@@ -390,6 +390,7 @@
             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
                 })
@@ -411,6 +412,7 @@
       //收起/展开
       dataLookButton(item){
         item.lookType = !item.lookType
+
       },
       //检查结果选中
       checkResultChange(val){

+ 1 - 1
src/views/safetyCheck/components/infoPage/infoPage.vue

@@ -166,7 +166,7 @@
           </div>
           <div class="for-max-big-box for-max-big-box-special" v-for="(item,index) in addForm.checkHazardInfoVoList" :key="index">
             <div class="for-title-box">
-              <p class="for-title-p">{{index+1}}、【{{item.hazardName}}】专项检查</p>
+              <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>

+ 6 - 5
src/views/safetyCheck/startInspection/index.vue

@@ -246,8 +246,8 @@
             </div>
             <div class="for-max-big-box for-max-big-box-special" v-for="(item,index) in addForm.checkHazardInfoVoList" :key="index">
               <div class="for-title-box">
-                <p class="for-title-p">{{index+1}}、【{{item.hazardName}}】专项检查</p>
-                <div class="for-del-box">
+                <p class="for-title-p">{{index+1}}、【{{item.hazardName}}{{item.hazardName}}】专项检查</p>
+                <div class="for-del-box" v-if="planType==1">
                   <p class="el-icon-delete"></p>
                   <p @click="delCheckHazardDtoList(index,'')">删除此项</p>
                 </div>
@@ -256,7 +256,7 @@
                   <p>{{item.lookType?'收起':'展开'}}</p>
                 </div>
               </div>
-              <div class="for-big-box-special"  v-for="(item2,index2) in item.checkHazardDtoList">
+              <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">
@@ -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"  @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)" 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">
@@ -289,7 +289,7 @@
                       <el-option :key="3" label="管理问题" :value="3"></el-option>
                     </el-select>
                   </el-form-item>
-                  <el-form-item v-if="item2.checkFlag==0" label="隐患描述" :prop="'checkHazardInfoVoList.'+index+'.checkHazardDtoList.'+index2+'.hazardDescribe'" :rules="rules.hazardDescribe" label-width="123px">
+                  <el-form-item v-if="item2.checkFlag==0" label="隐患描述"  label-width="123px">
                     <el-input
                       style="width: 898px"
                       type="textarea"
@@ -1009,6 +1009,7 @@
             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
                 })