Commit f87334a1 authored by 黄奎's avatar 黄奎

页面修改

parent ff1fa3be
<template> <template>
<!-- ppt 模版新增编辑窗口 --> <!-- ppt 模版新增编辑窗口 -->
<div class="dialogPptistVisible-box" <div class="dialogPptistVisible-box" style="width: 100%;height: 100%;">
style="width: 100%;height: 100%;">
<div class="closePptist-box"> <div class="closePptist-box">
<div class="closePptist"> <div class="closePptist">
<el-tooltip class="item" effect="dark" content="关闭窗口" placement="bottom"> <el-tooltip class="item" effect="dark" content="关闭窗口" placement="bottom">
<i class="el-icon-close" <i class="el-icon-close" style="color: #E95252;" @click="close()"></i>
style="color: #E95252;"
@click="close()"></i>
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
<iframe id="myTemplateUrl" name="myTemplateUrl" :src="Url" <iframe id="myTemplateUrl" name="myTemplateUrl" :src="Url" class="TemplateIframe">
class="TemplateIframe">
</iframe> </iframe>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props:['Url','FeaturePageType'], props: ['Url', 'FeaturePageType'],
data() { data() {
return { return {
dialogPptistVisible: false, dialogPptistVisible: false,
userInfo: {}, userInfo: {},
TemplateUrl:'', TemplateUrl: '',
TemplateUrlImg:'', TemplateUrlImg: '',
isPostMessage: false isPostMessage: false
} }
}, },
...@@ -34,24 +29,25 @@ ...@@ -34,24 +29,25 @@
FeaturePageType: { FeaturePageType: {
//深度监听,可监听到对象、数组的变化 //深度监听,可监听到对象、数组的变化
handler: function (val, oldVal) { handler: function (val, oldVal) {
if(document.all.myTemplateUrl){ if (document.all.myTemplateUrl) {
document.all.myTemplateUrl.src = this.Url+`&t=${new Date().getTime()}` if (this.Url && this.Url != '') {
document.all.myTemplateUrl.src = this.Url + `&t=${new Date().getTime()}`
}
} }
}, },
deep: true, deep: true,
immediate:true immediate: true
}, },
Url: { Url: {
handler: function (val, oldVal) { handler: function (val, oldVal) {
if(document.all.myTemplateUrl){ if (document.all.myTemplateUrl) {
document.all.myTemplateUrl.src = this.Url+`&t=${new Date().getTime()}` 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, deep: true,
immediate:true immediate: true
}, },
}, },
mounted() { mounted() {
...@@ -63,9 +59,10 @@ ...@@ -63,9 +59,10 @@
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.dialogPptistVisible-box{ .dialogPptistVisible-box {
position: fixed; position: fixed;
z-index: 1000; z-index: 1000;
left: 0; left: 0;
...@@ -74,7 +71,8 @@ ...@@ -74,7 +71,8 @@
bottom: 0; bottom: 0;
background: rgba(0, 0, 0, 0.4); background: rgba(0, 0, 0, 0.4);
} }
.closePptist-box{
.closePptist-box {
position: fixed; position: fixed;
z-index: 1001; z-index: 1001;
left: 0; left: 0;
...@@ -84,13 +82,15 @@ ...@@ -84,13 +82,15 @@
background: #fff; background: #fff;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
.closePptist { .closePptist {
padding: 0 30px; padding: 0 30px;
text-align: right; text-align: right;
margin: auto; margin: auto;
position: relative; position: relative;
} }
.closePptist i{
.closePptist i {
display: inline-block; display: inline-block;
padding: 5px 10px; padding: 5px 10px;
font-size: 20px; font-size: 20px;
...@@ -98,7 +98,8 @@ ...@@ -98,7 +98,8 @@
right: 20px; right: 20px;
cursor: pointer; cursor: pointer;
} }
.TemplateIframe{
.TemplateIframe {
border: none; border: none;
width: 100%; width: 100%;
height: calc(100vh - 30px); height: calc(100vh - 30px);
...@@ -110,4 +111,5 @@ ...@@ -110,4 +111,5 @@
right: 0; right: 0;
bottom: 0px; bottom: 0px;
} }
</style> </style>
...@@ -408,8 +408,6 @@ ...@@ -408,8 +408,6 @@
this.dialogPptistVisible = false this.dialogPptistVisible = false
}, },
handleMessage(event, targetOrigin) { handleMessage(event, targetOrigin) {
// console.log("handleMessage_event", event);
// console.log("handleMessage_event.data", event.data);
if (this.isPostMessage) return if (this.isPostMessage) return
if (event.data && event.data.data && !event.data.data) return if (event.data && event.data.data && !event.data.data) return
if (event && event.data) { if (event && event.data) {
...@@ -422,7 +420,9 @@ ...@@ -422,7 +420,9 @@
this.myIframeHeigth = datas[1]; this.myIframeHeigth = datas[1];
this.isPostMessage = true this.isPostMessage = true
} }
if (this.myIframeUrl && this.myIframeUrl != '') {
document.all.myIframe.src = this.myIframeUrl + `&t=${new Date().getTime()}` document.all.myIframe.src = this.myIframeUrl + `&t=${new Date().getTime()}`
}
this.$emit('pptJourney', true) this.$emit('pptJourney', true)
} else if (event.data == '暂无行程数据') { } else if (event.data == '暂无行程数据') {
this.PostMessageText = event.data this.PostMessageText = event.data
...@@ -647,9 +647,11 @@ ...@@ -647,9 +647,11 @@
this.initFileList(); this.initFileList();
if (this.FeatureData.FeatureType == 9) { if (this.FeatureData.FeatureType == 9) {
if (document.all.myIframe) { if (document.all.myIframe) {
if (this.myIframeUrl && this.myIframeUrl != '') {
document.all.myIframe.src = this.myIframeUrl + `&t=${new Date().getTime()}` document.all.myIframe.src = this.myIframeUrl + `&t=${new Date().getTime()}`
} }
} }
}
}, },
//点击折叠 //点击折叠
fold() { fold() {
...@@ -741,18 +743,7 @@ ...@@ -741,18 +743,7 @@
}); });
} }
}, },
mounted() { created() {
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)
}
this.apipost( this.apipost(
"travel_temp_token", {}, "travel_temp_token", {},
res => { res => {
...@@ -762,11 +753,22 @@ ...@@ -762,11 +753,22 @@
if (document.all.myIframe) { if (document.all.myIframe) {
document.all.myIframe.src = this.myIframeUrl + `&t=${new Date().getTime()}` 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: { watch: {
dataAll: { 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