app_secret.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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="role-form">
  11. <div class="select-list">
  12. <ul>
  13. <li>
  14. 版本:<input type="text" name="version" placeholder="请输入版本号"/>
  15. </li>
  16. <li>
  17. 系统:<select name="os" th:with="type=${@dict.getType('os_type')}">
  18. <option value="">所有</option>
  19. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  20. </select>
  21. </li>
  22. <li>
  23. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  24. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  25. </li>
  26. </ul>
  27. </div>
  28. </form>
  29. </div>
  30. <div class="btn-group-sm" id="toolbar" role="group">
  31. <a class="btn btn-success" onclick="add()" shiro:hasPermission="system:key:add">
  32. <i class="fa fa-plus"></i> 新增
  33. </a>
  34. </div>
  35. <div class="col-sm-12 select-table table-striped" style="overflow:scroll;">
  36. <table id="bootstrap-table" data-mobile-responsive="false" style="min-width:1500px;"></table>
  37. </div>
  38. </div>
  39. </div>
  40. <th:block th:include="include :: footer" />
  41. <script th:inline="javascript">
  42. var editFlag = [[${@permission.hasPermi('system:key:edit')}]];
  43. var removeFlag = [[${@permission.hasPermi('system:key:del')}]];
  44. var osType = [[${@dict.getType('os_type')}]];
  45. var prefix = ctx + "system/key";
  46. $(function() {
  47. var options = {
  48. url: prefix + "/list",
  49. createUrl: prefix + "/add",
  50. updateUrl: prefix + "/edit/{id}",
  51. removeUrl: prefix + "/remove",
  52. modalName: "秘钥管理",
  53. height: 600,
  54. columns: [
  55. {
  56. field: 'os',
  57. title: '系统',
  58. align : 'center',
  59. formatter: function(value, row, index) {
  60. return $.table.selectDictLabel(osType, value);
  61. }
  62. },
  63. {
  64. field: 'appVersion',
  65. title: '版本号'
  66. },
  67. {
  68. field: 'signKey',
  69. title: '版本密钥',
  70. align : 'center'
  71. },
  72. {
  73. field: 'createTime',
  74. title: '时间',
  75. align : 'center'
  76. },
  77. {
  78. title: '操作',
  79. align: 'center',
  80. formatter: function(value, row, index) {
  81. var actions = [];
  82. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="edit(\'' + row.signKey + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
  83. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="remove(\'' + row.signKey + '\')"><i class="fa fa-remove"></i> 删除</a>');
  84. return actions.join('');
  85. }
  86. }]
  87. };
  88. $.table.init(options);
  89. });
  90. function use(id,isUse){
  91. $.modal.confirm("确认要该银行卡为默认使用吗?", function() {
  92. $.operate.post(prefix + "/use?id=" + id + "&use=" + isUse);
  93. });
  94. }
  95. function add(){
  96. var url = prefix + "/add";
  97. $.modal.open("新增秘钥信息",url,'800','400');
  98. }
  99. function edit(id){
  100. var url = prefix + "/edit/" + id;
  101. $.modal.open("编辑秘钥信息",url,'800','400');
  102. }
  103. function remove(id) {
  104. $.modal.confirm("确认要删除该记录吗?", function() {
  105. $.operate.post(prefix + "/del?signKey=" + id);
  106. });
  107. }
  108. </script>
  109. </body>
  110. </html>