try
parent
6f8959c142
commit
fec2711d8a
|
|
@ -0,0 +1,82 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增参数')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-config-add" name="form-config-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">参数名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="configName" name="configName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">参数键名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="configKey" name="configKey" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">参数键值:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="configValue" name="configValue" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">系统内置:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_yes_no')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="configType" th:value="${dict.dictValue}" th:checked="${dict.default}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea id="remark" name="remark" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "system/config";
|
||||
|
||||
$("#form-config-add").validate({
|
||||
onkeyup: false,
|
||||
rules: {
|
||||
configKey: {
|
||||
remote: {
|
||||
url: prefix + "/checkConfigKeyUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"configKey": function() {
|
||||
return $.common.trim($("#configKey").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"configKey": {
|
||||
remote: "参数键名已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-config-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
<!DOCTYPE html>
|
||||
<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>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="config-form">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
参数名称:<input type="text" name="configName"/>
|
||||
</li>
|
||||
<li>
|
||||
参数键名:<input type="text" name="configKey"/>
|
||||
</li>
|
||||
<li>
|
||||
系统内置:<select name="configType" th:with="type=${@dict.getType('sys_yes_no')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li class="select-time">
|
||||
<label>创建时间: </label>
|
||||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
|
||||
<span>-</span>
|
||||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:config:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:config:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:config:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:config:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
<a class="btn btn-danger" onclick="refreshCache()" shiro:hasPermission="system:config:remove">
|
||||
<i class="fa fa-refresh"></i> 刷新缓存
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('system:config:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:config:remove')}]];
|
||||
var datas = [[${@dict.getType('sys_yes_no')}]];
|
||||
var prefix = ctx + "system/config";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
sortName: "configId",
|
||||
sortOrder: "asc",
|
||||
modalName: "参数",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'configId',
|
||||
title: '参数主键'
|
||||
},
|
||||
{
|
||||
field: 'configName',
|
||||
title: '参数名称',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.tooltip(value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'configKey',
|
||||
title: '参数键名',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.tooltip(value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'configValue',
|
||||
title: '参数键值'
|
||||
},
|
||||
{
|
||||
field: 'configType',
|
||||
title: '系统内置',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(datas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.tooltip(value, 10, "open");
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.configId + '\')"><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.configId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
/** 刷新参数缓存 */
|
||||
function refreshCache() {
|
||||
$.operate.get(prefix + "/refreshCache");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改参数')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-config-edit" th:object="${config}">
|
||||
<input id="configId" name="configId" th:field="*{configId}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">参数名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="configName" name="configName" th:field="*{configName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">参数键名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="configKey" name="configKey" th:field="*{configKey}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">参数键值:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="configValue" name="configValue" th:field="*{configValue}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">系统内置:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_yes_no')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="configType" th:value="${dict.dictValue}" th:field="*{configType}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "system/config";
|
||||
|
||||
$("#form-config-edit").validate({
|
||||
onkeyup: false,
|
||||
rules: {
|
||||
configKey: {
|
||||
remote: {
|
||||
url: prefix + "/checkConfigKeyUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"configId": function() {
|
||||
return $("#configId").val();
|
||||
},
|
||||
"configKey": function() {
|
||||
return $.common.trim($("#configKey").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"configKey": {
|
||||
remote: "参数键名已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-config-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,133 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增部门')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-dept-add">
|
||||
<input id="treeId" name="parentId" type="hidden" th:value="${dept?.deptId}" />
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">上级部门:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" onclick="selectDeptTree()" id="treeName" readonly="true" th:value="${dept?.deptName}" required>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">部门名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="deptName" id="deptName" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">显示排序:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="orderNum" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">负责人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="leader">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">联系电话:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="phone">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">邮箱:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">部门状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "system/dept";
|
||||
|
||||
$("#form-dept-add").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
deptName:{
|
||||
remote: {
|
||||
url: prefix + "/checkDeptNameUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"parentId": function() {
|
||||
return $("input[name='parentId']").val();
|
||||
},
|
||||
"deptName" : function() {
|
||||
return $.common.trim($("#deptName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
orderNum:{
|
||||
digits:true
|
||||
},
|
||||
email:{
|
||||
email:true,
|
||||
},
|
||||
phone:{
|
||||
isPhone:true,
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"deptName": {
|
||||
remote: "部门已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-dept-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
/*部门管理-新增-选择父部门树*/
|
||||
function selectDeptTree() {
|
||||
var treeId = $("#treeId").val();
|
||||
if ($.common.isEmpty(treeId)) {
|
||||
$.modal.alertWarning("请先添加用户所属的部门!");
|
||||
return;
|
||||
}
|
||||
var options = {
|
||||
title: '部门选择',
|
||||
width: "380",
|
||||
url: prefix + "/selectDeptTree/" + treeId,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = $.modal.getChildFrame(index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
$.modal.close(index);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
<!DOCTYPE html>
|
||||
<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>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="dept-form">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
部门名称:<input type="text" name="deptName"/>
|
||||
</li>
|
||||
<li>
|
||||
部门状态:<select name="status" th:with="type=${@dict.getType('sys_normal_disable')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.treeTable.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add(100)" shiro:hasPermission="system:dept:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary" onclick="$.operate.edit()" shiro:hasPermission="system:dept:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-info" id="expandAllBtn">
|
||||
<i class="fa fa-exchange"></i> 展开/折叠
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-tree-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var addFlag = [[${@permission.hasPermi('system:dept:add')}]];
|
||||
var editFlag = [[${@permission.hasPermi('system:dept:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:dept:remove')}]];
|
||||
var datas = [[${@dict.getType('sys_normal_disable')}]];
|
||||
var prefix = ctx + "system/dept"
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
code: "deptId",
|
||||
parentCode: "parentId",
|
||||
uniqueId: "deptId",
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add/{id}",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove/{id}",
|
||||
modalName: "部门",
|
||||
columns: [{
|
||||
field: 'selectItem',
|
||||
radio: true
|
||||
},
|
||||
{
|
||||
field: 'deptName',
|
||||
title: '部门名称',
|
||||
align: "left"
|
||||
},
|
||||
{
|
||||
field: 'orderNum',
|
||||
title: '排序',
|
||||
align: "left"
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
align: "left",
|
||||
formatter: function(value, item, index) {
|
||||
return $.table.selectDictLabel(datas, item.status);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
align: "left"
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'left',
|
||||
formatter: function(value, row, index) {
|
||||
if (row.parentId != 0) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.deptId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.deptId + '\')"><i class="fa fa-plus"></i>新增</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.deptId + '\')"><i class="fa fa-trash"></i>删除</a>');
|
||||
return actions.join('');
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.treeTable.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改部门')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-dept-edit" th:object="${dept}">
|
||||
<input name="deptId" type="hidden" th:field="*{deptId}" />
|
||||
<input id="treeId" name="parentId" type="hidden" th:field="*{parentId}" />
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">上级部门:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="treeName" onclick="selectDeptTree()" readonly="true" th:field="*{parentName}">
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">部门名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="deptName" th:field="*{deptName}" id="deptName" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">显示排序:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="orderNum" th:field="*{orderNum}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">负责人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="leader" th:field="*{leader}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">联系电话:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="phone" th:field="*{phone}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">邮箱:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="email" th:field="*{email}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">部门状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "system/dept";
|
||||
|
||||
$("#form-dept-edit").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
deptName:{
|
||||
remote: {
|
||||
url: prefix + "/checkDeptNameUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"deptId": function() {
|
||||
return $("#deptId").val();
|
||||
},
|
||||
"parentId": function() {
|
||||
return $("input[name='parentId']").val();
|
||||
},
|
||||
"deptName": function() {
|
||||
return $.common.trim($("#deptName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
orderNum:{
|
||||
digits:true
|
||||
},
|
||||
email:{
|
||||
email:true,
|
||||
},
|
||||
phone:{
|
||||
isPhone:true,
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"deptName": {
|
||||
remote: "部门已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-dept-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
/*部门管理-修改-选择部门树*/
|
||||
function selectDeptTree() {
|
||||
var deptId = $("#treeId").val();
|
||||
var excludeId = $("input[name='deptId']").val();
|
||||
if(deptId > 0) {
|
||||
var options = {
|
||||
title: '部门选择',
|
||||
width: "380",
|
||||
url: prefix + "/selectDeptTree/" + $("#treeId").val() + "/" + excludeId,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
} else {
|
||||
$.modal.alertError("父部门不能选择");
|
||||
}
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
||||
if ($.tree.notAllowLastLevel(tree)) {
|
||||
var body = $.modal.getChildFrame(index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
$.modal.close(index);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('部门树选择')" />
|
||||
<th:block th:include="include :: ztree-css" />
|
||||
</head>
|
||||
<style>
|
||||
body{height:auto;font-family: "Microsoft YaHei";}
|
||||
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
|
||||
</style>
|
||||
<body class="hold-transition box box-main">
|
||||
<input id="treeId" name="treeId" type="hidden" th:value="${dept.deptId}"/>
|
||||
<input id="treeName" name="treeName" type="hidden" th:value="${dept.deptName}"/>
|
||||
<div class="wrapper"><div class="treeShowHideButton" onclick="$.tree.toggleSearch();">
|
||||
<label id="btnShow" title="显示搜索" style="display:none;">︾</label>
|
||||
<label id="btnHide" title="隐藏搜索">︽</label>
|
||||
</div>
|
||||
<div class="treeSearchInput" id="search">
|
||||
<label for="keyword">关键字:</label><input type="text" class="empty" id="keyword" maxlength="50">
|
||||
<button class="btn" id="btn" onclick="$.tree.searchNode()"> 搜索 </button>
|
||||
</div>
|
||||
<div class="treeExpandCollapse">
|
||||
<a href="#" onclick="$.tree.expand()">展开</a> /
|
||||
<a href="#" onclick="$.tree.collapse()">折叠</a>
|
||||
</div>
|
||||
<div id="tree" class="ztree treeselect"></div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: ztree-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/dept"
|
||||
var deptId = [[${deptId}]];
|
||||
var excludeId = [[${excludeId}]];
|
||||
$(function() {
|
||||
var url = $.common.isEmpty(excludeId) ? prefix + "/treeData": prefix + "/treeData/" + excludeId;
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 2,
|
||||
onClick : zOnClick
|
||||
};
|
||||
$.tree.init(options);
|
||||
});
|
||||
|
||||
function zOnClick(event, treeId, treeNode) {
|
||||
var treeId = treeNode.id;
|
||||
var treeName = treeNode.name;
|
||||
$("#treeId").val(treeId);
|
||||
$("#treeName").val(treeName);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增字典数据')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-dict-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">字典标签:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="dictLabel" id="dictLabel" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">字典键值:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="dictValue" id="dictValue" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">字典类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" id="dictType" name="dictType" readonly="true" th:value="${dictType}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">样式属性:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" id="cssClass" name="cssClass">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">字典排序:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="dictSort" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">回显样式:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="listClass" class="form-control m-b">
|
||||
<option value="">---请选择---</option>
|
||||
<option value="default">默认</option>
|
||||
<option value="primary">主要</option>
|
||||
<option value="success">成功</option>
|
||||
<option value="info"> 信息</option>
|
||||
<option value="warning">警告</option>
|
||||
<option value="danger"> 危险</option>
|
||||
</select>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> table表格字典列显示样式属性</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">系统默认:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_yes_no')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="isDefault" th:value="${dict.dictValue}" th:checked="${dict.default}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea id="remark" name="remark" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "system/dict/data";
|
||||
|
||||
$("#form-dict-add").validate({
|
||||
rules:{
|
||||
dictSort:{
|
||||
number:true
|
||||
},
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-dict-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('字典数据列表')" />
|
||||
<th:block th:include="include :: select2-css" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="data-form">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
字典名称:<select id="dictType" name="dictType" class="form-control">
|
||||
<option th:each="dict : ${dictList}" th:text="${dict['dictName']}" th:value="${dict['dictType']}" th:field="*{dict.dictType}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
字典标签:<input type="text" name="dictLabel"/>
|
||||
</li>
|
||||
<li>
|
||||
数据状态:<select name="status" th:with="type=${@dict.getType('sys_normal_disable')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="add()" shiro:hasPermission="system:dict:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:dict:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:dict:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:dict:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
<a class="btn btn-danger" onclick="closeItem()">
|
||||
<i class="fa fa-reply-all"></i> 关闭
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: select2-js" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('system:dict:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:dict:remove')}]];
|
||||
var datas = [[${@dict.getType('sys_normal_disable')}]];
|
||||
var prefix = ctx + "system/dict/data";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add/{id}",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
queryParams: queryParams,
|
||||
sortName: "dictSort",
|
||||
sortOrder: "asc",
|
||||
modalName: "数据",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'dictCode',
|
||||
title: '字典编码'
|
||||
},
|
||||
{
|
||||
field: 'dictLabel',
|
||||
title: '字典标签',
|
||||
formatter: function(value, row, index) {
|
||||
var listClass = $.common.equals("default", row.listClass) || $.common.isEmpty(row.listClass) ? "" : "badge badge-" + row.listClass;
|
||||
return $.common.sprintf("<span class='%s'>%s</span>", listClass, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'dictValue',
|
||||
title: '字典键值'
|
||||
},
|
||||
{
|
||||
field: 'dictSort',
|
||||
title: '字典排序'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(datas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.dictCode + '\')"><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.dictCode + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function queryParams(params) {
|
||||
var search = $.table.queryParams(params);
|
||||
search.dictType = $("#dictType").val();
|
||||
return search;
|
||||
}
|
||||
|
||||
/*字典数据-新增字典*/
|
||||
function add() {
|
||||
var dictType = $("#dictType option:selected").val();
|
||||
$.operate.add(dictType);
|
||||
}
|
||||
|
||||
function resetPre() {
|
||||
$.form.reset();
|
||||
$("#dictType").val($("#dictType").val()).trigger("change");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改字典数据')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-dict-edit" th:object="${dict}">
|
||||
<input name="dictCode" type="hidden" th:field="*{dictCode}" />
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">字典标签:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="dictLabel" id="dictLabel" th:field="*{dictLabel}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">字典键值:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="dictValue" id="dictValue" th:field="*{dictValue}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">字典类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" readonly="true" th:field="*{dictType}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">样式属性:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" id="cssClass" name="cssClass" th:field="*{cssClass}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">字典排序:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="dictSort" th:field="*{dictSort}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">回显样式:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="listClass" class="form-control m-b">
|
||||
<option value="" th:field="*{listClass}">---请选择---</option>
|
||||
<option value="default" th:field="*{listClass}">默认</option>
|
||||
<option value="primary" th:field="*{listClass}">主要</option>
|
||||
<option value="success" th:field="*{listClass}">成功</option>
|
||||
<option value="info" th:field="*{listClass}">信息</option>
|
||||
<option value="warning" th:field="*{listClass}">警告</option>
|
||||
<option value="danger" th:field="*{listClass}">危险</option>
|
||||
</select>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> table表格字典列显示样式属性</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">系统默认:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_yes_no')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="isDefault" th:value="${dict.dictValue}" th:field="*{isDefault}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "system/dict/data";
|
||||
|
||||
$("#form-dict-edit").validate({
|
||||
rules:{
|
||||
dictSort:{
|
||||
number:true
|
||||
},
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-dict-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增字典类型')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-dict-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">字典名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="dictName" id="dictName" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">字典类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="dictType" id="dictType" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea id="remark" name="remark" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "system/dict";
|
||||
|
||||
$("#form-dict-add").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
dictType:{
|
||||
minlength: 5,
|
||||
remote: {
|
||||
url: prefix + "/checkDictTypeUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
name : function() {
|
||||
return $.common.trim($("#dictType").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"dictType": {
|
||||
remote: "该字典类型已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-dict-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改字典类型')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-dict-edit" th:object="${dict}">
|
||||
<input id="dictId" name="dictId" type="hidden" th:field="*{dictId}" />
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">字典名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="dictName" id="dictName" th:field="*{dictName}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">字典类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="dictType" id="dictType" th:field="*{dictType}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "system/dict";
|
||||
|
||||
$("#form-dict-edit").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
dictType:{
|
||||
minlength: 5,
|
||||
remote: {
|
||||
url: prefix + "/checkDictTypeUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
dictId : function() {
|
||||
return $("#dictId").val();
|
||||
},
|
||||
dictType : function() {
|
||||
return $.common.trim($("#dictType").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"dictType": {
|
||||
remote: "该字典类型已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-dict-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('字典树选择')" />
|
||||
<th:block th:include="include :: ztree-css" />
|
||||
</head>
|
||||
<style>
|
||||
body{height:auto;font-family: "Microsoft YaHei";}
|
||||
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
|
||||
</style>
|
||||
<body class="hold-transition box box-main">
|
||||
<input id="columnId" type="hidden" th:value="${columnId}"/>
|
||||
<input id="treeId" type="hidden" th:value="${dict?.dictId}"/>
|
||||
<input id="dictType" type="hidden" th:value="${dict?.dictType}"/>
|
||||
<div class="wrapper"><div class="treeShowHideButton" onclick="$.tree.toggleSearch();">
|
||||
<label id="btnShow" title="显示搜索" style="display:none;">︾</label>
|
||||
<label id="btnHide" title="隐藏搜索">︽</label>
|
||||
</div>
|
||||
<div class="treeSearchInput" id="search">
|
||||
<label for="keyword">关键字:</label><input type="text" class="empty" id="keyword" maxlength="50">
|
||||
<button class="btn" id="btn" onclick="$.tree.searchNode()"> 搜索 </button>
|
||||
</div>
|
||||
<div id="tree" class="ztree treeselect"></div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: ztree-js" />
|
||||
<script th:inline="javascript">
|
||||
$(function() {
|
||||
var url = ctx + "system/dict/treeData";
|
||||
var options = {
|
||||
url: url,
|
||||
onClick : zOnClick
|
||||
};
|
||||
$.tree.init(options);
|
||||
});
|
||||
|
||||
function zOnClick(event, treeId, treeNode) {
|
||||
$("#dictType").val(treeNode.title);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
<!DOCTYPE html>
|
||||
<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>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="type-form">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
字典名称:<input type="text" name="dictName"/>
|
||||
</li>
|
||||
<li>
|
||||
字典类型:<input type="text" name="dictType"/>
|
||||
</li>
|
||||
<li>
|
||||
字典状态:<select name="status" th:with="type=${@dict.getType('sys_normal_disable')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li class="select-time">
|
||||
<label>创建时间: </label>
|
||||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
|
||||
<span>-</span>
|
||||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:dict:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:dict:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:dict:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:dict:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
<a class="btn btn-danger" onclick="refreshCache()" shiro:hasPermission="system:dict:remove">
|
||||
<i class="fa fa-refresh"></i> 刷新缓存
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('system:dict:edit')}]];
|
||||
var listFlag = [[${@permission.hasPermi('system:dict:list')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:dict:remove')}]];
|
||||
var datas = [[${@dict.getType('sys_normal_disable')}]];
|
||||
var prefix = ctx + "system/dict";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
sortName: "dictId",
|
||||
sortOrder: "asc",
|
||||
modalName: "类型",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'dictId',
|
||||
title: '字典主键'
|
||||
},
|
||||
{
|
||||
field: 'dictName',
|
||||
title: '字典名称',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field: 'dictType',
|
||||
title: '字典类型',
|
||||
sortable: true,
|
||||
formatter: function(value, row, index) {
|
||||
return '<a href="javascript:void(0)" onclick="detail(\'' + row.dictId + '\')">' + value + '</a>';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(datas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.tooltip(value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.dictId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-info btn-xs ' + listFlag + '" href="javascript:void(0)" onclick="detail(\'' + row.dictId + '\')"><i class="fa fa-list-ul"></i>列表</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.dictId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
/*字典列表-详细*/
|
||||
function detail(dictId) {
|
||||
var url = prefix + '/detail/' + dictId;
|
||||
$.modal.openTab("字典数据", url);
|
||||
}
|
||||
|
||||
/** 刷新字典缓存 */
|
||||
function refreshCache() {
|
||||
$.operate.get(prefix + "/refreshCache");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,202 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增菜单')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-menu-add">
|
||||
<input id="treeId" name="parentId" type="hidden" th:value="${menu.menuId}" />
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">上级菜单:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" onclick="selectMenuTree()" id="treeName" readonly="true" th:value="${menu.menuName}">
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">菜单类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="radio-box"> <input type="radio" name="menuType" value="M" /> 目录 </label>
|
||||
<label class="radio-box"> <input type="radio" name="menuType" value="C" /> 菜单 </label>
|
||||
<label class="radio-box"> <input type="radio" name="menuType" value="F" /> 按钮 </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">菜单名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="menuName" id="menuName" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">请求地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="url" name="url" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">打开方式:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="target" name="target" class="form-control m-b">
|
||||
<option value="menuItem">页签</option>
|
||||
<option value="menuBlank">新窗口</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">权限标识:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="perms" name="perms" class="form-control" type="text">
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 控制器中定义的权限标识,如:@RequiresPermissions("")</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">显示排序:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="orderNum" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">图标:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="icon" name="icon" class="form-control" type="text" placeholder="选择图标">
|
||||
<div class="ms-parent" style="width: 100%;">
|
||||
<div class="icon-drop animated flipInX" style="display: none;max-height:200px;overflow-y:auto">
|
||||
<div data-th-include="system/menu/icon"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">菜单状态:</label>
|
||||
<div class="col-sm-3">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_show_hide')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="visible" th:value="${dict.dictValue}" th:checked="${dict.default}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label is-refresh" title="打开菜单选项卡是否刷新页面">是否刷新:<i class="fa fa-question-circle-o"></i></label>
|
||||
<div class="col-sm-3 is-refresh">
|
||||
<div class="radio-box">
|
||||
<input type="radio" id="refresh-no" name="isRefresh" value="1" checked>
|
||||
<label for="refresh-no">否</label>
|
||||
</div>
|
||||
<div class="radio-box">
|
||||
<input type="radio" id="refresh-yes" name="isRefresh" value="0">
|
||||
<label for="refresh-yes">是</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script>
|
||||
var prefix = ctx + "system/menu";
|
||||
|
||||
$("#form-menu-add").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
menuType:{
|
||||
required:true,
|
||||
},
|
||||
menuName:{
|
||||
remote: {
|
||||
url: prefix + "/checkMenuNameUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"parentId": function() {
|
||||
return $("input[name='parentId']").val();
|
||||
},
|
||||
"menuName" : function() {
|
||||
return $.common.trim($("#menuName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
orderNum:{
|
||||
digits:true
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"menuName": {
|
||||
remote: "菜单已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-menu-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("input[name='icon']").focus(function() {
|
||||
$(".icon-drop").show();
|
||||
});
|
||||
$("#form-menu-add").click(function(event) {
|
||||
var obj = event.srcElement || event.target;
|
||||
if (!$(obj).is("input[name='icon']")) {
|
||||
$(".icon-drop").hide();
|
||||
}
|
||||
});
|
||||
$(".icon-drop").find(".ico-list i").on("click", function() {
|
||||
$('#icon').val($(this).attr('class'));
|
||||
});
|
||||
$('input').on('ifChecked', function(event){
|
||||
var menuType = $(event.target).val();
|
||||
if (menuType == "M") {
|
||||
$("#url").parents(".form-group").hide();
|
||||
$("#perms").parents(".form-group").hide();
|
||||
$("#icon").parents(".form-group").show();
|
||||
$("#target").parents(".form-group").hide();
|
||||
$("input[name='visible']").parents(".form-group").show();
|
||||
$(".is-refresh").hide();
|
||||
} else if (menuType == "C") {
|
||||
$("#url").parents(".form-group").show();
|
||||
$("#perms").parents(".form-group").show();
|
||||
$("#icon").parents(".form-group").show();
|
||||
$("#target").parents(".form-group").show();
|
||||
$("input[name='visible']").parents(".form-group").show();
|
||||
$(".is-refresh").show();
|
||||
} else if (menuType == "F") {
|
||||
$("#url").parents(".form-group").hide();
|
||||
$("#perms").parents(".form-group").show();
|
||||
$("#icon").parents(".form-group").hide();
|
||||
$("#target").parents(".form-group").hide();
|
||||
$("input[name='visible']").parents(".form-group").hide();
|
||||
$(".is-refresh").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/*菜单管理-新增-选择菜单树*/
|
||||
function selectMenuTree() {
|
||||
var treeId = $("#treeId").val();
|
||||
var menuId = treeId > 0 ? treeId : 1;
|
||||
var url = prefix + "/selectMenuTree/" + menuId;
|
||||
var options = {
|
||||
title: '菜单选择',
|
||||
width: "380",
|
||||
url: url,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = $.modal.getChildFrame(index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
$.modal.close(index);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,230 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改菜单')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-menu-edit" th:object="${menu}">
|
||||
<input name="menuId" type="hidden" th:field="*{menuId}" />
|
||||
<input id="treeId" name="parentId" type="hidden" th:field="*{parentId}" />
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">上级菜单:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" onclick="selectMenuTree()" id="treeName" readonly="true" th:value="${menu.parentName == null ? '无' : menu.parentName}">
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">菜单类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="radio-box"> <input type="radio" th:field="*{menuType}" name="menuType" value="M" /> 目录 </label>
|
||||
<label class="radio-box"> <input type="radio" th:field="*{menuType}" name="menuType" value="C" /> 菜单 </label>
|
||||
<label class="radio-box"> <input type="radio" th:field="*{menuType}" name="menuType" value="F" /> 按钮 </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">菜单名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="menuName" id="menuName" th:field="*{menuName}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">请求地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="url" name="url" class="form-control" type="text" th:field="*{url}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">打开方式:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="target" name="target" class="form-control m-b">
|
||||
<option value="menuItem" th:field="*{target}">页签</option>
|
||||
<option value="menuBlank" th:selected="*{target == 'menuBlank'}">新窗口</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">权限标识:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="perms" name="perms" class="form-control" type="text" th:field="*{perms}">
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 控制器中定义的权限标识,如:@RequiresPermissions("")</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">显示排序:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="orderNum" th:field="*{orderNum}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">图标:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="icon" name="icon" class="form-control" type="text" placeholder="选择图标" th:field="*{icon}">
|
||||
<div class="ms-parent" style="width: 100%;">
|
||||
<div class="icon-drop animated flipInX" style="display: none;max-height:200px;overflow-y:auto">
|
||||
<div data-th-include="system/menu/icon"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">菜单状态:</label>
|
||||
<div class="col-sm-3">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_show_hide')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="visible" th:value="${dict.dictValue}" th:field="*{visible}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label is-refresh" title="打开菜单选项卡是否刷新页面">是否刷新:<i class="fa fa-question-circle-o"></i></label>
|
||||
<div class="col-sm-3 is-refresh">
|
||||
<div class="radio-box">
|
||||
<input type="radio" id="refresh-no" name="isRefresh" value="1" th:field="*{isRefresh}">
|
||||
<label for="refresh-no">否</label>
|
||||
</div>
|
||||
<div class="radio-box">
|
||||
<input type="radio" id="refresh-yes" name="isRefresh" value="0" th:field="*{isRefresh}">
|
||||
<label for="refresh-yes">是</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script>
|
||||
var prefix = ctx + "system/menu";
|
||||
|
||||
$(function() {
|
||||
var menuType = $('input[name="menuType"]:checked').val();
|
||||
menuVisible(menuType);
|
||||
});
|
||||
|
||||
$("#form-menu-edit").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
menuType:{
|
||||
required:true,
|
||||
},
|
||||
menuName:{
|
||||
remote: {
|
||||
url: prefix + "/checkMenuNameUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"menuId": function() {
|
||||
return $("#menuId").val();
|
||||
},
|
||||
"parentId": function() {
|
||||
return $("input[name='parentId']").val();
|
||||
},
|
||||
"menuName": function() {
|
||||
return $.common.trim($("#menuName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
orderNum:{
|
||||
digits:true
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"menuName": {
|
||||
remote: "菜单已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-menu-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("input[name='icon']").focus(function() {
|
||||
$(".icon-drop").show();
|
||||
});
|
||||
$("#form-menu-edit").click(function(event) {
|
||||
var obj = event.srcElement || event.target;
|
||||
if (!$(obj).is("input[name='icon']")) {
|
||||
$(".icon-drop").hide();
|
||||
}
|
||||
});
|
||||
$(".icon-drop").find(".ico-list i").on("click",
|
||||
function() {
|
||||
$('#icon').val($(this).attr('class'));
|
||||
});
|
||||
$('input').on('ifChecked',
|
||||
function(event) {
|
||||
var menuType = $(event.target).val();
|
||||
menuVisible(menuType);
|
||||
});
|
||||
});
|
||||
|
||||
function menuVisible(menuType) {
|
||||
if (menuType == "M") {
|
||||
$("#url").parents(".form-group").hide();
|
||||
$("#perms").parents(".form-group").hide();
|
||||
$("#icon").parents(".form-group").show();
|
||||
$("#target").parents(".form-group").hide();
|
||||
$("input[name='visible']").parents(".form-group").show();
|
||||
$(".is-refresh").hide();
|
||||
} else if (menuType == "C") {
|
||||
$("#url").parents(".form-group").show();
|
||||
$("#perms").parents(".form-group").show();
|
||||
$("#icon").parents(".form-group").show();
|
||||
$("#target").parents(".form-group").show();
|
||||
$("input[name='visible']").parents(".form-group").show();
|
||||
$(".is-refresh").show();
|
||||
} else if (menuType == "F") {
|
||||
$("#url").parents(".form-group").hide();
|
||||
$("#perms").parents(".form-group").show();
|
||||
$("#icon").parents(".form-group").hide();
|
||||
$("#target").parents(".form-group").hide();
|
||||
$("input[name='visible']").parents(".form-group").hide();
|
||||
$(".is-refresh").hide();
|
||||
}
|
||||
}
|
||||
|
||||
/*菜单管理-修改-选择菜单树*/
|
||||
function selectMenuTree() {
|
||||
var menuId = $("#treeId").val();
|
||||
if(menuId > 0) {
|
||||
var url = prefix + "/selectMenuTree/" + menuId;
|
||||
$.modal.open("选择菜单", url, '380', '380');
|
||||
} else {
|
||||
$.modal.alertError("主菜单不能选择");
|
||||
}
|
||||
}
|
||||
|
||||
function selectMenuTree() {
|
||||
var menuId = $("#treeId").val();
|
||||
if(menuId > 0) {
|
||||
var url = prefix + "/selectMenuTree/" + menuId;
|
||||
var options = {
|
||||
title: '菜单选择',
|
||||
width: "380",
|
||||
url: url,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
} else {
|
||||
$.modal.alertError("主菜单不能选择");
|
||||
}
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = $.modal.getChildFrame(index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
$.modal.close(index);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,928 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Font Awesome Ico list</title>
|
||||
<link href="/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
<style type="text/css">
|
||||
.ico-list .fa{
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
cursor:pointer;
|
||||
font-size: 18px;
|
||||
width: 28px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.ico-list .fa:hover {
|
||||
background-color: #1d9d74;
|
||||
color: #ffffff;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="ico-list">
|
||||
<i class="fa fa-address-book" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-address-book-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-address-card" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-address-card-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-adjust" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-american-sign-language-interpreting" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-anchor" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-archive" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-area-chart" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-arrows" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-arrows-h" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-arrows-v" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-asl-interpreting" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-assistive-listening-systems" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-asterisk" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-at" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-audio-description" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-automobile" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-balance-scale" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-ban" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bank" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bar-chart" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bar-chart-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-barcode" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bars" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bath" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bathtub" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-battery" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-battery-0" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-battery-1" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-battery-2" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-battery-3" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-battery-4" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-battery-empty" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-battery-full" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-battery-half" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-battery-quarter" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-battery-three-quarters" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bed" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-beer" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bell" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bell-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bell-slash" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bell-slash-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bicycle" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-binoculars" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-birthday-cake" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-blind" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bluetooth" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bluetooth-b" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bolt" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bomb" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-book" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bookmark" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bookmark-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-braille" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-briefcase" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bug" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-building" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-building-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bullhorn" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bullseye" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-bus" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-cab" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-calculator" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-calendar" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-calendar-check-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-calendar-minus-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-calendar-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-calendar-plus-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-calendar-times-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-camera" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-camera-retro" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-car" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-caret-square-o-down" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-caret-square-o-left" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-caret-square-o-right" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-caret-square-o-up" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-cart-arrow-down" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-cart-plus" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-cc" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-certificate" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-check" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-check-circle" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-check-circle-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-check-square" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-check-square-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-child" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-circle" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-circle-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-circle-o-notch" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-circle-thin" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-clock-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-clone" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-close" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-cloud" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-cloud-download" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-cloud-upload" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-code" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-code-fork" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-coffee" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-cog" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-cogs" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-comment" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-comment-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-commenting" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-commenting-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-comments" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-comments-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-compass" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-copyright" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-creative-commons" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-credit-card" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-credit-card-alt" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-crop" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-crosshairs" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-cube" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-cubes" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-cutlery" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-dashboard" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-database" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-deaf" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-deafness" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-desktop" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-diamond" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-dot-circle-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-download" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-drivers-license" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-drivers-license-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-edit" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-ellipsis-h" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-ellipsis-v" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-envelope" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-envelope-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-envelope-open" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-envelope-open-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-envelope-square" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-eraser" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-exchange" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-exclamation" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-external-link" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-external-link-square" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-eye" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-eye-slash" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-eyedropper" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-fax" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-feed" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-female" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-fighter-jet" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-file-archive-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-file-audio-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-file-code-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-file-excel-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-file-image-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-file-movie-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-file-pdf-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-file-photo-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-file-picture-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-file-powerpoint-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-file-sound-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-file-video-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-file-word-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-file-zip-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-film" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-filter" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-fire" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-fire-extinguisher" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-flag" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-flag-checkered" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-flag-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-flash" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-flask" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-folder" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-folder-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-folder-open" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-folder-open-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-frown-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-futbol-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-gamepad" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-gavel" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-gear" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-gears" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-gift" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-glass" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-globe" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-group" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hand-grab-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hand-lizard-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hand-paper-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hand-peace-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hand-pointer-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hand-rock-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hand-scissors-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hand-spock-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hand-stop-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-handshake-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hard-of-hearing" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hashtag" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hdd-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-headphones" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-heart" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-heart-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-heartbeat" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-history" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-home" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hotel" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hourglass" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hourglass-1" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hourglass-2" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hourglass-3" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hourglass-end" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hourglass-half" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hourglass-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-hourglass-start" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-i-cursor" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-id-badge" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-id-card" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-id-card-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-image" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-inbox" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-industry" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-info" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-info-circle" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-institution" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-key" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-keyboard-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-language" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-laptop" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-leaf" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-legal" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-lemon-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-level-down" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-level-up" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-life-bouy" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-life-buoy" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-life-ring" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-life-saver" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-lightbulb-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-line-chart" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-location-arrow" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-lock" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-low-vision" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-magic" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-magnet" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-mail-forward" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-mail-reply" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-mail-reply-all" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-male" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-map" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-map-marker" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-map-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-map-pin" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-map-signs" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-meh-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-microchip" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-microphone" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-microphone-slash" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-minus" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-minus-circle" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-minus-square" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-minus-square-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-mobile" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-mobile-phone" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-money" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-moon-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-mortar-board" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-motorcycle" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-mouse-pointer" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-music" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-navicon" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-newspaper-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-object-group" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-object-ungroup" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-paint-brush" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-paper-plane" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-paper-plane-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-paw" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-pencil-square" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-pencil-square-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-percent" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-phone" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-phone-square" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-photo" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-picture-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-pie-chart" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-plane" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-plug" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-plus" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-plus-circle" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-plus-square" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-plus-square-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-podcast" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-power-off" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-print" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-puzzle-piece" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-qrcode" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-question" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-question-circle-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-quote-left" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-quote-right" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-random" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-recycle" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-refresh" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-registered" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-remove" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-reorder" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-reply" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-reply-all" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-retweet" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-road" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-rocket" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-rss" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-rss-square" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-s15" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-search" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-search-minus" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-search-plus" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-send" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-send-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-server" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-share" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-share-alt" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-share-alt-square" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-share-square" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-share-square-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-shield" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-ship" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-shopping-bag" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-shopping-basket" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-shopping-cart" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-shower" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sign-in" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sign-language" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sign-out" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-signal" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-signing" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sitemap" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sliders" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-smile-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-snowflake-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-soccer-ball-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sort" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sort-alpha-asc" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sort-alpha-desc" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sort-amount-asc" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sort-amount-desc" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sort-asc" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sort-desc" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sort-down" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sort-numeric-asc" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sort-numeric-desc" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sort-up" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-space-shuttle" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-spinner" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-spoon" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-square" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-square-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-star" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-star-half" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-star-half-empty" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-star-half-full" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-star-half-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-star-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sticky-note" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sticky-note-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-street-view" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-suitcase" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-sun-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-support" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-tablet" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-tachometer" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-tag" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-tags" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-tasks" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-taxi" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-television" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-terminal" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thermometer" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thermometer-0" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thermometer-1" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thermometer-2" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thermometer-3" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thermometer-4" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thermometer-empty" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thermometer-full" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thermometer-half" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thermometer-quarter" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thermometer-three-quarters" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thumb-tack" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thumbs-down" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thumbs-o-down" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thumbs-o-up" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-thumbs-up" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-ticket" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-times" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-times-circle" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-times-circle-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-times-rectangle" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-times-rectangle-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-tint" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-toggle-down" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-toggle-left" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-toggle-off" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-toggle-on" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-toggle-right" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-toggle-up" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-trademark" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-trash" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-trash-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-tree" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-trophy" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-truck" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-tty" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-tv" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-umbrella" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-universal-access" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-university" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-unlock" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-unlock-alt" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-unsorted" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-upload" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-user" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-user-circle" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-user-circle-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-user-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-user-plus" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-user-secret" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-user-times" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-users" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-vcard" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-vcard-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-video-camera" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-volume-control-phone" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-volume-down" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-volume-off" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-volume-up" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-warning" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-wheelchair" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-wheelchair-alt" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-wifi" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-window-close" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-window-close-o" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-window-maximize" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-window-minimize" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-window-restore" aria-hidden="true"></i>
|
||||
|
||||
<i class="fa fa-wrench" aria-hidden="true"></i>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
<!DOCTYPE html>
|
||||
<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>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="menu-form">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
菜单名称:<input type="text" name="menuName"/>
|
||||
</li>
|
||||
<li>
|
||||
菜单状态:<select name="visible" th:with="type=${@dict.getType('sys_show_hide')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.treeTable.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add(0)" shiro:hasPermission="system:menu:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary" onclick="$.operate.edit()" shiro:hasPermission="system:menu:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-info" id="expandAllBtn">
|
||||
<i class="fa fa-exchange"></i> 展开/折叠
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-tree-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var addFlag = [[${@permission.hasPermi('system:menu:add')}]];
|
||||
var editFlag = [[${@permission.hasPermi('system:menu:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:menu:remove')}]];
|
||||
var datas = [[${@dict.getType('sys_show_hide')}]];
|
||||
var prefix = ctx + "system/menu";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
code: "menuId",
|
||||
parentCode: "parentId",
|
||||
uniqueId: "menuId",
|
||||
expandAll: false,
|
||||
expandFirst: false,
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add/{id}",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove/{id}",
|
||||
modalName: "菜单",
|
||||
columns: [{
|
||||
field: 'selectItem',
|
||||
radio: true
|
||||
},
|
||||
{
|
||||
title: '菜单名称',
|
||||
field: 'menuName',
|
||||
width: '20',
|
||||
widthUnit: '%',
|
||||
formatter: function(value, row, index) {
|
||||
if ($.common.isEmpty(row.icon)) {
|
||||
return row.menuName;
|
||||
} else {
|
||||
return '<i class="' + row.icon + '"></i> <span class="nav-label">' + row.menuName + '</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'orderNum',
|
||||
title: '排序',
|
||||
width: '10',
|
||||
widthUnit: '%',
|
||||
align: "left"
|
||||
},
|
||||
{
|
||||
field: 'url',
|
||||
title: '请求地址',
|
||||
width: '15',
|
||||
widthUnit: '%',
|
||||
align: "left",
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.tooltip(value);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
field: 'menuType',
|
||||
width: '10',
|
||||
widthUnit: '%',
|
||||
align: "left",
|
||||
formatter: function(value, item, index) {
|
||||
if (item.menuType == 'M') {
|
||||
return '<span class="label label-success">目录</span>';
|
||||
}
|
||||
else if (item.menuType == 'C') {
|
||||
return '<span class="label label-primary">菜单</span>';
|
||||
}
|
||||
else if (item.menuType == 'F') {
|
||||
return '<span class="label label-warning">按钮</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'visible',
|
||||
title: '可见',
|
||||
width: '10',
|
||||
widthUnit: '%',
|
||||
align: "left",
|
||||
formatter: function(value, row, index) {
|
||||
if (row.menuType == 'F') {
|
||||
return '-';
|
||||
}
|
||||
return $.table.selectDictLabel(datas, row.visible);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'perms',
|
||||
title: '权限标识',
|
||||
width: '15',
|
||||
widthUnit: '%',
|
||||
align: "left",
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.tooltip(value);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '20',
|
||||
widthUnit: '%',
|
||||
align: "left",
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.menuId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.menuId + '\')"><i class="fa fa-plus"></i>新增</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.menuId + '\')"><i class="fa fa-trash"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.treeTable.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('菜单树选择')" />
|
||||
<th:block th:include="include :: ztree-css" />
|
||||
</head>
|
||||
<style>
|
||||
body{height:auto;font-family: "Microsoft YaHei";}
|
||||
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
|
||||
</style>
|
||||
<body class="hold-transition box box-main">
|
||||
<input id="treeId" name="treeId" type="hidden" th:value="${menu.menuId}"/>
|
||||
<input id="treeName" name="treeName" type="hidden" th:value="${menu.menuName}"/>
|
||||
<div class="wrapper"><div class="treeShowHideButton" onclick="$.tree.toggleSearch();">
|
||||
<label id="btnShow" title="显示搜索" style="display:none;">︾</label>
|
||||
<label id="btnHide" title="隐藏搜索">︽</label>
|
||||
</div>
|
||||
<div class="treeSearchInput" id="search">
|
||||
<label for="keyword">关键字:</label><input type="text" class="empty" id="keyword" maxlength="50">
|
||||
<button class="btn" id="btn" onclick="$.tree.searchNode()"> 搜索 </button>
|
||||
</div>
|
||||
<div class="treeExpandCollapse">
|
||||
<a href="#" onclick="$.tree.expand()">展开</a> /
|
||||
<a href="#" onclick="$.tree.collapse()">折叠</a>
|
||||
</div>
|
||||
<div id="tree" class="ztree treeselect"></div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: ztree-js" />
|
||||
<script th:inline="javascript">
|
||||
$(function() {
|
||||
var url = ctx + "system/menu/menuTreeData";
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 1,
|
||||
onClick : zOnClick
|
||||
};
|
||||
$.tree.init(options);
|
||||
});
|
||||
|
||||
function zOnClick(event, treeId, treeNode) {
|
||||
var treeId = treeNode.id;
|
||||
var treeName = treeNode.name;
|
||||
$("#treeId").val(treeId);
|
||||
$("#treeName").val(treeName);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增通知公告')" />
|
||||
<th:block th:include="include :: summernote-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-notice-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label is-required">公告标题:</label>
|
||||
<div class="col-sm-10">
|
||||
<input id="noticeTitle" name="noticeTitle" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">公告类型:</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="noticeType" class="form-control m-b" th:with="type=${@dict.getType('sys_notice_type')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">公告内容:</label>
|
||||
<div class="col-sm-10">
|
||||
<input id="noticeContent" name="noticeContent" type="hidden">
|
||||
<div class="summernote"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">公告状态:</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_notice_status')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: summernote-js" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "system/notice";
|
||||
|
||||
$('.summernote').summernote({
|
||||
placeholder: '请输入公告内容',
|
||||
height : 192,
|
||||
lang : 'zh-CN',
|
||||
followingToolbar: false,
|
||||
dialogsInBody: true,
|
||||
callbacks: {
|
||||
onImageUpload: function (files) {
|
||||
sendFile(files[0], this);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 上传文件
|
||||
function sendFile(file, obj) {
|
||||
var data = new FormData();
|
||||
data.append("file", file);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ctx + "common/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$(obj).summernote('editor.insertImage', result.url, result.fileName);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#form-notice-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
var sHTML = $('.summernote').summernote('code');
|
||||
$("#noticeContent").val(sHTML);
|
||||
$.operate.save(prefix + "/add", $('#form-notice-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改通知公告')" />
|
||||
<th:block th:include="include :: summernote-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-notice-edit" th:object="${notice}">
|
||||
<input id="noticeId" name="noticeId" th:field="*{noticeId}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label is-required">公告标题:</label>
|
||||
<div class="col-sm-10">
|
||||
<input id="noticeTitle" name="noticeTitle" th:field="*{noticeTitle}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">公告类型:</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="noticeType" class="form-control m-b" th:with="type=${@dict.getType('sys_notice_type')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{noticeType}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">公告内容:</label>
|
||||
<div class="col-sm-10">
|
||||
<input id="noticeContent" name="noticeContent" th:field="*{noticeContent}" type="hidden">
|
||||
<div id="editor" class="summernote"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">公告状态:</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_notice_status')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: summernote-js" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "system/notice";
|
||||
|
||||
$(function() {
|
||||
$('.summernote').summernote({
|
||||
placeholder: '请输入公告内容',
|
||||
height : 192,
|
||||
lang : 'zh-CN',
|
||||
followingToolbar: false,
|
||||
dialogsInBody: true,
|
||||
callbacks: {
|
||||
onImageUpload: function (files) {
|
||||
sendFile(files[0], this);
|
||||
}
|
||||
}
|
||||
});
|
||||
var content = $("#noticeContent").val();
|
||||
$('#editor').summernote('code', content);
|
||||
});
|
||||
|
||||
// 上传文件
|
||||
function sendFile(file, obj) {
|
||||
var data = new FormData();
|
||||
data.append("file", file);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ctx + "common/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$(obj).summernote('editor.insertImage', result.url, result.fileName);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#form-notice-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
var sHTML = $('.summernote').summernote('code');
|
||||
$("#noticeContent").val(sHTML);
|
||||
$.operate.save(prefix + "/edit", $('#form-notice-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
<!DOCTYPE html>
|
||||
<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>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="notice-form">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
公告标题:<input type="text" name="noticeTitle"/>
|
||||
</li>
|
||||
<li>
|
||||
操作人员:<input type="text" name="createBy"/>
|
||||
</li>
|
||||
<li>
|
||||
公告类型:<select name="noticeType" th:with="type=${@dict.getType('sys_notice_type')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="system:notice:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.editFull()" shiro:hasPermission="system:notice:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:notice:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
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')}]];
|
||||
var prefix = ctx + "system/notice";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
modalName: "公告",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field : 'noticeId',
|
||||
title : '序号'
|
||||
},
|
||||
{
|
||||
field : 'noticeTitle',
|
||||
title : '公告标题'
|
||||
},
|
||||
{
|
||||
field: 'noticeType',
|
||||
title: '公告类型',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(types, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(datas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field : 'createBy',
|
||||
title : '创建者'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editFull(\'' + row.noticeId + '\')"><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.noticeId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增平台公司权限')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
|
||||
<form class="form-horizontal m" id="form-plat-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">用户:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="loginName" class="form-control" type="text" placeholder="请输入用户名称" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">平台公司:</label>
|
||||
<div class="col-sm-8" th:with="type=${@dict.getPlat()}">
|
||||
<label th:each="dict : ${type}" class="check-box">
|
||||
<input name="dept" type="checkbox" th:value="${dict.dictValue}" th:text="${dict.dictLabel}">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="remark" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/plat"
|
||||
$("#form-plat-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-plat-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改平台公司权限')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-plat-edit" th:object="${loginUserDept}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">用户:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="loginName" th:field="*{loginName}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">显示名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="displayName" th:field="*{displayName}" class="form-control" type="text" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">平台公司:</label>
|
||||
<div class="col-sm-8" th:with="type=${@dict.getPlat()}">
|
||||
<label th:each="dict : ${type}" class="check-box">
|
||||
<input name="dept" type="checkbox" th:value="${dict.dictValue}" th:text="${dict.dictLabel}" th:attr="checked=${loginUserDept.dept.contains(dict.dictValue)?true:false}">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/plat";
|
||||
$("#form-plat-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-plat-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
<!DOCTYPE html>
|
||||
<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>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>用户:</label>
|
||||
<input type="text" name="loginName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>显示名称:</label>
|
||||
<input type="text" name="displayName"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:plat:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:plat:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:plat:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:plat:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('system:plat:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:plat:remove')}]];
|
||||
var deptDatas = [[${@dict.getPlat()}]];
|
||||
var prefix = ctx + "system/plat";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "平台公司权限",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'loginName',
|
||||
title: '用户'
|
||||
},
|
||||
{
|
||||
field: 'displayName',
|
||||
title: '显示名称'
|
||||
},
|
||||
{
|
||||
field: 'dept',
|
||||
title: '平台公司',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabels(deptDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间'
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: '更新(登录)时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.loginName + '\')"><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.loginName + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增岗位')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-post-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">岗位名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="postName" id="postName" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">岗位编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="postCode" id="postCode" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">显示顺序:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="postSort" id="postSort" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">岗位状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea id="remark" name="remark" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "system/post";
|
||||
|
||||
$("#form-post-add").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
postName:{
|
||||
remote: {
|
||||
url: ctx + "system/post/checkPostNameUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"postName" : function() {
|
||||
return $.common.trim($("#postName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
postCode:{
|
||||
remote: {
|
||||
url: ctx + "system/post/checkPostCodeUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"postCode" : function() {
|
||||
return $.common.trim($("#postCode").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
postSort:{
|
||||
digits:true
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"postCode": {
|
||||
remote: "岗位编码已经存在"
|
||||
},
|
||||
"postName": {
|
||||
remote: "岗位名称已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-post-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改岗位')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-post-edit" th:object="${post}">
|
||||
<input id="postId" name="postId" type="hidden" th:field="*{postId}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">岗位名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="postName" id="postName" th:field="*{postName}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">岗位编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="postCode" id="postCode" th:field="*{postCode}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">显示顺序:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="postSort" id="postSort" th:field="*{postSort}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">岗位状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
|
||||
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
|
||||
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "system/post";
|
||||
|
||||
$("#form-post-edit").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
postName:{
|
||||
remote: {
|
||||
url: ctx + "system/post/checkPostNameUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"postId": function() {
|
||||
return $("input[name='postId']").val();
|
||||
},
|
||||
"postName" : function() {
|
||||
return $.common.trim($("#postName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
postCode:{
|
||||
remote: {
|
||||
url: ctx + "system/post/checkPostCodeUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"postId": function() {
|
||||
return $("input[name='postId']").val();
|
||||
},
|
||||
"postCode" : function() {
|
||||
return $.common.trim($("#postCode").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
postSort:{
|
||||
digits:true
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"postCode": {
|
||||
remote: "岗位编码已经存在"
|
||||
},
|
||||
"postName": {
|
||||
remote: "岗位名称已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-post-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
<!DOCTYPE html>
|
||||
<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>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="post-form">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
岗位编码:<input type="text" name="postCode"/>
|
||||
</li>
|
||||
<li>
|
||||
岗位名称:<input type="text" name="postName"/>
|
||||
</li>
|
||||
<li>
|
||||
岗位状态:<select name="status" th:with="type=${@dict.getType('sys_normal_disable')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:post:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:post:edit">
|
||||
<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> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:post:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('system:post:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:post:remove')}]];
|
||||
var datas = [[${@dict.getType('sys_normal_disable')}]];
|
||||
var prefix = ctx + "system/post";
|
||||
|
||||
$(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) {
|
||||
return $.table.selectDictLabel(datas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
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>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增角色')" />
|
||||
<th:block th:include="include :: ztree-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-role-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">角色名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="roleName" id="roleName" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">权限字符:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="roleKey" id="roleKey" required>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 控制器中定义的权限字符,如:@RequiresRoles("")</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">显示顺序:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="roleSort" id="roleSort" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="toggle-switch switch-solid">
|
||||
<input type="checkbox" id="status" checked>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="remark" name="remark" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">菜单权限:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="check-box">
|
||||
<input type="checkbox" value="1">展开/折叠</label>
|
||||
<label class="check-box">
|
||||
<input type="checkbox" value="2">全选/全不选</label>
|
||||
<label class="check-box">
|
||||
<input type="checkbox" value="3" checked>父子联动</label>
|
||||
<div id="menuTrees" class="ztree ztree-border"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: ztree-js" />
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var url = ctx + "system/menu/roleMenuTreeData";
|
||||
var options = {
|
||||
id: "menuTrees",
|
||||
url: url,
|
||||
check: { enable: true },
|
||||
expandLevel: 0
|
||||
};
|
||||
$.tree.init(options);
|
||||
});
|
||||
|
||||
$("#form-role-add").validate({
|
||||
rules:{
|
||||
onkeyup: false,
|
||||
roleName:{
|
||||
remote: {
|
||||
url: ctx + "system/role/checkRoleNameUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"roleName" : function() {
|
||||
return $.common.trim($("#roleName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
roleKey:{
|
||||
remote: {
|
||||
url: ctx + "system/role/checkRoleKeyUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"roleKey" : function() {
|
||||
return $.common.trim($("#roleKey").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
roleSort:{
|
||||
digits:true
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"roleName": {
|
||||
remote: "角色名称已经存在"
|
||||
},
|
||||
"roleKey": {
|
||||
remote: "角色权限已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
$('input').on('ifChanged', function(obj){
|
||||
var type = $(this).val();
|
||||
var checked = obj.currentTarget.checked;
|
||||
if (type == 1) {
|
||||
if (checked) {
|
||||
$._tree.expandAll(true);
|
||||
} else {
|
||||
$._tree.expandAll(false);
|
||||
}
|
||||
} else if (type == "2") {
|
||||
if (checked) {
|
||||
$._tree.checkAllNodes(true);
|
||||
} else {
|
||||
$._tree.checkAllNodes(false);
|
||||
}
|
||||
} else if (type == "3") {
|
||||
if (checked) {
|
||||
$._tree.setting.check.chkboxType = { "Y": "ps", "N": "ps" };
|
||||
} else {
|
||||
$._tree.setting.check.chkboxType = { "Y": "", "N": "" };
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
add();
|
||||
}
|
||||
}
|
||||
|
||||
function add() {
|
||||
var roleName = $("input[name='roleName']").val();
|
||||
var roleKey = $("input[name='roleKey']").val();
|
||||
var roleSort = $("input[name='roleSort']").val();
|
||||
var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
|
||||
var remark = $("input[name='remark']").val();
|
||||
var menuIds = $.tree.getCheckedNodes();
|
||||
$.ajax({
|
||||
cache : true,
|
||||
type : "POST",
|
||||
url : ctx + "system/role/add",
|
||||
data : {
|
||||
"roleName": roleName,
|
||||
"roleKey": roleKey,
|
||||
"roleSort": roleSort,
|
||||
"status": status,
|
||||
"remark": remark,
|
||||
"menuIds": menuIds
|
||||
},
|
||||
async : false,
|
||||
error : function(request) {
|
||||
$.modal.alertError("系统错误");
|
||||
},
|
||||
success : function(data) {
|
||||
$.operate.successCallback(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
<!DOCTYPE html>
|
||||
<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>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="role-form">
|
||||
<input type="hidden" id="roleId" name="roleId" th:value="${role.roleId}">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
登录名称:<input type="text" name="loginName"/>
|
||||
</li>
|
||||
<li>
|
||||
手机号码:<input type="text" name="phonenumber"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="selectUser()" shiro:hasPermission="system:role:add">
|
||||
<i class="fa fa-plus"></i> 添加用户
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="cancelAuthUserAll()" shiro:hasPermission="system:role:remove">
|
||||
<i class="fa fa-remove"></i> 批量取消授权
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="closeItem()">
|
||||
<i class="fa fa-reply-all"></i> 关闭
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var removeFlag = [[${@permission.hasPermi('system:role:remove')}]];
|
||||
var datas = [[${@dict.getType('sys_normal_disable')}]];
|
||||
var prefix = ctx + "system/role/authUser";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/allocatedList",
|
||||
queryParams: queryParams,
|
||||
sortName: "createTime",
|
||||
sortOrder: "desc",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'userId',
|
||||
title: '用户ID',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'loginName',
|
||||
title: '登录名称',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field: 'userName',
|
||||
title: '用户名称'
|
||||
},
|
||||
{
|
||||
field: 'email',
|
||||
title: '邮箱'
|
||||
},
|
||||
{
|
||||
field: 'phonenumber',
|
||||
title: '手机'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '用户状态',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
return $.table.selectDictLabel(datas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="cancelAuthUser(\'' + row.userId + '\')"><i class="fa fa-remove"></i>取消授权</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function queryParams(params) {
|
||||
var search = $.table.queryParams(params);
|
||||
search.roleId = $("#roleId").val();
|
||||
return search;
|
||||
}
|
||||
|
||||
/* 分配用户-选择用户 */
|
||||
function selectUser() {
|
||||
var url = prefix + '/selectUser/' + $("#roleId").val();
|
||||
$.modal.open("选择用户", url);
|
||||
}
|
||||
|
||||
/* 分配用户-批量取消授权 */
|
||||
function cancelAuthUserAll(userId) {
|
||||
var rows = $.table.selectFirstColumns();
|
||||
if (rows.length == 0) {
|
||||
$.modal.alertWarning("请至少选择一条记录");
|
||||
return;
|
||||
}
|
||||
$.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
|
||||
var data = { "roleId": $("#roleId").val(), "userIds": rows.join() };
|
||||
$.operate.submit(prefix + "/cancelAll", "post", "json", data);
|
||||
});
|
||||
}
|
||||
|
||||
/* 分配用户-取消授权 */
|
||||
function cancelAuthUser(userId) {
|
||||
$.modal.confirm("确认要取消该用户角色吗?", function() {
|
||||
$.operate.post(prefix + "/cancel", { "roleId": $("#roleId").val(), "userId": userId });
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('角色数据权限')" />
|
||||
<th:block th:include="include :: ztree-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-role-edit" th:object="${role}">
|
||||
<input id="roleId" name="roleId" type="hidden" th:field="*{roleId}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">角色名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="roleName" id="roleName" th:field="*{roleName}" readonly="true"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">权限字符:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="roleKey" id="roleKey" th:field="*{roleKey}" readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">数据范围:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="dataScope" name="dataScope" class="form-control m-b">
|
||||
<option value="1" th:field="*{dataScope}">全部数据权限</option>
|
||||
<option value="2" th:field="*{dataScope}">自定数据权限</option>
|
||||
<option value="3" th:field="*{dataScope}">本部门数据权限</option>
|
||||
<option value="4" th:field="*{dataScope}">本部门及以下数据权限</option>
|
||||
<option value="5" th:field="*{dataScope}">仅本人数据权限</option>
|
||||
</select>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 特殊情况下,设置为“自定数据权限”</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="authDataScope" th:style="'display:' + @{(*{dataScope=='2'} ? 'block' : 'none')} + ''">
|
||||
<label class="col-sm-3 control-label">数据权限:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="check-box">
|
||||
<input type="checkbox" value="1" checked>展开/折叠</label>
|
||||
<label class="check-box">
|
||||
<input type="checkbox" value="2">全选/全不选</label>
|
||||
<label class="check-box">
|
||||
<input type="checkbox" value="3" checked>父子联动</label>
|
||||
<div id="deptTrees" class="ztree ztree-border"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: ztree-js" />
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
var url = ctx + "system/dept/roleDeptTreeData?roleId=" + $("#roleId").val();
|
||||
var options = {
|
||||
id: "deptTrees",
|
||||
url: url,
|
||||
check: { enable: true, nocheckInherit: true, chkboxType: { "Y": "ps", "N": "ps" } },
|
||||
expandLevel: 2
|
||||
};
|
||||
$.tree.init(options);
|
||||
});
|
||||
|
||||
$('input').on('ifChanged', function(obj){
|
||||
var type = $(this).val();
|
||||
var checked = obj.currentTarget.checked;
|
||||
if (type == 1) {
|
||||
if (checked) {
|
||||
$._tree.expandAll(true);
|
||||
} else {
|
||||
$._tree.expandAll(false);
|
||||
}
|
||||
} else if (type == "2") {
|
||||
if (checked) {
|
||||
$._tree.checkAllNodes(true);
|
||||
} else {
|
||||
$._tree.checkAllNodes(false);
|
||||
}
|
||||
} else if (type == "3") {
|
||||
if (checked) {
|
||||
$._tree.setting.check.chkboxType = { "Y": "ps", "N": "ps" };
|
||||
} else {
|
||||
$._tree.setting.check.chkboxType = { "Y": "", "N": "" };
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
edit();
|
||||
}
|
||||
}
|
||||
|
||||
function edit() {
|
||||
var roleId = $("input[name='roleId']").val();
|
||||
var roleName = $("input[name='roleName']").val();
|
||||
var roleKey = $("input[name='roleKey']").val();
|
||||
var dataScope = $("#dataScope").val();
|
||||
var deptIds = $.tree.getCheckedNodes();
|
||||
$.ajax({
|
||||
cache : true,
|
||||
type : "POST",
|
||||
url : ctx + "system/role/authDataScope",
|
||||
data : {
|
||||
"roleId": roleId,
|
||||
"roleName": roleName,
|
||||
"roleKey": roleKey,
|
||||
"dataScope": dataScope,
|
||||
"deptIds": deptIds
|
||||
},
|
||||
async : false,
|
||||
error : function(request) {
|
||||
$.modal.alertError("系统错误");
|
||||
},
|
||||
success : function(data) {
|
||||
$.operate.successCallback(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#dataScope").change(function(event){
|
||||
var dataScope = $(event.target).val();
|
||||
dataScopeVisible(dataScope);
|
||||
});
|
||||
|
||||
function dataScopeVisible(dataScope) {
|
||||
if (dataScope == 2) {
|
||||
$("#authDataScope").show();
|
||||
} else {
|
||||
$._tree.checkAllNodes(false);
|
||||
$("#authDataScope").hide();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,189 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改角色')" />
|
||||
<th:block th:include="include :: ztree-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-role-edit" th:object="${role}">
|
||||
<input id="roleId" name="roleId" type="hidden" th:field="*{roleId}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">角色名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="roleName" id="roleName" th:field="*{roleName}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">权限字符:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="roleKey" id="roleKey" th:field="*{roleKey}" required>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 控制器中定义的权限字符,如:@RequiresRoles("")</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">显示顺序:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="roleSort" id="roleSort" th:field="*{roleSort}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="toggle-switch switch-solid">
|
||||
<input type="checkbox" id="status" th:checked="${role.status == '0' ? true : false}">
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="remark" name="remark" class="form-control" type="text" th:field="*{remark}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">菜单权限:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="check-box">
|
||||
<input type="checkbox" value="1">展开/折叠</label>
|
||||
<label class="check-box">
|
||||
<input type="checkbox" value="2">全选/全不选</label>
|
||||
<label class="check-box">
|
||||
<input type="checkbox" value="3" checked>父子联动</label>
|
||||
<div id="menuTrees" class="ztree ztree-border"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: ztree-js" />
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var url = ctx + "system/menu/roleMenuTreeData?roleId=" + $("#roleId").val();
|
||||
var options = {
|
||||
id: "menuTrees",
|
||||
url: url,
|
||||
check: { enable: true },
|
||||
expandLevel: 0
|
||||
};
|
||||
$.tree.init(options);
|
||||
});
|
||||
|
||||
$("#form-role-edit").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
roleName:{
|
||||
remote: {
|
||||
url: ctx + "system/role/checkRoleNameUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"roleId": function() {
|
||||
return $("#roleId").val();
|
||||
},
|
||||
"roleName": function() {
|
||||
return $.common.trim($("#roleName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
roleKey:{
|
||||
remote: {
|
||||
url: ctx + "system/role/checkRoleKeyUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"roleId": function() {
|
||||
return $("#roleId").val();
|
||||
},
|
||||
"roleKey": function() {
|
||||
return $.common.trim($("#roleKey").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
roleSort:{
|
||||
digits:true
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"roleName": {
|
||||
remote: "角色名称已经存在"
|
||||
},
|
||||
"roleKey": {
|
||||
remote: "角色权限已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
$('input').on('ifChanged', function(obj){
|
||||
var type = $(this).val();
|
||||
var checked = obj.currentTarget.checked;
|
||||
if (type == 1) {
|
||||
if (checked) {
|
||||
$._tree.expandAll(true);
|
||||
} else {
|
||||
$._tree.expandAll(false);
|
||||
}
|
||||
} else if (type == "2") {
|
||||
if (checked) {
|
||||
$._tree.checkAllNodes(true);
|
||||
} else {
|
||||
$._tree.checkAllNodes(false);
|
||||
}
|
||||
} else if (type == "3") {
|
||||
if (checked) {
|
||||
$._tree.setting.check.chkboxType = { "Y": "ps", "N": "ps" };
|
||||
} else {
|
||||
$._tree.setting.check.chkboxType = { "Y": "", "N": "" };
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function edit() {
|
||||
var roleId = $("input[name='roleId']").val();
|
||||
var roleName = $("input[name='roleName']").val();
|
||||
var roleKey = $("input[name='roleKey']").val();
|
||||
var roleSort = $("input[name='roleSort']").val();
|
||||
var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
|
||||
var remark = $("input[name='remark']").val();
|
||||
var menuIds = $.tree.getCheckedNodes();
|
||||
$.ajax({
|
||||
cache : true,
|
||||
type : "POST",
|
||||
url : ctx + "system/role/edit",
|
||||
data : {
|
||||
"roleId": roleId,
|
||||
"roleName": roleName,
|
||||
"roleKey": roleKey,
|
||||
"roleSort": roleSort,
|
||||
"status": status,
|
||||
"remark": remark,
|
||||
"menuIds": menuIds
|
||||
},
|
||||
async : false,
|
||||
error : function(request) {
|
||||
$.modal.alertError("系统错误");
|
||||
},
|
||||
success : function(data) {
|
||||
$.operate.successCallback(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
edit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,169 @@
|
|||
<!DOCTYPE html>
|
||||
<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>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="role-form">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
角色名称:<input type="text" name="roleName"/>
|
||||
</li>
|
||||
<li>
|
||||
权限字符:<input type="text" name="roleKey"/>
|
||||
</li>
|
||||
<li>
|
||||
角色状态:<select name="status" th:with="type=${@dict.getType('sys_normal_disable')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li class="select-time">
|
||||
<label>创建时间: </label>
|
||||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
|
||||
<span>-</span>
|
||||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:role:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:role:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:role:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('system:role:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:role:remove')}]];
|
||||
var prefix = ctx + "system/role";
|
||||
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
sortName: "roleSort",
|
||||
modalName: "角色",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'roleId',
|
||||
title: '角色编号'
|
||||
},
|
||||
{
|
||||
field: 'roleName',
|
||||
title: '角色名称',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field: 'roleKey',
|
||||
title: '权限字符',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field: 'roleSort',
|
||||
title: '显示顺序',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
visible: editFlag == 'hidden' ? false : true,
|
||||
title: '角色状态',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
return statusTools(row);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
if (row.roleId != 1) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.roleId + '\')"><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.roleId + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||
var more = [];
|
||||
more.push("<a class='btn btn-default btn-xs " + editFlag + "' href='javascript:void(0)' onclick='authDataScope(" + row.roleId + ")'><i class='fa fa-check-square-o'></i>数据权限</a> ");
|
||||
more.push("<a class='btn btn-default btn-xs " + editFlag + "' href='javascript:void(0)' onclick='authUser(" + row.roleId + ")'><i class='fa fa-user'></i>分配用户</a>");
|
||||
actions.push('<a tabindex="0" class="btn btn-info btn-xs" role="button" data-container="body" data-placement="left" data-toggle="popover" data-html="true" data-trigger="hover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>');
|
||||
return actions.join('');
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
/* 角色管理-分配数据权限 */
|
||||
function authDataScope(roleId) {
|
||||
var url = prefix + '/authDataScope/' + roleId;
|
||||
$.modal.open("分配数据权限", url);
|
||||
}
|
||||
|
||||
/* 角色管理-分配用户 */
|
||||
function authUser(roleId) {
|
||||
var url = prefix + '/authUser/' + roleId;
|
||||
$.modal.openTab("分配用户", url);
|
||||
}
|
||||
|
||||
/* 角色状态显示 */
|
||||
function statusTools(row) {
|
||||
if (row.status == 1) {
|
||||
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.roleId + '\')"></i> ';
|
||||
} else {
|
||||
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.roleId + '\')"></i> ';
|
||||
}
|
||||
}
|
||||
|
||||
/* 角色管理-停用 */
|
||||
function disable(roleId) {
|
||||
$.modal.confirm("确认要停用角色吗?", function() {
|
||||
$.operate.post(prefix + "/changeStatus", { "roleId": roleId, "status": 1 });
|
||||
})
|
||||
}
|
||||
|
||||
/* 角色管理启用 */
|
||||
function enable(roleId) {
|
||||
$.modal.confirm("确认要启用角色吗?", function() {
|
||||
$.operate.post(prefix + "/changeStatus", { "roleId": roleId, "status": 0 });
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('分配角色选择用户')" />
|
||||
</head>
|
||||
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="role-form">
|
||||
<input type="hidden" id="roleId" name="roleId" th:value="${role.roleId}">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
登录名称:<input type="text" name="loginName"/>
|
||||
</li>
|
||||
<li>
|
||||
手机号码:<input type="text" name="phonenumber"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var datas = [[${@dict.getType('sys_normal_disable')}]];
|
||||
var prefix = ctx + "system/role/authUser";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/unallocatedList",
|
||||
queryParams: queryParams,
|
||||
sortName: "createTime",
|
||||
sortOrder: "desc",
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
clickToSelect: true,
|
||||
rememberSelected: true,
|
||||
columns: [{
|
||||
field: 'state',
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'userId',
|
||||
title: '用户ID',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'loginName',
|
||||
title: '登录名称',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field: 'userName',
|
||||
title: '用户名称'
|
||||
},
|
||||
{
|
||||
field: 'email',
|
||||
title: '邮箱'
|
||||
},
|
||||
{
|
||||
field: 'phonenumber',
|
||||
title: '手机'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '用户状态',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
return $.table.selectDictLabel(datas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function queryParams(params) {
|
||||
var search = $.table.queryParams(params);
|
||||
search.roleId = $("#roleId").val();
|
||||
return search;
|
||||
}
|
||||
|
||||
/* 添加用户-选择用户-提交 */
|
||||
function submitHandler() {
|
||||
var rows = $.table.selectFirstColumns();
|
||||
if (rows.length == 0) {
|
||||
$.modal.alertWarning("请至少选择一条记录");
|
||||
return;
|
||||
}
|
||||
var data = { "roleId": $("#roleId").val(), "userIds": rows.join() };
|
||||
$.operate.save(prefix + "/selectAll", data);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,268 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增用户')" />
|
||||
<th:block th:include="include :: select2-css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="main-content">
|
||||
<form id="form-user-add" class="form-horizontal">
|
||||
<input name="deptId" type="hidden" id="treeId"/>
|
||||
<h4 class="form-header h4">基本信息</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">用户名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userName" placeholder="请输入用户名称" class="form-control" type="text" maxlength="30" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">归属部门:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input name="deptName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择归属部门" class="form-control">
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">手机号码:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="phonenumber" name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11">
|
||||
<span class="input-group-addon"><i class="fa fa-mobile"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">邮箱:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="email" name="email" class="form-control email" type="text" maxlength="50" placeholder="请输入邮箱">
|
||||
<span class="input-group-addon"><i class="fa fa-envelope"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">登录账号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="loginName" name="loginName" placeholder="请输入登录账号" class="form-control" type="text" maxlength="30" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">登录密码:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="password" name="password" placeholder="请输入登录密码" class="form-control" type="password" th:value="${@config.getKey('sys.user.initPassword')}" required>
|
||||
<span class="input-group-addon" title="登录密码,鼠标按下显示密码"
|
||||
onmousedown="$('#password').attr('type','text')"
|
||||
onmouseup="$('#password').attr('type','password')"><i class="fa fa-key"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">用户性别:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">用户状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="toggle-switch switch-solid">
|
||||
<input type="checkbox" id="status" checked>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">岗位:</label>
|
||||
<div class="col-xs-4">
|
||||
<select id="post" class="form-control select2-multiple" multiple>
|
||||
<option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:disabled="${post.status == '1'}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">角色:</label>
|
||||
<div class="col-xs-10">
|
||||
<label th:each="role:${roles}" class="check-box">
|
||||
<input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:disabled="${role.status == '1'}">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="form-header h4">其他信息</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">备注:</label>
|
||||
<div class="col-xs-10">
|
||||
<textarea name="remark" maxlength="500" class="form-control" rows="3"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-5 col-sm-10">
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>
|
||||
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: select2-js" />
|
||||
<script>
|
||||
var prefix = ctx + "system/user";
|
||||
|
||||
$("#form-user-add").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
loginName:{
|
||||
minlength: 2,
|
||||
maxlength: 20,
|
||||
remote: {
|
||||
url: prefix + "/checkLoginNameUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"loginName": function() {
|
||||
return $.common.trim($("#loginName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
password:{
|
||||
minlength: 5,
|
||||
maxlength: 20
|
||||
},
|
||||
email:{
|
||||
email:true,
|
||||
remote: {
|
||||
url: prefix + "/checkEmailUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"email": function () {
|
||||
return $.common.trim($("#email").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function (data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
phonenumber:{
|
||||
isPhone:true,
|
||||
remote: {
|
||||
url: prefix + "/checkPhoneUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"phonenumber": function () {
|
||||
return $.common.trim($("#phonenumber").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function (data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"loginName": {
|
||||
remote: "用户已经存在"
|
||||
},
|
||||
"email": {
|
||||
remote: "Email已经存在"
|
||||
},
|
||||
"phonenumber":{
|
||||
remote: "手机号码已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
var chrtype = [[${#strings.defaultString(@config.getKey('sys.account.chrtype'), 0)}]];
|
||||
var password = $("#password").val();
|
||||
if ($.validate.form() && checkpwd(chrtype, password)) {
|
||||
var data = $("#form-user-add").serializeArray();
|
||||
var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
|
||||
var roleIds = $.form.selectCheckeds("role");
|
||||
var postIds = $.form.selectSelects("post");
|
||||
data.push({"name": "status", "value": status});
|
||||
data.push({"name": "roleIds", "value": roleIds});
|
||||
data.push({"name": "postIds", "value": postIds});
|
||||
$.operate.saveTab(prefix + "/add", data);
|
||||
}
|
||||
}
|
||||
|
||||
/* 用户管理-新增-选择部门树 */
|
||||
function selectDeptTree() {
|
||||
var treeId = $("#treeId").val();
|
||||
var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
|
||||
var url = ctx + "system/dept/selectDeptTree/" + deptId;
|
||||
var options = {
|
||||
title: '选择部门',
|
||||
width: "380",
|
||||
url: url,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
||||
var body = $.modal.getChildFrame(index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#post').select2({
|
||||
placeholder: "请选择岗位",
|
||||
allowClear: true
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('用户分配角色')" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="main-content">
|
||||
<form id="form-user-add" class="form-horizontal">
|
||||
<input type="hidden" id="userId" name="userId" th:value="${user.userId}">
|
||||
<h4 class="form-header h4">基本信息</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">用户名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userName" class="form-control" type="text" disabled th:value="${user.userName}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">登录账号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="loginName" class="form-control" type="text" disabled th:value="${user.loginName}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="form-header h4">分配角色</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-5 col-sm-10">
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>
|
||||
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/user/authRole";
|
||||
var roles = [[${roles}]]
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
data: roles,
|
||||
sidePagination: "client",
|
||||
sortName: "roleSort",
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
clickToSelect: true,
|
||||
maintainSelected: true,
|
||||
columns: [{
|
||||
checkbox: true,
|
||||
formatter:function (value, row, index) {
|
||||
if($.common.isEmpty(value)) {
|
||||
return { checked: row.flag };
|
||||
} else {
|
||||
return { checked: value }
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'roleId',
|
||||
title: '角色编号'
|
||||
},
|
||||
{
|
||||
field: 'roleSort',
|
||||
title: '排序',
|
||||
sortable: true,
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'roleName',
|
||||
title: '角色名称'
|
||||
},
|
||||
{
|
||||
field: 'roleKey',
|
||||
title: '权限字符',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
/* 添加角色-提交 */
|
||||
function submitHandler(index, layero){
|
||||
var rows = $.table.selectFirstColumns();
|
||||
var data = { "userId": $("#userId").val(), "roleIds": rows.join() };
|
||||
$.operate.saveTab(prefix + "/insertAuthRole", data);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,232 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改用户')" />
|
||||
<th:block th:include="include :: select2-css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="main-content">
|
||||
<form class="form-horizontal" id="form-user-edit" th:object="${user}">
|
||||
<input name="userId" type="hidden" th:field="*{userId}" />
|
||||
<input name="deptId" type="hidden" th:field="*{deptId}" id="treeId"/>
|
||||
<h4 class="form-header h4">基本信息</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">用户名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userName" placeholder="请输入用户名称" class="form-control" type="text" maxlength="30" th:field="*{userName}" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">归属部门:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" name="deptName" onclick="selectDeptTree()" id="treeName" th:field="*{dept.deptName}">
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">手机号码:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" th:field="*{phonenumber}">
|
||||
<span class="input-group-addon"><i class="fa fa-mobile"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">邮箱:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input name="email" class="form-control email" type="text" maxlength="50" placeholder="请输入邮箱" th:field="*{email}">
|
||||
<span class="input-group-addon"><i class="fa fa-envelope"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">登录账号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" readonly="true" th:field="*{loginName}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">用户状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="toggle-switch switch-solid">
|
||||
<input type="checkbox" id="status" th:checked="${user.status == '0' ? true : false}">
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">岗位:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="post" class="form-control select2-multiple" multiple>
|
||||
<option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:selected="${post.flag}" th:disabled="${post.status == '1'}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">用户性别:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sex}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">角色:</label>
|
||||
<div class="col-xs-10">
|
||||
<label th:each="role:${roles}" class="check-box">
|
||||
<input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:checked="${role.flag}" th:disabled="${role.status == '1'}">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="form-header h4">其他信息</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">备注:</label>
|
||||
<div class="col-xs-10">
|
||||
<textarea name="remark" maxlength="500" class="form-control" rows="3">[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-5 col-sm-10">
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>
|
||||
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: select2-js" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "system/user";
|
||||
|
||||
$("#form-user-edit").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
email:{
|
||||
email:true,
|
||||
remote: {
|
||||
url: prefix + "/checkEmailUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"userId": function() {
|
||||
return $("#userId").val();
|
||||
},
|
||||
"email": function() {
|
||||
return $.common.trim($("#email").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function (data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
phonenumber:{
|
||||
isPhone:true,
|
||||
remote: {
|
||||
url: prefix + "/checkPhoneUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"userId": function() {
|
||||
return $("#userId").val();
|
||||
},
|
||||
"phonenumber": function() {
|
||||
return $.common.trim($("#phonenumber").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function (data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"email": {
|
||||
remote: "Email已经存在"
|
||||
},
|
||||
"phonenumber":{
|
||||
remote: "手机号码已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
var data = $("#form-user-edit").serializeArray();
|
||||
var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
|
||||
var roleIds = $.form.selectCheckeds("role");
|
||||
var postIds = $.form.selectSelects("post");
|
||||
data.push({"name": "status", "value": status});
|
||||
data.push({"name": "roleIds", "value": roleIds});
|
||||
data.push({"name": "postIds", "value": postIds});
|
||||
$.operate.saveTab(prefix + "/edit", data);
|
||||
}
|
||||
}
|
||||
|
||||
/* 用户管理-修改-选择部门树 */
|
||||
function selectDeptTree() {
|
||||
var deptId = $.common.isEmpty($("#treeId").val()) ? "100" : $("#treeId").val();
|
||||
var url = ctx + "system/dept/selectDeptTree/" + deptId;
|
||||
var options = {
|
||||
title: '选择部门',
|
||||
width: "380",
|
||||
url: url,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
||||
var body = $.modal.getChildFrame(index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#post').select2({
|
||||
placeholder: "请选择岗位",
|
||||
allowClear: true
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,261 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改用户头像')" />
|
||||
<th:block th:include="include :: cropper-css" />
|
||||
<style type='text/css'>
|
||||
/* avator css start */
|
||||
.container {
|
||||
margin: 10px 5px 5px 5px;
|
||||
}
|
||||
|
||||
.action {
|
||||
padding: 5px 0px;
|
||||
}
|
||||
|
||||
.cropped {
|
||||
width: 200px;
|
||||
border: 1px #ddd solid;
|
||||
box-shadow: 0px 0px 12px #ddd;
|
||||
}
|
||||
|
||||
.img-preview {
|
||||
border-radius: 50%;
|
||||
box-shadow: 0px 0px 12px #7e7e7e;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.preview-box {
|
||||
text-align: center;
|
||||
margin: 0px auto;
|
||||
margin-top: 10px;
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.preview-md {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
}
|
||||
|
||||
.preview-sm {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
}
|
||||
|
||||
.preview-xs {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
.imageBox {
|
||||
border: 1px solid #aaa;
|
||||
overflow: hidden;
|
||||
cursor: move;
|
||||
box-shadow: 4px 4px 12px #B0B0B0;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
.btn-custom {
|
||||
float: right;
|
||||
width: 46px;
|
||||
display: inline-block;
|
||||
margin-bottom: 10px;
|
||||
height: 37px;
|
||||
line-height: 37px;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
margin: 0px 2px;
|
||||
background-color: #f38e81;
|
||||
border-radius: 3px;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
box-shadow: 0px 0px 5px #B0B0B0;
|
||||
border: 0px #fff solid;
|
||||
}
|
||||
/*选择文件上传*/
|
||||
.new-contentarea {
|
||||
width: 165px;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.new-contentarea label {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.new-contentarea input[type=file] {
|
||||
width: 188px;
|
||||
height: 60px;
|
||||
background: #333;
|
||||
margin: 0 auto;
|
||||
position: absolute;
|
||||
right: 50%;
|
||||
margin-right: -94px;
|
||||
top: 0;
|
||||
right/*\**/: 0px\9;
|
||||
margin-right/*\**/: 0px\9;
|
||||
width/*\**/: 10px\9;
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
a.upload-img {
|
||||
width: 165px;
|
||||
display: inline-block;
|
||||
margin-bottom: 10px;
|
||||
height: 37px;
|
||||
line-height: 37px;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
background-color: #f38e81;
|
||||
border-radius: 3px;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
border: 0px #fff solid;
|
||||
box-shadow: 0px 0px 5px #B0B0B0;
|
||||
}
|
||||
|
||||
a.upload-img:hover {
|
||||
background-color: #ec7e70;
|
||||
}
|
||||
|
||||
.tc {
|
||||
text-align: center;
|
||||
}
|
||||
/* avator css end */
|
||||
</style>
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="row container">
|
||||
<div class="col-md-10">
|
||||
<div class="imageBox">
|
||||
<img id="avatar" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="'this.src=\'' + @{'/img/profile.jpg'} + '\''">
|
||||
</div>
|
||||
<div class="action">
|
||||
<div class="new-contentarea tc">
|
||||
<a href="javascript:void(0)" class="upload-img"><label for="inputImage">上传图像</label> </a>
|
||||
<input type="file" name="avatar" id="inputImage" accept="image/*"/>
|
||||
</div>
|
||||
<button type="button" class="btn-custom" data-method="zoom" data-option="0.1"><i class="fa fa-search-plus"></i></button>
|
||||
<button type="button" class="btn-custom" data-method="zoom" data-option="-0.1"><i class="fa fa-search-minus"></i></button>
|
||||
<button type="button" class="btn-custom" data-method="rotate" data-option="-45"><i class="fa fa-rotate-left"></i></button>
|
||||
<button type="button" class="btn-custom" data-method="rotate" data-option="45"><i class="fa fa-rotate-right"></i></button>
|
||||
<button type="button" class="btn-custom" data-method="scaleX" data-option="-1"><i class="fa fa-arrows-h"></i></button>
|
||||
<button type="button" class="btn-custom" data-method="scaleY" data-option="-1"><i class="fa fa-arrows-v"></i></button>
|
||||
<button type="button" class="btn-custom" data-method="reset"><i class="fa fa-refresh"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="cropped">
|
||||
<div class="preview-box">
|
||||
<div class="img-preview preview-xs"></div>
|
||||
</div>
|
||||
<div class="preview-box">
|
||||
<div class="img-preview preview-sm"></div>
|
||||
</div>
|
||||
<div class="preview-box">
|
||||
<div class="img-preview preview-md"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: cropper-js" />
|
||||
<script type="text/javascript">
|
||||
var cropper;
|
||||
var croppable = false;
|
||||
$(window).on('load', function() {
|
||||
var image = document.getElementById('avatar');
|
||||
cropper = new Cropper(image, {
|
||||
aspectRatio: 1,
|
||||
viewMode: 1,
|
||||
autoCropArea: 0.9,
|
||||
preview: '.img-preview',
|
||||
ready: function () {
|
||||
croppable = true;
|
||||
}
|
||||
})
|
||||
|
||||
$('#inputImage').on('change', function() {
|
||||
var reader = new FileReader();
|
||||
var file = $('#inputImage')[0].files[0];
|
||||
if (/^image\/\w+$/.test(file.type)) {
|
||||
reader.onload = function(e) {
|
||||
if(croppable){
|
||||
cropper.replace(e.target.result)
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(this.files[0]);
|
||||
} else {
|
||||
$.modal.alertWarning('请选择一个图片文件。');
|
||||
}
|
||||
});
|
||||
|
||||
$('.btn-custom').on('click',function (e) {
|
||||
if (!croppable) {
|
||||
$.modal.alertWarning("裁剪框加载中,请稍候...");
|
||||
return;
|
||||
}
|
||||
var data = {
|
||||
method: $(this).data('method'),
|
||||
option: $(this).data('option') || undefined,
|
||||
};
|
||||
var result = cropper[data.method](data.option, data.secondOption);
|
||||
if(['scaleX','scaleY'].indexOf(data.method) !== -1){
|
||||
$(this).data('option', -data.option)
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if (!croppable) {
|
||||
$.modal.alertWarning("裁剪框加载中,请稍候...");
|
||||
return
|
||||
}
|
||||
cropper.getCroppedCanvas().toBlob(function(img) {
|
||||
var formdata = new FormData();
|
||||
formdata.append("avatarfile", img);
|
||||
$.ajax({
|
||||
url: ctx + "system/user/profile/updateAvatar",
|
||||
data: formdata,
|
||||
type: "post",
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(result) {
|
||||
$.operate.saveReload(result);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
$(window).resize(function() {
|
||||
$('.imageBox').height($(window).height() - 80);
|
||||
$('.cropped').height($(window).height() - 40);
|
||||
}).resize();
|
||||
|
||||
if (!HTMLCanvasElement.prototype.toBlob) {
|
||||
Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {
|
||||
value: function(callback, type, quality) {
|
||||
var canvas = this;
|
||||
setTimeout(function() {
|
||||
var binStr = atob(canvas.toDataURL(type, quality).split(',')[1]);
|
||||
var len = binStr.length;
|
||||
var arr = new Uint8Array(len);
|
||||
for (var i = 0; i < len; i++) {
|
||||
arr[i] = binStr.charCodeAt(i);
|
||||
}
|
||||
callback(new Blob([arr], {
|
||||
type: type || 'image/png'
|
||||
}));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,304 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('用户个人信息')" />
|
||||
<style type="text/css">.user-info-head{position:relative;display:inline-block;}.user-info-head:hover:after{content:'\f030';position:absolute;left:0;right:0;top:0;bottom:0;color:#eee;background:rgba(0,0,0,0.5);font-family:FontAwesome;font-size:24px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;cursor:pointer;line-height:110px;border-radius:50%;}</style>
|
||||
</head>
|
||||
|
||||
<body class="gray-bg" style="font: 14px Helvetica Neue, Helvetica, PingFang SC, 微软雅黑, Tahoma, Arial, sans-serif !important;">
|
||||
<input id="userId" name="userId" type="hidden" th:value="${user.userId}" />
|
||||
<section class="section-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-3 pr5">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title ibox-title-gray dashboard-header gray-bg">
|
||||
<h5>个人资料</h5>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="text-center">
|
||||
<p class="user-info-head" onclick="avatar()"><img class="img-circle img-lg" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="'this.src=\'' + @{'/img/profile.jpg'} + '\''"></p>
|
||||
<p><a href="javascript:avatar()">修改头像</a></p>
|
||||
</div>
|
||||
<ul class="list-group list-group-striped">
|
||||
<li class="list-group-item"><i class="fa fa-user"></i>
|
||||
<b class="font-noraml">登录名称:</b>
|
||||
<p class="pull-right">[[${user.loginName}]]</p>
|
||||
</li>
|
||||
<li class="list-group-item"><i class="fa fa-phone"></i>
|
||||
<b class="font-noraml">手机号码:</b>
|
||||
<p class="pull-right">[[${user.phonenumber}]]</p>
|
||||
</li>
|
||||
<li class="list-group-item" th:if="${user.dept?.deptName != null}"><i class="fa fa-group"></i>
|
||||
<b class="font-noraml">所属部门:</b>
|
||||
<p class="pull-right" style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis;width:120px;">[[${user.dept?.deptName}]] / [[${#strings.defaultString(postGroup,'无岗位')}]]</p>
|
||||
</li>
|
||||
<li class="list-group-item"><i class="fa fa-envelope-o"></i>
|
||||
<b class="font-noraml">邮箱地址:</b>
|
||||
<p class="pull-right" th:title="${user.email}">[[${#strings.abbreviate(user.email, 16)}]]</p>
|
||||
</li>
|
||||
<li class="list-group-item"><i class="fa fa-calendar"></i>
|
||||
<b class="font-noraml">创建时间:</b>
|
||||
<p class="pull-right">[[${#dates.format(user.createTime, 'yyyy-MM-dd')}]]</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 about">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title ibox-title-gray dashboard-header">
|
||||
<h5>基本资料</h5>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#user_info" data-toggle="tab" aria-expanded="true">基本资料</a></li>
|
||||
<li><a href="#modify_password" data-toggle="tab" aria-expanded="false">修改密码</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!--用户信息-->
|
||||
<div class="tab-pane active" id="user_info" th:object="${user}">
|
||||
<form class="form-horizontal" id="form-user-edit">
|
||||
<!--隐藏ID-->
|
||||
<input name="id" id="id" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">用户名称:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="userName" th:field="*{userName}" placeholder="请输入用户名称">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">手机号码:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="phonenumber" maxlength="11" th:field="*{phonenumber}" placeholder="请输入手机号码">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">邮箱:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" maxlength="50" class="form-control" name="email" th:field="*{email}" placeholder="请输入邮箱">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">性别:</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="radio-box">
|
||||
<input type="radio" id="radio1" th:field="*{sex}" name="sex" value="0">
|
||||
<label for="radio1">男</label>
|
||||
</div>
|
||||
<div class="radio-box">
|
||||
<input type="radio" id="radio2" th:field="*{sex}" name="sex" value="1">
|
||||
<label for="radio2">女</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="submitUserInfo()"><i class="fa fa-check"></i>保 存</button>
|
||||
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!--修改密码-->
|
||||
<div class="tab-pane" id="modify_password">
|
||||
<form class="form-horizontal" id="form-user-resetPwd">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">旧密码:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" name="oldPassword" placeholder="请输入旧密码">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">新密码:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" name="newPassword" id="newPassword" placeholder="请输入新密码">
|
||||
<th:block th:with="chrtype=${@config.getKey('sys.account.chrtype')}">
|
||||
<th:block th:if="${chrtype != '0'}">
|
||||
<span class="help-block m-b-none">
|
||||
<th:block th:if="${chrtype == '1'}"><i class="fa fa-info-circle" style="color: red;"></i> 密码只能为0-9数字 </th:block>
|
||||
<th:block th:if="${chrtype == '2'}"><i class="fa fa-info-circle" style="color: red;"></i> 密码只能为a-z和A-Z字母</th:block>
|
||||
<th:block th:if="${chrtype == '3'}"><i class="fa fa-info-circle" style="color: red;"></i> 密码必须包含(字母,数字)</th:block>
|
||||
<th:block th:if="${chrtype == '4'}"><i class="fa fa-info-circle" style="color: red;"></i> 密码必须包含(字母,数字,特殊字符!@#$%^&*()-=_+)</th:block>
|
||||
</span>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">确认密码:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" name="confirmPassword" placeholder="请确认密码">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="submitChangPassword()"><i class="fa fa-check"></i>保 存</button>
|
||||
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<th:block th:include="include :: footer" />
|
||||
<script>
|
||||
/*用户管理-头像*/
|
||||
function avatar() {
|
||||
var url = ctx + 'system/user/profile/avatar';
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
area: [$(window).width() + 'px', $(window).height() + 'px'],
|
||||
fix: false,
|
||||
//不固定
|
||||
maxmin: true,
|
||||
shade: 0.3,
|
||||
title: "修改头像",
|
||||
content: url,
|
||||
btn: ['确定', '关闭'],
|
||||
// 弹层外区域关闭
|
||||
shadeClose: true,
|
||||
yes: function(index, layero) {
|
||||
var iframeWin = layero.find('iframe')[0];
|
||||
iframeWin.contentWindow.submitHandler(index, layero);
|
||||
},
|
||||
cancel: function(index) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*用户信息-修改*/
|
||||
$("#form-user-edit").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
userName:{
|
||||
required:true,
|
||||
},
|
||||
email:{
|
||||
required:true,
|
||||
email:true,
|
||||
remote: {
|
||||
url: ctx + "system/user/checkEmailUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"userId": function() {
|
||||
return $("#userId").val();
|
||||
},
|
||||
"email": function() {
|
||||
return $.common.trim($("#email").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function (data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
phonenumber:{
|
||||
required:true,
|
||||
isPhone:true,
|
||||
remote: {
|
||||
url: ctx + "system/user/checkPhoneUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"userId": function() {
|
||||
return $("#userId").val();
|
||||
},
|
||||
"phonenumber": function() {
|
||||
return $.common.trim($("#phonenumber").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function (data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"userName": {
|
||||
required: "请输入用户名称",
|
||||
},
|
||||
"email": {
|
||||
required: "请输入邮箱",
|
||||
remote: "Email已经存在"
|
||||
},
|
||||
"phonenumber":{
|
||||
required: "请输入手机号码",
|
||||
remote: "手机号码已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitUserInfo() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.saveModal(ctx + "system/user/profile/update", $('#form-user-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
/*用户管理-修改密码*/
|
||||
$("#form-user-resetPwd").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
oldPassword:{
|
||||
required:true,
|
||||
remote: {
|
||||
url: ctx + "system/user/profile/checkPassword",
|
||||
type: "get",
|
||||
dataType: "json",
|
||||
data: {
|
||||
password: function() {
|
||||
return $("input[name='oldPassword']").val();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
newPassword: {
|
||||
required: true,
|
||||
minlength: 6,
|
||||
maxlength: 20
|
||||
},
|
||||
confirmPassword: {
|
||||
required: true,
|
||||
equalTo: "#newPassword"
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
oldPassword: {
|
||||
required: "请输入原密码",
|
||||
remote: "原密码错误"
|
||||
},
|
||||
newPassword: {
|
||||
required: "请输入新密码",
|
||||
minlength: "密码不能小于6个字符",
|
||||
maxlength: "密码不能大于20个字符"
|
||||
},
|
||||
confirmPassword: {
|
||||
required: "请再次输入新密码",
|
||||
equalTo: "两次密码输入不一致"
|
||||
}
|
||||
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitChangPassword () {
|
||||
var chrtype = [[${#strings.defaultString(@config.getKey('sys.account.chrtype'), 0)}]];
|
||||
var password = $("#newPassword").val();
|
||||
if ($.validate.form("form-user-resetPwd") && checkpwd(chrtype, password)) {
|
||||
$.operate.saveModal(ctx + "system/user/profile/resetPwd", $('#form-user-resetPwd').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改用户密码')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-user-resetPwd">
|
||||
<input name="userId" type="hidden" th:value="${user.userId}" />
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">登录名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" readonly="true" name="loginName" th:value="${user.loginName}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">旧密码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="password" name="oldPassword" id="oldPassword">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">新密码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="password" name="newPassword" id="newPassword">
|
||||
<th:block th:with="chrtype=${@config.getKey('sys.account.chrtype')}">
|
||||
<th:block th:if="${chrtype != '0'}">
|
||||
<span class="help-block m-b-none">
|
||||
<th:block th:if="${chrtype == '1'}"><i class="fa fa-info-circle" style="color: red;"></i> 密码只能为0-9数字 </th:block>
|
||||
<th:block th:if="${chrtype == '2'}"><i class="fa fa-info-circle" style="color: red;"></i> 密码只能为a-z和A-Z字母</th:block>
|
||||
<th:block th:if="${chrtype == '3'}"><i class="fa fa-info-circle" style="color: red;"></i> 密码必须包含(字母,数字)</th:block>
|
||||
<th:block th:if="${chrtype == '4'}"><i class="fa fa-info-circle" style="color: red;"></i> 密码必须包含(字母,数字,特殊字符!@#$%^&*()-=_+)</th:block>
|
||||
</span>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">再次确认:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="password" name="confirmPassword" id="confirmPassword">
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请再次输入您的密码</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
|
||||
<script>
|
||||
$("#form-user-resetPwd").validate({
|
||||
rules:{
|
||||
oldPassword:{
|
||||
required:true,
|
||||
remote: {
|
||||
url: ctx + "system/user/profile/checkPassword",
|
||||
type: "get",
|
||||
dataType: "json",
|
||||
data: {
|
||||
password: function() {
|
||||
return $("input[name='oldPassword']").val();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
newPassword: {
|
||||
required: true,
|
||||
minlength: 5,
|
||||
maxlength: 20
|
||||
},
|
||||
confirmPassword: {
|
||||
required: true,
|
||||
equalTo: "#newPassword"
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
oldPassword: {
|
||||
required: "请输入原密码",
|
||||
remote: "原密码错误"
|
||||
},
|
||||
newPassword: {
|
||||
required: "请输入新密码",
|
||||
minlength: "密码不能小于5个字符",
|
||||
maxlength: "密码不能大于20个字符"
|
||||
},
|
||||
confirmPassword: {
|
||||
required: "请再次输入新密码",
|
||||
equalTo: "两次密码输入不一致"
|
||||
}
|
||||
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
var chrtype = [[${#strings.defaultString(@config.getKey('sys.account.chrtype'), 0)}]];
|
||||
var password = $("#newPassword").val();
|
||||
if ($.validate.form() && checkpwd(chrtype, password)) {
|
||||
$.operate.save(ctx + "system/user/profile/resetPwd", $('#form-user-resetPwd').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改密码')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-user-resetPwd">
|
||||
<input name="userId" type="hidden" th:value="${user.userId}" />
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">登录名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" readonly="true" name="loginName" th:value="${user.loginName}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">输入密码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="password" name="password" id="password" th:value="${@config.getKey('sys.user.initPassword')}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script type="text/javascript">
|
||||
$("#form-user-resetPwd").validate({
|
||||
rules:{
|
||||
password:{
|
||||
required:true,
|
||||
minlength: 5,
|
||||
maxlength: 20
|
||||
},
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(ctx + "system/user/resetPwd", $('#form-user-resetPwd').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,282 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('用户列表')" />
|
||||
<th:block th:include="include :: layout-latest-css" />
|
||||
<th:block th:include="include :: ztree-css" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="ui-layout-west">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-grid"></i> 组织机构
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<a type="button" class="btn btn-box-tool" href="#" onclick="dept()" title="管理部门"><i class="fa fa-edit"></i></a>
|
||||
<button type="button" class="btn btn-box-tool" id="btnExpand" title="展开" style="display:none;"><i class="fa fa-chevron-up"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnCollapse" title="折叠"><i class="fa fa-chevron-down"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="刷新部门"><i class="fa fa-refresh"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-content">
|
||||
<div id="tree" class="ztree"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-layout-center">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="user-form">
|
||||
<input type="hidden" id="deptId" name="deptId">
|
||||
<input type="hidden" id="parentId" name="parentId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
登录名称:<input type="text" name="loginName"/>
|
||||
</li>
|
||||
<li>
|
||||
手机号码:<input type="text" name="phonenumber"/>
|
||||
</li>
|
||||
<li>
|
||||
用户状态:<select name="status" th:with="type=${@dict.getType('sys_normal_disable')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li class="select-time">
|
||||
<label>创建时间: </label>
|
||||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
|
||||
<span>-</span>
|
||||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.addTab()" shiro:hasPermission="system:user:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.editTab()" shiro:hasPermission="system:user:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:user:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="system:user:import">
|
||||
<i class="fa fa-upload"></i> 导入
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:user:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: layout-latest-js" />
|
||||
<th:block th:include="include :: ztree-js" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('system:user:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:user:remove')}]];
|
||||
var resetPwdFlag = [[${@permission.hasPermi('system:user:resetPwd')}]];
|
||||
var prefix = ctx + "system/user";
|
||||
|
||||
$(function() {
|
||||
var panehHidden = false;
|
||||
if ($(this).width() < 769) {
|
||||
panehHidden = true;
|
||||
}
|
||||
$('body').layout({ initClosed: panehHidden, west__size: 185 });
|
||||
// 回到顶部绑定
|
||||
if ($.fn.toTop !== undefined) {
|
||||
var opt = {
|
||||
win:$('.ui-layout-center'),
|
||||
doc:$('.ui-layout-center')
|
||||
};
|
||||
$('#scroll-up').toTop(opt);
|
||||
}
|
||||
queryUserList();
|
||||
queryDeptTree();
|
||||
});
|
||||
|
||||
function queryUserList() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
importUrl: prefix + "/importData",
|
||||
importTemplateUrl: prefix + "/importTemplate",
|
||||
sortName: "createTime",
|
||||
sortOrder: "desc",
|
||||
modalName: "用户",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'userId',
|
||||
title: '用户ID'
|
||||
},
|
||||
{
|
||||
field: 'loginName',
|
||||
title: '登录名称',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field: 'userName',
|
||||
title: '用户名称'
|
||||
},
|
||||
{
|
||||
field: 'dept.deptName',
|
||||
title: '部门'
|
||||
},
|
||||
{
|
||||
field: 'email',
|
||||
title: '邮箱',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'phonenumber',
|
||||
title: '手机'
|
||||
},
|
||||
{
|
||||
visible: editFlag == 'hidden' ? false : true,
|
||||
title: '用户状态',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
return statusTools(row);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
if (row.userId != 1) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editTab(\'' + row.userId + '\')"><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.userId + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||
var more = [];
|
||||
more.push("<a class='btn btn-default btn-xs " + resetPwdFlag + "' href='javascript:void(0)' onclick='resetPwd(" + row.userId + ")'><i class='fa fa-key'></i>重置密码</a> ");
|
||||
more.push("<a class='btn btn-default btn-xs " + editFlag + "' href='javascript:void(0)' onclick='authRole(" + row.userId + ")'><i class='fa fa-check-square-o'></i>分配角色</a>");
|
||||
actions.push('<a tabindex="0" class="btn btn-info btn-xs" role="button" data-container="body" data-placement="left" data-toggle="popover" data-html="true" data-trigger="hover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>');
|
||||
return actions.join('');
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
}
|
||||
|
||||
function queryDeptTree()
|
||||
{
|
||||
var url = ctx + "system/dept/treeData";
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 2,
|
||||
onClick : zOnClick
|
||||
};
|
||||
$.tree.init(options);
|
||||
|
||||
function zOnClick(event, treeId, treeNode) {
|
||||
$("#deptId").val(treeNode.id);
|
||||
$("#parentId").val(treeNode.pId);
|
||||
$.table.search();
|
||||
}
|
||||
}
|
||||
|
||||
$('#btnExpand').click(function() {
|
||||
$._tree.expandAll(true);
|
||||
$(this).hide();
|
||||
$('#btnCollapse').show();
|
||||
});
|
||||
|
||||
$('#btnCollapse').click(function() {
|
||||
$._tree.expandAll(false);
|
||||
$(this).hide();
|
||||
$('#btnExpand').show();
|
||||
});
|
||||
|
||||
$('#btnRefresh').click(function() {
|
||||
queryDeptTree();
|
||||
});
|
||||
|
||||
/* 用户管理-部门 */
|
||||
function dept() {
|
||||
var url = ctx + "system/dept";
|
||||
$.modal.openTab("部门管理", url);
|
||||
}
|
||||
|
||||
/* 用户管理-重置密码 */
|
||||
function resetPwd(userId) {
|
||||
var url = prefix + '/resetPwd/' + userId;
|
||||
$.modal.open("重置密码", url, '800', '300');
|
||||
}
|
||||
|
||||
/* 用户管理-分配角色 */
|
||||
function authRole(userId) {
|
||||
var url = prefix + '/authRole/' + userId;
|
||||
$.modal.openTab("用户分配角色", url);
|
||||
}
|
||||
|
||||
/* 用户状态显示 */
|
||||
function statusTools(row) {
|
||||
if (row.status == 1) {
|
||||
return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="enable(\'' + row.userId + '\')"></i> ';
|
||||
} else {
|
||||
return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="disable(\'' + row.userId + '\')"></i> ';
|
||||
}
|
||||
}
|
||||
|
||||
/* 用户管理-停用 */
|
||||
function disable(userId) {
|
||||
$.modal.confirm("确认要停用用户吗?", function() {
|
||||
$.operate.post(prefix + "/changeStatus", { "userId": userId, "status": 1 });
|
||||
})
|
||||
}
|
||||
|
||||
/* 用户管理启用 */
|
||||
function enable(userId) {
|
||||
$.modal.confirm("确认要启用用户吗?", function() {
|
||||
$.operate.post(prefix + "/changeStatus", { "userId": userId, "status": 0 });
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
<!-- 导入区域 -->
|
||||
<script id="importTpl" type="text/template">
|
||||
<form enctype="multipart/form-data" class="mt20 mb10">
|
||||
<div class="col-xs-offset-1">
|
||||
<input type="file" id="file" name="file"/>
|
||||
<div class="mt10 pt5">
|
||||
<input type="checkbox" id="updateSupport" name="updateSupport" title="如果登录账户已经存在,更新这条数据。"> 是否更新已经存在的用户数据
|
||||
<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
|
||||
</div>
|
||||
<font color="red" class="pull-left mt10">
|
||||
提示:仅允许导入“xls”或“xlsx”格式文件!
|
||||
</font>
|
||||
</div>
|
||||
</form>
|
||||
</script>
|
||||
</html>
|
||||
Loading…
Reference in New Issue