Browse Source

Merge branch 'demand-132' into demand-199

cxmo 10 months ago
parent
commit
1bd7e2900a

+ 2 - 0
src/views/ppt/hooks/createPPTContent.js

@@ -17,6 +17,7 @@ import FormatNine from '../template/FormatNine.vue'
 import FormatTen from '../template/FormatTen.vue'
 import FormatEle from '../template/FormatEle.vue'
 import FormatTwelve from '../template/FormatTwelve.vue'
+import FormatThirteen from '../template/FormatThirteen.vue'
 import ChartWrap from '../components/ChartWrap.vue'
 import RichText from '../components/RichText.vue'
 import ImageWrap from '../components/ImageWrap.vue'
@@ -121,6 +122,7 @@ export function getTemplate(modelId){
         [10,FormatTen],
         [11,FormatEle],
         [12,FormatTwelve],
+        [13,FormatThirteen],
         [-1,Footer],
     ])
     return modelMap.get(modelId)

+ 60 - 0
src/views/ppt/template/FormatThirteen.vue

@@ -0,0 +1,60 @@
+<script setup>
+import {ref} from 'vue'
+import {getPPTContentType,getPPTContentItemData,getPPTLayerType} from '../hooks/createPPTContent'
+
+const props=defineProps({
+    pageData:{
+        type:Object,
+        default:{}
+    }
+})
+
+const lang=ref(window.location.pathname.startsWith('/ppten')?'en':'zh')
+
+</script>
+
+<template>
+	<div :class="['ppt-item-box ppt-item-page',lang=='en'?'ppt-item-box_en':'']">
+		<div class="ppt-title-box">{{pageData.title}}</div>
+		<div class="ppt-content-box">
+			<div class="container">
+				<div class="top-box">
+					<component 
+						:is="getPPTContentType(1,pageData.elements)"
+						:itemData="getPPTContentItemData(1,pageData)"
+					/>
+				</div>
+				<div class="bot-box">
+					<component 
+						:is="getPPTContentType(2,pageData.elements)"
+						:itemData="getPPTContentItemData(2,pageData)"
+					/>
+				</div>
+			</div>
+			<div class="layer-wrap">
+				<template v-for="item in pageData.layers" :key="item.id">
+					<component 
+						:is="getPPTLayerType(item)"
+						:itemData="item"
+					/>
+				</template>
+			</div>
+		</div>
+	</div>
+</template>
+
+
+
+<style scoped lang="scss">
+// @import '../style/common.scss';
+.ppt-content-box{
+	.top-box{
+		width: 100%;
+		height: 50%;
+	}
+	.bot-box{
+		width: 100%;
+		height: 50%;
+	}
+}
+</style>

+ 16 - 0
src/views/ppt/utils/config.js

@@ -391,6 +391,22 @@ export const modelConfig = [
             x:(100-100*0.9)/2,
             y:74
         }]
+    },{
+        modelId:13,
+        elements:[{
+            position:1,
+            width:100,
+            height:(restHeight)*0.5*0.9,
+            x:0,
+            y:(restHeight*0.5-restHeight*0.5*0.9)/2
+        },
+        {
+            position:2,
+            width:100,
+            height:(restHeight)*0.5*0.9,
+            x:0,
+            y:(restHeight)*0.5
+        }]
     }
 
 ]