result_publicity.html 3.33 KB
<!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">
            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-warning" onclick="exportExcel()" shiro:hasPermission="business:task:export">
                    <i class="fa fa-download"></i> 导出excel
                </a>
                <a class="btn btn-warning" onclick="exportWord()" shiro:hasPermission="business:task:export">
                    <i class="fa fa-download"></i> 导出报告
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var nameTypeDatas = [[${@dict.getType('eit_red_list_type')}]];

        var prefix = ctx + "business/task";

        var taskIdValue = [[${taskId}]];

        $(function() {
            var options = {
                url: prefix + "/publicity/result/list/" + taskIdValue,
                exportUrl: prefix + "/export",
                pageSize: 100,
                modalName: "双公示信息报送情况",
                columns: [{
                    checkbox: false
                },
                {
                    field: 'deptName',
                    title: '单位名称'
                },
                {
                    field: 'reportNum',
                    title: '数据总量'
                },
                {
                    field: 'wrongNum',
                    title: '不合规数据数'
                },
                {
                    field: 'wrongRation',
                    title: '不合规率'
                },
                {
                    field: 'lateNum',
                    title: '迟报数据数'
                },
                {
                    field: 'lateRation',
                    title: '迟报率'
                },
                {
                    field: 'fakeNum',
                    title: '瞒报数据数',
                    visible: false
                },
                {
                    field: 'fakeRation',
                    title: '瞒报率',
                    visible: false
                }]
            };
            $.table.init(options);
        });

        function exportExcel() {
            window.location.href = ctx + "business/task/publicity/export/" + taskIdValue;
        }

        function exportWord() {
            $.operate.get(ctx + "business/task/publicity/word/" + taskIdValue, function (result) {
                if (result.code == web_status.SUCCESS) {
                    var ossKey = result.data;
                    if (ossKey) {
                        window.location.href = ctx + "business/common/oss/download?ossKey=" + encodeURI(ossKey);
                    } else {
                        $.modal.alertError("暂未生成报告");
                    }
                    ///window.open(result.data);
                } else {
                    $.modal.alertError(result.msg);
                }
            })
        }
    </script>
</body>
</html>