Browse Source

组合维护类型切换完成

zhouna 6 years ago
parent
commit
e375673643

+ 1 - 1
src/components/preTreat/AddCombinQuestion.vue

@@ -108,7 +108,7 @@
             "itemType" :this.dataPub.region12,           //是否为主要内容
             "url":this.dataPub.region13,                  //上传图片
             //"questionDetails": this.options,                //明细项
-            "questionMapping": this.options,      //映射关系,
+            "questionMappings": this.options,      //映射关系,
           }
         };
         this.showSaveDialog(param);

+ 6 - 7
src/components/preTreat/QuestionTagGroup.vue

@@ -31,7 +31,6 @@
     </div>
     <div class="bottomPartRight ">
       <p class="poolTitle">操作界面:</p>
-        {{rightTagsList}}
       <ul class="tagList operationPool operationPools">
             <li class = "tagItem"
                 v-for="(item) in rightTagsList"
@@ -74,11 +73,11 @@ export default {
     mounted() {
         let tagList = this.transOptions(this.options);
         if(tagList&&tagList.length > 0){
-          this.rightTagsList = tagList;
-          this.$emit('changeActionData',this.rightTagsList);
+          const that = this;
+          setTimeout(function(){            //等watch执行后赋值tags,否则这里先执行,会被watch里清空
+            that.rightTagsList = tagList;
+          },100);
         }
-        console.log(this.options,this.rightTagsList)
-        //this.searchTagList();
     },
     watch: {
         searchVal(newVal, preVal){
@@ -102,10 +101,10 @@ export default {
         },
         ifReflashTagList(newVal='', preVal=''){
           if(newVal.trim() == ''){
-            this.rightTagsList=[];
+            this.rightTagsList=[];console.log(1)
             this.searchTagList();
           }else if(newVal.trim() != preVal.trim()){
-            this.rightTagsList=[];
+            this.rightTagsList=[];console.log(2)
             this.searchTagList();
           }
         },