Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0e265a18
authored
Nov 25, 2020
by
sunxiwang
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
二维码批量下载
1 parent
5bbeadf1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
linkwe-ui/src/api/drainageCode/staff.js
linkwe-ui/src/views/drainageCode/staff/list.vue
linkwe-ui/src/api/drainageCode/staff.js
View file @
0e265a1
...
@@ -139,8 +139,9 @@ export function downloadBatch(ids) {
...
@@ -139,8 +139,9 @@ export function downloadBatch(ids) {
params
:
{
params
:
{
ids
,
ids
,
},
},
responseType
:
'blob'
})
})
return
process
.
env
.
VUE_APP_BASE_API
+
service
+
'/downloadBatch/?ids='
+
ids
//
return process.env.VUE_APP_BASE_API + service + '/downloadBatch/?ids=' + ids
}
}
/**
/**
...
...
linkwe-ui/src/views/drainageCode/staff/list.vue
View file @
0e265a1
...
@@ -140,10 +140,19 @@ export default {
...
@@ -140,10 +140,19 @@ export default {
type
:
'warning'
,
type
:
'warning'
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
downloadBatch
(
this
.
ids
+
''
)
return
downloadBatch
(
this
.
ids
+
''
)
// window.open(downloadBatch(this.ids))
// window.open(downloadBatch(this.ids))
})
}).
then
((
res
)
=>
{
.
catch
(
function
()
{})
if
(
res
!=
null
)
{
let
blob
=
new
Blob
([
res
],
{
type
:
'application/zip'
});
let
url
=
window
.
URL
.
createObjectURL
(
blob
);
const
link
=
document
.
createElement
(
'a'
);
// 创建a标签
link
.
href
=
url
;
link
.
download
=
'批量员工活码.zip'
;
// 重命名文件
link
.
click
();
URL
.
revokeObjectURL
(
url
);
// 释放内存
}
}).
catch
(
function
()
{})
},
},
},
},
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment