多单位版国产化地质资料管理系统
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
 
<!DOCTYPE HTML>
<html>
<head>
    <base href="<%=basePath%>">
 
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>地质资料利用情况</title>
    <link href="static/plugins/font-awesome/css/font-awesome.css"
          rel="stylesheet" type="text/css">
    <link href="static/plugins/jquery-easyui/themes/bootstrap/easyui.css"
          rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="static/styles/initialize.css"
          type="text/css">
    <link rel="stylesheet" href="static/styles/common.css" type="text/css">
    <link rel="stylesheet" href="static/styles/archives.css" type="text/css">
    <script type="text/javascript" src="static/plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript"
            src="static/plugins/jquery-easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript"
            src="static/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
    <script src="static/plugins/echarts/echarts.min.js"></script>
    <script type="text/javascript" src="static/plugins/jquery-easyui/plugins/datagrid-cellediting.js"></script>
    <script type="text/javascript" src="static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
 
    <!-- wcp组件 -->
    <script type="text/javascript" src="static/wcp/scripts/wcp.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.layer.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.blockUI.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.spin.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.jquery.js"></script>
    <style>
        html, body {
            height: 100%;
        }
 
        .table_statistical {
            width: 100%;
            height: 100%;
            border: 0;
        }
 
        .table_statistical tr td {
            width: 50%;
            height: 100%;
        }
 
        .table_statistical_div {
            width: 100%;
            height: 100%;
            padding-top: 3%;
        }
    </style>
</head>
 
<body class="pt-tree">
<div class="archives_statistics">
    <h3 class="statistics_title">
        【地质资料利用情况】
    </h3>
    <div class="option_row clear">
        <span class="option_col1">统计数据过滤查询</span>
        <ul class="clear">
 
            <li>年度: <input class="easyui-textbox" id="deptName"
                             style="width:150px; height: 24px;"/>
            </li>
            <%--            <li>起止汇交时间:--%>
            <%--                <input class="easyui-datebox" id="startDate" style="width:150px;height:24px"/>--%>
            <%--                ---%>
            <%--                <input class="easyui-datebox" id="endDate" style="width:150px;height:24px"/>--%>
            <%--            </li>--%>
            <li class="statistics_btn_row" style="display: flex;align-items:center;height:24px">
                <button class="pt-btn pt-btn-purple" onclick="startStatistics()"><i class="fa fa-bar-chart"></i>开始统计
                </button>
            </li>
 
        </ul>
    </div>
</div>
 
<div class="statistics_txt">
    <div class="title">统计结果</div>
    <div class="statistics_scroll" style="padding:0">
        <div id="tab_statistical" class="fulltext_row2" style="width: 100%;height:100%;">
            <div id="pie_statisticals" style="width: 100%;height:100%;overflow: hidden;"></div>
<%--            <iframe name="statisticsIframe" id="statisticsIframe" width="100%" frameborder="no" border="0"--%>
<%--                    marginwidth="0" marginheight="0" allowtransparency="yes"></iframe>--%>
        </div>
    </div>
</div>
<script type="text/javascript" src="static/scripts/ResizeScroll.js"></script>
<script>
 
 
    $(function () {
        new ResizeScroll({
            "id": ".statistics_scroll",
            fun: function () {
                var wh = $(window).height();
                //重新计算iframe高度
                $("#statisticsIframe").height(wh - 60 - 160);
                return (wh - 60 - 124);
            }
        });
        utilizationStatistics();
    })
 
    function utilizationStatistics() {
        var myChart = echarts.init(document.getElementById('pie_statisticals'));
        var colors = ['#87CEFA', '#945b6c', '#00FFFF', '#FFA500'];
        option = {
            title: {
                text: '借阅统计',
                left: 'center',
                textStyle: {
                    color: '#0c0c0c'
                }
            },
            tooltip: {
                trigger: 'item',
                formatter: '{a} <br/>{b}: {c} ({d}%)'
            },
            legend: {
                orient: 'vertical',
                left: 'left',
                data: ['非密', '内部', '秘密', '机密'],
                textStyle: {
                    color: '#0e0e0e'
                }
            },
            series: [
                {
                    name: '纸质借阅',
                    type: 'pie',
                    radius: ['0%', '40%'],  // 内半径和外半径
                    center: ['50%', '50%'],  // 圆心位置
                    data: [],
                    color: colors,
                    label: {
                        color: '#2d2424'
                    }
                },
                {
                    name: '电子借阅',
                    type: 'pie',
                    radius: ['50%', '70%'],  // 内半径和外半径
                    center: ['50%', '50%'],  // 圆心位置
                    data: [],
                    color: colors,
                    label: {
                        color: '#100f0f'
                    }
                }
            ]
        };
 
        myChart.showLoading(); //loading动画
 
        $.ajax({
            type: "post",
            async: true,
            url: "screen/getBorrowEchartsPie",
            dataType: "json",
            success: function (result) {
                if (result) {
                    myChart.hideLoading();
                    // 假设返回的数据包含纸质借阅和电子借阅两组数据
                    myChart.setOption({
                        series: [
                            { data: result.paperData || [] },  // 纸质借阅数据
                            { data: result.electronicData || [] }  // 电子借阅数据
                        ]
                    });
                }
            },
            error: function (errorMsg) {
                //请求失败时执行该函数
                alert("请求数据失败!");
                myChart.hideLoading();
            }
        });
 
        myChart.setOption(option);
 
 
        <%--var reportFile = "borrow_approval_hn.ureport%202.xml";--%>
        <%--var path = "<%=path%>";--%>
        <%--var url = path + "/ureport/preview?_u=file:" + reportFile ;--%>
        <%--$('#statisticsIframe').attr('src', url); //注:不能用window.open方式打开,否则放大缩小会被清空--%>
    }
 
</script>
</body>
</html>