Browse Source

修改辅检关联维护搜索(2632)

zhangxc 5 years ago
parent
commit
4d120bd2d4

+ 1 - 0
src/api/config.js

@@ -1,6 +1,7 @@
 export default {
   host:'http://192.168.2.241:5050',
   imgHost:'http://192.168.2.241:82',      //富文本编辑器图片回传地址
+  delayTime: 500,
   urls: {
     /* 登录注册相关接口 */
     'getImgVerification': '/api/user/userver/getImgVerification',

+ 2 - 1
src/components/diagBase/DisFeatureItem.vue

@@ -117,6 +117,7 @@
                 </tr>
 </template>
 <script>
+import config from '@api/config.js';
 export default {
     props:['item', 'index','featureTypeList','showDiagList','searchIndex',
             'searchFiled', 'searchResultList'],
@@ -144,7 +145,7 @@ export default {
             let timer = setTimeout(()=>{
                 clearTimeout(this.timer);
                 this.$emit('handleInp',{index,e,type,itemType})
-            }, 100)
+            }, config.delayTime)
             this.timer = timer
         },
         clickItem(index, type) {

+ 2 - 1
src/components/diagBase/DisFormulaItem.vue

@@ -28,6 +28,7 @@
                 </tr>
 </template>
 <script>
+import config from '@api/config.js';
 export default {
     props:['item', 'index','formulaTypeList'],
     data() {
@@ -54,7 +55,7 @@ export default {
             let timer = setTimeout(()=>{
                 clearTimeout(this.timer);
                 this.$emit('handleInp',{index,e,type,itemType})
-            }, 100)
+            }, config.delayTime)
             this.timer = timer
         },
         clickItem(index, type) {

+ 11 - 2
src/components/medicalTerm/AddAssistCheckMultRelation.vue

@@ -75,6 +75,7 @@
 <script type="text/javascript">
 import api from '@api/icss.js';
 import apis from '@api/medicalTerm.js';
+import config from '@api/config.js';
   export default {
     name:'AddAssistCheckMultRelation',
     data(){
@@ -135,7 +136,8 @@ import apis from '@api/medicalTerm.js';
         level: 0, //层级(修改时只能显示三级)
         saveDisable: false,  //保存按钮禁止点击
         showSearch: false,
-        defaultExpandedArr: []
+        defaultExpandedArr: [],
+        timer: undefined
       }
     },
     created(){
@@ -157,7 +159,14 @@ import apis from '@api/medicalTerm.js';
           this.conceptList = []
         }
         if(nextVal.trim() &&nextVal != prevVal) {
-          this.searchConcept()
+          clearTimeout(this.timer)
+          let timer = setTimeout(()=>{
+                clearTimeout(this.timer);
+                this.searchConcept()
+            }, config.delayTime)
+            this.timer = timer
+
+          
         }
       }
     },