<!DOCTYPE html>
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
<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="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>
|
[[#{jsp.system.user.005}]]:<input type="text" name="loginName"/>
|
</li>
|
<li>
|
[[#{jsp.exam.distributor.userName}]]:<input type="text" name="userName"/>
|
</li>
|
<li>
|
[[#{jsp.system.user.004}]]:<input type="text" name="phonenumber"/>
|
</li>
|
<li>
|
[[#{basis.state}]]:<select name="status"
|
th:with="type=${@dict.getType('sys_normal_disable')}">
|
<option value="">All</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> [[#{basis.search}]]</a>
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
|
class="fa fa-refresh"></i> [[#{basis.reset}]]</a>
|
</li>
|
</ul>
|
</div>
|
</form>
|
</div>
|
|
<div class="col-sm-12 select-table table-striped">
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
</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 prefix = ctx + "exam/paper";
|
|
$(function () {
|
queryUserList();
|
});
|
|
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: [[#{jsp.exam.distributor.userName}]],
|
columns: [{
|
checkbox: true
|
},
|
{
|
field: 'userId',
|
title: 'userId',
|
visible: false
|
},
|
{
|
field: 'loginName',
|
title: [[#{jsp.exam.distributor.loginname}]],
|
sortable: true
|
},
|
{
|
field: 'userName',
|
title: [[#{jsp.exam.distributor.userName}]]
|
},
|
{
|
field: 'email',
|
title: [[#{jsp.system.user.profile.005}]],
|
visible: false
|
},
|
{
|
field: 'phonenumber',
|
title: [[#{jsp.system.user.profile.003}]]
|
},
|
{
|
field: 'status',
|
title: [[#{basis.state}]],
|
align: 'center',
|
formatter: function (value, row, index) {
|
if (value == "0") {
|
return [[#{dict.ic6}]];
|
} else {
|
return [[#{dict.ic7}]];
|
}
|
}
|
},
|
{
|
field: 'createTime',
|
title: [[#{basis.createTime}]],
|
sortable: true
|
},
|
{
|
title: [[#{basis.operate}]],
|
align: 'center',
|
formatter: function (value, row, index) {
|
var actions = [];
|
actions.push('<a class="btn btn-success btn-xs href="javascript:void(0)" onclick="$.operate.edit(\'' + row.userId + '\')"><i class="fa fa-edit"></i>'+[[#{jsp.product.package.authorization}]]+'</a> ');
|
return actions.join('');
|
}
|
}]
|
};
|
$.table.init(options);
|
}
|
|
|
$('#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("resetPwd", url, '800', '300');
|
}
|
|
/* 用户状态显示 */
|
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([[#{jsp.system.user.014}]], function () {
|
$.operate.post(prefix + "/changeStatus", {"userId": userId, "status": 1});
|
})
|
}
|
|
/* 用户管理启用 */
|
function enable(userId) {
|
$.modal.confirm([[#{jsp.system.user.015}]], 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="如果登录账户已经存在,更新这条数据。"> [[#{whether.to.update.existing.data}]]
|
<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i
|
class="fa fa-file-excel-o"></i> [[#{basis.template}]]</a>
|
</div>
|
<font color="red" class="pull-left mt10">
|
[[#{jsp.exam.product.bulkImportTips}]]
|
</font>
|
</div>
|
</form>
|
</script>
|
</html>
|