Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
SuperMan
Commits
d07e27c3
Commit
d07e27c3
authored
Jun 26, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
ad90abb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
71 deletions
+24
-71
confirmationOrderDownLoad.vue
src/components/confirmationOrderDownLoad.vue
+24
-71
No files found.
src/components/confirmationOrderDownLoad.vue
View file @
d07e27c3
...
...
@@ -15,8 +15,8 @@
<div
class=
"trip_cover"
v-show=
"pdfLoading"
v-loading=
"pdfLoading"
></div>
<input
type=
"button"
style=
"width: auto !important;"
class=
"travelControlTripBtn"
value=
"下载电脑版PDF"
@
click=
"toPDF(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游')"
/>
<input
type=
"button"
style=
"width: auto !important;
display:none;
"
class=
"travelControlTripBtn"
value=
"下载电脑版PDF2"
@
click=
"toPDF_V2(orderMsg.startDate + orderMsg.lineteamName+orderMsg.dayNum+'日游')"
/>
<input
type=
"button"
style=
"width: auto !important; "
class=
"travelControlTripBtn"
value=
"下载电脑版PDF2"
@
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"
...
...
@@ -65,6 +65,9 @@
<p
class=
"pkey"
>
返回日期
</p>
<p
class=
"pvalue"
>
{{
orderMsg
.
endDate
}}
</p>
</td>
<td
rowspan=
"2"
>
<img
:src=
"WeiXinShareImgSrc"
/>
</td>
</tr>
<tr>
<td
class=
"essential-item"
>
...
...
@@ -615,6 +618,8 @@
export
default
{
data
()
{
return
{
//微信分享图片
WeiXinShareImgSrc
:
""
,
//下拉框默认值
defaultSelectValue
:
0
,
//航空公司下拉
...
...
@@ -671,6 +676,7 @@
mounted
()
{
this
.
orderId
=
this
.
$route
.
query
.
orderId
;
this
.
isopOperation
=
this
.
$route
.
query
.
isopOperation
;
this
.
getWxCode
();
this
.
init
();
this
.
initAirlines
()
setTimeout
(()
=>
{
...
...
@@ -678,78 +684,23 @@
},
2000
)
},
methods
:
{
//获取微信二维码
getWxCode
:
function
()
{
this
.
apipost
(
'survey_post_GetSurveyWeiXinShare'
,
{
TCID
:
this
.
$route
.
query
.
tcid
},
res
=>
{
console
.
log
(
"生成二维码"
,
res
.
data
);
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
WeiXinShareImgSrc
=
res
.
data
.
data
;
}
},
err
=>
{})
},
gernalFeature
(
isPc
)
{
this
.
pdfLoading
=
true
;
let
tcid
=
this
.
$route
.
query
.
tcid
;
let
UploadUrl
=
this
.
domainManager
().
UploadUrl
let
_this
=
this
if
(
this
.
showType
>=
4
)
{
// 判断是否为行程特色
// var apiurl = this.domainManager().UploadUrl + '/Upload/GetImage?filePath=Feature/' + tcid;
// this.$http.post(apiurl).then(res => {
// let msg = res.data
// if (msg.ResultCode === 1 && _this.vshowC) { // 已经存在文件 直接调用下载
// _this.ToWord(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg.dayNum +
// '日游', isPc)
// } else if (document.querySelector("#gernalCanvas")) { // 不存在图片保存图片后下载
// if (document.querySelector("#gernalCanvas").querySelectorAll('img').length === 0) {
// _this.ToWord(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg.dayNum +
// '日游', isPc)
// return
// }
// let cName = ''
// if (_this.showType == 4) {
// cName = '.feature-box'
// } else if (_this.showType > 4) {
// cName = '.travle_page'
// }
// if (cName != '') {
// let allNum = 1
// document.querySelectorAll(cName).forEach((x, index) => {
// html2Canvas(x, {
// useCORS: true,
// scale: 0.7,
// backgroundColor: '#FFFFFF',
// }).then((canvas) => {
// if (canvas) {
// var context = canvas.getContext('2d')
// context.mozImageSmoothingEnabled = false
// context.webkitImageSmoothingEnabled = false
// context.msImageSmoothingEnabled = false
// context.imageSmoothingEnabled = false
// var image = new Image();
// image.src = canvas.toDataURL("image/png");
// $.ajax({
// url: UploadUrl +
// '/Upload/UploadBase64?fileType=1&fileLimit=5&&filePath=Feature/' + tcid,
// type: "POST",
// data: {
// myfile: image.src,
// fileIndex: index
// },
// datatype: "jsonP",
// success: function (data) {
// },
// error: function () {
// }
// });
// if (allNum !== document.querySelectorAll(cName).length) {
// allNum += 1
// } else {
// _this.ToWord(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg
// .dayNum + '日游', isPc)
// }
// }
// });
// });
// }
// } else {
// _this.ToWord(_this.orderMsg.startDate + _this.orderMsg.lineteamName + _this.orderMsg.dayNum +
// '日游', isPc)
// }
// }, null)
_this
.
ToWord
(
_this
.
orderMsg
.
startDate
+
_this
.
orderMsg
.
lineteamName
+
_this
.
orderMsg
.
dayNum
+
'日游'
,
isPc
)
}
else
{
...
...
@@ -944,7 +895,7 @@
this
.
pdfLoading
=
true
let
pageData
=
document
.
getElementById
(
'pdfNode'
).
innerHTML
let
urlObj
=
this
.
domainManager
();
let
msg
=
{
let
msg
=
{
configId
:
this
.
$route
.
query
.
configId
,
cityId
:
this
.
$route
.
query
.
cityId
,
tcid
:
this
.
$route
.
query
.
tcid
,
...
...
@@ -994,9 +945,11 @@
}
}).
then
(
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
let
sign
=
title
const
a
=
document
.
createElement
(
'a'
);
a
.
setAttribute
(
'download'
,
title
+
".pdf"
);
a
.
setAttribute
(
'href'
,
urlObj
.
DomainUrl
+
res
.
data
.
data
);
a
.
setAttribute
(
'download'
,
''
);
a
.
setAttribute
(
'href'
,
urlObj
.
DomainUrl
+
'/api/file/DownloadFileForPdf?fileName='
+
sign
+
'.pdf&&fPath='
+
res
.
data
.
data
);
a
.
click
();
}
else
{
this
.
$message
.
error
(
'PDF获取失败'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment