Commit d7832d10 authored by 黄奎's avatar 黄奎

页面修改

parent 0447f735
...@@ -4,34 +4,27 @@ ...@@ -4,34 +4,27 @@
<ul> <ul>
<li> <li>
<em>出团公司</em> <em>出团公司</em>
<el-select filterable v-model='msg.OutBranchId' size="small" <el-select filterable v-model='msg.OutBranchId' size="small" @change='getControlList()' clearable>
@change='getControlList()'>
<el-option label="不限" :value="-1" :key="-1"></el-option> <el-option label="不限" :value="-1" :key="-1"></el-option>
<el-option <el-option v-for="item in companyList" :label='item.BName' :value='item.Id' :key='item.Id'></el-option>
v-for="item in companyList"
:label='item.BName'
:value='item.Id'
:key='item.Id'
></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<span> <span>
<em>类型</em> <em>团队类型</em>
<el-select class="w200" v-model="msg.TeamType" filterable :placeholder="$t('pub.pleaseImport')" size="small" <el-select class="w200" v-model="msg.TeamType" filterable :placeholder="$t('pub.pleaseImport')" size="small"
@change="getControlList()"> @change="getControlList()" clearable>
<el-option v-for="item in groupType" :label="item.Name" :value="item.Id" <el-option v-for="item in groupType" :label="item.Name" :value="item.Id" :key="item.Id"></el-option>
:key="item.Id"></el-option>
</el-select> </el-select>
</span> </span>
</li> </li>
<li> <li>
<span> <span>
<em>审核状态</em> <em>审核状态</em>
<el-select class="w200" v-model="msg.BranchAuditState" filterable :placeholder="$t('pub.pleaseImport')" size="small" <el-select class="w200" v-model="msg.BranchAuditState" filterable :placeholder="$t('pub.pleaseImport')"
@change="getControlList()"> size="small" @change="getControlList()" clearable>
<el-option v-for="item in BranchAuditStateType" :label="item.Name" :value="item.Id" <el-option v-for="item in BranchAuditStateType" :label="item.Name" :value="item.Id" :key="item.Id">
:key="item.Id"></el-option> </el-option>
</el-select> </el-select>
</span> </span>
</li> </li>
...@@ -39,186 +32,94 @@ ...@@ -39,186 +32,94 @@
<span> <span>
<em>团号</em> <em>团号</em>
<el-input maxlength="50" v-model="msg.TCNUM" class="permiss-input w200" size="small" <el-input maxlength="50" v-model="msg.TCNUM" class="permiss-input w200" size="small"
@keyup.enter="getControlList" :placeholder="$t('pub.pleaseImport')"></el-input> @keyup.enter="getControlList" :placeholder="$t('pub.pleaseImport')" clearable @clear="getControlList">
</span> </el-input>
</li>
<li v-if="false">
<span>
<em>编号</em>
<el-input maxlength="6" v-model="msg.TCID" class="permiss-input 200" size="small"
@keyup.native.enter="getControlList" :placeholder="$t('pub.pleaseImport')"
@keyup.native="checkInteger(msg,'TCID')"></el-input>
</span> </span>
</li> </li>
<li> <li>
<span> <span>
<em>申请日期</em> <em>申请日期</em>
<el-date-picker <el-date-picker style="width: 300px;" v-model="StartTime" format='yyyy-MM-dd' value-format="yyyy-MM-dd"
style="width: 300px;" size="small" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
v-model="StartTime" @change="getStartTime" clearable>
format='yyyy-MM-dd'
value-format="yyyy-MM-dd"
size="small"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="getStartTime">
</el-date-picker> </el-date-picker>
</span> </span>
</li> </li>
<li> <li>
<button class="hollowFixedBtn" type="button" <button class="hollowFixedBtn" type="button" @click="getControlList">{{$t('pub.searchBtn')}}</button>
@click="getControlList">{{$t('pub.searchBtn')}}</button>
</li> </li>
</ul> </ul>
</div> </div>
<ul class="_nav clearfix" v-if="false"> <el-table v-loading="loading" ref="multipleTable" :data="dataList" tooltip-effect="dark" style="width: 100%"
<li :class="active==1?'_active':''" @click="active=1, msg.OutGroupAuditState=1, getControlList()">待审批</li> @selection-change="handleSelectionChange">
<li :class="active==2?'_active':''" @click="active=2, msg.OutGroupAuditState=2, getControlList()">已审批</li> <el-table-column label="团队编号" width="200">
<div style="float: right;" v-if="multipleSelection.length>0">
<button class="hollowFixedBtn" @click="setAudit()">批量审核</button>
</div>
<li style="float: right;color: red;font-size: 14px;">
<!-- 注:落地团,小包团,国内线 均按订单利润的20%计算最大预计销售提成,实际发放提成不会超过最大预期销售提成 -->
</li>
</ul>
<ul style="overflow: initial!important">
<li style="margin-bottom:10px;width: 100%;">
</li>
</ul>
<el-table
v-loading="loading"
ref="multipleTable"
:data="dataList"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
>
<!-- <el-table-column
type="selection"
width="55" :selectable="selectable"> -->
</el-table-column>
<el-table-column
label="团队编号"
width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.OutBranchName}}</p> <p>{{scope.row.OutBranchName}}</p>
<span style="cursor: pointer;text-decoration: underline;" <span style="cursor: pointer;text-decoration: underline;"
@click="goTravel(scope.row.TCID)">{{scope.row.TCNUM}}({{scope.row.TCID}})</span> @click="goTravel(scope.row)">{{scope.row.TCNUM}}({{scope.row.TCID}})</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="StartDate" label="出发日期" width="120" show-overflow-tooltip></el-table-column>
prop="LtName" <el-table-column prop="LtName" label="系列" width="200" show-overflow-tooltip>
label="系列"
width="200"
show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.LineName}}</br> {{scope.row.LineName}}</br>
{{scope.row.LtName}} {{scope.row.LtName}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="Title" label="团名" width="200" show-overflow-tooltip></el-table-column>
prop="Title" <el-table-column prop="" label="申请人/申请日期" width="200">
label="团名"
width="200"
show-overflow-tooltip></el-table-column>
<el-table-column
prop=""
label="申请人/申请日期" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<p> {{scope.row.BranchApplyName}}</p> <p> {{scope.row.BranchApplyName}}</p>
<p> {{scope.row.BranchApplyTime}}</p> <p> {{scope.row.BranchApplyTime}}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="OPName" label="申请原因" show-overflow-tooltip>
prop="OPName"
label="申请原因" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.BranchApplyResion}} {{scope.row.BranchApplyResion}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="PriceTeamTypeName" label="团队类型" width="130">
prop="PriceTeamTypeName"
label="团队类型" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.TeamTypeName">{{scope.row.TeamTypeName}}</template> <template v-if="scope.row.TeamTypeName">{{scope.row.TeamTypeName}}</template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="OldBranchName" label="原出团公司" width="130"></el-table-column>
prop="OldBranchName" <el-table-column prop="NewBranchName" label="新出团公司" width="130"></el-table-column>
label="原出团公司" width="130"></el-table-column> <el-table-column prop="" label="审核状态" width="100">
<el-table-column
prop="NewBranchName"
label="新出团公司" width="130"></el-table-column>
<el-table-column
prop=""
label="审核状态" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{'color':scope.row.BranchAuditState==1?'red':scope.row.BranchAuditState==2?'#33B3FF':''}"> <span :style="{'color':scope.row.BranchAuditState==3?'red':scope.row.BranchAuditState==2?'#33B3FF':'blue'}">
{{scope.row.BranchAuditStateStr}} {{scope.row.BranchAuditStateStr}}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="" label="操作" width="150">
prop=""
label="操作"
width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="_icon_btn"> <div class="_icon_btn">
<el-tooltip class="item" effect="dark" content="审核" placement="top" <el-tooltip class="item" effect="dark" content="审核" placement="top" v-if="scope.row.BranchAuditState==1">
v-if="scope.row.BranchAuditState==1">
<i v-loading="loading" class="iconfont icon-ico_commodity_defaul" @click="shenhei(scope.row)"></i> <i v-loading="loading" class="iconfont icon-ico_commodity_defaul" @click="shenhei(scope.row)"></i>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="驳回" placement="top" v-if="scope.row.BranchAuditState==1"> <el-tooltip class="item" effect="dark" content="驳回" placement="top" v-if="scope.row.BranchAuditState==1">
<i class="iconfont icon-shenhebohui" @click="bohui(scope.row)"></i> <i class="iconfont icon-shenhebohui" @click="bohui(scope.row)"></i>
</el-tooltip> </el-tooltip>
<!-- <el-tooltip class="item" effect="dark" content="收支明细" placement="top">
<i class="iconfont icon-mingxi" @click="goTeamBalance(scope.row.TCID)"></i>
</el-tooltip> -->
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="width: 100%;"> <div style="width: 100%;">
<el-pagination background <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
@size-change="handleSizeChange" :current-page.sync="msg.pageIndex" layout="sizes,total,prev, pager, next, jumper"
@current-change="handleCurrentChange" :page-sizes="[5, 10, 20, 30,50,100]" :page-size="msg.pageSize" :total="total">
:current-page.sync="msg.pageIndex"
layout="sizes,total,prev, pager, next, jumper"
:page-sizes="[5, 10, 20, 30,50,100]"
:page-size="msg.pageSize" :total="total">
</el-pagination> </el-pagination>
</div> </div>
<el-dialog <el-dialog custom-class="w600" title="驳回缘由" :visible.sync="cancelOrderDialog">
custom-class="w600"
title="驳回缘由"
:visible.sync="cancelOrderDialog"
>
<div style="padding-bottom:20px"> <div style="padding-bottom:20px">
<el-input <el-input type="textarea" autofocus rows="5" placeholder="请填写驳回该团的缘由" clear="w300" v-model="cancelRemark">
type="textarea" </el-input>
autofocus
rows="5"
placeholder="请填写驳回该团的缘由"
clear="w300"
v-model="cancelRemark"
></el-input>
<el-row :gutter="20" style="margin-top: 20px;"> <el-row :gutter="20" style="margin-top: 20px;">
<el-col :span="24" style="text-align: right;"> <el-col :span="24" style="text-align: right;">
<el-button <el-button class="normalBtn" value="" @click="cancelOrderHandler" :loading="loading">确定驳回</el-button>
class="normalBtn" <el-button class="hollowFixedBtn" @click="cancelOrderDialog = false,cancelRemark=''">关闭</el-button>
value=""
@click="cancelOrderHandler"
:loading="loading"
>确定驳回</el-button>
<el-button
class="hollowFixedBtn"
@click="cancelOrderDialog = false,cancelRemark=''"
>关闭</el-button>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
...@@ -227,56 +128,68 @@ ...@@ -227,56 +128,68 @@
</template> </template>
<script> <script>
export default { export default {
components: { components: {
}, },
data() { data() {
return { return {
StartTime:[], StartTime: [],
groupType:[ groupType: [{
{Name:'不限',Id:-1}, Name: '不限',
{Name:'小包团',Id:1}, Id: -1
{Name:'当地游',Id:2}, },
{Name:'常规团',Id:0} {
Name: '小包团',
Id: 1
},
{
Name: '当地游',
Id: 2
},
{
Name: '常规团',
Id: 0
}
], ],
BranchAuditStateType:[ BranchAuditStateType: [{
{Name:'不限',Id:-1}, Name: '不限',
{Name:'待审核',Id:1}, Id: -1
{Name:'通过',Id:2}, },
{Name:'驳回',Id:3} {
Name: '待审核',
Id: 1
},
{
Name: '通过',
Id: 2
},
{
Name: '驳回',
Id: 3
}
], ],
companyList:[], companyList: [],
cancelRemark: '', cancelRemark: '',
dataRow: null, dataRow: null,
cancelOrderDialog: false, cancelOrderDialog: false,
loading: false, loading: false,
dataList: [], dataList: [],
active: '1',
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
TCNUM: '',//团号 TCNUM: '', //团号
TeamType: -1,//团队类型 0-常规,1-小包团,2-当地游 TeamType: -1, //团队类型 0-常规,1-小包团,2-当地游
OutBranchId: -1, OutBranchId: -1,
QStartDate: '', QStartDate: '',
QEndDate: '', QEndDate: '',
BranchAuditState: -1 BranchAuditState: 1, //默认待审核
}, },
TeamListArr:[], total: 0,
total:0,
EmployeeId:0,
multipleSelection: [], multipleSelection: [],
AuditLoading: false, getCompanyMsg: {
dialog: { RB_Group_Id: '0',
show: false, Status: '0',
ConfigId: '',
OfferId: ''
},
getCompanyMsg:{
RB_Group_Id:'0',
Status:'0',
}, },
} }
}, },
...@@ -285,104 +198,34 @@ ...@@ -285,104 +198,34 @@
var MonthDayNum = new Date(myDate.getFullYear(), myDate.getMonth(), 0).getDate(); var MonthDayNum = new Date(myDate.getFullYear(), myDate.getMonth(), 0).getDate();
var StartTime = `${myDate.getFullYear()}-${myDate.getMonth() + 1}-01` var StartTime = `${myDate.getFullYear()}-${myDate.getMonth() + 1}-01`
var EndTime = `${myDate.getFullYear()}-${myDate.getMonth() + 1}-${MonthDayNum}` var EndTime = `${myDate.getFullYear()}-${myDate.getMonth() + 1}-${MonthDayNum}`
this.StartTime = [StartTime,EndTime] this.StartTime = [StartTime, EndTime]
this.msg.QStartDate = StartTime this.msg.QStartDate = StartTime
this.msg.QEndDate = EndTime this.msg.QEndDate = EndTime
this.getTeamList() if (this.$route.query && this.$route.query.TCID) {
let userinfo = this.getLocalStorage();
this.getCompanyMsg.RB_Group_Id=userinfo.RB_Group_id;
this.EmployeeId = userinfo.EmployeeId
let ActionMenuCode=userinfo.ActionMenuCode;
if(ActionMenuCode.indexOf('Finance_clumpSeeAll')!=-1){//如果有权限 可以查看所有 如果没有只能看自己审核的
// this.msg.OutGroupAuditEmpId = 0
}else{
// this.msg.OutGroupAuditEmpId = userinfo.EmployeeId
}
if(this.$route.query && this.$route.query.TCID){
this.msg.TCID = this.$route.query.TCID this.msg.TCID = this.$route.query.TCID
} }
this.getCompany() this.getCompany()
}, },
mounted() { mounted() {
this.getList() this.getList()
}, },
methods: { methods: {
getStartTime(){ getStartTime() {
if(this.StartTime.length==2){ if (this.StartTime.length == 2) {
this.msg.QStartDate = this.StartTime[0] this.msg.QStartDate = this.StartTime[0]
this.msg.QEndDate = this.StartTime[1] this.msg.QEndDate = this.StartTime[1]
}else{ } else {
this.msg.QStartDate = '' this.msg.QStartDate = ''
this.msg.QEndDate = '' this.msg.QEndDate = ''
} }
}, },
// 销售预期提成 getCompany() {
goAnticipate(row,type){ this.apipost('admin_get_BranchGetList', this.getCompanyMsg, res => {
let userInfo = this.getLocalStorage(); if (res.data.resultCode == 1) {
let name this.companyList = res.data.data;
if(type==1){//国内
name = 'domesticCommissiondetails'
}else if(type==2){//单项
name = 'ServiceCommissiondetails'
}else if(type==3){//台湾
name = 'domesticCommissiondetailsTW'
}else if(type==4){//同业
name = 'TradeTicketDetails'
}
this.$router.push({
name: name,
query: {
Type: 1,
TCNUM: row.TCNUM,
blank: 'y'
}
});
},
getCompany(){
this.apipost('admin_get_BranchGetList',this.getCompanyMsg,res=>{
if(res.data.resultCode==1){
this.companyList=res.data.data;
}else{}
},err=>{})
},
showDialog(ConfigId, OfferId) {
this.dialog = {
show: true,
ConfigId,
OfferId
} }
this.$nextTick(() => {
this.$refs.dialog.getPostData()
}) })
}, },
selectable(row, index) {
if(this.active==1){
return true
}else{
return false
}
},
setAudit(type){
let ids = this.multipleSelection.map(x=>{ return x.TCID})
if(ids.length==0){
return this.$message.error('请勾选需要批量审核的数据');
}
let that = this;
that.$confirm('是否通过该批量审核数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
for(let i=0;i<ids.length;i++){
setTimeout(()=>{
this.groupAudit(2,ids[i],'multiple',(i+1)==ids.length?ids.length:0)
},500)
}
}).catch(() => {
});
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
...@@ -390,11 +233,11 @@ ...@@ -390,11 +233,11 @@
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.getList() this.getList()
}, },
handleSizeChange(e){ handleSizeChange(e) {
this.msg.pageSize = e; this.msg.pageSize = e;
this.getList() this.getList()
}, },
handleCurrentChange(e){ handleCurrentChange(e) {
this.msg.pageIndex = e; this.msg.pageIndex = e;
this.getList() this.getList()
}, },
...@@ -409,13 +252,9 @@ ...@@ -409,13 +252,9 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData; this.dataList = res.data.data.pageData;
this.total = res.data.data.count; this.total = res.data.data.count;
} else {
}else{
this.Error(res.data.message); this.Error(res.data.message);
} }
},
err => {
} }
); );
}, },
...@@ -426,13 +265,13 @@ ...@@ -426,13 +265,13 @@
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.groupAudit(2,item.TCID) this.groupAudit(2, item.TCID)
}).catch(() => { }).catch(() => {
}); });
}, },
cancelOrderHandler(){ cancelOrderHandler() {
if(!this.cancelRemark) return this.Error('请输入驳回缘由') if (!this.cancelRemark) return this.Error('请输入驳回缘由')
let that = this; let that = this;
that.$confirm('是否驳回该团?', '提示', { that.$confirm('是否驳回该团?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -440,7 +279,7 @@ ...@@ -440,7 +279,7 @@
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
//掉接口 //掉接口
this.groupAudit(3,this.dataRow.TCID) this.groupAudit(3, this.dataRow.TCID)
}).catch(() => { }).catch(() => {
}); });
...@@ -449,37 +288,26 @@ ...@@ -449,37 +288,26 @@
this.dataRow = item this.dataRow = item
this.cancelOrderDialog = true this.cancelOrderDialog = true
return return
let that = this;
that.$confirm('是否驳回该团?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
//掉接口
this.groupAudit(3,item.TCID)
}).catch(() => {
});
}, },
groupAudit(type,TCID,name,length){ groupAudit(type, TCID, name, length) {
let msg = { let msg = {
TCID:TCID, TCID: TCID,
BranchAuditState:type, BranchAuditState: type,
BranchAuditRemark:this.cancelRemark BranchAuditRemark: this.cancelRemark
} }
this.loading = true this.loading = true
this.apipost("travel_post_AuditPriceOutBranchTeamType", { this.apipost("travel_post_AuditPriceOutBranchTeamType", {
TCID:TCID, TCID: TCID,
BranchAuditState:type, BranchAuditState: type,
BranchAuditRemark:this.cancelRemark BranchAuditRemark: this.cancelRemark
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
if(!name){ if (!name) {
this.cancelOrderDialog = false this.cancelOrderDialog = false
this.Success(res.data.message); this.Success(res.data.message);
this.getList() this.getList()
}else{ } else {
if(length){ if (length) {
this.cancelOrderDialog = false this.cancelOrderDialog = false
this.Success(res.data.message); this.Success(res.data.message);
this.getList() this.getList()
...@@ -489,37 +317,21 @@ ...@@ -489,37 +317,21 @@
this.Error(res.data.message); this.Error(res.data.message);
} }
this.loading = false this.loading = false
}, }
err => { }
); );
}, },
goTeamBalance(id, OutBranchId) {//团队收支明细 goTravel(item) { //跳转到团队列表
this.$router.push({ var newPath = "TravelControlList";
name: "TeamBalancePayment", if (item.TeamType == 1) {
query: { newPath = "TravelControlListSale"
id: id,
IsHaveAuth: true,
blank: "y",
tab: "团队收支明细"
} }
}); if (item.TeamType == 2) {
}, newPath = "oneDayTrip"
getTeamList() {
this.apipost("travel_get_GetTravelPriceTeamTypeList", {}, res => {
if (res.data.resultCode == 1) {
this.TeamListArr = res.data.data;
} else {
this.Error(res.data.message);
} }
},
err => { }
);
},
goTravel(TCID){//跳转到团队列表
this.$router.push({ this.$router.push({
path: 'TravelControlList', path: newPath,
query: { query: {
TCID: TCID, TCID: item.TCID,
blank: 'y', blank: 'y',
tab: '团控列表' tab: '团控列表'
} }
...@@ -598,4 +410,5 @@ ...@@ -598,4 +410,5 @@
._icon_btn i.icon-mingxi { ._icon_btn i.icon-mingxi {
background-color: rgb(71, 191, 140) background-color: rgb(71, 191, 140)
} }
</style> </style>
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
<!-- ppt 模版行程 --> <!-- ppt 模版行程 -->
<div v-if="FeatureData.FeatureType==9&&FeatureDataFlag" v-loading="iframeLoading"> <div v-if="FeatureData.FeatureType==9&&FeatureDataFlag" v-loading="iframeLoading">
<iframe name="myIframe" :src="myIframeUrl" style="width: 100%;border: 0;" <iframe name="myIframe" :src="myIframeUrl" style="width: 100%;border: 0;"
:style="{'height':myIframeHeigth+'px'}" > :style="{'height':myIframeHeigth+'px'}">
</iframe> </iframe>
<!-- <div v-if="FeatureData.TripImageListNew&&FeatureData.TripImageListNew.length>0"> <!-- <div v-if="FeatureData.TripImageListNew&&FeatureData.TripImageListNew.length>0">
<template v-for="url in FeatureData.TripImageListNew"> <template v-for="url in FeatureData.TripImageListNew">
...@@ -132,7 +132,8 @@ ...@@ -132,7 +132,8 @@
:preview-src-list="FeatureData.TripImageListNew"></el-image> :preview-src-list="FeatureData.TripImageListNew"></el-image>
</template> </template>
</div> --> </div> -->
<div v-show="PostMessageText=='暂无行程数据'" style="text-align: center;margin-bottom: 20px;font-size: 14px;color: #808080;">暂无数据,右上角编辑行程试试吧!</div> <div v-show="PostMessageText=='暂无行程数据'"
style="text-align: center;margin-bottom: 20px;font-size: 14px;color: #808080;">暂无数据,右上角编辑行程试试吧!</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -281,8 +282,8 @@ ...@@ -281,8 +282,8 @@
CurrentUserInfo: {}, CurrentUserInfo: {},
dialogPptistVisible: false, dialogPptistVisible: false,
userInfo: {}, userInfo: {},
TemplateUrl:'',// 模版 修改url TemplateUrl: '', // 模版 修改url
myIframeUrl:'',//行程特色url myIframeUrl: '', //行程特色url
myIframeHeigth: 0, myIframeHeigth: 0,
isPostMessage: false, isPostMessage: false,
PostMessageText: '', PostMessageText: '',
...@@ -294,38 +295,44 @@ ...@@ -294,38 +295,44 @@
}, },
methods: { methods: {
closeIframe(){ closeIframe() {
this.dialogPptistVisible = false this.dialogPptistVisible = false
}, },
handleMessage(event,targetOrigin) { handleMessage(event, targetOrigin) {
if(this.isPostMessage) return console.log("event", event);
if(event.data&&event.data.data&&!event.data.data) return console.log("event.data", event.data);
if (this.isPostMessage) return
if (event.data && event.data.data && !event.data.data) return
if (event && event.data) { if (event && event.data) {
if (event.data == '行程数据保存成功'||event.data.indexOf('行程特色高')!=-1) { try {
if (event.data == '行程数据保存成功' || event.data.indexOf('行程特色高') != -1) {
// this.$emit('ConfigInfo',this.myIframeUrl) // this.$emit('ConfigInfo',this.myIframeUrl)
this.PostMessageText = '' this.PostMessageText = ''
//行程特色高 //行程特色高
if (event.data && typeof(event.data)=='string' &&event.data.indexOf('行程特色高')!=-1) { if (event.data && typeof (event.data) == 'string' && event.data.indexOf('行程特色高') != -1) {
let datas = event.data.split('-') let datas = event.data.split('-')
this.myIframeHeigth = datas[1]; this.myIframeHeigth = datas[1];
this.isPostMessage = true this.isPostMessage = true
} }
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
this.$emit('pptJourney',false) this.$emit('pptJourney', false)
this.isPostMessage = false this.isPostMessage = false
} }
} } catch {
this.iframeLoading = false }
}
this.iframeLoading = false;
}, },
// 添加编辑模版 // 添加编辑模版
journeyTemplate(){ journeyTemplate() {
this.isPostMessage = false this.isPostMessage = false;
let href = this.domainManager().PptUrl let href = this.domainManager().PptUrl
this.TemplateUrl=`${href}/?uid=${this.userInfo.EmployeeId}&ConfigId=${this.FeatureData.ConfigId}&model=0&TempType=${this.dataAll.FeaturePageType}` this.TemplateUrl =
`${href}/?uid=${this.userInfo.EmployeeId}&ConfigId=${this.FeatureData.ConfigId}&model=0&TempType=${this.dataAll.FeaturePageType}`
// this.TemplateUrl=`${href}/index/${this.userInfo.EmployeeId}/${this.FeatureData.ConfigId}/0/${this.dataAll.FeaturePageType}` // this.TemplateUrl=`${href}/index/${this.userInfo.EmployeeId}/${this.FeatureData.ConfigId}/0/${this.dataAll.FeaturePageType}`
this.dialogPptistVisible = true this.dialogPptistVisible = true
}, },
...@@ -560,10 +567,10 @@ ...@@ -560,10 +567,10 @@
}); });
} }
this.initFileList(); this.initFileList();
if(this.FeatureData.FeatureType==9) { if (this.FeatureData.FeatureType == 9) {
// this.iframeLoading = true // this.iframeLoading = true
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()}`
} }
} }
...@@ -638,30 +645,30 @@ ...@@ -638,30 +645,30 @@
} }
}, },
mounted() { mounted() {
window.addEventListener('message', this.handleMessage,false); window.addEventListener('message', this.handleMessage, false);
this.userInfo = this.getLocalStorage() this.userInfo = this.getLocalStorage()
let userInfo = this.getLocalStorage() let userInfo = this.getLocalStorage()
this.CurrentUserInfo = userInfo this.CurrentUserInfo = userInfo
this.MsgBus.$on('FeatureDataFlag', () => { this.MsgBus.$on('FeatureDataFlag', () => {
this.FeatureDataFlag = true this.FeatureDataFlag = true
}); });
let obj = this.TypeArray.find(x=>{ let obj = this.TypeArray.find(x => {
return x.TypeState == this.FeatureData.FeatureType return x.TypeState == this.FeatureData.FeatureType
}) })
if(obj){ if (obj) {
this.clickFeature(obj) this.clickFeature(obj)
} }
this.myIframeUrl = `${this.domainManager().PptUrl}/?uid=${this.userInfo.EmployeeId}&ConfigId=${this.$route.query.configId}&index=0&model=3&w=1108` this.myIframeUrl =
if(document.all.myIframe){ `${this.domainManager().PptUrl}/?uid=${this.userInfo.EmployeeId}&ConfigId=${this.$route.query.configId}&index=0&model=3&w=1108`
document.all.myIframe.src = this.myIframeUrl+`&t=${new Date().getTime()}` if (document.all.myIframe) {
document.all.myIframe.src = this.myIframeUrl + `&t=${new Date().getTime()}`
} }
}, },
watch: { watch: {
dataAll:{ dataAll: {
handler: function (val, oldVal) { handler: function (val, oldVal) {},
},
deep: true, deep: true,
immediate:true immediate: true
}, },
FeatureData: { FeatureData: {
//深度监听,可监听到对象、数组的变化 //深度监听,可监听到对象、数组的变化
...@@ -671,7 +678,7 @@ ...@@ -671,7 +678,7 @@
}, },
deep: true, deep: true,
immediate:true immediate: true
}, },
"FeatureData.fileList": { "FeatureData.fileList": {
handler: function (val, oldval) { handler: function (val, oldval) {
......
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