Files
RuoYi/ruoyi-admin/src/main/resources/templates/system/post/post.html

120 lines
4.3 KiB
HTML
Raw Normal View History

2018-07-09 08:44:52 +08:00
<!DOCTYPE html>
2019-03-31 12:56:04 +08:00
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('岗位列表')" />
</head>
2018-07-09 08:44:52 +08:00
<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="post-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="postCode"/>
</li>
<li>
岗位名称:<input type="text" name="postName"/>
</li>
<li>
2018-07-22 23:05:50 +08:00
岗位状态:<select name="status" th:with="type=${@dict.getType('sys_normal_disable')}">
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-10-05 18:43:41 +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>
2019-02-28 20:52:07 +08:00
<div class="btn-group-sm" id="toolbar" role="group">
2018-10-05 18:43:41 +08:00
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:post:add">
2018-07-09 08:44:52 +08:00
<i class="fa fa-plus"></i> 新增
2018-07-29 17:04:32 +08:00
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:post:edit">
2018-10-05 18:43:41 +08:00
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:post:remove">
<i class="fa fa-remove"></i> 删除
2018-07-29 17:04:32 +08:00
</a>
2018-10-05 18:43:41 +08:00
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:post:export">
<i class="fa fa-download"></i> 导出
</a>
2018-07-09 08:44:52 +08:00
</div>
2018-08-23 17:06:31 +08:00
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
2018-07-09 08:44:52 +08:00
</div>
</div>
</div>
2019-03-31 12:56:04 +08:00
<th:block th:include="include :: footer" />
2018-07-09 08:44:52 +08:00
<script th:inline="javascript">
2018-07-22 23:05:50 +08:00
var editFlag = [[${@permission.hasPermi('system:post:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:post:remove')}]];
var datas = [[${@dict.getType('sys_normal_disable')}]];
2018-10-05 19:27:24 +08:00
var prefix = ctx + "system/post";
2018-07-09 08:44:52 +08:00
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
sortName: "postSort",
modalName: "岗位",
columns: [{
checkbox: true
},
{
field: 'postId',
title: '岗位编号'
},
{
field: 'postCode',
title: '岗位编码',
sortable: true
},
{
field: 'postName',
title: '岗位名称',
sortable: true
},
{
field: 'postSort',
title: '显示顺序',
sortable: true
},
{
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
}
},
{
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 = [];
2019-05-13 19:03:32 +08:00
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.postId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.postId + '\')"><i class="fa fa-remove"></i>删除</a>');
2018-07-09 08:44:52 +08:00
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>