瀏覽代碼

多次调用问题解决

Luolei 6 年之前
父節點
當前提交
aebb7f75c3

+ 3 - 5
src/components/icss/BloodPressTagGroup.vue

@@ -91,15 +91,13 @@ export default {
     },
     mounted() {
          this.rightTagsList2 = this.options
-        this.searchTagList()
+        // this.searchTagList()
         // this.leftTagsList = this.pool
         // console.log('TAGPOOL', this.pool)
     },
     watch: {
         pool(newVal, preVal) {
-            if (JSON.stringify(newVal) != JSON.stringify(preVal)) {
-                this.leftTagsList = newVal
-            }
+          this.leftTagsList = newVal
         },
         searchVal(newVal, preVal){
             if(newVal.trim() == ''){
@@ -117,7 +115,7 @@ export default {
                     this.rightTagsList2 = [];
                     this.selectRightTagsList = [];
                     this.searchVal = '';
-                     this.searchTagList();
+                    //  this.searchTagList();
                 }
             }
         },

+ 3 - 4
src/components/icss/PubTagGroup.vue

@@ -287,6 +287,7 @@ export default {
   watch: {
     newSex(nextVal, prevVal) {
       this.tmpSex = prevVal;
+      this.searchTagList()
     },
     newType(nextVal, prevVal) {
       this.tmpOwn = prevVal;
@@ -296,7 +297,7 @@ export default {
     },
     newSign(nextVal, prevVal) {
       this.tmpType = prevVal;
-      if (nextVal != prevVal && JSON.stringify(this.form.tagPool) != '[]' ) {
+      if (nextVal != prevVal ) {
         this.searchTagList()
       }
     },
@@ -317,8 +318,8 @@ export default {
     },
     searchTagList() {
       let region1 = this.form.region1, region2 = this.form.region2;
-
       let param1 = !!region2 ? api.getGroupParams(region2): {};
+      console.log(region2)
       let param2 = {
         type: region1,
         sexType: this.form.region7,
@@ -358,13 +359,11 @@ export default {
     changeSex(data) {   //改变性别清空数据
       this.$emit('changeVal', this.form, false)
       this.$emit('changeSex', data, false)
-      this.searchTagList()
     },
     readyChangeSelect(tmpData,type) {
       if(type === 1) {
         this.form.region2 = '';
         this.labelTypes = this.labelTypesList.filter(item => config.labelTypesMaps[tmpData].indexOf(item.val) > -1)
-        
       }
       this.changeSex(tmpData);
       // if(type == 3){

+ 3 - 5
src/components/icss/SymptomTagGroup.vue

@@ -103,15 +103,13 @@ export default {
     },
     mounted() {
         this.rightTagsList2 = this.options
-        this.searchTagList()
+        // this.searchTagList()
         // this.leftTagsList = this.pool
         // console.log('TAGPOOL', this.pool)
     },
     watch: {
         pool(newVal, preVal) {
-            if (JSON.stringify(newVal) != JSON.stringify(preVal)) {
-                this.leftTagsList = newVal
-            }
+          this.leftTagsList = newVal
         },
         searchVal(newVal, preVal){
             if(newVal.trim() == ''){
@@ -129,7 +127,7 @@ export default {
                     this.rightTagsList2 = [];
                     this.selectRightTagsList = [];
                     this.searchVal = '';
-                     this.searchTagList();
+                    //  this.searchTagList();
                 }
             }
         },