config.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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 gd">
  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=${@dictService.selectDictData('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>
  25. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search($('form').attr('id'))"><i class="fa fa-search"></i>&nbsp;搜索</a>
  26. <a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel($('form').attr('id'))"><i class="fa fa-download"></i>&nbsp;下载</a>
  27. </li>
  28. </ul>
  29. </div>
  30. </form>
  31. </div>
  32. <div class="btn-group hidden-xs" id="toolbar" role="group">
  33. <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="system:config:add">
  34. <i class="fa fa-plus"></i> 新增
  35. </a>
  36. <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="system:config:remove">
  37. <i class="fa fa-trash-o"></i> 删除
  38. </a>
  39. </div>
  40. <div class="col-sm-12 select-info table-striped">
  41. <table id="bootstrap-table" data-mobile-responsive="true"></table>
  42. </div>
  43. </div>
  44. </div>
  45. <div th:include="include :: footer"></div>
  46. <script th:inline="javascript">
  47. var editFlag = [[${@permissionService.hasPermi('system:config:edit')}]];
  48. var removeFlag = [[${@permissionService.hasPermi('system:config:remove')}]];
  49. var prefix = ctx + "system/config"
  50. $(function() {
  51. var options = {
  52. url: prefix + "/list",
  53. createUrl: prefix + "/add",
  54. updateUrl: prefix + "/edit/{id}",
  55. removeUrl: prefix + "/remove",
  56. exportUrl: prefix + "/export",
  57. sortName: "createTime",
  58. sortOrder: "desc",
  59. modalName: "参数",
  60. search: false,
  61. showExport: false,
  62. columns: [{
  63. checkbox: true
  64. },
  65. {
  66. field: 'configId',
  67. title: '参数主键'
  68. },
  69. {
  70. field: 'configName',
  71. title: '参数名称'
  72. },
  73. {
  74. field: 'configKey',
  75. title: '参数键名'
  76. },
  77. {
  78. field: 'configValue',
  79. title: '参数键值'
  80. },
  81. {
  82. field: 'configType',
  83. title: '系统内置',
  84. align: 'center',
  85. formatter: function(value, row, index) {
  86. if (value == 'Y') {
  87. return '<span class="badge badge-primary">是</span>';
  88. } else if (value == 'N') {
  89. return '<span class="badge badge-danger">否</span>';
  90. }
  91. }
  92. },
  93. {
  94. field: 'createDateTimeStr',
  95. title: '创建时间'
  96. },
  97. {
  98. title: '操作',
  99. align: 'center',
  100. formatter: function(value, row, index) {
  101. var actions = [];
  102. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.configId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  103. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.configId + '\')"><i class="fa fa-remove"></i>删除</a>');
  104. return actions.join('');
  105. }
  106. }]
  107. };
  108. $.table.init(options);
  109. });
  110. </script>
  111. </body>
  112. </html>