Commit f87334a1 authored by 黄奎's avatar 黄奎

页面修改

parent ff1fa3be
<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
}
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,9 +647,11 @@
this.initFileList();
if (this.FeatureData.FeatureType == 9) {
if (document.all.myIframe) {
if (this.myIframeUrl && this.myIframeUrl != '') {
document.all.myIframe.src = this.myIframeUrl + `&t=${new Date().getTime()}`
}
}
}
},
//点击折叠
fold() {
......@@ -741,18 +743,7 @@
});
}
},
mounted() {
window.addEventListener('message', this.handleMessage, false);
this.CurrentUserInfo = this.getLocalStorage();
this.MsgBus.$on('FeatureDataFlag', () => {
this.FeatureDataFlag = true
});
let obj = this.TypeArray.find(x => {
return x.TypeState == this.FeatureData.FeatureType
})
if (obj) {
this.clickFeature(obj)
}
created() {
this.apipost(
"travel_temp_token", {},
res => {
......@@ -762,11 +753,22 @@
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();
this.MsgBus.$on('FeatureDataFlag', () => {
this.FeatureDataFlag = true
});
let obj = this.TypeArray.find(x => {
return x.TypeState == this.FeatureData.FeatureType
})
if (obj) {
this.clickFeature(obj)
}
},
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