Files
RuoYi/src/main/resources/templates/system/notice/notice.html

118 lines
4.3 KiB
HTML
Raw Normal View History

2018-07-09 08:44:52 +08:00
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
2018-10-01 21:32:01 +08:00
<div class="col-sm-12 search-collapse">
2018-07-15 20:39:59 +08:00
<form id="notice-form">
2018-08-01 10:07:28 +08:00
<div class="select-list">
2018-07-09 08:44:52 +08:00
<ul>
<li>
公告标题:<input type="text" name="noticeTitle"/>
</li>
<li>
操作人员:<input type="text" name="createBy"/>
</li>
<li>
2018-07-22 23:05:50 +08:00
公告类型:<select name="noticeType" th:with="type=${@dict.getType('sys_notice_type')}">
2018-07-09 08:44:52 +08:00
<option value="">所有</option>
2018-08-23 17:06:31 +08:00
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
2018-07-09 08:44:52 +08:00
</select>
</li>
<li>
2018-07-27 21:56:08 +08:00
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
2018-08-25 10:42:10 +08:00
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
2018-07-09 08:44:52 +08:00
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
2018-10-05 18:43:41 +08:00
<a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="system:notice:add">
2018-07-09 08:44:52 +08:00
<i class="fa fa-plus"></i> 新增
</a>
2018-10-05 18:43:41 +08:00
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.editFull()" shiro:hasPermission="system:notice:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:notice:remove">
<i class="fa fa-remove"></i> 删除
2018-07-09 08:44:52 +08:00
</a>
</div>
2018-08-23 17:06:31 +08:00
<div class="col-sm-12 select-table table-striped">
2018-07-09 08:44:52 +08:00
<table id="bootstrap-table" data-mobile-responsive="true"></table>
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
2018-07-22 23:05:50 +08:00
var editFlag = [[${@permission.hasPermi('system:notice:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:notice:remove')}]];
var types = [[${@dict.getType('sys_notice_type')}]];
var datas = [[${@dict.getType('sys_notice_status')}]];
2018-07-09 08:44:52 +08:00
var prefix = ctx + "system/notice"
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
modalName: "公告",
search: false,
columns: [{
checkbox: true
},
{
field : 'noticeId',
title : '序号'
},
{
field : 'noticeTitle',
title : '公告标题'
},
{
field: 'noticeType',
title: '公告类型',
align: 'center',
formatter: function(value, row, index) {
2018-07-22 23:05:50 +08:00
return $.table.selectDictLabel(types, value);
2018-07-09 08:44:52 +08:00
}
},
{
field: 'status',
title: '状态',
align: 'center',
formatter: function(value, row, index) {
2018-07-22 23:05:50 +08:00
return $.table.selectDictLabel(datas, value);
2018-07-09 08:44:52 +08:00
}
},
{
field : 'createBy',
title : '创建者'
},
{
2018-07-19 21:17:17 +08:00
field: 'createTime',
title: '创建时间',
sortable: true
2018-07-09 08:44:52 +08:00
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.editFull(\'' + row.noticeId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.noticeId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>