diff --git a/backend/src/main/java/io/dataease/base/mapper/ext/ExtSysMsgMapper.java b/backend/src/main/java/io/dataease/base/mapper/ext/ExtSysMsgMapper.java
index c86fa302b0..110b76dafb 100644
--- a/backend/src/main/java/io/dataease/base/mapper/ext/ExtSysMsgMapper.java
+++ b/backend/src/main/java/io/dataease/base/mapper/ext/ExtSysMsgMapper.java
@@ -16,13 +16,13 @@ public interface ExtSysMsgMapper {
@Update({
""
})
- int batchStatus(@Param("msgIds") List msgIds);
+ int batchStatus(@Param("msgIds") List msgIds, @Param("time") Long time);
@Delete({
diff --git a/backend/src/main/java/io/dataease/service/message/SysMsgService.java b/backend/src/main/java/io/dataease/service/message/SysMsgService.java
index 58809cc63d..b43d1cf687 100644
--- a/backend/src/main/java/io/dataease/service/message/SysMsgService.java
+++ b/backend/src/main/java/io/dataease/service/message/SysMsgService.java
@@ -109,7 +109,7 @@ public class SysMsgService {
}
public void setBatchReaded(List msgIds) {
- extSysMsgMapper.batchStatus(msgIds);
+ extSysMsgMapper.batchStatus(msgIds, System.currentTimeMillis());
}
public void batchDelete(List msgIds) {
diff --git a/frontend/src/api/system/msg.js b/frontend/src/api/system/msg.js
index d84dba9cb9..83accc340f 100644
--- a/frontend/src/api/system/msg.js
+++ b/frontend/src/api/system/msg.js
@@ -26,6 +26,15 @@ export function batchRead(data) {
})
}
+export function batchDelete(data) {
+ return request({
+ url: '/api/sys_msg/batchDelete',
+ method: 'post',
+ loading: true,
+ data
+ })
+}
+
export function treeList() {
return request({
url: '/api/sys_msg/treeNodes',
diff --git a/frontend/src/views/msg/readed.vue b/frontend/src/views/msg/readed.vue
index 0866f44f88..f573391921 100644
--- a/frontend/src/views/msg/readed.vue
+++ b/frontend/src/views/msg/readed.vue
@@ -11,9 +11,16 @@
:pagination-config="paginationConfig"
@select="select"
@search="search"
+ @selection-change="handleSelectionChange"
@sort-change="sortChange"
>
-
+
+ {{ $t('commons.delete') }}
+
+
@@ -57,7 +64,7 @@
import LayoutContent from '@/components/business/LayoutContent'
import ComplexTable from '@/components/business/complex-table'
-import { query } from '@/api/system/msg'
+import { query, batchDelete } from '@/api/system/msg'
import { msgTypes, getTypeName, loadMsgTypes } from '@/utils/webMsg'
import { addOrder, formatOrders } from '@/utils/index'
import { mapGetters } from 'vuex'
@@ -85,7 +92,8 @@ export default {
currentPage: 1,
pageSize: 10,
total: 0
- }
+ },
+ multipleSelection: []
}
},
computed: {
@@ -164,6 +172,20 @@ export default {
}
addOrder({ field: prop, value: order }, this.orderConditions)
this.search()
+ },
+ deleteBatch() {
+ if (this.multipleSelection.length === 0) {
+ this.$warning(this.$t('webmsg.please_select'))
+ return
+ }
+ const param = this.multipleSelection.map(item => item.msgId)
+ batchDelete(param).then(res => {
+ this.$success(this.$t('commons.delete_success'))
+ this.search()
+ })
+ },
+ handleSelectionChange(val) {
+ this.multipleSelection = val
}
}