config.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <head>
  4. <th:block th:include="include :: header('参数列表')" />
  5. </head>
  6. <body class="gray-bg">
  7. <div class="container-div">
  8. <div class="row">
  9. <div class="col-sm-12 search-collapse">
  10. <form id="config-form">
  11. <div class="select-list">
  12. <ul>
  13. <li>
  14. 参数名称:<input type="text" name="configName"/>
  15. </li>
  16. <li>
  17. 参数键名:<input type="text" name="configKey"/>
  18. </li>
  19. <li>
  20. 系统内置:<select name="configType" th:with="type=${@dict.getType('sys_yes_no')}">
  21. <option value="">所有</option>
  22. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  23. </select>
  24. </li>
  25. <li class="select-time">
  26. <label>创建时间: </label>
  27. <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
  28. <span>-</span>
  29. <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
  30. </li>
  31. <li>
  32. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  33. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  34. </li>
  35. </ul>
  36. </div>
  37. </form>
  38. </div>
  39. <div class="btn-group-sm" id="toolbar" role="group">
  40. <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:config:add">
  41. <i class="fa fa-plus"></i> 新增
  42. </a>
  43. <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:config:edit">
  44. <i class="fa fa-edit"></i> 修改
  45. </a>
  46. <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:config:remove">
  47. <i class="fa fa-remove"></i> 删除
  48. </a>
  49. <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:config:export">
  50. <i class="fa fa-download"></i> 导出
  51. </a>
  52. <a class="btn btn-danger" onclick="refreshCache()" shiro:hasPermission="system:config:remove">
  53. <i class="fa fa-refresh"></i> 刷新缓存
  54. </a>
  55. </div>
  56. <div class="col-sm-12 select-table table-striped">
  57. <table id="bootstrap-table"></table>
  58. </div>
  59. </div>
  60. </div>
  61. <th:block th:include="include :: footer" />
  62. <script th:inline="javascript">
  63. var editFlag = [[${@permission.hasPermi('system:config:edit')}]];
  64. var removeFlag = [[${@permission.hasPermi('system:config:remove')}]];
  65. var datas = [[${@dict.getType('sys_yes_no')}]];
  66. var prefix = ctx + "system/config";
  67. $(function() {
  68. var options = {
  69. url: prefix + "/list",
  70. createUrl: prefix + "/add",
  71. updateUrl: prefix + "/edit/{id}",
  72. removeUrl: prefix + "/remove",
  73. exportUrl: prefix + "/export",
  74. sortName: "configId",
  75. sortOrder: "asc",
  76. modalName: "参数",
  77. columns: [{
  78. checkbox: true
  79. },
  80. {
  81. field: 'configId',
  82. title: '参数主键'
  83. },
  84. {
  85. field: 'configName',
  86. title: '参数名称',
  87. formatter: function(value, row, index) {
  88. return $.table.tooltip(value);
  89. }
  90. },
  91. {
  92. field: 'configKey',
  93. title: '参数键名',
  94. formatter: function(value, row, index) {
  95. return $.table.tooltip(value);
  96. }
  97. },
  98. {
  99. field: 'configValue',
  100. title: '参数键值'
  101. },
  102. {
  103. field: 'configType',
  104. title: '系统内置',
  105. align: 'center',
  106. formatter: function(value, row, index) {
  107. return $.table.selectDictLabel(datas, value);
  108. }
  109. },
  110. {
  111. field: 'remark',
  112. title: '备注',
  113. align: 'center',
  114. formatter: function(value, row, index) {
  115. return $.table.tooltip(value, 10, "open");
  116. }
  117. },
  118. {
  119. field: 'createTime',
  120. title: '创建时间'
  121. },
  122. {
  123. title: '操作',
  124. align: 'center',
  125. formatter: function(value, row, index) {
  126. var actions = [];
  127. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.configId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  128. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.configId + '\')"><i class="fa fa-remove"></i>删除</a>');
  129. return actions.join('');
  130. }
  131. }]
  132. };
  133. $.table.init(options);
  134. });
  135. /** 刷新参数缓存 */
  136. function refreshCache() {
  137. $.operate.get(prefix + "/refreshCache");
  138. }
  139. </script>
  140. </body>
  141. </html>