Commit 90ee1d30 authored by zhengke's avatar zhengke

卷妹说下载

parent 84efbbf3
......@@ -15,19 +15,42 @@
<template>
<div class="travelControlTrip detail-box">
<div class="trip_cover" v-show="pdfLoading" v-loading="pdfLoading"></div>
<input type="button" style="width: auto !important; display:none;" class="travelControlTripBtn" value="下载电脑版PDF"
@click="toPDF(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游')" />
<input type="button" style="width: auto !important;" class="travelControlTripBtn" value="下载电脑版PDF"
@click="toPDF_V2(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游')" />
<input type="button" style="width: auto !important;" class="travelControlTripBtn" value="下载手机版WORD"
@click="gernalFeature(0)" />
<input type="button" style="width: auto !important;" class="travelControlTripBtn" value="下载电脑版WORD"
@click="gernalFeature(1)" />
<a class="travelControlTripBtn" v-if="priceList.length>0&& priceList[0].wordPath!=''" style="display:inline-block;text-decoration:none;
width:135px;text-align:center;line-height:30px;font-size:13px;position:relative;top:2px;"
:href="domainManager().ViittoFileUrl+priceList[0].wordPath">下载WORD行程</a>
<!--&&isopOperation HK 注释 可以让销售修改基本信息-->
<input type="button" v-if="orderId>0" class="travelControlTripBtn" value="修改信息" @click="editMsgShow=true" />
<el-row>
<el-col :span="14">
<input type="button" style="width: auto !important; display:none;" class="travelControlTripBtn" value="下载电脑版PDF"
@click="toPDF(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游')" />
<input type="button" style="width: auto !important;" class="travelControlTripBtn" value="下载电脑版PDF"
@click="toPDF_V2(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游')" />
<input type="button" style="width: auto !important;" class="travelControlTripBtn" value="下载手机版WORD"
@click="gernalFeature(0)" />
<input type="button" style="width: auto !important;" class="travelControlTripBtn" value="下载电脑版WORD"
@click="gernalFeature(1)" />
<a class="travelControlTripBtn" v-if="priceList.length>0&& priceList[0].wordPath!=''" style="display:inline-block;text-decoration:none;
width:135px;text-align:center;line-height:30px;font-size:13px;position:relative;top:2px;"
:href="domainManager().ViittoFileUrl+priceList[0].wordPath">下载WORD行程</a>
<!--&&isopOperation HK 注释 可以让销售修改基本信息-->
<input type="button" v-if="orderId>0" class="travelControlTripBtn" value="修改信息" @click="editMsgShow=true" />
</el-col>
<!-- <el-col :span="10">
<span>行程明细</span>
<el-select filterable size="small" v-model="Typevalue" placeholder="请选择">
<el-option label="日本寻秋意赏枫季" :value="-1"></el-option>
<el-option label="仲夏花火夜" :value="-2"></el-option>
<el-option label="寻觅日本美食" :value="-3"></el-option>
<el-option label="邂逅北海道的雪" :value="-4"></el-option>
<el-option
v-for="item in titleList"
:label="item.title"
:value="item.id">
</el-option>
</el-select>
<input type="button" style="width: auto !important;background: rgb(0, 198, 255);border:1px solid rgb(0, 198, 255);outline:none" class="travelControlTripBtn" value="预览"
@click="yuLan" />
<input type="button" style="width: auto !important;outline:none" class="travelControlTripBtn" value="下载"
@click="DownloadJuanmSaid" />
</el-col> -->
</el-row>
<div id="pdfNode">
<div id='pdfDom' style="padding:0 20px;">
<div id="pdf_1">
......@@ -627,6 +650,12 @@
export default {
data() {
return {
Typevalue:-1,
titleList:[],
listMsg:{
pageSize:1000,
pageIndex:1,
},
//微信分享图片
WeiXinShareImgSrc:"",
//下拉框默认值
......@@ -691,8 +720,69 @@
setTimeout(() => {
this.appendParent()
}, 2000)
this.getDataList();
},
methods: {
DownloadJuanmSaid(){
console.log("Typevalue",this.Typevalue)
this.pdfLoading = true
let pageData = document.getElementById('pdfNode').innerHTML
let urlObj = this.domainManager()
this.$http({
headers: {
'Content-Type': 'application/json'
},
method: 'post',
url: urlObj.DomainUrl + '/api/file/DownLoadJuanSaid',
data: {
"msg": {id:this.Typevalue}
}
}).then(res => {
if (res.data.resultCode === 1) {
setTimeout(() => {
let sign = title
const a = document.createElement('a');
a.setAttribute('download', '');
a.setAttribute('href', urlObj.DomainUrl + '/api/file/DownloadFileForPdf?fileName=' + sign +
'.pdf&&fPath=' + res.data.data);
a.click();
}, 1000)
} else {
this.$message.error('PDF获取失败');
}
this.pdfLoading = false
}).catch(err => {
})
},
yuLan(){
if(this.Typevalue==-1){
window.open("http://www.oytour.com/#/FoodImg2");
}
else if(this.Typevalue==-2){
window.open("http://www.oytour.com/#/Fire");
}
else if(this.Typevalue==-3){
window.open("http://www.oytour.com/#/FoodImg");
}
else if(this.Typevalue==-4){
window.open("http://www.oytour.com/#/FoodImg4");
}
else{
window.open("http://www.oytour.com/#/JuanDetails?id="+this.Typevalue);
}
},
// 获取标题
getDataList(){
this.apiJavaPost('/api/rssarticle/getArticleList',this.listMsg,res=>{
if(res.data.resultCode==1){
let data=res.data.data.pageData.list;
this.titleList=data;
}else{
this.Error(res.data.message);
}
},null)
},
//获取微信二维码
getWxCode: function () {
this.apipost('survey_post_GetSurveyWeiXinShare', {
......
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