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
954b1705
Commit
954b1705
authored
Feb 20, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
‘行程特色!’
parent
2cc72e4b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
56 deletions
+60
-56
confirmationOrderDownLoad.vue
src/components/confirmationOrderDownLoad.vue
+60
-56
No files found.
src/components/confirmationOrderDownLoad.vue
View file @
954b1705
...
...
@@ -657,65 +657,69 @@
// console.log("上传失败");
}
});
document
.
querySelector
(
"#gernalCanvas"
).
querySelectorAll
(
'img'
).
forEach
(
x
=>
{
let
src
=
x
.
src
src
=
src
.
replace
(
'https:'
,
'http:'
)
if
(
src
.
indexOf
(
'http'
)
!=-
1
){
x
.
setAttribute
(
'crossOrigin'
,
'anonymous'
)
if
(
this
.
showType
===
4
||
this
.
showType
===
5
)
{
document
.
querySelector
(
"#gernalCanvas"
).
querySelectorAll
(
'img'
).
forEach
(
x
=>
{
let
src
=
x
.
src
src
=
src
.
replace
(
'https:'
,
'http:'
)
if
(
src
.
indexOf
(
'http'
)
!=-
1
){
x
.
setAttribute
(
'crossOrigin'
,
'anonymous'
)
}
x
.
src
=
src
});
let
cName
=
''
if
(
this
.
showType
==
4
){
cName
=
'.feature-box'
}
else
if
(
this
.
showType
==
5
){
cName
=
'.travle_page'
}
x
.
src
=
src
});
let
cName
=
''
if
(
this
.
showType
==
4
){
cName
=
'.feature-box'
}
else
if
(
this
.
showType
==
5
){
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"
);
// document.body.appendChild(image) upload.oytour.com
$
.
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
)
{
// console.log("上传成功",data);
},
error
:
function
()
{
// console.log("上传失败");
}
});
// this.uploadImg(tcid,{'myfile': image.src}, res=>{
// console.log(res)
// }, err=>{
// console.log("GHJK",err);
// })
if
(
allNum
!==
document
.
querySelectorAll
(
cName
).
length
)
{
allNum
+=
1
}
else
{
this
.
ToWord
(
this
.
orderMsg
.
startDate
+
this
.
orderMsg
.
lineteamName
+
this
.
orderMsg
.
dayNum
+
'日游'
)
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"
);
// document.body.appendChild(image) upload.oytour.com
$
.
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
)
{
// console.log("上传成功",data);
},
error
:
function
()
{
// console.log("上传失败");
}
});
// this.uploadImg(tcid,{'myfile': image.src}, res=>{
// console.log(res)
// }, err=>{
// console.log("GHJK",err);
// })
if
(
allNum
!==
document
.
querySelectorAll
(
cName
).
length
)
{
allNum
+=
1
}
else
{
this
.
ToWord
(
this
.
orderMsg
.
startDate
+
this
.
orderMsg
.
lineteamName
+
this
.
orderMsg
.
dayNum
+
'日游'
)
}
}
}
}
);
});
});
}
}
else
{
this
.
ToWord
(
this
.
orderMsg
.
startDate
+
this
.
orderMsg
.
lineteamName
+
this
.
orderMsg
.
dayNum
+
'日游'
)
}
},
//保存基础数据
...
...
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