Commit e32e3449 authored by youjie's avatar youjie

财务单据详情 优化多图展示, 行程特色iframe

parents bec7252a 1d344d4d
......@@ -6,6 +6,11 @@
</span>
<span class="foldList" @click="fold" v-if="isFold==''">{{$t('sm.djzd')}}</span>
<span class="foldList" @click="fold" v-if="isFold==1">{{$t('sm.djzk')}}</span>
<!-- <span class="foldList" style="margin-right: 5px;"
v-if="userInfo.IsEditTripTemplate"
@click="journeyTemplate(1)">添加模版</span>
<span class="foldList" style="margin-right: 5px;"
@click="journeyTemplate(0)">编辑行程</span> -->
<div class="TrfList clearfix">
<!--&&item.TypeState!=8-->
<template v-for="item in TypeArray">
......@@ -118,6 +123,23 @@
</div>
</div>
</div>
<!-- ppt 模版 -->
<div class="dialogPptistVisible-box" v-show="dialogPptistVisible"
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="dialogPptistVisible=!dialogPptistVisible"></i>
</el-tooltip>
</div>
</div>
<iframe :src="TemplateUrl"
class="TemplateIframe">
</iframe>
</div>
</div>
</template>
<script>
......@@ -247,12 +269,36 @@
isFold: "",
FeatureDataFlag: false,
//当前登录用户信息
CurrentUserInfo: {}
CurrentUserInfo: {},
dialogPptistVisible: false,
userInfo: {},
TemplateUrl:'',
isPostMessage: false
};
},
created: function () {},
methods: {
handleMessage(event,targetOrigin) {
if(this.isPostMessage) return
if(event.data=='行程数据保存成功'){
this.dialogPptistVisible = false
this.isPostMessage = true
this.$emit('ConfigInfo')
}
},
// 添加编辑模版
journeyTemplate(type){
this.isPostMessage = false
// console.log(this.userInfo.EmployeeId,'-----',this.FeatureData.ConfigId)
let href = window.location.href.indexOf('localhost:')!=-1?'http://localhost:8080/':'http://localhost:8080/'
if(type&&type==1){
this.TemplateUrl=`${href}?uid=${this.userInfo.EmployeeId}&model=1`
}else{
this.TemplateUrl=`${href}?ConfigId=${this.FeatureData.ConfigId}&model=1`
}
this.dialogPptistVisible = true
},
//重新加载行程特色
ReLoadFeature() {
if (this.$refs.UpgradedVersion != undefined) {
......@@ -555,6 +601,8 @@
}
},
mounted() {
window.addEventListener('message', this.handleMessage,false);
this.userInfo = this.getLocalStorage()
let userInfo = this.getLocalStorage()
this.CurrentUserInfo = userInfo
this.MsgBus.$on('FeatureDataFlag', () => {
......@@ -1661,5 +1709,49 @@
font-size: 16px;
color: #333333;
}
.dialogPptistVisible-box{
position: fixed;
z-index: 1000;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
}
.closePptist-box{
position: fixed;
z-index: 1001;
left: 0;
right: 0;
top: 0;
height: 30px;
background: #fff;
border-bottom: 1px solid #eee;
}
.closePptist {
padding: 0 30px;
text-align: right;
margin: auto;
position: relative;
}
.closePptist i{
display: inline-block;
padding: 5px 10px;
font-size: 20px;
position: absolute;
right: 20px;
cursor: pointer;
}
.TemplateIframe{
border: none;
width: 100%;
height: calc(100vh - 30px);
background: rgb(243, 246, 251);
position: fixed;
z-index: 1002;
top: 30px;
left: 0;
right: 0;
bottom: 0px;
}
</style>
......@@ -57,7 +57,8 @@
:TeamType="TeamType" :IsOpenHotel="PostConfig.IsOpenHotel"></TravelDaysTripDirect>
<TravelFeature :TripColor="PostConfig.TripColor" :class="{'showOther':(TeamType==3)}" ref="TravelFeature"
id="thirdAnchor" @featureCallBack="getFeature" :FeatureData="FeatureData" :TeamType="TeamType"
:isNewConfig="isNewConfig" @unlockFormCommit="unlockFormCommit" :CurrentUserInfo="CurrentUserInfo">
:isNewConfig="isNewConfig" @unlockFormCommit="unlockFormCommit" :CurrentUserInfo="CurrentUserInfo"
@ConfigInfo="firstLoadConfigInfo">
</TravelFeature>
<!-- 地图 -->
<div id="thirdMap">
......@@ -303,6 +304,16 @@
};
},
methods: {
handleMessage(event,targetOrigin) {
console.log(event.data,'------',targetOrigin)
if(this.isPostMessage) return
if(event.data=='行程数据保存成功'){
this.isPostMessage = true
}
if(event.origin === targetOrigin){
}
},
/*获取行程特色内容对象*/
getFeature(featureObj) {
this.PostFeature = featureObj;
......
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