双重预防项目-国泰新华二开定制版
SZH
2022-08-20 f9f0687195e0fe349185437d22c495d74c8d4a20
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('数据统计')"/>
    <style type='text/css'>
        .control-label {
            width: 22% !important;
            font-size: 25px;
            text-align: center;
            color: white;
            padding: 10px 0px;
            margin: 10px 2px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          border-radius: 6px;
        }
 
    </style>
 
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <label>公司名称:</label>
                            <input type="text" name="companyName"/>
                        </li>
 
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>
 
        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-warning" onclick="$.table.exportExcel()" >
                <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 prefix = ctx + "tr/dataStatistics";
 
    $(function () {
        var options = {
            url: prefix + "/list",
            exportUrl: prefix + "/export",
            pageSize: 50,
            modalName: "数据统计",
            columns: [
                {
                    field: 'companyId',
                    title: '公司ID',
                    align: "center",
                    visible: false
                },
                {
                    field: 'number',
                    title: '序号',
                    width: 5,
                    align: 'center',
                    switchable: false,
                    formatter: function (value, row, index) {
                        //通过表的#id 可以得到每页多少条
                        var pageSize = $('#bootstrap-table').bootstrapTable('getOptions').pageSize;
                        //通过表的#id 可以得到当前第几页
                        var pageNumber = $('#bootstrap-table').bootstrapTable('getOptions').pageNumber;
                        //返回每条的序号: 每页条数 * (当前页 - 1 )+ 序号
                        return pageSize * (pageNumber - 1) + index + 1;
                    }
                },
                {
                    field: 'companyName',
                    title: '公司名称',
                    align: "center"
                },
                {
                    field: 'companyRegion',
                    title: '公司区域',
                    align: "center"
                },
                {
                    field: 'companyIndustry',
                    title: '行业类别',
                    align: "center"
                },
                {
                    field: 'companySubIndustry',
                    title: '行业子分类',
                    align: "center"
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.modal.openNoConfirm(\'' + row.companyName + '四色图\',\'' + '/system/company/detailCompanyFourColorMap/' + row.companyId + '\')"><i class="fa fa-drivers-license"></i>四色图</a> ');
                        actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.modal.openNoConfirm(\'' + row.companyName + '柱状图\',\'' + '/system/company/detailPostSafetyRiskBarChartUrl/' + row.companyId + '\')"><i class="fa fa-bar-chart-o"></i>柱状图</a> ');
                        return actions.join('');
                    }
                }
            ]
        };
        $.table.init(options);
    });
</script>
</body>
</html>