app_version.html 5.3 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="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}"
  20. th:value="${dict.dictValue}"></option>
  21. </select>
  22. </li>
  23. <li>
  24. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
  25. class="fa fa-search"></i>&nbsp;搜索</a>
  26. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
  27. class="fa fa-refresh"></i>&nbsp;重置</a>
  28. </li>
  29. </ul>
  30. </div>
  31. </form>
  32. </div>
  33. <div class="btn-group-sm" id="toolbar" role="group">
  34. <a class="btn btn-success" onclick="add()" shiro:hasPermission="system:version:add">
  35. <i class="fa fa-plus"></i> 新增
  36. </a>
  37. </div>
  38. <div class="col-sm-12 select-table table-striped" style="overflow:scroll;">
  39. <table id="bootstrap-table" data-mobile-responsive="false" style="min-width:1500px;"></table>
  40. </div>
  41. </div>
  42. </div>
  43. <th:block th:include="include :: footer"/>
  44. <script th:inline="javascript">
  45. var editFlag = [[${@permission.hasPermi('system:version:edit')}]];
  46. var removeFlag = [[${@permission.hasPermi('system:version:del')}]];
  47. var osType = [[${@dict.getType('os_type')}]];
  48. var prefix = ctx + "system/version";
  49. var versionStatus = [[${@dict.getType('version_status')}]];
  50. $(function () {
  51. var options = {
  52. url: prefix + "/list",
  53. createUrl: prefix + "/add",
  54. updateUrl: prefix + "/edit/{id}",
  55. removeUrl: prefix + "/remove",
  56. modalName: "版本管理",
  57. height: 600,
  58. columns: [
  59. {
  60. field: 'versionId',
  61. title: 'ID'
  62. },
  63. {
  64. field: 'os',
  65. title: '系统',
  66. align: 'center',
  67. formatter: function (value, row, index) {
  68. return $.table.selectDictLabel(osType, value);
  69. }
  70. },
  71. {
  72. field: 'appid',
  73. title: 'appid'
  74. },
  75. {
  76. field: 'version',
  77. title: '版本号'
  78. },
  79. {
  80. field: 'platform',
  81. title: '平台'
  82. },
  83. {
  84. field: 'status',
  85. title: '状态',
  86. formatter: function (value, row, index) {
  87. return $.table.selectDictLabel(versionStatus, value);
  88. }
  89. },
  90. {
  91. field: 'versionDesc',
  92. title: '版本描述'
  93. },
  94. {
  95. field: 'publishTime',
  96. title: '发布时间'
  97. },
  98. {
  99. field: 'createTime',
  100. title: '创建时间',
  101. align: 'center'
  102. },
  103. {
  104. field: 'downloadUrl',
  105. title: '下载地址',
  106. align: 'center'
  107. },
  108. {
  109. title: '操作',
  110. align: 'center',
  111. formatter: function (value, row, index) {
  112. var actions = [];
  113. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="edit(\'' + row.versionId + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
  114. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="remove(\'' + row.versionId + '\')"><i class="fa fa-remove"></i> 删除</a>');
  115. return actions.join('');
  116. }
  117. }]
  118. };
  119. $.table.init(options);
  120. });
  121. function add() {
  122. var url = prefix + "/add";
  123. $.modal.open("新增版本信息", url, '800', '650');
  124. }
  125. function edit(id) {
  126. var url = prefix + "/edit/" + id;
  127. $.modal.open("编辑版本信息", url, '800', '650');
  128. }
  129. function remove(id) {
  130. $.modal.confirm("确认要删除该记录吗?", function () {
  131. $.operate.post(prefix + "/del?versionId=" + id);
  132. });
  133. }
  134. </script>
  135. </body>
  136. </html>