123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <!DOCTYPE html>
- <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
- <head>
- <th:block th:include="include :: header('评论回复列表')" />
- </head>
- <body class="gray-bg">
- <div class="container-div">
- <input id="commentId" name="id" th:value="${id}" type="hidden">
- <div class="row">
- <div class="col-sm-12 select-table table-striped">
- <table id="bootstrap-tree-table" data-mobile-responsive="false"></table>
- </div>
- </div>
- </div>
-
- <th:block th:include="include :: footer" />
- <script th:inline="javascript">
- var passFlag = [[${@permission.hasPermi('dynamic:circle:comment:pass')}]];
- var failFlag = [[${@permission.hasPermi('dynamic:circle:comment:fail')}]];
- var reviewStatus = [[${@dict.getType('review_status')}]];
- var prefix = ctx + "dynamic/circle/comment";
- $(function() {
- var commentId = $("#commentId").val();
- var options = {
- code: "id",
- parentCode: "pid",
- uniqueId: "id",
- expandAll: false,
- expandFirst: false,
- url: prefix + "/replyList?commentId=" + commentId,
- modalName: "评论回复列表",
- height: $(window).height()-120,
- columns: [{
- field: 'id',
- visible: false,
- title: 'ID'
- },
- {
- field: 'momentsId',
- title: '动态ID'
- },
- {
- field: 'no',
- title: '回复人卿卿号'
- },
- {
- field: 'nick',
- title: '回复人昵称'
- },
- {
- field: 'content',
- title: '内容'
- },
- {
- field: 'state',
- title: '状态',
- align : 'center',
- formatter: function(value, row, index) {
- return $.table.selectDictLabel(reviewStatus, value);
- }
- },
- {
- field: 'adminName',
- title: '审核人'
- },
- {
- field: 'updateTime',
- title: '审核时间'
- },
- {
- field: 'createTime',
- title: '创建时间'
- },
- {
- title: '操作',
- align: 'center',
- formatter: function(value, row, index) {
- var actions = [];
- if(row.state == 0){
- 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>');
- actions.push(' ');
- actions.push(' ');
- 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>');
- }else if(row.state == 1){
- 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>');
- } else if(row.state == 2){
- 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>');
- }
- return actions.join('');
- }
- }]
- };
- $.treeTable.init(options);
- });
- function fail(id) {
- $.modal.confirm("确认要审核不通过该记录吗?", function() {
- $.operate.post(prefix + "/fail?ids=" +id);
- });
- }
- function pass(id) {
- $.modal.confirm("确认要审核通过该记录吗?", function() {
- $.operate.post(prefix + "/pass?ids=" +id);
- });
- }
- </script>
- </body>
- </html>
|