若依 2.1

This commit is contained in:
RuoYi
2018-07-09 08:44:52 +08:00
parent a66f603437
commit 57773e6eff
458 changed files with 103815 additions and 0 deletions

View File

@ -0,0 +1,41 @@
<!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-${classname}-add">
#foreach($column in $columns)
#if($column.columnName != $primaryKey.columnName)
<div class="form-group">
<label class="col-sm-3 control-label">${column.columnComment}</label>
<div class="col-sm-8">
<input id="${column.attrname}" name="${column.attrname}" class="form-control" type="text">
</div>
</div>
#end
#end
<div class="form-group">
<div class="form-control-static col-sm-offset-9">
<button type="submit" class="btn btn-primary">提交</button>
<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
var prefix = ctx + "${moduleName}/${classname}"
$("#form-${classname}-add").validate({
rules:{
xxxx:{
required:true,
},
},
submitHandler: function(form) {
$.operate.save(prefix + "/save", $('#form-${classname}-add').serialize());
}
});
</script>
</body>
</html>

View File

@ -0,0 +1,42 @@
<!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-${classname}-edit" th:object="${${classname}}">
<input id="${primaryKey.attrname}" name="${primaryKey.attrname}" th:field="*{${primaryKey.attrname}}" type="hidden">
#foreach($column in $columns)
#if($column.columnName != $primaryKey.columnName)
<div class="form-group">
<label class="col-sm-3 control-label">${column.columnComment}</label>
<div class="col-sm-8">
<input id="${column.attrname}" name="${column.attrname}" th:field="*{${column.attrname}}" class="form-control" type="text">
</div>
</div>
#end
#end
<div class="form-group">
<div class="form-control-static col-sm-offset-9">
<button type="submit" class="btn btn-primary">提交</button>
<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
var prefix = ctx + "${moduleName}/${classname}"
$("#form-${classname}-edit").validate({
rules:{
xxxx:{
required:true,
},
},
submitHandler: function(form) {
$.operate.save(prefix + "/save", $('#form-${classname}-edit').serialize());
}
});
</script>
</body>
</html>

View File

@ -0,0 +1,57 @@
<!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="btn-group hidden-xs" id="toolbar" role="group">
<a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="${moduleName}:${classname}:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="${moduleName}:${classname}:remove">
<i class="fa fa-trash-o"></i> 删除
</a>
</div>
<div class="col-sm-12 select-info order-table">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
</div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
var editFlag = [[${@permissionService.hasPermi('${moduleName}:${classname}:edit')}]];
var removeFlag = [[${@permissionService.hasPermi('${moduleName}:${classname}:remove')}]];
var prefix = ctx + "${moduleName}/${classname}"
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
modalName: "${tableComment}",
columns: [{
checkbox: true
},
#foreach($column in $columns)
{
field : '${column.attrname}',
title : '${column.columnComment}'
},
#end
{
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.${primaryKey.attrname} + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.${primaryKey.attrname} + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>