瀏覽代碼

bug调整

luolei 5 年之前
父節點
當前提交
1e65ae6bdf
共有 2 個文件被更改,包括 8 次插入6 次删除
  1. 3 3
      src/components/AddContent.vue
  2. 5 3
      src/components/MainPage.vue

+ 3 - 3
src/components/AddContent.vue

@@ -122,11 +122,11 @@ export default {
     },
     next(flg){
       let routeName = getRouteName(flg)
-      this.$router.push({
-        path:routeName
-      })
       this.$store.commit('setText',{data:this.dataTrd,type:this.allMoudles&&this.allMoudles.type});
       this.$emit('next','preview')
+      this.$router.replace({
+        path:routeName
+      })
     },
     setDetail(obj){
       this.labelDetail = obj.detail;

+ 5 - 3
src/components/MainPage.vue

@@ -235,7 +235,7 @@ export default {
       return {arr,arrp};
     },
     previewRes(){
-      this.$router.push({
+      this.$router.replace({
         path:'/preview'
       })
     },
@@ -353,7 +353,8 @@ export default {
       //上传的图片及是否有可上传***答案不显示在预览所以不记录到state.diagnose.text中
       if(this.symptomResult.id!==999999&&this.symptomResult.controlType!=4){
         // console.log('当前问题单选',this.num-1,this.canceledQa,contentResult.val,contentResult.valp)
-        this.$store.commit('setText', { type: this.activeTab,
+        this.$store.commit('setText', { 
+          type: this.activeTab,
           text: contentResult.val,
           textP: contentResult.valp,
           idx:contentResult.idx,
@@ -385,7 +386,6 @@ export default {
           this.symptomResult = tmpNowItem;
         });
         this.canceledQa = -1//进入下一阶段需要初始化
-        this.cancelNum = -1//进入下一阶段需要初始化
         this.$nextTick(()=>{
           this.scroll.refresh()
           this.scroll.scrollTo(0, this.scroll.maxScrollY,500)
@@ -407,6 +407,8 @@ export default {
         this.scroll.scrollTo(0, this.scroll.maxScrollY,500)
       })
     },
+
+
     showWarn(text){
       this.waring=text;
       this.wrong=true;