Selaa lähdekoodia

Merge branch 'termLink0615' into test

wyq 3 vuotta sitten
vanhempi
commit
c55dd2538e
1 muutettua tiedostoa jossa 40 lisäystä ja 27 poistoa
  1. 40 27
      src/components/common/LtModal.vue

+ 40 - 27
src/components/common/LtModal.vue

@@ -151,7 +151,10 @@
       </div>
       </div>
       <div class="mapList">
       <div class="mapList">
         已关联标准术语:
         已关联标准术语:
-        <span v-for="item in mapList" :key="item.id">{{item.uniqueName}}&nbsp;&nbsp;{{item.form}};</span>
+        <span
+          v-for="item in mapList"
+          :key="item.id"
+        >{{item.uniqueName}}&nbsp;&nbsp;{{item.form}};</span>
       </div>
       </div>
       <div class="modal-footer">
       <div class="modal-footer">
         <button class="confirm btns" :disabled="saveDisable" @click="submitForm">确定</button>
         <button class="confirm btns" :disabled="saveDisable" @click="submitForm">确定</button>
@@ -166,7 +169,7 @@ import config from '@api/config.js';
 import utils from '@api/utils.js';
 import utils from '@api/utils.js';
 export default {
 export default {
   name: 'lt-modal',
   name: 'lt-modal',
-  props: ['modalVisiable', 'meal', 'detail', 'standard', 'type', 'data','tip'],
+  props: ['modalVisiable', 'meal', 'detail', 'standard', 'type', 'data', 'tip'],
   data() {
   data() {
     return {
     return {
       form: {
       form: {
@@ -200,7 +203,7 @@ export default {
       getIndex: 6,
       getIndex: 6,
       ty: this.type,
       ty: this.type,
       searchType: '',
       searchType: '',
-      title: '添加',
+      title: '添加'
     };
     };
   },
   },
   created() {
   created() {
@@ -221,17 +224,25 @@ export default {
       this.form.form = this.data.form;
       this.form.form = this.data.form;
       this.form.source = this.data.source;
       this.form.source = this.data.source;
       this.form.hisCode = this.data.hisCode;
       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.ty = 1; // 1-化验大项、2-化验小项
-        this.searchType = 1
+        this.searchType = 1;
         name = this.data.hisName;
         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.ty = 2;
-        this.searchType = 2
+        this.searchType = 2;
         name = this.data.hisDetailName;
         name = this.data.hisDetailName;
       }
       }
-      this.getTermMatching(this.ty,name);
+      this.getTermMatching(this.ty, name);
       this.getRelatedMapping();
       this.getRelatedMapping();
     }
     }
   },
   },
@@ -240,7 +251,7 @@ export default {
       if (this.getIndex === rowIndex) {
       if (this.getIndex === rowIndex) {
         return {
         return {
           'background-color': '#EBEEF5',
           'background-color': '#EBEEF5',
-          'color':'#48C5D7'
+          color: '#48C5D7'
         };
         };
       }
       }
     },
     },
@@ -251,7 +262,7 @@ export default {
       const { hisName, hisDetailName } = this.form;
       const { hisName, hisDetailName } = this.form;
       if (hisName !== '' && hisDetailName === '') {
       if (hisName !== '' && hisDetailName === '') {
         this.ty = 1;
         this.ty = 1;
-      }else if(hisName !== '' && hisDetailName !== ''){
+      } else if (hisName !== '' && hisDetailName !== '') {
         this.ty = 2;
         this.ty = 2;
       }
       }
       this.searchType = this.ty;
       this.searchType = this.ty;
@@ -269,8 +280,8 @@ export default {
         this.form.source = row.source;
         this.form.source = row.source;
       }
       }
     },
     },
-    handleChoose(val,id) {
-       this.form.conceptId = id
+    handleChoose(val, id) {
+      this.form.conceptId = id;
       this.form.searchTextPre = val;
       this.form.searchTextPre = val;
       this.form.searchText = val;
       this.form.searchText = val;
     },
     },
@@ -281,12 +292,14 @@ export default {
         return;
         return;
       }
       }
       const { hisName, hisDetailName } = this.form;
       const { hisName, hisDetailName } = this.form;
-      if (hisName !== '' && hisDetailName === '') {
+      if (hisName !== '' && hisDetailName === '' && this.type == 1) {
         this.ty = 1;
         this.ty = 1;
-      }else if(hisName !== '' && hisDetailName !== ''){
+      } else if (hisName !== '' && hisDetailName !== '') {
         this.ty = 2;
         this.ty = 2;
       }
       }
       this.searchType = this.ty;
       this.searchType = this.ty;
+      console.log(this.ty)
+      console.log(this.type)
       this.showDrop = true;
       this.showDrop = true;
       let params = {
       let params = {
         type: this.ty ? this.ty : this.type,
         type: this.ty ? this.ty : this.type,
@@ -359,22 +372,22 @@ export default {
     // 获取焦点
     // 获取焦点
     handleFocus() {},
     handleFocus() {},
     onblur() {
     onblur() {
-      let type,name
+      let type, name;
       if (this.type == 1) {
       if (this.type == 1) {
         const { hisName, hisDetailName } = this.form;
         const { hisName, hisDetailName } = this.form;
         type = 1; // 1-化验大项、2-化验小项
         type = 1; // 1-化验大项、2-化验小项
-        name = hisName
+        name = hisName;
         if (hisName !== '' && hisDetailName !== '') {
         if (hisName !== '' && hisDetailName !== '') {
           type = 2;
           type = 2;
-          name = hisDetailName
+          name = hisDetailName;
         }
         }
       }
       }
-      this.getTermMatching(type,name);
+      this.getTermMatching(type, name);
     },
     },
-    getTermMatching(type,name) {
+    getTermMatching(type, name) {
       let params = {
       let params = {
         type: type ? type : this.type,
         type: type ? type : this.type,
-        inputStr: name ? name :this.form.hisName
+        inputStr: name ? name : this.form.hisName
       };
       };
       api.getTermMatching(params).then(res => {
       api.getTermMatching(params).then(res => {
         this.showDrop = false;
         this.showDrop = false;
@@ -399,7 +412,6 @@ export default {
             hisCode
             hisCode
           } = this.form;
           } = this.form;
           // 当标准术语是套餐时,细项必须为空
           // 当标准术语是套餐时,细项必须为空
-          console.log(this.searchType)
           if (this.searchType === 1 && hisDetailName !== '') {
           if (this.searchType === 1 && hisDetailName !== '') {
             this.warning('医院术语与标准术语类型不匹配,请修改');
             this.warning('医院术语与标准术语类型不匹配,请修改');
             return;
             return;
@@ -503,7 +515,7 @@ export default {
         showClose: true,
         showClose: true,
         message: msg,
         message: msg,
         type: type || 'warning',
         type: type || 'warning',
-        duration:'1000'
+        duration: '1000'
       });
       });
     },
     },
     closeModal() {
     closeModal() {
@@ -634,11 +646,12 @@ export default {
 .titleBox {
 .titleBox {
   padding: 0 0 10px 0px;
   padding: 0 0 10px 0px;
 }
 }
-/deep/.el-table th{
-  background: #F7F7F7;
+/deep/.el-table th {
+  background: #f7f7f7;
 }
 }
-/deep/ .el-table td, .el-table th.is-leaf{
-  border-bottom:none
+/deep/ .el-table td,
+.el-table th.is-leaf {
+  border-bottom: none;
 }
 }
 .title-l {
 .title-l {
   font-size: 14px;
   font-size: 14px;