|
@@ -83,6 +83,16 @@ export const formatPre = [{
|
|
|
},{
|
|
|
modelId:9,
|
|
|
text:'上2图+文字'
|
|
|
+ },{
|
|
|
+ modelId:10,
|
|
|
+ text:'上6图+文字'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ modelId:11,
|
|
|
+ text:'上4图+文字'
|
|
|
+ },{
|
|
|
+ modelId:12,
|
|
|
+ text:'上6图'
|
|
|
}
|
|
|
]
|
|
|
//版式id对应组件名
|
|
@@ -95,7 +105,10 @@ export const modelMap = {
|
|
|
6: 'Six',
|
|
|
7: 'Seven',
|
|
|
8: 'Eight',
|
|
|
- 9: 'Nine'
|
|
|
+ 9: 'Nine',
|
|
|
+ 10:'Ten',
|
|
|
+ 11:'Ele',
|
|
|
+ 12:'Twelve'
|
|
|
}
|
|
|
//版式信息,用于判断图表/文字插入哪个位置
|
|
|
export const modelInfo = {
|
|
@@ -167,7 +180,31 @@ export const modelInfo = {
|
|
|
elChartNum:2,
|
|
|
elTextNum:1,
|
|
|
elTextPosition: 3
|
|
|
- }
|
|
|
+ },
|
|
|
+ 12:{
|
|
|
+ elNum:6,
|
|
|
+ elType:['chart','chart','chart','chart','chart','chart'],
|
|
|
+ positions:[1,2,3,4,5,6],
|
|
|
+ elChartNum:6,
|
|
|
+ elTextNum:0,
|
|
|
+ /* elTextPosition: 7 */
|
|
|
+ },
|
|
|
+ 11:{
|
|
|
+ elNum:5,
|
|
|
+ elType:['chart','chart','chart','chart','text'],
|
|
|
+ positions:[1,2,3,4,5],
|
|
|
+ elChartNum:4,
|
|
|
+ elTextNum:1,
|
|
|
+ elTextPosition: 5
|
|
|
+ },
|
|
|
+ 10:{
|
|
|
+ elNum:7,
|
|
|
+ elType:['chart','chart','chart','chart','chart','chart','text'],
|
|
|
+ positions:[1,2,3,4,5,6],
|
|
|
+ elChartNum:6,
|
|
|
+ elTextNum:1,
|
|
|
+ elTextPosition: 7
|
|
|
+ },
|
|
|
}
|
|
|
|
|
|
//给标题预留的位置,单位%
|
|
@@ -176,6 +213,7 @@ const titleHeight = 7
|
|
|
const restHeight = 100 - marginTop
|
|
|
//版式位置宽高设置,x,y,width,height都是基于整张ppt的百分比
|
|
|
//百分比的值来自./css/format.scss ->.chart-wrap,.editor-wrap
|
|
|
+//用于发布页生成PPT
|
|
|
export const modelConfig = [{
|
|
|
modelId: 1,
|
|
|
elements: [{
|
|
@@ -348,6 +386,132 @@ export const modelConfig = [{
|
|
|
y:60
|
|
|
}
|
|
|
]
|
|
|
+ },{
|
|
|
+ modelId:12,
|
|
|
+ elements:[{
|
|
|
+ position:1,
|
|
|
+ width:33*0.9,
|
|
|
+ height:(restHeight)*0.48*0.9,
|
|
|
+ x:(33*0.1)/2,
|
|
|
+ y:(restHeight*0.48*0.1)/2
|
|
|
+ },{
|
|
|
+ position:2,
|
|
|
+ width:33*0.9,
|
|
|
+ height:(restHeight)*0.48*0.9,
|
|
|
+ x:(33*0.1)/2+33,
|
|
|
+ y:(restHeight*0.48*0.1)/2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ position:3,
|
|
|
+ width:33*0.9,
|
|
|
+ height:(restHeight)*0.48*0.9,
|
|
|
+ x:(33*0.1)/2+33*2,
|
|
|
+ y:(restHeight*0.48*0.1)/2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ position:4,
|
|
|
+ width:33*0.9,
|
|
|
+ height:(restHeight)*0.48*0.9,
|
|
|
+ x:(33*0.1)/2,
|
|
|
+ y:(restHeight)*0.48
|
|
|
+ },
|
|
|
+ {
|
|
|
+ position:5,
|
|
|
+ width:33*0.9,
|
|
|
+ height:(restHeight)*0.48*0.9,
|
|
|
+ x:(33*0.1)/2+33,
|
|
|
+ y:(restHeight)*0.48
|
|
|
+ },
|
|
|
+ {
|
|
|
+ position:6,
|
|
|
+ width:33*0.9,
|
|
|
+ height:(restHeight)*0.48*0.9,
|
|
|
+ x:(33*0.1)/2+33*2,
|
|
|
+ y:(restHeight)*0.48
|
|
|
+ }]
|
|
|
+ },{
|
|
|
+ modelId:11,
|
|
|
+ elements:[{
|
|
|
+ position:1,
|
|
|
+ width:45*0.9,
|
|
|
+ height:(restHeight)*0.40*0.9,
|
|
|
+ x:(45*0.1)/2,
|
|
|
+ y:(restHeight*0.4*0.1)/2
|
|
|
+ },{
|
|
|
+ position:2,
|
|
|
+ width:45*0.9,
|
|
|
+ height:(restHeight)*0.40*0.9,
|
|
|
+ x:(45*0.1)/2+50,
|
|
|
+ y:(restHeight*0.4*0.1)/2
|
|
|
+ },{
|
|
|
+ position:3,
|
|
|
+ width:45*0.9,
|
|
|
+ height:(restHeight)*0.40*0.9,
|
|
|
+ x:(45*0.1)/2,
|
|
|
+ y:38
|
|
|
+ },{
|
|
|
+ position:4,
|
|
|
+ width:45*0.9,
|
|
|
+ height:(restHeight)*0.40*0.9,
|
|
|
+ x:(45*0.1)/2+50,
|
|
|
+ y:38
|
|
|
+ },{
|
|
|
+ position:5,
|
|
|
+ width:100*0.9,
|
|
|
+ height:(restHeight)*0.18*0.8,
|
|
|
+ x:(100-100*0.9)/2,
|
|
|
+ y:74
|
|
|
+ }]
|
|
|
+ },{
|
|
|
+ modelId:10,
|
|
|
+ elements:[{
|
|
|
+ position:1,
|
|
|
+ width:33*0.9,
|
|
|
+ height:(restHeight)*0.4*0.9,
|
|
|
+ x:(33*0.1)/2,
|
|
|
+ y:(restHeight*0.4*0.1)/2
|
|
|
+ },{
|
|
|
+ position:2,
|
|
|
+ width:33*0.9,
|
|
|
+ height:(restHeight)*0.4*0.9,
|
|
|
+ x:(33*0.1)/2+33,
|
|
|
+ y:(restHeight*0.4*0.1)/2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ position:3,
|
|
|
+ width:33*0.9,
|
|
|
+ height:(restHeight)*0.4*0.9,
|
|
|
+ x:(33*0.1)/2+33*2,
|
|
|
+ y:(restHeight*0.4*0.1)/2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ position:4,
|
|
|
+ width:33*0.9,
|
|
|
+ height:(restHeight)*0.4*0.9,
|
|
|
+ x:(33*0.1)/2,
|
|
|
+ y:38
|
|
|
+ },
|
|
|
+ {
|
|
|
+ position:5,
|
|
|
+ width:33*0.9,
|
|
|
+ height:(restHeight)*0.4*0.9,
|
|
|
+ x:(33*0.1)/2+33,
|
|
|
+ y:38
|
|
|
+ },
|
|
|
+ {
|
|
|
+ position:6,
|
|
|
+ width:33*0.9,
|
|
|
+ height:(restHeight)*0.4*0.9,
|
|
|
+ x:(33*0.1)/2+33*2,
|
|
|
+ y:38
|
|
|
+ },
|
|
|
+ {
|
|
|
+ position:7,
|
|
|
+ width:100*0.9,
|
|
|
+ height:(restHeight)*0.18*0.8,
|
|
|
+ x:(100-100*0.9)/2,
|
|
|
+ y:74
|
|
|
+ }]
|
|
|
}
|
|
|
]
|
|
|
//ppt母版
|
|
@@ -579,6 +743,7 @@ export const BaseTextShape = {
|
|
|
richContent:''
|
|
|
}
|
|
|
//默认情况下,版式内部位置对应的组件元素
|
|
|
+//用于版式渲染,版式内切换元素位置
|
|
|
export const defaultPosition = {
|
|
|
1:{//modelId
|
|
|
1:{type:'chart'},//position
|
|
@@ -619,7 +784,31 @@ export const defaultPosition = {
|
|
|
1:{type:'chart'},
|
|
|
2:{type:'chart'},
|
|
|
3:{type:'text'}
|
|
|
- }
|
|
|
+ },
|
|
|
+ 12:{
|
|
|
+ 1:{type:'chart'},
|
|
|
+ 2:{type:'chart'},
|
|
|
+ 3:{type:'chart'},
|
|
|
+ 4:{type:'chart'},
|
|
|
+ 5:{type:'chart'},
|
|
|
+ 6:{type:'chart'},
|
|
|
+ },
|
|
|
+ 11:{
|
|
|
+ 1:{type:'chart'},
|
|
|
+ 2:{type:'chart'},
|
|
|
+ 3:{type:'chart'},
|
|
|
+ 4:{type:'chart'},
|
|
|
+ 5:{type:'text'},
|
|
|
+ },
|
|
|
+ 10:{
|
|
|
+ 1:{type:'chart'},
|
|
|
+ 2:{type:'chart'},
|
|
|
+ 3:{type:'chart'},
|
|
|
+ 4:{type:'chart'},
|
|
|
+ 5:{type:'chart'},
|
|
|
+ 6:{type:'chart'},
|
|
|
+ 7:{type:'text'}
|
|
|
+ },
|
|
|
}
|
|
|
//画笔工具栏
|
|
|
export const boardTool = [
|