mora.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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="erBanNo" placeholder="请输入卿卿号"/>
  15. </li>
  16. <li>
  17. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  18. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  19. </li>
  20. </ul>
  21. </div>
  22. </form>
  23. </div>
  24. <div class="btn-group-sm" id="toolbar" role="group">
  25. <a class="btn btn-success" onclick="add()" shiro:hasPermission="room:mora:add">
  26. <i class="fa fa-plus"></i> 新增
  27. </a>
  28. </div>
  29. <div class="col-sm-12 select-table table-striped" style="overflow:scroll;">
  30. <table id="bootstrap-table" data-mobile-responsive="false" style="min-width:1500px;"></table>
  31. </div>
  32. </div>
  33. </div>
  34. <th:block th:include="include :: footer" />
  35. <script th:inline="javascript">
  36. var editFlag = [[${@permission.hasPermi('room:mora:edit')}]];
  37. var removeFlag = [[${@permission.hasPermi('room:mora:del')}]];
  38. var commonType = [[${@dict.getType('common_type')}]];
  39. var prefix = ctx + "room/mora";
  40. $(function() {
  41. var options = {
  42. url: prefix + "/list",
  43. createUrl: prefix + "/add",
  44. removeUrl: prefix + "/remove",
  45. modalName: "猜拳配置管理",
  46. height: $(window).height()-120,
  47. columns: [
  48. {
  49. field: 'id',
  50. title: 'ID'
  51. },
  52. {
  53. field: 'uid',
  54. title: 'UID'
  55. },
  56. {
  57. field: 'erbanNo',
  58. title: '卿卿号',
  59. align : 'center'
  60. },
  61. {
  62. field: 'nick',
  63. title: '昵称',
  64. align : 'center'
  65. },
  66. {
  67. field: 'roomTitle',
  68. title: '房间标题',
  69. align : 'center'
  70. },
  71. {
  72. field: 'start',
  73. title: '开始时间',
  74. align : 'center'
  75. },
  76. {
  77. field: 'end',
  78. title: '结束时间',
  79. align : 'center'
  80. },
  81. {
  82. field: 'status',
  83. title: '状态',
  84. align: 'center',
  85. formatter: function(value, row, index) {
  86. return $.table.selectDictLabel(commonType, value);
  87. }
  88. },
  89. {
  90. field: 'createTime',
  91. title: '创建时间',
  92. align : 'center'
  93. },
  94. {
  95. field: 'adminName',
  96. title: '操作人',
  97. align : 'center'
  98. },
  99. {
  100. title: '操作',
  101. align: 'center',
  102. formatter: function(value, row, index) {
  103. var actions = [];
  104. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="edit(\'' + row.id + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
  105. actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="remove(\'' + row.id + '\')"><i class="fa fa-remove"></i> 删除</a>');
  106. return actions.join('');
  107. }
  108. }]
  109. };
  110. $.table.init(options);
  111. });
  112. function add(){
  113. var url = prefix + "/add";
  114. $.modal.open("新增猜拳配置信息",url,'800','400');
  115. }
  116. function edit(id){
  117. var url = prefix + "/edit/" + id;
  118. $.modal.open("编辑猜拳配置信息",url,'800','400');
  119. }
  120. function remove(id) {
  121. $.modal.confirm("确认要删除该猜拳配置记录吗?", function() {
  122. $.operate.post(prefix + "/del?ids=" + id);
  123. });
  124. }
  125. </script>
  126. </body>
  127. </html>