Browse Source

Merge branch 'bug-fix-4436' into custom

cxmo 6 months ago
parent
commit
5701d9c87e

+ 4 - 3
src/views/ppt_manage/newVersion/pptEditor.vue

@@ -1024,7 +1024,7 @@ export default {
       }
       if(!checkResult.result){
         this.$message.warning(checkResult.hintText)
-        return
+        return checkResult
       }
       let Content = JSON.stringify(this.pageList)
       //console.log(Content)
@@ -1154,7 +1154,8 @@ export default {
     },
     async handlePublish(){
       //ETA1.7.5更改发布逻辑,点击发布时,自动执行保存操作,若可保存,则跳转发布页
-      await this.handleSave('pub')
+      const res = await this.handleSave('pub')
+      if(res&&!res.result) return
       //ppt4.0后,合并后的PPT可能会超出页数or图表限制,在这里做个校验
       if(this.pageList.length>this.maxPageNum){
         this.$message.warning(this.$t('Slides.most_add_ppt_msg',{count:this.maxPageNum}))
@@ -1164,7 +1165,7 @@ export default {
         this.$message.warning(this.$t('Slides.most_add_chart_msg',{count:this.maxPageChart}));
         return;
       }
-      this.$router.push({path:'/pptpublish',query:{id:this.pptId}})
+      this.pptId&&this.$router.push({path:'/pptpublish',query:{id:this.pptId}})
     },
     //拖动相关
     dragstart(e,value) {

+ 4 - 3
src/views/ppt_manage/newVersion/pptEnEditor.vue

@@ -1022,7 +1022,7 @@ export default {
       }
       if(!checkResult.result){
         this.$message.warning(checkResult.hintText)
-        return
+        return checkResult
       }
       let Content = JSON.stringify(this.pageList)
       const {Title,ReportType,PptDate,BackgroundImg,BackIndex} = this.firstPage
@@ -1141,7 +1141,8 @@ export default {
     },
     async handlePublish(){
       //ETA1.7.5更改发布逻辑,点击发布时,自动执行保存操作,若可保存,则跳转发布页
-      await this.handleSave('pub')
+      const res = await this.handleSave('pub')
+      if(res&&!res.result) return
       //ppt4.0后,合并后的PPT可能会超出页数or图表限制,在这里做个校验
       if(this.pageList.length>this.maxPageNum){
         this.$message.warning(this.$t('Slides.most_add_ppt_msg',{count:this.maxPageNum}))
@@ -1151,7 +1152,7 @@ export default {
         this.$message.warning(this.$t('Slides.most_add_chart_msg',{count:this.maxPageNum}));
         return;
       }
-      this.$router.push({path:'/pptenpublish',query:{id:this.pptId}})
+      this.pptId&&this.$router.push({path:'/pptenpublish',query:{id:this.pptId}})
     },
     //拖动相关
     dragstart(e,value) {