通知公告新增详细显示

This commit is contained in:
RuoYi
2024-01-12 11:57:22 +08:00
parent 5b19d33af9
commit 83b90c3267
6 changed files with 49 additions and 6 deletions

View File

@ -99,6 +99,17 @@ public class SysNoticeController extends BaseController
return toAjax(noticeService.updateNotice(notice));
}
/**
* 查询公告详细
*/
@RequiresPermissions("system:notice:list")
@GetMapping("/view/{noticeId}")
public String view(@PathVariable("noticeId") Long noticeId, ModelMap mmap)
{
mmap.put("notice", noticeService.selectNoticeById(noticeId));
return prefix + "/view";
}
/**
* 删除公告
*/

View File

@ -59,6 +59,7 @@
$(function() {
var options = {
url: prefix + "/list",
viewUrl: prefix + "/view/{id}",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
@ -71,9 +72,12 @@
title : '序号'
},
{
field : 'noticeTitle',
title : '公告标题'
},
field: 'noticeTitle',
title: '公告标题',
formatter: function (value, row, index) {
return '<a href="javascript:void(0)" onclick="$.operate.view(\'' + row.noticeId + '\')">' + value + '</a>';
}
},
{
field: 'noticeType',
title: '公告类型',

View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('公告详细')" />
</head>
<body>
<div class="main-content">
<div class="row">
<div class="col-sm-12">
<div class="mail-box-header">
<div class="mail-tools tooltip-demo m-t-md">
<h3 style="text-align: center">[[${notice.noticeTitle}]]</h3>
<h5>
<span class="pull-right font-noraml">发送时间:[[${#dates.format(notice.createTime, 'yyyy-MM-dd HH:mm:ss')}]] </span>
<span class="font-noraml">发件人: </span>[[${notice.createBy}]]
</h5>
</div>
</div>
<div class="mail-box">
<div class="mail-body" th:utext="${notice.noticeContent}"></div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
</body>
</html>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('用户详细')" />
<th:block th:include="include :: header('用户详细')" />
</head>
<body>
<div class="main-content">