config.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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 btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:config:edit">
  44. <i class="fa fa-edit"></i> 修改
  45. </a>
  46. <a class="btn btn-danger btn-del 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. </div>
  53. <div class="col-sm-12 select-table table-striped">
  54. <table id="bootstrap-table" data-mobile-responsive="true"></table>
  55. </div>
  56. </div>
  57. </div>
  58. <th:block th:include="include :: footer" />
  59. <script th:inline="javascript">
  60. var editFlag = [[${@permission.hasPermi('system:config:edit')}]];
  61. var removeFlag = [[${@permission.hasPermi('system:config:remove')}]];
  62. var datas = [[${@dict.getType('sys_yes_no')}]];
  63. var prefix = ctx + "system/config";
  64. $(function() {
  65. var options = {
  66. url: prefix + "/list",
  67. createUrl: prefix + "/add",
  68. updateUrl: prefix + "/edit/{id}",
  69. removeUrl: prefix + "/remove",
  70. exportUrl: prefix + "/export",
  71. sortName: "createTime",
  72. sortOrder: "desc",
  73. modalName: "参数",
  74. columns: [{
  75. checkbox: true
  76. },
  77. {
  78. field: 'configId',
  79. title: '参数主键'
  80. },
  81. {
  82. field: 'configName',
  83. title: '参数名称'
  84. },
  85. {
  86. field: 'configKey',
  87. title: '参数键名'
  88. },
  89. {
  90. field: 'configValue',
  91. title: '参数键值'
  92. },
  93. {
  94. field: 'configType',
  95. title: '系统内置',
  96. align: 'center',
  97. formatter: function(value, row, index) {
  98. return $.table.selectDictLabel(datas, value);
  99. }
  100. },
  101. {
  102. field: 'remark',
  103. title: '备注',
  104. align: 'center',
  105. formatter: function(value, row, index) {
  106. return $.table.tooltip(value);
  107. }
  108. },
  109. {
  110. field: 'createTime',
  111. title: '创建时间'
  112. },
  113. {
  114. title: '操作',
  115. align: 'center',
  116. formatter: function(value, row, index) {
  117. var actions = [];
  118. 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> ');
  119. 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>');
  120. return actions.join('');
  121. }
  122. }]
  123. };
  124. $.table.init(options);
  125. });
  126. </script>
  127. </body>
  128. </html>