Explorar el Código

推荐匹配修改

wyq hace 4 años
padre
commit
a482dc4993
Se han modificado 1 ficheros con 14 adiciones y 4 borrados
  1. 14 4
      src/components/base/LtModal.vue

+ 14 - 4
src/components/base/LtModal.vue

@@ -231,12 +231,15 @@ export default {
       this.form.form = this.data.form;
       this.form.source = this.data.source;
       this.form.hisCode = this.data.hisCode;
-      if (this.data.hisDetailName != '') {
+      let name
+      if (this.data.hisName !== '' && this.data.hisDetailName === '') {
+        this.ty = 1; // 1-化验大项、2-化验小项
+        name = this.data.hisName;
+      } else if (this.data.hisName !== '' && this.data.hisDetailName !== '') {
         this.ty = 2;
-      } else {
-        this.ty = 1;
+        name = this.data.hisDetailName;
       }
-      this.getTermMatching();
+      this.getTermMatching(this.ty,name);
       this.getRelatedMapping();
     }
   },
@@ -372,6 +375,13 @@ 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) {