dedsudiyu 4 months ago
parent
commit
a7027d3b8d

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

@@ -161,6 +161,7 @@
                 @change="hazardCheckProChange"
                 :options="cascaderData"
                 :props="{ value: 'id', label: 'labelName',emitPath:false }"
+                :filter-method="dataFilter"
               ></el-cascader>
             </el-form-item>
             <p class="dangers-num-p" v-if="dangersNum>0">此检查项在当前实验室累计出现 <span>{{dangersNum}}</span> 次隐患</p>
@@ -818,6 +819,12 @@
         }
         return list
       },
+      //模糊查询规则修改为检查要点
+      dataFilter(node, val) {
+        if (!!~node.data.mainPoint.indexOf(val) || !!~node.data.mainPoint.toUpperCase().indexOf(val.toUpperCase())) {
+          return true
+        }
+      },
     }
   }
 </script>

+ 38 - 18
src/views/safetyCheck/components/snapshotInfo.vue

@@ -80,26 +80,40 @@
           <span :class="itemShowType_2?'el-icon-arrow-down':'el-icon-arrow-up'" @click="itemShowButton(2)"></span>
         </p>
         <div v-if="itemShowType_2" class="show-box">
+          <!--<el-form-item label="检查项目" prop="hazardCheckId" v-if="!propsData.rectify||(propsData.rectify&&addForm.hazardCheckId)">-->
+            <!--<el-cascader-->
+              <!--:disabled="lookInfoType||propsData.rectify"-->
+              <!--clearable-->
+              <!--:placeholder="lookInfoType||propsData.rectify?'未选择检查项目':'请选择检查项目'"-->
+              <!--style="width:704px;"-->
+              <!--v-model="addForm.hazardCheckId"-->
+              <!--filterable-->
+              <!--:options="options"-->
+              <!--:props="{ value: 'id', label: 'labelName',emitPath:false}"-->
+              <!--:filter-method="dataFilter"-->
+              <!--@change="handleChange"></el-cascader>-->
+          <!--</el-form-item>-->
+          <!--<p class="dangers-num-p" v-if="dangersNum>0">此检查项在当前实验室累计出现 <span>{{dangersNum}}</span> 次隐患</p>-->
+          <!--<div class="right-text-box">-->
+          <!--<p class="right-text-name-p">检查要点</p>-->
+          <!--<div class="right-text-title-box" style="min-height: 80px;width:704px;">-->
+          <!--<p :style="!addForm.hazardCheckPoint?'color:#C0C4CC;':'color:#333;'" v-if="lookInfoType||propsData.rectify">{{addForm.hazardCheckPoint?addForm.hazardCheckPoint:'未选择检查项目'}}</p>-->
+          <!--<p :style="!addForm.hazardCheckPoint?'color:#C0C4CC;':'color:#333;'" v-if="!lookInfoType&&!propsData.rectify">{{addForm.hazardCheckPoint?addForm.hazardCheckPoint:'请选择检查项目'}}</p>-->
+          <!--</div>-->
+          <!--</div>-->
           <el-form-item label="检查项目" prop="hazardCheckId" v-if="!propsData.rectify||(propsData.rectify&&addForm.hazardCheckId)">
-            <el-cascader
-              :disabled="lookInfoType||propsData.rectify"
-              clearable
-              :placeholder="lookInfoType||propsData.rectify?'未选择检查项目':'请选择检查项目'"
-              style="width:704px;"
-              v-model="addForm.hazardCheckId"
-              filterable
-              :options="options"
-              :props="{ value: 'id', label: 'labelName',emitPath:false }"
-              @change="handleChange"></el-cascader>
+            <el-select :disabled="lookInfoType||propsData.rectify"
+               v-model="addForm.hazardCheckId"
+               placeholder="请选择检查项目"
+               style="width:704px;">
+              <el-option
+                v-for="item in options"
+                :key="item.id"
+                :label="item.labelName"
+                :value="item.id">
+              </el-option>
+            </el-select>
           </el-form-item>
-          <p class="dangers-num-p" v-if="dangersNum>0">此检查项在当前实验室累计出现 <span>{{dangersNum}}</span> 次隐患</p>
-          <div class="right-text-box">
-            <p class="right-text-name-p">检查要点</p>
-            <div class="right-text-title-box" style="min-height: 80px;width:704px;">
-              <p :style="!addForm.hazardCheckPoint?'color:#C0C4CC;':'color:#333;'" v-if="lookInfoType||propsData.rectify">{{addForm.hazardCheckPoint?addForm.hazardCheckPoint:'未选择检查项目'}}</p>
-              <p :style="!addForm.hazardCheckPoint?'color:#C0C4CC;':'color:#333;'" v-if="!lookInfoType&&!propsData.rectify">{{addForm.hazardCheckPoint?addForm.hazardCheckPoint:'请选择检查项目'}}</p>
-            </div>
-          </div>
           <!--<div class="right-text-box">-->
             <!--<p class="right-text-name-p">隐患等级</p>-->
             <!--<div class="right-text-title-box" style="width:301px;">-->
@@ -606,6 +620,12 @@
         this.$set(this,'fullScreenViewProps',newList);
         this.$refs['fullScreenView'].initialize(index);
       },
+      //模糊查询规则修改为检查要点
+      dataFilter(node, val) {
+        if (!!~node.data.mainPoint.indexOf(val) || !!~node.data.mainPoint.toUpperCase().indexOf(val.toUpperCase())) {
+          return true
+        }
+      },
     },
   }
 </script>