Commit 52eebe95 authored by youjie's avatar youjie

优化 ppt 行程

parent 4645dc42
......@@ -120,7 +120,6 @@
</UpgradedVersion>
</div>
<!-- ppt 模版行程 -->
<!-- -->
<div v-if="FeatureData.FeatureType==9&&FeatureDataFlag" v-loading="iframeLoading">
<iframe name="myIframe" :src="myIframeUrl" style="width: 100%;border: 0;"
:style="{'height':myIframeHeigth+'px'}" >
......@@ -299,29 +298,27 @@
this.dialogPptistVisible = false
},
handleMessage(event,targetOrigin) {
if(event.data&&event.data.data&&!event.data.data) return
if(this.isPostMessage) return
if(event.data&&event.data.data&&!event.data.data) return
if (event && event.data) {
if (event.data == '行程数据保存成功') {
if (event.data == '行程数据保存成功'||event.data.indexOf('行程特色高')!=-1) {
// this.$emit('ConfigInfo',this.myIframeUrl)
if (document.all.myIframe) {
document.all.myIframe.src = this.myIframeUrl+`&t=${new Date().getTime()}`
}
} else if (event.data == '暂无行程数据') {
this.PostMessageText = event.data
} else {
this.PostMessageText = ''
//行程特色高
this.PostMessageText = '';
if (event.data && typeof(event.data)=='string') {
if (event.data && typeof(event.data)=='string' &&event.data.indexOf('行程特色高')!=-1) {
let datas = event.data.split('-')
this.myIframeHeigth = datas[1];
if (document.all.myIframe) {
document.all.myIframe.src = this.myIframeUrl+`&t=${new Date().getTime()}`
}
this.isPostMessage = true
}
document.all.myIframe.src = this.myIframeUrl+`&t=${new Date().getTime()}`
this.$emit('pptJourney',true)
} else if (event.data == '暂无行程数据') {
this.PostMessageText = event.data
this.$emit('pptJourney',false)
this.isPostMessage = false
}
}
this.isPostMessage = true
this.iframeLoading = false
},
// 添加编辑模版
......@@ -567,9 +564,9 @@
// this.iframeLoading = true
if(document.all.myIframe){
document.all.myIframe.src = this.myIframeUrl+`&t=${new Date().getTime()}`
this.isPostMessage = false
}
}
},
//点击折叠
fold() {
......@@ -657,7 +654,6 @@
this.myIframeUrl = `${this.domainManager().PptUrl}/?uid=${this.userInfo.EmployeeId}&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()}`
this.isPostMessage = false
}
},
watch: {
......
......@@ -58,7 +58,8 @@
<TravelFeature :TripColor="PostConfig.TripColor" :dataAll="PostConfig" :class="{'showOther':(TeamType==3)}" ref="TravelFeature"
id="thirdAnchor" @featureCallBack="getFeature" :FeatureData="FeatureData" :TeamType="TeamType"
:isNewConfig="isNewConfig" @unlockFormCommit="unlockFormCommit" :CurrentUserInfo="CurrentUserInfo"
@ConfigInfo="firstLoadConfigInfo">
@ConfigInfo="firstLoadConfigInfo"
@pptJourney="getPptJourney">
</TravelFeature>
<!-- 地图 -->
<div id="thirdMap">
......@@ -303,9 +304,13 @@
isOffer: 0, //是否是报价单开团
},
saveLoading: false, //保存按钮loading
isPptJourney: false, //是否存在ppt行程
};
},
methods: {
getPptJourney(status){
this.isPptJourney = status
},
/*获取行程特色内容对象*/
getFeature(featureObj) {
this.PostFeature = featureObj;
......@@ -382,6 +387,10 @@
},
//提交验证
submitForm(SaveType) {
if(this.FeatureData.FeatureType==9&&!this.isPptJourney){
this.Error('请编辑PPT行程并保存');
return
}
if (this.PostConfig.LineteamId == 0) {
this.Error('请选择系列');
return
......
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