config.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <meta charset="utf-8">
  4. <head th:include="include :: header"></head>
  5. <body class="gray-bg">
  6. <div class="container-div">
  7. <div class="row">
  8. <div class="col-sm-12 select-info">
  9. <form id="config-form">
  10. <div class="select-list">
  11. <ul>
  12. <li>
  13. 参数名称:<input type="text" name="configName"/>
  14. </li>
  15. <li>
  16. 参数键名:<input type="text" name="configKey"/>
  17. </li>
  18. <li>
  19. 系统内置:<select name="configType" th:with="type=${@dict.getType('sys_yes_no')}">
  20. <option value="">所有</option>
  21. <option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option>
  22. </select>
  23. </li>
  24. <li class="time">
  25. <label>创建时间: </label>
  26. <input type="text" class="layui-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
  27. <span>-</span>
  28. <input type="text" class="layui-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
  29. </li>
  30. <li>
  31. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  32. <a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()"><i class="fa fa-download"></i>&nbsp;下载</a>
  33. </li>
  34. </ul>
  35. </div>
  36. </form>
  37. </div>
  38. <div class="btn-group hidden-xs" id="toolbar" role="group">
  39. <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="system:config:add">
  40. <i class="fa fa-plus"></i> 新增
  41. </a>
  42. <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="system:config:remove">
  43. <i class="fa fa-trash-o"></i> 删除
  44. </a>
  45. </div>
  46. <div class="col-sm-12 select-info table-striped">
  47. <table id="bootstrap-table" data-mobile-responsive="true"></table>
  48. </div>
  49. </div>
  50. </div>
  51. <div th:include="include :: footer"></div>
  52. <script th:inline="javascript">
  53. var editFlag = [[${@permission.hasPermi('system:config:edit')}]];
  54. var removeFlag = [[${@permission.hasPermi('system:config:remove')}]];
  55. var datas = [[${@dict.getType('sys_yes_no')}]];
  56. var prefix = ctx + "system/config"
  57. $(function() {
  58. var options = {
  59. url: prefix + "/list",
  60. createUrl: prefix + "/add",
  61. updateUrl: prefix + "/edit/{id}",
  62. removeUrl: prefix + "/remove",
  63. exportUrl: prefix + "/export",
  64. sortName: "createTime",
  65. sortOrder: "desc",
  66. modalName: "参数",
  67. search: false,
  68. showExport: false,
  69. columns: [{
  70. checkbox: true
  71. },
  72. {
  73. field: 'configId',
  74. title: '参数主键'
  75. },
  76. {
  77. field: 'configName',
  78. title: '参数名称'
  79. },
  80. {
  81. field: 'configKey',
  82. title: '参数键名'
  83. },
  84. {
  85. field: 'configValue',
  86. title: '参数键值'
  87. },
  88. {
  89. field: 'configType',
  90. title: '系统内置',
  91. align: 'center',
  92. formatter: function(value, row, index) {
  93. return $.table.selectDictLabel(datas, value);
  94. }
  95. },
  96. {
  97. field: 'createTime',
  98. title: '创建时间'
  99. },
  100. {
  101. title: '操作',
  102. align: 'center',
  103. formatter: function(value, row, index) {
  104. var actions = [];
  105. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.configId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  106. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.configId + '\')"><i class="fa fa-remove"></i>删除</a>');
  107. return actions.join('');
  108. }
  109. }]
  110. };
  111. $.table.init(options);
  112. });
  113. </script>
  114. </body>
  115. </html>