|
@@ -55,6 +55,7 @@ import TextEl from './chooseCover/TextEl.vue';
|
|
import { BaseTextShape } from '@/views/ppt_manage/newVersion/utils/config';
|
|
import { BaseTextShape } from '@/views/ppt_manage/newVersion/utils/config';
|
|
import {createRandomCode,caclShapePercentage} from "@/views/ppt_manage/newVersion/utils/untils";
|
|
import {createRandomCode,caclShapePercentage} from "@/views/ppt_manage/newVersion/utils/untils";
|
|
import {pptInterface} from '@/api/api.js';
|
|
import {pptInterface} from '@/api/api.js';
|
|
|
|
+import {pptEnInterface} from '@/api/modules/pptEnApi.js';
|
|
export default {
|
|
export default {
|
|
props: {
|
|
props: {
|
|
isShowChooseCover: {
|
|
isShowChooseCover: {
|
|
@@ -72,6 +73,10 @@ export default {
|
|
CoverContent: {
|
|
CoverContent: {
|
|
type: String,
|
|
type: String,
|
|
default: ''
|
|
default: ''
|
|
|
|
+ },
|
|
|
|
+ PptId:{
|
|
|
|
+ type:Number,
|
|
|
|
+ default:0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
@@ -108,20 +113,22 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//保存封面配置
|
|
//保存封面配置
|
|
- saveCover() {
|
|
|
|
|
|
+ async saveCover() {
|
|
if(!this.pageData.Title.length){
|
|
if(!this.pageData.Title.length){
|
|
return this.$message.warning("请输入PPT标题")
|
|
return this.$message.warning("请输入PPT标题")
|
|
}
|
|
}
|
|
const coverContent = JSON.stringify(this.coverElList);
|
|
const coverContent = JSON.stringify(this.coverElList);
|
|
//校验标题
|
|
//校验标题
|
|
- pptInterface.pptTitleCheck({PptId:this.$route.query.id || this.PptId ||0,Title:this.pageData.Title}).then(res=>{
|
|
|
|
- if(res.Ret == 200){
|
|
|
|
- this.$emit('saveCover', {
|
|
|
|
|
|
+ const pptId = this.$route.query.id || this.PptId||0
|
|
|
|
+ const res = this.$parent.currentLang!=='en'
|
|
|
|
+ ?await pptInterface.pptTitleCheck({PptId:pptId,Title:this.pageData.Title})
|
|
|
|
+ :await pptEnInterface.pptTitleCheck({PptId:pptId,Title:this.pageData.Title})
|
|
|
|
+ if(res.Ret===200){
|
|
|
|
+ this.$emit('saveCover', {
|
|
firstPage:Object.assign(this.firstPage,this.pageData),
|
|
firstPage:Object.assign(this.firstPage,this.pageData),
|
|
content:coverContent
|
|
content:coverContent
|
|
- });
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
changeActEl(el){
|
|
changeActEl(el){
|
|
this.activeEl = el
|
|
this.activeEl = el
|