Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
74cc2bb0
提交
74cc2bb0
authored
8月 27, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:未读消息列表增加一键全部已读
上级
4494562c
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
33 行增加
和
3 行删除
+33
-3
MsgController.java
...c/main/java/io/dataease/controller/sys/MsgController.java
+6
-1
SysMsgService.java
.../main/java/io/dataease/service/message/SysMsgService.java
+8
-0
msg.js
frontend/src/api/system/msg.js
+8
-0
en.js
frontend/src/lang/en.js
+1
-0
tw.js
frontend/src/lang/tw.js
+1
-0
zh.js
frontend/src/lang/zh.js
+1
-0
unread.vue
frontend/src/views/msg/unread.vue
+8
-2
没有找到文件。
backend/src/main/java/io/dataease/controller/sys/MsgController.java
浏览文件 @
74cc2bb0
...
...
@@ -6,7 +6,6 @@ import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import
io.dataease.base.domain.SysMsgChannel
;
import
io.dataease.base.domain.SysMsgSetting
;
import
io.dataease.base.domain.SysMsgType
;
import
io.dataease.commons.exception.DEException
;
import
io.dataease.commons.utils.AuthUtils
;
import
io.dataease.commons.utils.PageUtils
;
import
io.dataease.commons.utils.Pager
;
...
...
@@ -71,6 +70,12 @@ public class MsgController {
sysMsgService
.
setBatchReaded
(
msgIds
);
}
@ApiOperation
(
"全部设置已读"
)
@PostMapping
(
"/allRead"
)
public
void
allRead
()
{
sysMsgService
.
setAllRead
();
}
@ApiOperation
(
"批量删除"
)
@PostMapping
(
"/batchDelete"
)
public
void
batchDelete
(
@RequestBody
List
<
Long
>
msgIds
)
{
...
...
backend/src/main/java/io/dataease/service/message/SysMsgService.java
浏览文件 @
74cc2bb0
...
...
@@ -312,4 +312,12 @@ public class SysMsgService {
return
sourceLists
;
}
public
void
setAllRead
()
{
SysMsg
record
=
new
SysMsg
();
record
.
setStatus
(
true
);
SysMsgExample
example
=
new
SysMsgExample
();
example
.
createCriteria
().
andUserIdEqualTo
(
AuthUtils
.
getUser
().
getUserId
()).
andStatusEqualTo
(
false
);
sysMsgMapper
.
updateByExampleSelective
(
record
,
example
);
}
}
frontend/src/api/system/msg.js
浏览文件 @
74cc2bb0
...
...
@@ -35,6 +35,14 @@ export function batchRead(data) {
})
}
export
function
allRead
()
{
return
request
({
url
:
'/api/sys_msg/allRead'
,
method
:
'post'
,
loading
:
true
})
}
export
function
batchDelete
(
data
)
{
return
request
({
url
:
'/api/sys_msg/batchDelete'
,
...
...
frontend/src/lang/en.js
浏览文件 @
74cc2bb0
...
...
@@ -1351,6 +1351,7 @@ export default {
read_time
:
'Read Time'
,
type
:
'Message Type'
,
mark_readed
:
'Mark As Read'
,
all_mark_readed
:
'Mark All As Read'
,
please_select
:
'Please select at least one message'
,
mark_success
:
'Mark read successfully'
,
receive_manage
:
'Receive Manage'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
74cc2bb0
...
...
@@ -1350,6 +1350,7 @@ export default {
read_time
:
'查看時間'
,
type
:
'消息類型'
,
mark_readed
:
'標記已讀'
,
all_mark_readed
:
'全部已讀'
,
please_select
:
'請至少選擇一條消息'
,
mark_success
:
'標記已讀成功'
,
receive_manage
:
'接收管理'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
74cc2bb0
...
...
@@ -1353,6 +1353,7 @@ export default {
read_time
:
'查看时间'
,
type
:
'消息类型'
,
mark_readed
:
'标记已读'
,
all_mark_readed
:
'全部已读'
,
please_select
:
'请至少选择一条消息'
,
mark_success
:
'标记已读成功'
,
receive_manage
:
'接收管理'
,
...
...
frontend/src/views/msg/unread.vue
浏览文件 @
74cc2bb0
...
...
@@ -18,7 +18,7 @@
>
<template
#
toolbar
>
<el-button
:disabled=
"multipleSelection.length === 0"
@
click=
"markReaded"
>
{{
$t
(
'webmsg.mark_readed'
)
}}
</el-button>
<
!--
<fu-table-button
v-permission=
"['user:add']"
icon=
"el-icon-circle-plus-outline"
:label=
"$t('user.create')"
@
click=
"create"
/>
--
>
<
el-button
@
click=
"allMarkReaded"
>
{{
$t
(
'webmsg.all_mark_readed'
)
}}
</el-button
>
</
template
>
<el-table-column
type=
"selection"
...
...
@@ -61,7 +61,7 @@
import
LayoutContent
from
'@/components/business/LayoutContent'
import
ComplexTable
from
'@/components/business/complex-table'
import
{
query
,
updateStatus
,
batchRead
}
from
'@/api/system/msg'
import
{
query
,
updateStatus
,
batchRead
,
allRead
}
from
'@/api/system/msg'
import
{
msgTypes
,
getTypeName
,
loadMsgTypes
}
from
'@/utils/webMsg'
import
bus
from
'@/utils/bus'
import
{
addOrder
,
formatOrders
}
from
'@/utils/index'
...
...
@@ -166,6 +166,12 @@ export default {
this
.
search
()
})
},
allMarkReaded
()
{
allRead
().
then
(
res
=>
{
this
.
$success
(
this
.
$t
(
'webmsg.mark_success'
))
this
.
search
()
})
},
markReaded
()
{
if
(
this
.
multipleSelection
.
length
===
0
)
{
this
.
$warning
(
this
.
$t
(
'webmsg.please_select'
))
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论