Commit 6b55026b authored by 吴春's avatar 吴春
parents 160202f5 f87334a1
......@@ -33,8 +33,8 @@
font-size: 15px;
}
._PrintPage_always{
/* page-break-after: always; */
padding-top: 10px;
page-break-after: always;
}
</style>
<template v-loading="loading">
......@@ -92,6 +92,7 @@
</div>
</template>
</template>
<div style="page-break-after: always"></div>
</div>
</div>
</div>
......
<template>
<!-- ppt 模版新增编辑窗口 -->
<div class="dialogPptistVisible-box"
style="width: 100%;height: 100%;">
<div class="dialogPptistVisible-box" style="width: 100%;height: 100%;">
<div class="closePptist-box">
<div class="closePptist">
<el-tooltip class="item" effect="dark" content="关闭窗口" placement="bottom">
<i class="el-icon-close"
style="color: #E95252;"
@click="close()"></i>
<i class="el-icon-close" style="color: #E95252;" @click="close()"></i>
</el-tooltip>
</div>
</div>
<iframe id="myTemplateUrl" name="myTemplateUrl" :src="Url"
class="TemplateIframe">
<iframe id="myTemplateUrl" name="myTemplateUrl" :src="Url" class="TemplateIframe">
</iframe>
</div>
</template>
<script>
export default {
props:['Url','FeaturePageType'],
props: ['Url', 'FeaturePageType'],
data() {
return {
dialogPptistVisible: false,
userInfo: {},
TemplateUrl:'',
TemplateUrlImg:'',
TemplateUrl: '',
TemplateUrlImg: '',
isPostMessage: false
}
},
......@@ -34,24 +29,25 @@
FeaturePageType: {
//深度监听,可监听到对象、数组的变化
handler: function (val, oldVal) {
if(document.all.myTemplateUrl){
document.all.myTemplateUrl.src = this.Url+`&t=${new Date().getTime()}`
if (document.all.myTemplateUrl) {
if (this.Url && this.Url != '') {
document.all.myTemplateUrl.src = this.Url + `&t=${new Date().getTime()}`
}
}
},
deep: true,
immediate:true
immediate: true
},
Url: {
handler: function (val, oldVal) {
if(document.all.myTemplateUrl){
document.all.myTemplateUrl.src = this.Url+`&t=${new Date().getTime()}`
if (document.all.myTemplateUrl) {
if (this.Url && this.Url != '') {
document.all.myTemplateUrl.src = this.Url + `&t=${new Date().getTime()}`
}
}
// window.onload = function () {
// document.getElementById('#myTemplateUrl').contentWindow.location.reload();
// }
},
deep: true,
immediate:true
immediate: true
},
},
mounted() {
......@@ -63,9 +59,10 @@
}
}
}
</script>
<style scoped>
.dialogPptistVisible-box{
.dialogPptistVisible-box {
position: fixed;
z-index: 1000;
left: 0;
......@@ -74,7 +71,8 @@
bottom: 0;
background: rgba(0, 0, 0, 0.4);
}
.closePptist-box{
.closePptist-box {
position: fixed;
z-index: 1001;
left: 0;
......@@ -84,13 +82,15 @@
background: #fff;
border-bottom: 1px solid #eee;
}
.closePptist {
padding: 0 30px;
text-align: right;
margin: auto;
position: relative;
}
.closePptist i{
.closePptist i {
display: inline-block;
padding: 5px 10px;
font-size: 20px;
......@@ -98,7 +98,8 @@
right: 20px;
cursor: pointer;
}
.TemplateIframe{
.TemplateIframe {
border: none;
width: 100%;
height: calc(100vh - 30px);
......@@ -110,4 +111,5 @@
right: 0;
bottom: 0px;
}
</style>
......@@ -408,8 +408,6 @@
this.dialogPptistVisible = false
},
handleMessage(event, targetOrigin) {
// console.log("handleMessage_event", event);
// console.log("handleMessage_event.data", event.data);
if (this.isPostMessage) return
if (event.data && event.data.data && !event.data.data) return
if (event && event.data) {
......@@ -422,7 +420,9 @@
this.myIframeHeigth = datas[1];
this.isPostMessage = true
}
document.all.myIframe.src = this.myIframeUrl + `&t=${new Date().getTime()}`
if (this.myIframeUrl && this.myIframeUrl != '') {
document.all.myIframe.src = this.myIframeUrl + `&t=${new Date().getTime()}`
}
this.$emit('pptJourney', true)
} else if (event.data == '暂无行程数据') {
this.PostMessageText = event.data
......@@ -647,7 +647,9 @@
this.initFileList();
if (this.FeatureData.FeatureType == 9) {
if (document.all.myIframe) {
document.all.myIframe.src = this.myIframeUrl + `&t=${new Date().getTime()}`
if (this.myIframeUrl && this.myIframeUrl != '') {
document.all.myIframe.src = this.myIframeUrl + `&t=${new Date().getTime()}`
}
}
}
},
......@@ -741,6 +743,20 @@
});
}
},
created() {
this.apipost(
"travel_temp_token", {},
res => {
if (res.data.resultCode == 1) {
this.myIframeUrl =
`${this.domainManager().PptUrl}/?uid=${res.data.data}&ConfigId=${this.$route.query.configId}&index=0&model=3&w=1108`
if (document.all.myIframe) {
document.all.myIframe.src = this.myIframeUrl + `&t=${new Date().getTime()}`
}
}
}
);
},
mounted() {
window.addEventListener('message', this.handleMessage, false);
this.CurrentUserInfo = this.getLocalStorage();
......@@ -753,20 +769,6 @@
if (obj) {
this.clickFeature(obj)
}
this.apipost(
"travel_temp_token", {},
res => {
if (res.data.resultCode == 1) {
this.myIframeUrl =
`${this.domainManager().PptUrl}/?uid=${res.data.data}&ConfigId=${this.$route.query.configId}&index=0&model=3&w=1108`
if (document.all.myIframe) {
document.all.myIframe.src = this.myIframeUrl + `&t=${new Date().getTime()}`
}
}
}
);
},
watch: {
dataAll: {
......
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