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,54 +495,43 @@ ...@@ -495,54 +495,43 @@
} }
}).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');
a.setAttribute('download', '');
let path = res.data.data
a.setAttribute('href', 'https://microservice.oytour.com/task/create/pdf/' + encodeURIComponent(path));
a.click();
setTimeout(() => {
this.pdfLoading = false
}, 25000)
} else {
this.pdfLoading = false
this.$message.error('PDF获取失败');
}
}).catch(err => {
})
},
// 生成pdf
toPDF_2023New: function (title) {
var fileName = title + "_2023.pdf"; var fileName = title + "_2023.pdf";
this.pdfLoading = true; this.pdfLoading = true;
let urlObj = this.domainManager(); let urlObj = this.domainManager();
let msg = this.getPostMsg(); let msg = this.getPostMsg();
var ocrUrl = urlObj.ocrUrl + "/Home/DownloadFileForPdf?url=" + encodeURIComponent(path);
this.$http({ this.$http({
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
method: 'post', method: 'get',
url: urlObj.DomainUrl + '/api/file/DownLoadPdf2023New', url: ocrUrl,
data: { data: {
"msg": msg
}, },
//responseType: 'arraybuffer' responseType: 'arraybuffer'
}).then(res => { }).then(res => {
console.log(res, "res"); console.log(res, "res");
// let blob = new Blob([res.data], { let blob = new Blob([res.data], {
// type: "application/pdf" type: "application/pdf"
// }) })
// let url = URL.createObjectURL(blob); let url = URL.createObjectURL(blob);
var newUrl = urlObj.ocrUrl + res.data;
let link = document.getElementById('pdfDownLoad'); let link = document.getElementById('pdfDownLoad');
link.href = newUrl; link.href = url;
link.setAttribute("download", fileName); link.setAttribute("download", fileName);
link.click(); link.click();
this.pdfLoading = false; this.pdfLoading = false;
}).catch(err => { }).catch(err => {
this.pdfLoading = false this.pdfLoading = false
}) })
} else {
this.pdfLoading = false
this.$message.error('PDF获取失败');
}
}).catch(err => {
})
}, },
//保存基础数据 //保存基础数据
submitForm: function () { submitForm: function () {
......
...@@ -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