若依 2.0
This commit is contained in:
94
src/main/resources/templates/system/dict/data/add.html
Normal file
94
src/main/resources/templates/system/dict/data/add.html
Normal file
@@ -0,0 +1,94 @@
|
||||
<!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" th:with="type=${@dictService.selectDictData('sys_yes_no')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<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">
|
||||
<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" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<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">
|
||||
<input id="remark" name="remark" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 + "system/dict/data"
|
||||
|
||||
$("#form-dict-add").validate({
|
||||
rules:{
|
||||
dictLabel:{
|
||||
required:true,
|
||||
},
|
||||
dictValue:{
|
||||
required:true,
|
||||
},
|
||||
dictSort:{
|
||||
required:true,
|
||||
digits:true
|
||||
},
|
||||
},
|
||||
submitHandler:function(form){
|
||||
$.operate.save(prefix + "/save", $('#form-dict-add').serialize());
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
128
src/main/resources/templates/system/dict/data/data.html
Normal file
128
src/main/resources/templates/system/dict/data/data.html
Normal file
@@ -0,0 +1,128 @@
|
||||
<!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 select-info">
|
||||
<form id="operlog-form">
|
||||
<div class="select-list gd">
|
||||
<ul>
|
||||
<li>
|
||||
字典类型:<input type="text" id="dictType" name="dictType" th:value="${dict.dictType}"/>
|
||||
</li>
|
||||
<li>
|
||||
字典标签:<input type="text" name="dictLabel"/>
|
||||
</li>
|
||||
<li>
|
||||
数据状态:<select name="status" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search($('form').attr('id'))"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel($('form').attr('id'))"><i class="fa fa-download"></i> 下载</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group hidden-xs" id="toolbar" role="group">
|
||||
<a class="btn btn-outline btn-success btn-rounded" th:onclick="'javascript:$.operate.add(\''+${dict.dictType}+'\')'" shiro:hasPermission="system:dict:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="system:dict: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>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permissionService.hasPermi('system:dict:edit')}]];
|
||||
var removeFlag = [[${@permissionService.hasPermi('system:dict:remove')}]];
|
||||
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) {
|
||||
if (value == 0) {
|
||||
return '<span class="badge badge-primary">正常</span>';
|
||||
} else if (value == 1) {
|
||||
return '<span class="badge badge-danger">停用</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注'
|
||||
},
|
||||
{
|
||||
field: 'createDateTimeStr',
|
||||
title: '创建时间'
|
||||
},
|
||||
{
|
||||
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()
|
||||
};
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
95
src/main/resources/templates/system/dict/data/edit.html
Normal file
95
src/main/resources/templates/system/dict/data/edit.html
Normal file
@@ -0,0 +1,95 @@
|
||||
<!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" th:with="type=${@dictService.selectDictData('sys_yes_no')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<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">
|
||||
<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" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<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">
|
||||
<input id="remark" name="remark" class="form-control" type="text" th:field="*{remark}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 + "system/dict/data"
|
||||
|
||||
$("#form-dict-edit").validate({
|
||||
rules:{
|
||||
dictLabel:{
|
||||
required:true,
|
||||
},
|
||||
dictValue:{
|
||||
required:true,
|
||||
},
|
||||
dictSort:{
|
||||
required:true,
|
||||
digits:true
|
||||
},
|
||||
},
|
||||
submitHandler:function(form){
|
||||
$.operate.save(prefix + "/save", $('#form-dict-edit').serialize());
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
83
src/main/resources/templates/system/dict/type/add.html
Normal file
83
src/main/resources/templates/system/dict/type/add.html
Normal file
@@ -0,0 +1,83 @@
|
||||
<!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" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<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">
|
||||
<input id="remark" name="remark" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 + "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 $.trim($("#dictType").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
if (data == "0") return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"dictType": {
|
||||
remote: "该字典类型已经存在"
|
||||
}
|
||||
},
|
||||
submitHandler:function(form){
|
||||
$.operate.save(prefix + "/save", $('#form-dict-add').serialize());
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
87
src/main/resources/templates/system/dict/type/edit.html
Normal file
87
src/main/resources/templates/system/dict/type/edit.html
Normal file
@@ -0,0 +1,87 @@
|
||||
<!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" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<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">
|
||||
<input id="remark" name="remark" class="form-control" type="text" th:field="*{remark}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 + "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 $.trim($("#dictId").val());
|
||||
},
|
||||
dictType : function() {
|
||||
return $.trim($("#dictType").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
if (data == "0") return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"dictType": {
|
||||
remote: "该字典类型已经存在"
|
||||
}
|
||||
},
|
||||
submitHandler:function(form){
|
||||
$.operate.save(prefix + "/save", $('#form-dict-edit').serialize());
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
128
src/main/resources/templates/system/dict/type/type.html
Normal file
128
src/main/resources/templates/system/dict/type/type.html
Normal file
@@ -0,0 +1,128 @@
|
||||
<!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 select-info">
|
||||
<form id="operlog-form">
|
||||
<div class="select-list gd">
|
||||
<ul>
|
||||
<li>
|
||||
字典名称:<input type="text" name="dictName"/>
|
||||
</li>
|
||||
<li>
|
||||
字典类型:<input type="text" name="dictType"/>
|
||||
</li>
|
||||
<li>
|
||||
字典状态:<select name="status" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search($('form').attr('id'))"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel($('form').attr('id'))"><i class="fa fa-download"></i> 下载</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</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="system:dict:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="system:dict: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>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permissionService.hasPermi('system:dict:edit')}]];
|
||||
var listFlag = [[${@permissionService.hasPermi('system:dict:list')}]];
|
||||
var removeFlag = [[${@permissionService.hasPermi('system:dict:remove')}]];
|
||||
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: '字典名称'
|
||||
},
|
||||
{
|
||||
field: 'dictType',
|
||||
title: '字典类型',
|
||||
formatter: function(value, row, index) {
|
||||
return '<a href="#" onclick="detail(\'' + row.dictId + '\')">' + value + '</a>';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
if (value == 0) {
|
||||
return '<span class="badge badge-primary">正常</span>';
|
||||
} else if (value == 1) {
|
||||
return '<span class="badge badge-danger">停用</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注'
|
||||
},
|
||||
{
|
||||
field: 'createDateTimeStr',
|
||||
title: '创建时间'
|
||||
},
|
||||
{
|
||||
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>
|
Reference in New Issue
Block a user