cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>运维周报</title> 
[#include "/business/pages/include/static.html" /]
<script type="text/javascript">
 
    var statisType = 'week';
    $(function() {
        initSplineStyle();
        initOrderChart();
        initIncidentStateChart();
        initIncidentTypeChart();
    });
 
    //无数据显示
    function showNoData(containerId) {
        var strHrml = '<div id="noDailyReport" style="position:relative;width:100%;height:400px">';
        strHrml = strHrml + '<span class="nodata"></span>';
        strHrml = strHrml + '</div>';
        $('#'+containerId).html(strHrml);
    }
    
    //初始化类型图表
    function initIncidentTypeChart(){
        var selDate = '${RequestParameters.selDate}';
        var cusId = '${RequestParameters.cusId}';
        var param = {'selDate':selDate,'statisType':statisType,'cusId':cusId};
        $.post("${base}/uc/workReport/getIncidentTypeChart.html",param,function(data){
            if(data.nodata){
                showNoData('incident_type_container')
            }else{
                createIncidentTypeChart(data);
            }
        },'json');
    }
    
    function createIncidentTypeChart(data){
        $('#incident_type_container').highcharts({
            chart: {
                renderTo: 'container',
                type: 'pie'
                },
            title :{
                text:''
            },
            plotOptions: {
                pie: {
                    startAngle: -90,
                    endAngle:90,  
                    center: ['50%', '70%']
                }
            },
            tooltip: {
                valueSuffix:' ({point.percentage:.1f}%)'
            },
            series: [{
                name:'数量',
                data: data.seriesData
            }]
        });
    }
    
    //工单概况图表
    function initOrderChart(){
        var selDate = '${RequestParameters.selDate}';
        var cusId = '${RequestParameters.cusId}';
        var param = {'selDate':selDate,'statisType':statisType,'cusId':cusId};
        $.post("${base}/uc/workReport/getOrderSurveyChart.html",param,function(data){
            if(data.nodata){
                showNoData('order_container')
            }else{
                createOrderChart(data);
            }
            
        },'json');
    }
    
    function createOrderChart(data){
        $('#order_container').highcharts({
            chart: {
                type: 'column',
                height:400
            },
            xAxis: {
                categories: data.categories
            },
            legend: {
                floating:true,
                align: 'center',
                verticalAlign:'top',
                y:15,
                backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white',
                borderColor: '#CCC',
                borderWidth: 1,
                shadow: false
            },
            tooltip: {
                formatter: function() {
                    return '<b>'+ this.x +'</b><br>'+this.series.name +': '+ this.y ;
                }
            },
            plotOptions: {
                column: {
                    stacking: 'normal',
                    dataLabels: {
                        enabled: false,
                        color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white',
                        formatter: function() { //格式化标签名称                    
                            return this.y;               
                        }
                    },
                    pointWidth: 40
                }
            },
            series: data.series
        });
    }
    
    
    
    
    
    //初始化事件状态图表
    function initIncidentStateChart(){
        var selDate = '${RequestParameters.selDate}';
        var cusId = '${RequestParameters.cusId}';
        var param = {'selDate':selDate,'statisType':statisType,'cusId':cusId};
        $.post("${base}/uc/workReport/getIncidentStateChart.html",param,function(data){
            if(data.nodata){
                showNoData('incident_container')
            }else{
                createIncidentStateChart(data);
            }
            
        },'json');
    }
    
    function createIncidentStateChart(data){
        $('#incident_container').highcharts({
               chart: {
                type: 'pie',
                options3d: {
                    enabled: true,
                    alpha: 45,
                    beta: 0
                }
            },
            title: {
                text: ''
            },
            tooltip: {
                valueSuffix:' ({point.percentage:.1f}%)'
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    depth: 35,
                    dataLabels: {
                        enabled: true,
                        formatter: function() {
                          // return this.point.name +':'+ this.point.y;
                          return this.point.name;
                       }
                    },
                    showInLegend: true
                }
            },
            series: [{
                type: 'pie',
                name: '数量',
                data: data.seriesData,
                showInLegend:true
            }]
           });
    }
    
    
    
    
</script>
</head>
 
<body class="fullscreen">
    <div class="monitoring">
        <div class="edit_title">
          <h3>工单统计</h3>
        </div>
        <table class="monitor_flow" style="margin-top:0px;">
            <tr>
              <td style="width:55%;">
                <div class="dbserver_sga" id="order_container" style="height:400px;"></div>
              </td>
              <td style="width:42%;padding-left:10px;">
                <div class="dbserver_sga"  style="height:400px;">
                <table class="reportTable" style="width:auto;">
                [#if orderTableMap??]
                    [#if orderTableMap.labelList??&&orderTableMap.labelList?size>0]
                    <tr>
                        [#list orderTableMap.labelList as item]
                        <td  class="tdbg" style="width:7%">${item}</td>
                        [/#list]
                    </tr>
                    [/#if]
                    [#if orderTableMap.dataList??&&orderTableMap.dataList?size>0]
                        [#list orderTableMap.dataList as dataList]
                        <tr>
                            [#list dataList as item]
                            <td style="width:7%">${item}</td>
                            [/#list]
                        </tr>
                        [/#list]
                    [#else]
                        <tr>
                            <td colspan="${orderTableMap.labelList?size}">暂无数据</td>
                        </tr>
                    [/#if]
                    
                [/#if]
                </table>
                </div>
              </td>
            </tr>
        </table>
        
        
        
        <table class="monitor_flow" style="margin-top: 0px;">
            <tr>
              <td class="monitor_sysinfocon">
                  <div class="edit_title">
                  <h3>事件状态统计</h3>
                </div>
                <div class="dbserver_sga" id="incident_container" style="height: 400px;"></div>
              </td>
              <td>
                  <div class="edit_title">
                  <h3>事件类型</h3>
                </div>
                <div class="dbserver_sga" id="incident_type_container" style="height: 400px;"></div>
              </td>
            </tr>
        </table>
    </div>
</body>
 
</html>