Commit 000cb91e authored by 黄奎's avatar 黄奎

页面修改

parent 1a16ec7e
......@@ -52,8 +52,8 @@
text-align: center;
border-radius: 4px;
cursor: pointer;
margin-left: 20px;" @click="toPDF_2023New(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游')">
2023版PDF
margin-left: 20px;" @click="toPDF_2023(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游')">
{{orderId>0?"出团通知书下载":"行程下载"}}
</div>
<!--&&isopOperation HK 注释 可以让销售修改基本信息-->
<input type="button" v-if="orderId>0" class="travelControlTripBtn" value="修改信息" @click="editMsgShow=true" />
......@@ -495,15 +495,36 @@
}
}).then(res => {
if (res.data.resultCode === 1 && res.data.data) {
let sign = title + "V2"
const a = document.createElement('a');
a.setAttribute('download', '');
let path = res.data.data
a.setAttribute('href', 'https://microservice.oytour.com/task/create/pdf/' + encodeURIComponent(path));
a.click();
setTimeout(() => {
let path = res.data.data;
var fileName = title + "_2023.pdf";
this.pdfLoading = true;
let urlObj = this.domainManager();
let msg = this.getPostMsg();
var ocrUrl = urlObj.ocrUrl + "/Home/DownloadFileForPdf?url=" + encodeURIComponent(path);
this.$http({
headers: {
'Content-Type': 'application/json'
},
method: 'get',
url: ocrUrl,
data: {
},
responseType: 'arraybuffer'
}).then(res => {
console.log(res, "res");
let blob = new Blob([res.data], {
type: "application/pdf"
})
let url = URL.createObjectURL(blob);
let link = document.getElementById('pdfDownLoad');
link.href = url;
link.setAttribute("download", fileName);
link.click();
this.pdfLoading = false;
}).catch(err => {
this.pdfLoading = false
}, 25000)
})
} else {
this.pdfLoading = false
this.$message.error('PDF获取失败');
......@@ -512,38 +533,6 @@
})
},
// 生成pdf
toPDF_2023New: function (title) {
var fileName = title + "_2023.pdf";
this.pdfLoading = true;
let urlObj = this.domainManager();
let msg = this.getPostMsg();
this.$http({
headers: {
'Content-Type': 'application/json'
},
method: 'post',
url: urlObj.DomainUrl + '/api/file/DownLoadPdf2023New',
data: {
"msg": msg
},
//responseType: 'arraybuffer'
}).then(res => {
console.log(res, "res");
// let blob = new Blob([res.data], {
// type: "application/pdf"
// })
// let url = URL.createObjectURL(blob);
var newUrl = urlObj.ocrUrl + res.data;
let link = document.getElementById('pdfDownLoad');
link.href = newUrl;
link.setAttribute("download", fileName);
link.click();
this.pdfLoading = false;
}).catch(err => {
this.pdfLoading = false
})
},
//保存基础数据
submitForm: function () {
this.editForm.travelOrderFlightList.forEach(x => {
......
......@@ -119,7 +119,7 @@ export default {
let lxymallUrl = ''; //国内游api
let crmUrl = ""; //crm API
let locationName = window.location.hostname;
let ocrUrl="http://192.168.10.214:8150";
let ocrUrl="http://192.168.10.68:8888";
// domainUrl = "http://192.168.10.238:8083"; // 刘东电脑
// domainUrl = "http://192.168.10.226"; //春姐
domainUrl = "http://192.168.10.128"; //奎哥
......
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