若依 3.4

This commit is contained in:
RuoYi
2019-06-03 09:19:57 +08:00
parent dfd65fbeb8
commit 36738bca90
81 changed files with 24171 additions and 21 deletions

View File

@@ -0,0 +1,78 @@
<!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-add">
<div class="form-group">
<label class="col-sm-3 control-label">用户编号:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="userCode" id="userCode" 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="userName" id="userName" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用户性别:</label>
<div class="col-sm-8">
<div class="input-group" style="width: 100%">
<select name="userSex" 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="form-group">
<label class="col-sm-3 control-label">用户手机:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="userPhone" id="userPhone">
</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="userEmail" id="userEmail">
</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.isDefault == 'Y' ? true : false}">
<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 + "demo/operate";
$("#form-user-add").validate({
onkeyup: false,
rules:{
userPhone:{
isPhone:true
},
userEmail:{
email:true
},
},
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-user-add').serialize());
}
}
</script>
</body>
</html>

View File

@@ -0,0 +1,69 @@
<!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-edit">
<div class="form-group">
<label class="col-sm-3 control-label">用户编号:</label>
<div class="form-control-static" th:text="${user.userCode}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">用户姓名:</label>
<div class="col-sm-8">
<div class="form-control-static" th:text="${user.userName}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用户性别:</label>
<div class="col-sm-8">
<div class="form-control-static" th:text="${@dict.getLabel('sys_user_sex', user.status)}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用户手机:</label>
<div class="col-sm-8">
<div class="form-control-static" th:text="${user.userPhone}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用户邮箱:</label>
<div class="col-sm-8">
<div class="form-control-static" th:text="${user.userEmail}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用户状态:</label>
<div class="col-sm-8">
<div class="form-control-static" th:text="${@dict.getLabel('sys_normal_disable', user.status)}"></div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "demo/operate";
$("#form-user-add").validate({
onkeyup: false,
rules:{
userPhone:{
isPhone:true
},
userEmail:{
email:true
},
},
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-user-edit').serialize());
}
}
</script>
</body>
</html>

View File

@@ -0,0 +1,79 @@
<!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-edit" th:object="${user}">
<input name="userId" type="hidden" th:field="*{userId}" />
<div class="form-group">
<label class="col-sm-3 control-label">用户编号:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="userCode" id="userCode" th:field="*{userCode}" 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="userName" id="userName" th:field="*{userName}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用户性别:</label>
<div class="col-sm-8">
<div class="input-group" style="width: 100%">
<select name="userSex" 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="*{userSex}"></option>
</select>
</div>
</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="userPhone" th:field="*{userPhone}" id="userPhone">
</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="userEmail" th:field="*{userEmail}" id="userEmail">
</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 + "demo/operate";
$("#form-user-add").validate({
onkeyup: false,
rules:{
userPhone:{
isPhone:true
},
userEmail:{
email:true
},
},
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-user-edit').serialize());
}
}
</script>
</body>
</html>

View File

@@ -0,0 +1,9 @@
<!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">
</body>
</html>

View File

@@ -0,0 +1,123 @@
<!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="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-info" onclick="$.table.importExcel()">
<i class="fa fa-upload"></i> 导入
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()">
<i class="fa fa-download"></i> 导出
</a>
<a class="btn btn-info btn-detail disabled" onclick="$.operate.detail()">
<i class="fa fa-search"></i> 详细
</a>
<a class="btn btn-danger" onclick="$.operate.clean()">
<i class="fa fa-trash"></i> 清空
</a>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
var prefix = ctx + "demo/operate";
var datas = [[${@dict.getType('sys_normal_disable')}]];
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
importUrl: prefix + "/importData",
importTemplateUrl: prefix + "/importTemplate",
detailUrl: prefix + "/detail/{id}",
cleanUrl: prefix + "/clean",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
search: true,
modalName: "用户",
columns: [{
checkbox: true
},
{
field : 'userId',
title : '用户ID'
},
{
field : 'userCode',
title : '用户编号'
},
{
field : 'userName',
title : '用户姓名'
},
{
field : 'userPhone',
title : '用户手机'
},
{
field : 'userEmail',
title : '用户邮箱'
},
{
field : 'userBalance',
title : '用户余额'
},
{
field: 'status',
title: '用户状态',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="#" onclick="$.operate.edit(\'' + row.userId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-info btn-xs" href="#" onclick="$.operate.detail(\'' + row.userId + '\')"><i class="fa fa-search"></i>详细</a> ');
actions.push('<a class="btn btn-danger btn-xs" href="#" onclick="$.operate.remove(\'' + row.userId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
<!-- 导入区域 -->
<form id="importForm" enctype="multipart/form-data" class="mt20 mb10" style="display: none;">
<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="如果登录账户已经存在,更新这条数据。"> 是否更新已经存在的用户数据
&nbsp; <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>
</html>