diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java
index 5007d783..cd307c8c 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java
@@ -109,7 +109,6 @@ public class SysNoticeController extends BaseController
/**
* 查询公告详细
*/
- @RequiresPermissions("system:notice:list")
@GetMapping("/view/{noticeId}")
public String view(@PathVariable("noticeId") Long noticeId, ModelMap mmap)
{
@@ -157,6 +156,30 @@ public class SysNoticeController extends BaseController
return success();
}
+ /**
+ * 已读用户页面
+ */
+ @RequiresPermissions("system:notice:list")
+ @GetMapping("/readUsers/{noticeId}")
+ public String readUsers(@PathVariable("noticeId") Long noticeId, ModelMap mmap)
+ {
+ mmap.put("notice", noticeService.selectNoticeById(noticeId));
+ return prefix + "/readUsers";
+ }
+
+ /**
+ * 已读用户列表数据
+ */
+ @RequiresPermissions("system:notice:list")
+ @PostMapping("/readUsers/list")
+ @ResponseBody
+ public TableDataInfo readUsersList(Long noticeId, String searchValue)
+ {
+ startPage();
+ List> list = noticeReadService.selectReadUsersByNoticeId(noticeId, searchValue);
+ return getDataTable(list);
+ }
+
/**
* 删除公告
*/
diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
index 3901bc70..0a925ee0 100644
--- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
+++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
@@ -993,13 +993,15 @@ var table = {
closeItem(dataId);
},
// 右侧弹出窗口打开
- popupRight: function(title, url){
- var width = 150;
+ popupRight: function(title, url, width, height) {
+ var defaultWidth = 150;
if (top.location !== self.location) {
if ($(top.window).outerWidth() < 400) {
- width = 50;
+ defaultWidth = 50;
}
}
+ var finalWidth = width || ($(window).outerWidth() - defaultWidth) + 'px';
+ var finalHeight = height || '100%';
top.layer.open({
type: 2,
offset: 'r',
@@ -1008,7 +1010,7 @@ var table = {
title: title,
shade: 0.3,
shadeClose: true,
- area: [($(window).outerWidth() - width) + 'px', '100%'],
+ area: [finalWidth, finalHeight],
content: url
});
},
@@ -1657,7 +1659,9 @@ var table = {
if (!format) format = "yyyy-MM-dd";
switch (typeof date) {
case "string":
- date = new Date(date.replace(/-/g, "/"));
+ date = date.replace("T", " ");
+ date = date.replace(/-/g, "/");
+ date = new Date(date);
break;
case "number":
date = new Date(date);
diff --git a/ruoyi-admin/src/main/resources/templates/system/notice/notice.html b/ruoyi-admin/src/main/resources/templates/system/notice/notice.html
index 4ad5c895..954164e4 100644
--- a/ruoyi-admin/src/main/resources/templates/system/notice/notice.html
+++ b/ruoyi-admin/src/main/resources/templates/system/notice/notice.html
@@ -1,121 +1,128 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/templates/system/notice/readUsers.html b/ruoyi-admin/src/main/resources/templates/system/notice/readUsers.html
new file mode 100644
index 00000000..60dba1cf
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/templates/system/notice/readUsers.html
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeReadMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeReadMapper.java
index 69e9b8d6..4ee80a34 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeReadMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeReadMapper.java
@@ -1,9 +1,10 @@
package com.ruoyi.system.mapper;
import java.util.List;
+import java.util.Map;
import org.apache.ibatis.annotations.Param;
-import com.ruoyi.system.domain.SysNoticeRead;
import com.ruoyi.system.domain.SysNotice;
+import com.ruoyi.system.domain.SysNoticeRead;
/**
* 公告已读记录 数据层
@@ -62,4 +63,13 @@ public interface SysNoticeReadMapper
* @return 结果
*/
public int deleteByNoticeIds(@Param("noticeIds") String[] noticeIds);
+
+ /**
+ * 查询已阅读某公告的用户列表
+ *
+ * @param noticeId 公告ID
+ * @param searchValue 搜索值
+ * @return 已读用户列表
+ */
+ public List