Procházet zdrojové kódy

检验时搜索样式修改

wyq před 4 roky
rodič
revize
040548ccc8
1 změnil soubory, kde provedl 16 přidání a 15 odebrání
  1. 16 15
      src/components/base/LtModal.vue

+ 16 - 15
src/components/base/LtModal.vue

@@ -80,9 +80,9 @@
                       <el-option
                         v-for="item in uniqueNameList"
                         :key="item.icd10Code"
-                        :label="item.name"
-                        :value="item"
-                        :title="item.name"
+                        :label="searchType == 2 ? `${item.uniqueName}(${item.name})` : item.name"
+                        :value="searchType == 2 ? `${item.uniqueName}` : item"
+                        :title="searchType == 2 ? `${item.uniqueName}(${item.name})` : item.name"
                       ></el-option>
                     </el-select>
                   </el-form-item>
@@ -231,17 +231,25 @@ export default {
       this.form.form = this.data.form;
       this.form.source = this.data.source;
       this.form.hisCode = this.data.hisCode;
-      let name
-      if (this.data.hisName !== '' && this.data.hisDetailName === '' && this.type == 1) {
+      let name;
+      if (
+        this.data.hisName !== '' &&
+        this.data.hisDetailName === '' &&
+        this.type == 1
+      ) {
         this.ty = 1; // 1-化验大项、2-化验小项
         this.searchType = 1;
         name = this.data.hisName;
-      } else if (this.data.hisName !== '' && this.data.hisDetailName !== '' && this.type == 1) {
+      } else if (
+        this.data.hisName !== '' &&
+        this.data.hisDetailName !== '' &&
+        this.type == 1
+      ) {
         this.ty = 2;
         this.searchType = 2;
         name = this.data.hisDetailName;
       }
-      this.getTermMatching(this.ty,name);
+      this.getTermMatching(this.ty, name);
       this.getRelatedMapping();
     }
   },
@@ -360,7 +368,7 @@ export default {
     handleFocus() {},
     onblur() {
       let type, name;
-        const { hisName, hisDetailName } = this.form;
+      const { hisName, hisDetailName } = this.form;
       if (this.type == 1) {
         type = 1; // 1-化验大项、2-化验小项
         name = hisName;
@@ -369,13 +377,6 @@ export default {
           name = hisDetailName;
         }
       }
-      if (hisName !== '' && hisDetailName === '') {
-        type = 1; // 1-化验大项、2-化验小项
-        name = hisName;
-      } else if (hisName !== '' && hisDetailName !== '') {
-        type = 2;
-          name = hisDetailName;
-      }
       this.getTermMatching(type, name);
     },
     getTermMatching(type, name) {