Commit 41752793 authored by zhengke's avatar zhengke

op预览行程

parent 53a94604
...@@ -5,21 +5,25 @@ ...@@ -5,21 +5,25 @@
right: 0; right: 0;
top: 0; top: 0;
bottom: 0; bottom: 0;
overflow: auto; "
"> :style="{'overflow':param.w?'':'auto'}">
<!-- :size="viewportRatio < 1
? VIEWPORT_SIZE.Value
: VIEWPORT_VER_SIZE.Value
" -->
<div class="export-img-dialog"> <div class="export-img-dialog">
<div class="thumbnails-view" ref="refThumbnails"> <div class="thumbnails-view" ref="refThumbnails">
<div class="thumbnails" :style="{width:viewportRatio < 1 <div class="thumbnails" :style="{width:viewportRatio < 1
? VIEWPORT_SIZE.Value ? VIEWPORT_SIZE.Value
: VIEWPORT_VER_SIZE.Value+'px'}" v-for="slide in slides"> : VIEWPORT_VER_SIZE.Value+'px'}" v-for="slide in slides">
<ThumbnailSlide class="thumbnail" :key="slide.id" :slide="slide" :size="viewportRatio < 1 <ThumbnailSlide class="thumbnail" :key="slide.id" :slide="slide"
? VIEWPORT_SIZE.Value
: VIEWPORT_VER_SIZE.Value :size="param.w?param.w:(viewportRatio<1 ? VIEWPORT_SIZE.Value : VIEWPORT_VER_SIZE.Value )" />
" />
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 获取行程颜色dom -->
<div style="position: fixed;left: 200px;top: -100px;opacity: 0;"> <div style="position: fixed;left: 200px;top: -100px;opacity: 0;">
<canvas style="display: none" id="canvas"></canvas> <canvas style="display: none" id="canvas"></canvas>
<div <div
...@@ -65,6 +69,19 @@ const colorList = ([] as any) ...@@ -65,6 +69,19 @@ const colorList = ([] as any)
const w = ref(0) const w = ref(0)
const h = ref(0) const h = ref(0)
const refThumbnails = ref(null)
watch(() => refThumbnails.value, () => {
setTimeout(()=>{
getDomeWH()
},1000)
})
const getDomeWH = async () => {
if(refThumbnails.value){
let height = await refThumbnails.value.offsetHeight;
window.parent.postMessage(`行程特色高-${height}`, `${domainManager().notificationUrl}`);
}
}
const loadSliders = async ()=>{ const loadSliders = async ()=>{
const loadingObj = ElLoading.service({text:'正在渲染数据',lock:true}) const loadingObj = ElLoading.service({text:'正在渲染数据',lock:true})
let response = await ConfigService.GetTripTemplateSlide({TempId:parseInt(param.tempId.toString())}) let response = await ConfigService.GetTripTemplateSlide({TempId:parseInt(param.tempId.toString())})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment