|
|
@@ -97,6 +97,8 @@
|
|
97
|
97
|
<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
|
|
98
|
98
|
</div>
|
|
99
|
99
|
</div>
|
|
|
100
|
+
|
|
|
101
|
+
|
|
100
|
102
|
<div class="toolBox">
|
|
101
|
103
|
<div class="th-bar clearfix">
|
|
102
|
104
|
<div class="pull-right">
|
|
|
@@ -124,14 +126,31 @@
|
|
124
|
126
|
|
|
125
|
127
|
<div class="pull-right">
|
|
126
|
128
|
<button class="btns search">搜索</button>
|
|
127
|
|
- <!--<a href="" class="btns export">导出</a>-->
|
|
|
129
|
+ <a href="" class="btns export">导出</a>
|
|
128
|
130
|
</div>
|
|
129
|
131
|
</div>
|
|
130
|
132
|
</div>
|
|
131
|
133
|
</div>
|
|
132
|
134
|
</div>
|
|
133
|
|
- <div class="th-content">
|
|
134
|
|
- <div id="main" style="width: 100%; height: 400px;"></div>
|
|
|
135
|
+ <ul class="nav nav-tabs hu-tab">
|
|
|
136
|
+ <li role="presentation" class="active">
|
|
|
137
|
+ <a href="javascript:;">图形</a>
|
|
|
138
|
+ </li>
|
|
|
139
|
+ <li role="presentation">
|
|
|
140
|
+ <a href="javascript:;">表格</a>
|
|
|
141
|
+ </li>
|
|
|
142
|
+
|
|
|
143
|
+ </ul>
|
|
|
144
|
+
|
|
|
145
|
+ <div class="hu-content">
|
|
|
146
|
+ <div class="hu-con-right">
|
|
|
147
|
+ <h2 style="text-align: center; margin-top: 20px;">客诉数量柱状图</h2>
|
|
|
148
|
+ <div id="main" style="width: 100%; height: 400px;"></div>
|
|
|
149
|
+ </div>
|
|
|
150
|
+ <div class="hu-con-left" style="width: 80%; margin: 0 auto;">
|
|
|
151
|
+ <h2 style="text-align: center; margin-top: 20px; display: none;">客诉数量统计</h2>
|
|
|
152
|
+ <table class="layui-hide" id="t_callTotal"></table>
|
|
|
153
|
+ </div>
|
|
135
|
154
|
</div>
|
|
136
|
155
|
<script src="../js/zTree/jquery.ztree.core.js"></script>
|
|
137
|
156
|
<script src="../js/layui/layui.js"></script>
|
|
|
@@ -182,7 +201,6 @@
|
|
182
|
201
|
onClick: changeTreeClick
|
|
183
|
202
|
}
|
|
184
|
203
|
}
|
|
185
|
|
-
|
|
186
|
204
|
function changeTreeClick(event, treeId, treeNode) {
|
|
187
|
205
|
|
|
188
|
206
|
chanId = treeNode.F_Id;
|
|
|
@@ -240,15 +258,9 @@
|
|
240
|
258
|
result = $.parseJSON(result);
|
|
241
|
259
|
|
|
242
|
260
|
var Count = result.data;
|
|
243
|
|
-
|
|
|
261
|
+ $('<option value="" selected="selected">全部</option>').appendTo($(".orderType2"))
|
|
244
|
262
|
$(Count).each(function(i, n) {
|
|
245
|
|
-
|
|
246
|
|
- if(n.F_DictionaryValueId == "468") {
|
|
247
|
|
- $('<option value="' + n.F_DictionaryValueId + '" selected="selected">' + n.F_Name + '</option>').appendTo($(".orderType2"));
|
|
248
|
|
- } else {
|
|
249
|
|
- $('<option value="' + n.F_DictionaryValueId + '">' + n.F_Name + '</option>').appendTo($(".orderType2"));
|
|
250
|
|
- }
|
|
251
|
|
-
|
|
|
263
|
+ $('<option value="' + n.F_DictionaryValueId + '">' + n.F_Name + '</option>').appendTo($(".orderType2"));
|
|
252
|
264
|
})
|
|
253
|
265
|
|
|
254
|
266
|
});
|
|
|
@@ -257,7 +269,115 @@
|
|
257
|
269
|
$(".search").click(function() {
|
|
258
|
270
|
partThree(); //获取表格数据
|
|
259
|
271
|
})
|
|
|
272
|
+ //导出
|
|
|
273
|
+ $('.export').click(function() {
|
|
|
274
|
+ stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
|
|
|
275
|
+ endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
|
|
|
276
|
+ dcexcel(this);
|
|
|
277
|
+ });
|
|
|
278
|
+ function dcexcel(obj) {
|
|
|
279
|
+ var url = huayi.config.callcenter_url + "Business/GetWorkMonthCountReport?isdc=1&token=" + token;
|
|
|
280
|
+ url += "&type=" + $('#orderType2').val()
|
|
|
281
|
+ + "&area=" + $('.inps2').attr("index")
|
|
|
282
|
+ + "&province=" + $('.inps3').attr("index")
|
|
|
283
|
+ + "&city=" + $('.inps4').attr("index");
|
|
|
284
|
+ obj.href = url;
|
|
|
285
|
+ }
|
|
|
286
|
+ //tab切换
|
|
|
287
|
+ $('.hu-tab li').click(function() {
|
|
|
288
|
+ $(this).addClass('active')
|
|
|
289
|
+ .siblings().removeClass('active');
|
|
|
290
|
+
|
|
|
291
|
+ tabIndex = $(this).index();
|
|
|
292
|
+ $('.hu-content >div').eq(tabIndex).show()
|
|
|
293
|
+ .siblings().hide();
|
|
|
294
|
+ loadDatas();
|
|
|
295
|
+ });
|
|
|
296
|
+ function loadDatas() {
|
|
|
297
|
+ if(tabIndex == 0) {
|
|
|
298
|
+ //tu(); //加载图形
|
|
|
299
|
+ } else if(tabIndex == 1) {
|
|
|
300
|
+ getDataList(); //加载表格
|
|
|
301
|
+ }
|
|
|
302
|
+ }
|
|
260
|
303
|
});
|
|
|
304
|
+ function getDataList() {
|
|
|
305
|
+ var colsArr = [];
|
|
|
306
|
+ var dataArr = [];
|
|
|
307
|
+ var loadindex;
|
|
|
308
|
+ $.ajax({
|
|
|
309
|
+ type: 'get',
|
|
|
310
|
+ url: huayi.config.callcenter_url + "Business/GetWorkMonthCountReport",
|
|
|
311
|
+ async: true,
|
|
|
312
|
+ dataType: 'json',
|
|
|
313
|
+ beforeSend: function() {
|
|
|
314
|
+ loadindex = layer.load()
|
|
|
315
|
+ },
|
|
|
316
|
+ data: {
|
|
|
317
|
+ sdate: stime,
|
|
|
318
|
+ edate: endtime,
|
|
|
319
|
+ dpt: $('#bumen').val(),
|
|
|
320
|
+ token: token,
|
|
|
321
|
+ },
|
|
|
322
|
+ success: function(data) {
|
|
|
323
|
+ if(data.state.toLowerCase() == "success") {
|
|
|
324
|
+ var res = data.data.list;
|
|
|
325
|
+ if(res && res.length > 0) {
|
|
|
326
|
+ dataArr = res;
|
|
|
327
|
+ var newArr = [];
|
|
|
328
|
+ var keys = [];
|
|
|
329
|
+ for (var property in res[0]){
|
|
|
330
|
+ keys.push(property);
|
|
|
331
|
+ }
|
|
|
332
|
+ newArr.push({
|
|
|
333
|
+ field: keys[0],
|
|
|
334
|
+ title: keys[0],
|
|
|
335
|
+ align: 'center',
|
|
|
336
|
+ fixed: true,
|
|
|
337
|
+ //sort: true,
|
|
|
338
|
+ width: 150,
|
|
|
339
|
+ });
|
|
|
340
|
+ for(var i = 1, colNL = keys.length; i < colNL; i++) {
|
|
|
341
|
+ newArr.push({
|
|
|
342
|
+ field: keys[i],
|
|
|
343
|
+ title: keys[i],
|
|
|
344
|
+ align: 'center',
|
|
|
345
|
+ //fixed: true,
|
|
|
346
|
+ //sort: true,
|
|
|
347
|
+ //width: 150,
|
|
|
348
|
+ });
|
|
|
349
|
+ }
|
|
|
350
|
+ colsArr.push(newArr);
|
|
|
351
|
+ layui.use('table', function() {
|
|
|
352
|
+ var table = layui.table;
|
|
|
353
|
+ //方法级渲染
|
|
|
354
|
+
|
|
|
355
|
+ table.render({
|
|
|
356
|
+ elem: '#t_callTotal',
|
|
|
357
|
+ skin: 'row', //line (行边框风格) row (列边框风格) nob (无边框风格)
|
|
|
358
|
+ even: true, //开启隔行背景
|
|
|
359
|
+ size: 'lg', //sm,lg尺寸的表格
|
|
|
360
|
+ cellMinWidth: 100,
|
|
|
361
|
+ page: true,
|
|
|
362
|
+ cols: colsArr,
|
|
|
363
|
+ data: dataArr,
|
|
|
364
|
+ height: 'full-150',
|
|
|
365
|
+ limitName: 'pageSize', //每页数据量的参数名,默认:limit
|
|
|
366
|
+ response: {
|
|
|
367
|
+ pageSize: 20, //数据状态的字段名称,默认:code
|
|
|
368
|
+ },
|
|
|
369
|
+ });
|
|
|
370
|
+
|
|
|
371
|
+ });
|
|
|
372
|
+
|
|
|
373
|
+ }
|
|
|
374
|
+ }
|
|
|
375
|
+ },
|
|
|
376
|
+ }).then(function() {
|
|
|
377
|
+ layer.close(loadindex);
|
|
|
378
|
+
|
|
|
379
|
+ });
|
|
|
380
|
+ }
|
|
261
|
381
|
partThree();
|
|
262
|
382
|
//pasrt 3
|
|
263
|
383
|
var main = echarts.init(document.getElementById('main'));
|
|
|
@@ -336,12 +456,12 @@
|
|
336
|
456
|
// var part3 = result.data.b;
|
|
337
|
457
|
main.setOption({
|
|
338
|
458
|
xAxis: {
|
|
339
|
|
- data: con.months
|
|
|
459
|
+ data: con.chartdata.months
|
|
340
|
460
|
},
|
|
341
|
461
|
series: [{
|
|
342
|
462
|
name: "客诉数量",
|
|
343
|
463
|
type: "bar",
|
|
344
|
|
- data: con.counts[0]
|
|
|
464
|
+ data: con.chartdata.counts
|
|
345
|
465
|
}]
|
|
346
|
466
|
})
|
|
347
|
467
|
|