Commit 08c61845 authored by 华国豪's avatar 华国豪 🙄

'行程下载'

parent 62b98efc
...@@ -642,9 +642,11 @@ ...@@ -642,9 +642,11 @@
}, },
methods: { methods: {
gernalFeature(){ gernalFeature(){
this.pdfLoading = true;
let tcid = this.$route.query.tcid; let tcid = this.$route.query.tcid;
let UploadUrl = this.domainManager().UploadUrl
$.ajax({ $.ajax({
url: 'http://127.0.0.1:8120/Upload/RemoveImage?fileType=1&fileLimit=5&&filePath=Freature/' + tcid, url: UploadUrl + '/Upload/RemoveImage?fileType=1&fileLimit=5&&filePath=Freature/' + tcid,
type: "POST", type: "POST",
datatype:"jsonP", datatype:"jsonP",
success: function (data) { success: function (data) {
...@@ -683,7 +685,7 @@ ...@@ -683,7 +685,7 @@
image.src = canvas.toDataURL("image/png"); image.src = canvas.toDataURL("image/png");
// document.body.appendChild(image) upload.oytour.com // document.body.appendChild(image) upload.oytour.com
$.ajax({ $.ajax({
url: 'http://127.0.0.1:8120/Upload/UploadBase64?fileType=1&fileLimit=5&&filePath=Freature/' + tcid, url: UploadUrl + '/Upload/UploadBase64?fileType=1&fileLimit=5&&filePath=Freature/' + tcid,
type: "POST", type: "POST",
data: { data: {
myfile: image.src, myfile: image.src,
...@@ -922,7 +924,10 @@ ...@@ -922,7 +924,10 @@
//是否显示团号 //是否显示团号
isShowTCNUM:this.vshowTCNUM?1:0 isShowTCNUM:this.vshowTCNUM?1:0
}; };
this.GetLocalFile("DownLoadTripWord", msg,title+ ".doc"); this.GetLocalFile("DownLoadTripWord", msg,title+ ".doc", res=>{
this.pdfLoading = false
});
}, },
DateDiff(sDate1, sDate2) { //sDate1和sDate2是2002-12-18格式 DateDiff(sDate1, sDate2) { //sDate1和sDate2是2002-12-18格式
var aDate, oDate1, oDate2, iDays var aDate, oDate1, oDate2, iDays
......
...@@ -149,7 +149,7 @@ export default { ...@@ -149,7 +149,7 @@ export default {
GoogleMapUrl: "http://ditu.google.cn/maps/api/js?key=AIzaSyAZ5MIfzicStzKbIkbI3RcBBeZBjQFKsp0&sensor=false&language=zh-CN", GoogleMapUrl: "http://ditu.google.cn/maps/api/js?key=AIzaSyAZ5MIfzicStzKbIkbI3RcBBeZBjQFKsp0&sensor=false&language=zh-CN",
//google地图图片地址 //google地图图片地址
GoogleMapImageUrl: "http://super.oytour.com", GoogleMapImageUrl: "http://super.oytour.com",
Upload: "http://127.0.0.1:8120" UploadUrl: "http://upload.oytour.com"
}; };
return obj; return obj;
}, },
...@@ -219,9 +219,7 @@ export default { ...@@ -219,9 +219,7 @@ export default {
Vue.prototype.uploadImg = function (tcID, msg, successCall, faildCall) { Vue.prototype.uploadImg = function (tcID, msg, successCall, faildCall) {
var apiurl = this.domainManager().Upload + '/Upload/UploadBase64?fileType=1&fileLimit=5&&filePath=Freature/TCID' + tcID; var apiurl = this.domainManager().Upload + '/Upload/UploadBase64?fileType=1&fileLimit=5&&filePath=Freature/TCID' + tcID;
this.$http.post(apiurl, msg, { this.$http.post(apiurl, msg, {
headers: { datatype:"jsonP",
}
}).then(res => { }).then(res => {
successCall(res); successCall(res);
}, faildCall) }, faildCall)
...@@ -280,7 +278,7 @@ export default { ...@@ -280,7 +278,7 @@ export default {
}, },
//下载文件 //下载文件
Vue.prototype.GetLocalFile = function (cmd, msg, fileName) { Vue.prototype.GetLocalFile = function (cmd, msg, fileName, successCall) {
var apiurl = this.domainManager().LocalFileStreamDownLoadUrl; var apiurl = this.domainManager().LocalFileStreamDownLoadUrl;
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") { if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") {
...@@ -315,6 +313,7 @@ export default { ...@@ -315,6 +313,7 @@ export default {
link.setAttribute("download", fileName); link.setAttribute("download", fileName);
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
successCall(res);
}).catch(function (res) {}); }).catch(function (res) {});
}, },
Vue.prototype.getCookieItem = function () { Vue.prototype.getCookieItem = function () {
......
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