若依 3.0

This commit is contained in:
RuoYi
2018-10-07 14:16:47 +08:00
parent fed3aa8231
commit e166127c9f
438 changed files with 9987 additions and 3978 deletions

View File

@@ -0,0 +1,105 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head 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 ">字典标签:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictLabel" id="dictLabel"/>
</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="dictValue" id="dictValue"/>
</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">字典排序:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictSort">
</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.isDefault == 'Y' ? true : false}">
<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.isDefault == 'Y' ? true : false}">
<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>
<div th:include="include::footer"></div>
<script type="text/javascript">
var prefix = ctx + "system/dict/data";
$("#form-dict-add").validate({
rules:{
dictLabel:{
required:true,
},
dictValue:{
required:true,
},
dictSort:{
required:true,
digits:true
},
}
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-dict-add').serialize());
}
}
</script>
</body>
</html>

View File

@@ -0,0 +1,140 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="data-form">
<div class="select-list">
<ul>
<li>
字典名称:<select id="dictType" name="dictType">
<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>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<a class="btn btn-primary" th:onclick="'javascript:$.operate.add(\''+${dict.dictType}+'\')'" shiro:hasPermission="system:dict:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:dict:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del 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>
</div>
<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:src="@{/ajax/libs/select/select2.js}"></script>
<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: "createTime",
sortOrder: "desc",
modalName: "数据",
search: false,
showExport: false,
columns: [{
checkbox: true
},
{
field: 'dictCode',
title: '字典编码'
},
{
field: 'dictLabel',
title: '字典标签'
},
{
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="#" onclick="$.operate.edit(\'' + row.dictCode + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.dictCode + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
function queryParams(params) {
return {
dictType: $("#dictType").val(),
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
searchValue: params.search,
orderByColumn: params.sort,
isAsc: params.order
};
}
</script>
</body>
</html>

View File

@@ -0,0 +1,106 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head 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 ">字典标签:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictLabel" id="dictLabel" th:field="*{dictLabel}"/>
</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="dictValue" id="dictValue" th:field="*{dictValue}"/>
</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">字典排序:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictSort" th:field="*{dictSort}">
</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>
<div th:include="include::footer"></div>
<script type="text/javascript">
var prefix = ctx + "system/dict/data";
$("#form-dict-edit").validate({
rules:{
dictLabel:{
required:true,
},
dictValue:{
required:true,
},
dictSort:{
required:true,
digits:true
},
}
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-dict-edit').serialize());
}
}
</script>
</body>
</html>

View File

@@ -0,0 +1,78 @@
<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head 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 ">字典名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictName" id="dictName"/>
</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="dictType" id="dictType">
</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>
<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>
<div th:include="include::footer"></div>
<script type="text/javascript">
var prefix = ctx + "system/dict";
$("#form-dict-add").validate({
rules:{
dictName:{
required:true,
},
dictType:{
required:true,
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: "该字典类型已经存在"
}
}
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-dict-add').serialize());
}
}
</script>
</body>
</html>

View File

@@ -0,0 +1,82 @@
<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head 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 ">字典名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictName" id="dictName" th:field="*{dictName}"/>
</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="dictType" id="dictType" th:field="*{dictType}">
</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>
<div th:include="include::footer"></div>
<script type="text/javascript">
var prefix = ctx + "system/dict";
$("#form-dict-edit").validate({
rules:{
dictName:{
required:true,
},
dictType:{
required:true,
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: "该字典类型已经存在"
}
}
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-dict-edit').serialize());
}
}
</script>
</body>
</html>

View File

@@ -0,0 +1,140 @@
<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<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>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm hidden-xs" 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 btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:dict:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del 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>
</div>
<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 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: "createTime",
sortOrder: "desc",
modalName: "类型",
search: false,
showExport: false,
columns: [{
checkbox: true
},
{
field: 'dictId',
title: '字典主键'
},
{
field: 'dictName',
title: '字典名称',
sortable: true
},
{
field: 'dictType',
title: '字典类型',
sortable: true,
formatter: function(value, row, index) {
return '<a href="#" onclick="detail(\'' + row.dictId + '\')">' + value + '</a>';
}
},
{
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="#" onclick="$.operate.edit(\'' + row.dictId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-info btn-xs ' + listFlag + '" href="#" onclick="detail(\'' + row.dictId + '\')"><i class="fa fa-list-ul"></i>列表</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" 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;
createMenuItem(url, "字典数据");
}
</script>
</body>
</html>