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

页面修改

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