Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
ReactWeb5
CivManage
Commits
a9b6af24
Commit
a9b6af24
authored
May 27, 2024
by
田翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 出件称改
parent
6cb3baa5
Pipeline
#89070
passed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
index.js
...lMaintenance/maintenance/components/QRCodeDesign/index.js
+2
-2
No files found.
src/pages/bsmanager/patrolMaintenance/maintenance/components/QRCodeDesign/index.js
View file @
a9b6af24
...
...
@@ -229,7 +229,7 @@ const QRCodeDesign = (props, ref) => {
console
.
log
(
'can'
,
can
.
toDataURL
())
let
a
=
document
.
createElement
(
'a'
);
a
.
setAttribute
(
'href'
,
can
.
toDataURL
());
//toDataUrl:将canvas画布信息转化为base64格式图片
a
.
setAttribute
(
'download'
,
`
${
row
.
Account
Name
}
_
${
row
.
DeviceCode
}
`
);
//这个是必须的,否则会报错
a
.
setAttribute
(
'download'
,
`
${
row
.
Device
Name
}
_
${
row
.
DeviceCode
}
`
);
//这个是必须的,否则会报错
a
.
setAttribute
(
'target'
,
'_self'
);
a
.
click
();
setLoading
(
false
)
...
...
@@ -340,7 +340,7 @@ const QRCodeDesign = (props, ref) => {
const can = await html2canvas(canvas, { allowTaint: false, useCORS: true, width: 310, scale: 2 })
let img = new Image()
img.src = can.toDataURL('
image
/
png
')
zip.file(`${row.
Account
Name}_${row.DeviceCode}.png`, dataURLtoBlob(img.src))
zip.file(`${row.
Device
Name}_${row.DeviceCode}.png`, dataURLtoBlob(img.src))
}
}
zip.generateAsync({ type: '
blob
' }).then((res) => {
...
...
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