Prechádzať zdrojové kódy

标题配置应用整个PPT保存

cxmo 4 mesiacov pred
rodič
commit
ebd3313a4a

+ 1 - 0
src/views/ppt_manage/mixins/pptEditorMixins.js

@@ -327,6 +327,7 @@ export default{
       list.forEach(page=>{
         page.id = createRandomCode()
         page.elements = checkPPTpageElemant(page)
+        page.titleDetail = this.titleSetting?this.titleSetting:null
         pages.push(page)
       })
       //当前PPT没有页

+ 1 - 0
src/views/ppt_manage/newVersion/css/common.scss

@@ -106,6 +106,7 @@ $titleColor:#333333;
             width:100%;
             height:100%;
             font-size: 16px;
+            word-break: break-all;
             ul{
                 margin-left: 1em;
                 list-style-type: disc;

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

@@ -523,10 +523,6 @@ export default {
       this.pageList.forEach(i=>{
         i.isUpdating = false
       })
-      //如果有标题默认设置,应用这个设置
-      if(this.titleSetting){
-        this.settingAllPage()
-      }
       this.dataLoading.close();
       $('.ppt-item').css('background-image',`url(${this.pptBgImage})`);
       //开启自动保存
@@ -582,6 +578,7 @@ export default {
             modelId: modelId,
             title:'',
             elements: [],
+            titleDetail:this.titleSetting?this.titleSetting:null
         }
         //限制取消
         /* if(this.pageList.length>=this.maxPageNum){

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

@@ -540,13 +540,14 @@ export default {
         await this.getpptDataById(id)
         const {status} = this.result
         if(status===200){
-          const {content,FirstPage,ReportId} = this.result
+          const {content,FirstPage,ReportId,TitleSetting} = this.result
           this.pageList = content
           this.firstPage = FirstPage
           this.firstPage.BackIndex = FirstPage.TemplateType-1
           this.currentItem = this.pageList[0]
           this.ReportId=ReportId
           this.CoverContent = this.result.CoverContent
+          this.titleSetting = TitleSetting||null
           /* //开启自动保存
           this.autoSave() */
         }else{
@@ -583,6 +584,7 @@ export default {
             modelId: modelId,
             title:'',
             elements: [],
+            titleDetail:this.titleSetting?this.titleSetting:null
         }
         this.pageList.splice(index,0,page)
         this.changeCurrentItem(page)
@@ -1095,7 +1097,8 @@ export default {
         FirstPage:FirstPage,
         Content:Content,
         GroupId:this.catalogId,
-        CoverContent:this.CoverContent
+        CoverContent:this.CoverContent,
+        TitleSetting:JSON.stringify(this.titleSetting)
       }).then(res=>{
         this.isSaved = false
         if(res.Ret===200){
@@ -1114,7 +1117,8 @@ export default {
         PptId:parseInt(ppt_id),
         FirstPage:FirstPage,
         Content:Content,
-        CoverContent:this.CoverContent
+        CoverContent:this.CoverContent,
+        TitleSetting:JSON.stringify(this.titleSetting)
       }).then(res=>{
         this.isSaved = false
         if(res.Ret===200){
@@ -1146,11 +1150,13 @@ export default {
           return i
         })
         let Content = JSON.stringify(pageList) 
+        let TitleSetting = JSON.stringify(this.titleSetting)
         pptEnInterface.saveLog({
           PptId:parseInt(ppt_id),
           FirstPage:FirstPage,
           Content:Content,
-          CoverContent:this.CoverContent
+          CoverContent:this.CoverContent,
+          TitleSetting,
         }).then((res)=>{
             if(res.Ret!==200) return 
             this.showLastSaveTime = true