reply.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. <input id="commentId" name="id" th:value="${id}" type="hidden">
  9. <div class="row">
  10. <div class="col-sm-12 select-table table-striped">
  11. <table id="bootstrap-tree-table" data-mobile-responsive="false"></table>
  12. </div>
  13. </div>
  14. </div>
  15. <th:block th:include="include :: footer" />
  16. <script th:inline="javascript">
  17. var passFlag = [[${@permission.hasPermi('dynamic:circle:comment:pass')}]];
  18. var failFlag = [[${@permission.hasPermi('dynamic:circle:comment:fail')}]];
  19. var reviewStatus = [[${@dict.getType('review_status')}]];
  20. var prefix = ctx + "dynamic/circle/comment";
  21. $(function() {
  22. var commentId = $("#commentId").val();
  23. var options = {
  24. code: "id",
  25. parentCode: "pid",
  26. uniqueId: "id",
  27. expandAll: false,
  28. expandFirst: false,
  29. url: prefix + "/replyList?commentId=" + commentId,
  30. modalName: "评论回复列表",
  31. height: $(window).height()-120,
  32. columns: [{
  33. field: 'id',
  34. visible: false,
  35. title: 'ID'
  36. },
  37. {
  38. field: 'momentsId',
  39. title: '动态ID'
  40. },
  41. {
  42. field: 'no',
  43. title: '回复人卿卿号'
  44. },
  45. {
  46. field: 'nick',
  47. title: '回复人昵称'
  48. },
  49. {
  50. field: 'content',
  51. title: '内容'
  52. },
  53. {
  54. field: 'state',
  55. title: '状态',
  56. align : 'center',
  57. formatter: function(value, row, index) {
  58. return $.table.selectDictLabel(reviewStatus, value);
  59. }
  60. },
  61. {
  62. field: 'adminName',
  63. title: '审核人'
  64. },
  65. {
  66. field: 'updateTime',
  67. title: '审核时间'
  68. },
  69. {
  70. field: 'createTime',
  71. title: '创建时间'
  72. },
  73. {
  74. title: '操作',
  75. align: 'center',
  76. formatter: function(value, row, index) {
  77. var actions = [];
  78. if(row.state == 0){
  79. actions.push('<a class="btn btn-success btn-xs ' + passFlag + '" href="javascript:void(0)" onclick="pass(\'' + row.id + '\')"><i class="fa fa-check-circle"></i> 审核通过</a>');
  80. actions.push(' ');
  81. actions.push(' ');
  82. actions.push('<a class="btn btn-danger btn-xs ' + failFlag + '" href="javascript:void(0)" onclick="fail(\'' + row.id + '\')"><i class="fa fa-check-circle-o"></i> 审核不通过</a>');
  83. }else if(row.state == 1){
  84. actions.push('<a class="btn btn-danger btn-xs ' + failFlag + '" href="javascript:void(0)" onclick="fail(\'' + row.id + '\')"><i class="fa fa-check-circle-o"></i> 审核不通过</a>');
  85. } else if(row.state == 2){
  86. actions.push('<a class="btn btn-success btn-xs ' + passFlag + '" href="javascript:void(0)" onclick="pass(\'' + row.id + '\')"><i class="fa fa-check-circle"></i> 审核通过</a>');
  87. }
  88. return actions.join('');
  89. }
  90. }]
  91. };
  92. $.treeTable.init(options);
  93. });
  94. function fail(id) {
  95. $.modal.confirm("确认要审核不通过该记录吗?", function() {
  96. $.operate.post(prefix + "/fail?ids=" +id);
  97. });
  98. }
  99. function pass(id) {
  100. $.modal.confirm("确认要审核通过该记录吗?", function() {
  101. $.operate.post(prefix + "/pass?ids=" +id);
  102. });
  103. }
  104. </script>
  105. </body>
  106. </html>