Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
仟微科技
Link Wechat
提交
ad43204f
Link Wechat
项目概览
仟微科技
/
Link Wechat
通知
48
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Link Wechat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ad43204f
编写于
11月 26, 2020
作者:
S
sunxiwang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
员工活码下载
上级
067b521b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
60 addition
and
10 deletion
+60
-10
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeEmpleCodeController.java
...inkwechat/web/controller/wecom/WeEmpleCodeController.java
+16
-0
linkwe-ui/src/api/drainageCode/staff.js
linkwe-ui/src/api/drainageCode/staff.js
+10
-1
linkwe-ui/src/views/drainageCode/staff/detail.vue
linkwe-ui/src/views/drainageCode/staff/detail.vue
+17
-3
linkwe-ui/src/views/drainageCode/staff/list.vue
linkwe-ui/src/views/drainageCode/staff/list.vue
+17
-6
未找到文件。
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeEmpleCodeController.java
浏览文件 @
ad43204f
...
...
@@ -189,6 +189,22 @@ public class WeEmpleCodeController extends BaseController {
}
}
@PreAuthorize
(
"@ss.hasPermi('wecom:code:download')"
)
@Log
(
title
=
"员工活码下载"
,
businessType
=
BusinessType
.
OTHER
)
@GetMapping
(
"/download"
)
public
void
download
(
String
id
,
HttpServletRequest
request
,
HttpServletResponse
response
){
WeEmpleCode
weEmpleCode
=
weEmpleCodeService
.
selectWeEmpleCodeById
(
Long
.
valueOf
(
id
));
if
(
StringUtils
.
isEmpty
(
weEmpleCode
.
getQrCode
())){
return
;
}
else
{
try
{
FileUtils
.
downloadFile
(
weEmpleCode
.
getQrCode
(),
response
.
getOutputStream
());
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
/**
* 成员添加客户统计
...
...
linkwe-ui/src/api/drainageCode/staff.js
浏览文件 @
ad43204f
...
...
@@ -141,7 +141,16 @@ export function downloadBatch(ids) {
},
responseType
:
'
blob
'
})
//return process.env.VUE_APP_BASE_API + service + '/downloadBatch/?ids=' + ids
}
export
function
download
(
id
)
{
return
request
({
url
:
service
+
'
/download
'
,
params
:
{
id
,
},
responseType
:
'
blob
'
})
}
/**
...
...
linkwe-ui/src/views/drainageCode/staff/detail.vue
浏览文件 @
ad43204f
<
script
>
import
{
getDetail
,
getUserAddCustomerStat
}
from
'
@/api/drainageCode/staff
'
import
{
download
,
downloadBatch
}
from
'
@/api/common
'
import
{
getDetail
,
getUserAddCustomerStat
,
download
}
from
'
@/api/drainageCode/staff
'
import
ClipboardJS
from
'
clipboard
'
import
echarts
from
'
echarts
'
export
default
{
...
...
@@ -105,7 +104,22 @@ export default {
return
year
+
'
-
'
+
month
+
'
-
'
+
date
},
download
()
{
window
.
open
(
this
.
form
.
qrCode
)
let
userName
=
""
;
this
.
form
.
weEmpleCodeUseScops
.
forEach
((
item
)
=>
{
userName
+=
item
.
businessName
+
"
,
"
;
})
let
name
=
userName
.
substr
(
0
,
userName
.
length
-
1
)
+
"
-
"
+
this
.
form
.
activityScene
+
"
.png
"
download
(
this
.
form
.
id
).
then
((
res
)
=>
{
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
=
name
;
// 重命名文件
link
.
click
();
URL
.
revokeObjectURL
(
url
);
// 释放内存
}
})
},
},
}
...
...
linkwe-ui/src/views/drainageCode/staff/list.vue
浏览文件 @
ad43204f
...
...
@@ -4,8 +4,8 @@ import {
remove
,
batchAdd
,
downloadBatch
,
download
,
}
from
'
@/api/drainageCode/staff
'
import
{
download
}
from
'
@/api/common
'
import
SelectUser
from
'
@/components/SelectUser
'
import
ClipboardJS
from
'
clipboard
'
export
default
{
...
...
@@ -129,12 +129,23 @@ export default {
this
.
getList
(
1
)
})
},
download
(
id
,
userName
,
activityScene
){
let
name
=
userName
+
"
-
"
+
activityScene
+
"
.png
"
download
(
id
).
then
((
res
)
=>
{
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
=
name
;
// 重命名文件
link
.
click
();
URL
.
revokeObjectURL
(
url
);
// 释放内存
}
})
},
/** 下载 */
downloadBatch
(
qrCode
)
{
// window.open(download(row.qrCode, row.createBy.split(',')[0] + '.png'))
qrCode
&&
window
.
open
(
qrCode
)
qrCode
||
this
.
$confirm
(
'
是否确认下载所有图片吗?
'
,
'
警告
'
,
{
this
.
$confirm
(
'
是否确认下载所有图片吗?
'
,
'
警告
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
,
...
...
@@ -296,7 +307,7 @@ export default {
<
template
slot-scope=
"{ row }"
>
<el-button
type=
"text"
@
click=
"download
Batch(row.qrCod
e)"
@
click=
"download
(row.id,row.useUserName,row.activityScen
e)"
v-hasPermi=
"['monitor:operlog:query']"
>
下载
</el-button
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录