2
13693261870
2022-09-16 653761a31dfeb50dd3d007e892d69c90bf0cdafc
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
/********************************************
 *             前台展示 - 资源中心            *
 *******************************************/
 
//------------------------------------------
//F1.页面初始化
//F2.访问排行
//F3.最新资源
//F4.我的收藏夹
//F5.资源使用情况
//F6.初始化热门搜索关键字
//F7.热门搜索
//F8.搜索功能
//F9.我的申请资源
//F10.推荐资源
//F11.图表
//F12.我的申请详情
//F13 换一批(0定向推送1资源推荐)
//------------------------------------------
 
//F1.页面初始化
$(function () {
    $('.txt').css('width', $('.img').width() + 'px');
    var width1 = ($('.YWJC_Img').width() - $('.img').width()) / 2;
    $('.txt').css('left', width1 + 'px');
    $('.noanimate').css('width', $('.img').width() + 'px');
 
    var width1 = ($('.YWJC_Img').width() - $('.img').width()) / 2;
    $('.noanimate').css('left', width1 + 'px');
 
    //F2.访问排行
    FangWenPaiHang();
 
    //F3.最新资源
    ZuiXinZiYuan();
 
    //F4.我的收藏夹
    WoDeShouCangJia();
 
    //F5.我的足迹
    // WoDeZuJi();
 
    //F6.初始化热门搜索关键字
    initHotSearch();
 
    //F9.我的申请资源
    WoDeShenQing();
 
    //F10.我的推荐资源
    TuiJianZiYuan(0, 0);
 
    //F11.图表
    initEchaerts();
 
    //F14 资源推荐
    ZiYuanRecommend(0, 0);
 
    getChartData();
 
});
 
//F2.访问排行
function FangWenPaiHang() {
    $.ajax({
        url: '/res/resActionRecord/selectFangWenPaiHang',
        type: 'get',
        success: function (data) {
            var html = "";
            var jsonb = data.result;
            if (jsonb.length < 5) {
                $("#fwph").css("height", "275px");
            }
            var len = jsonb.length > 5?5:jsonb.length;
            for (var i = 0; i < len; i++) {
                var tit = htmlEncodeByRegExp(jsonb[i].fulltitle);
                var num = i+1;
                if (i == 0) {
                    html += "<li>" +
                        "<a title='" + tit + "' onclick=\"OpenZiYuan('" + jsonb[i].resourceid + "')\">" +
                        " <img src=\"/image/ZiYuanZhongXin/New/num1.png\" />&nbsp;&nbsp;" +
                        "<span>" + tit + "</span>" +
                        "</a>" +
                        "</li>";
                    continue;
                }
                if (i == 1) {
                    html += "<li>" +
                        "<a title='" + tit + "' onclick=\"OpenZiYuan('" + jsonb[i].resourceid + "')\">" +
                        "<img src=\"/image/ZiYuanZhongXin/New/num2.png\" />&nbsp;&nbsp;" +
                        "<span>" + jsonb[i].fulltitle + "</span>" +
                        "</a>" +
                        "</li>";
                    continue;
                }
                if (i == 2) {
                    html += "<li>" +
                        "<a title='" + tit + "' onclick=\"OpenZiYuan('" + jsonb[i].resourceid + "')\">" +
                        "<img src=\"/image/ZiYuanZhongXin/New/num3.png\" />&nbsp;&nbsp;" +
                        "<span>" + jsonb[i].fulltitle + "</span>" +
                        "</a>" +
                        "</li>";
                    continue;
                }
                else {
                    html += "<li>" +
                        "<a title='" + tit + "' onclick=\"OpenZiYuan('" + jsonb[i].resourceid + "')\">" +
                        "<span style='color: grey;display: inline-block;width: 41px;height: 17px;line-height: 17px;text-align: center;font-size: 16px;'>" + num + "</span>" +
                        "<span>&nbsp;&nbsp;" + jsonb[i].fulltitle + "</span>" +
                        "</a>" +
                        "</li>";
                }
            }
 
            $("#fwph").append(html);
        },
        error: function (e) {
          //  alert(e.message);
        }
    });
}
 
//F3.最新资源
function ZuiXinZiYuan() {
    $.ajax({
        url: '/res/ZiYuan/getAllOrderByTime',
        type: 'get',
        success: function (data) {
            var html = "";
            var jsonb = data.result;
            var today = new Date();
            var year = today.getFullYear() + "-";
            var month = today.getMonth() + 1;
            if (month < 10) {
                month = "0" + month;
            }
            var day = today.getDate();
            if (day < 10) {
                day = "0" + day;
            }
            var newday = year + month + "-" + day;
            if (jsonb.length < 5) {
                $("#zxzy").css("height", "275px");
            }
            var len = jsonb.length > 5?5:jsonb.length;
            for (var i = 0; i < len; i++) {
                var tit = htmlEncodeByRegExp(jsonb[i].fulltitle);
                html += "<li>" +
                    "<div>" +
                    "<a title='" + tit + "' onclick=\"OpenZiYuan('" + jsonb[i].resourceid + "')\">" + tit + "</a>" +
                    " <span style=\"color: #868686;float: right;\">" + jsonb[i].pubdate + "</span>" +
                    "</div>" +
                    "</li>";
            }
            $("#zxzy").append(html);
        },
        error: function (e) {
            //alert(e.message);
        }
    });
}
 
//F4.我的收藏夹
function WoDeShouCangJia() {
    $.ajax({
        // url: '/res/ditufuwu/getTopListWDSCJ',
        url: '/res/resActionRecord/selectByActiontype',
        type: 'post',
        dataType: 'json',
        data: {'actiontype': '收藏'},
        success: function (data) {
            var html = "";
            // var jsona = eval('(' + data + ')');
            var jsona = data.result;
            if (jsona.length < 5) {
                $(".mtree").css("height", "275px");
            }
            var len = jsona.length > 5?5:jsona.length;
            for (var i = 0; i < len; i++) {
                var tit = htmlEncodeByRegExp(jsona[i].fulltitle);
                html += "<li>" +
                    // "<a title=\"" + jsona[i].fulltitle + "\" style=\"vertical-align: middle;\" href=\"#\"></a>" +
                    "<a title=\"" + tit + "\" style=\"font-size: 13px;cursor: pointer;\" onclick=\"OpenZiYuan('" + jsona[i].resourceid + "')\" >" +
                    "<img style=\"padding-right: 5px; vertical-align: text-bottom;\" src=\"/image/ZiYuanZhongXin/New/shoucangicon.png\" />" + tit +
                    "</a>" +
                    " </li>";
            }
            $(".mtree").append(html);
 
        },
        error: function (e) {
            //alert(e.message);
        }
    });
}
 
//F5.我的足迹
function WoDeZuJi() {
    $.ajax({
        url: '/res/resActionRecord/selectByActiontype',
        type: 'post',
        dataType: 'json',
        data: {'actiontype': '浏览'},
        success: function (result) {
            var html = "";
            // var json = eval('(' + result + ')');
            var json = result.result;
            for (var i = 0; i < json.length; i++) {
                if (json.length - 1 != i) {
                    html += "<li>" +
                        "<a title=\"" + json[i].title + "\" style=\"vertical-align: middle;\" href=\"#\"></a>" +
                        "<a title=\"" + json[i].title + "\" style=\"color: rgb(250, 62, 69); cursor: pointer;\" onclick=\"OpenZiYuan('" + json[i].resourceid + "')\">" + json[i].title +
                        "</a>" +
                        "&nbsp;&nbsp;<span style=\"padding-right: 2px; font-size: 12px; float: right;\">" + json[i].finaltime + "</span>" +
                        "</li>";
                }
                if (json.length - 1 == i) {
                    html += "<li style='border-bottom: none !important;'>" +
                        "<a title=\"" + json[i].title + "\" style=\"vertical-align: middle;\" href=\"#\"></a>" +
                        "<a title=\"" + json[i].title + "\" style=\"color: rgb(250, 62, 69); cursor: pointer;\" onclick=\"OpenZiYuan('" + json[i].resourceid + "')\">" + json[i].title +
                        "</a>" +
                        "&nbsp;&nbsp;<span style=\"padding-right: 2px; font-size: 12px; float: right;\">" + json[i].finaltime + "</span>" +
                        "</li>";
                }
            }
            $(".zuji").append(html);
        },
        error: function (e) {
            //alert(e.message);
        }
    });
}
 
//F6.初始化热门搜索关键字
function initHotSearch() {
    $.ajax({
        url: '/res/getTopHotSearch',
        type: 'get',
        success: function (data) {
            if (data != "") {
                var list = data.result;
                var html = "<li>热门搜索:</li>";
 
                var num = 0;
                for (var i = 0; i < list.length; i++) {
                    // num += list[i].keyword.replace(/[^\x00-\xff]/g, 'xx').length;
                    // num += list[i].keyword.length;
                    // if(num > 50) break;
                    html += "<li onclick='HotSearch(this)' title='" + list[i].keyword + "' >" + list[i].keyword + "</li>";
                }
                // $("#ReMenSouSuoBox").css("width",window.innerWidth);
                $("#ReMenSouSuoBox ul").append(html);
            }
        },
        error: function (e) {
            //alert(e.message);
        }
    });
}
 
//F7.热门搜索
function HotSearch(e) {
    var keyword = $(e).attr("title");
    window.open("/res/ziyuanmulu/index?Menu=ZYZX&menuId=08&Message=" + encodeURIComponent(keyword), "_black");
}
 
//F8.搜索功能
function Search() {
    var key = document.getElementById("guanjianziSeach").value;
    // if (key != "") {
        $.ajax({
            url: 'Search',//TuiJianZiYuan
            type: 'post',
            data: {"key": key},
            success: function (data) {
            }
        });
        window.open("/res/ziyuanmulu/index?Menu=ZYZX&menuId=08&Message=" + encodeURIComponent(key), "_black");
    // }
}
 
//F9.我的申请资源
function WoDeShenQing() {
    $.ajax({
        url: '/res/resApplyRecommend/shenQingZiYuan',
        type: 'get',
        success: function (sqzy) {
            var html = "";
            var jsonzy = sqzy.result;
            if (jsonzy.length < 7) {
                $("#sqzy").css("height", "371px");
            }
            var len = jsonzy.length > 7?7:jsonzy.length;
            for (var i = 0; i < len; i++) {
                if (jsonzy.length == 0) {
                    break;
                }
                // if (9 != i) {
                var tit = htmlEncodeByRegExp(jsonzy[i].fulltitle);
                html += "<div class=\"sqzy\">";
                if (jsonzy[i].auditresult == "0") {
                    html += "<a title='" + tit + "' style=\"color: black; cursor: pointer;transition: 0.3s;\" onclick=\"OpenZiYuan('" + jsonzy[i].resourceid + "')\">" +
                        "<img class='fimg' src=\"/image/ZiYuanZhongXin/New/wodeshenqing_icon.png\" />" + tit + " </a>" +
                        " <img onclick='showApplyInfo(" + jsonzy[i].appid + ")' class='limg' src=\"/image/ZiYuanZhongXin/New/weipifu.png\" />";
                } else if (jsonzy[i].auditresult == "1") {
                    html += "<a title='" + tit + "' style=\"color: black; cursor: pointer;transition: 0.3s;\" onclick=\"OpenZiYuan('" + jsonzy[i].resourceid + "')\">" +
                        "<img class='fimg' src=\"/image/ZiYuanZhongXin/New/wodeshenqing_icon.png\" />" + tit + " </a>" +
                        " <img class='limg' onclick='showApplyInfo(" + jsonzy[i].appid + ")' src=\"/image/ZiYuanZhongXin/New/yitongguo.png\" />";
                } else if (jsonzy[i].auditresult == "2") {
                    html += "<a title='" + tit + "' style=\"color: black; cursor: pointer;transition: 0.3s;\" onclick=\"OpenZiYuan('" + jsonzy[i].resourceid + "')\">" +
                        "<img class='fimg' src=\"/image/ZiYuanZhongXin/New/wodeshenqing_icon.png\" />" + tit + " </a>" +
                        " <img class='limg' onclick='showApplyInfo(" + jsonzy[i].appid + ")' src=\"/image/ZiYuanZhongXin/New/weitongguo.png\" />";
                } else if (jsonzy[i].auditresult == "null" || jsonzy[i].auditresult == null) {
                    html += "<a title='" + tit + "' style=\"color: black; cursor: pointer;\" onclick=\"OpenZiYuan('" + jsonzy[i].resourceid + "')\">" +
                        "<img class='fimg' src=\"/image/ZiYuanZhongXin/New/wodeshenqing_icon.png\" />" + tit + " </a>" +
                        " <img class='limg' onclick='showApplyInfo(+jsonzy[i].appid+)' src=\"/image/ZiYuanZhongXin/New/weipifu.png\" />";
                }
                html += "</div>";
            }
            $("#sqzy").append(html);
        },
        error: function (e) {
           // alert(e.message);
        }
    });
}
 
//F10.我的推荐资源(0默认1换一批,)
function TuiJianZiYuan(type, num) {
    var url = (type == 0 ? '/res/ZiYuan/getTopRecommend?isDiTuFuwu=false' : ('/res/ditufuwu/getTuiJianZiYuanByIndex?isDiTuFuwu=false&limit=5&page=' + num));
    $.ajax({
        url: url,
        type: 'get',
        success: function (data) {
            var html = "";
            // var r = decodeURIComponent(data);
            var jsonb = data.result;
            // if (jsonb.length < 3) {
            //     $("#divtuijianziyuan").css("height", "398.5px");
            // }
            for (var i = 0; i < (jsonb.length > 5 ? 5 : jsonb.length); i++) {
                var description = decodeURIComponent(jsonb[i].description);
                var fulldescription = decodeURIComponent(jsonb[i].fulldescription);
                html += "<li class=\"YWJC_Img\" style=\"margin: 10.5px 0px 10.5px 0px !important;\" onclick=\"OpenZiYuan('" + jsonb[i].resourceid + "')\">"
                    + "<div style=\"margin: 0px auto; text-align: center;\">";
                html += "<img class=\"img\" src=\"" + jsonb[i].imgurl + "\" />";
                html += "<div class=\"txt\" style=\"float:left;margin-left: 2px;width: 96%; height: 25px; overflow: hidden; cursor: pointer;\">"
                    + "<h3 style=\"padding-top: 0px;\">" + jsonb[i].title + "</h3>"
                    + "<p title='" + fulldescription + "' style=\"text-align: left; padding-right: 10px; padding-left: 10px;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + description + "</p>"
                    + "</div>"
                    + "</div>"
                    + "</li>";
            }
 
            $("#tjzy").html(html);
 
            $(".lanren ul li").hover(function () {
                $(this).find(".txt").stop().animate({height: "100px"}, 400);
                $(this).find(".txt h3").stop().animate({marginTop: "10px"}, 400);
            }, function () {
                $(this).find(".txt").stop().animate({height: "25px"}, 400);
                $(this).find(".txt h3").stop().animate({marginTop: "0"}, 400);
            });
        },
        error: function (e) {
           // alert(e.message);
        }
    });
}
 
//F11.图表
function initEchaerts() {
    var divzylx = document.getElementById("zylx");
    var divzyly = document.getElementById("zyly");
    var divzyml = document.getElementById("zyml");
    var divshzt = document.getElementById("shzt");
    var divgxxy = document.getElementById("gxxy");
 
    var zylx = echarts.init(divzylx);
    var zyly = echarts.init(divzyly);
    var zyml = echarts.init(divzyml);
    var shzt = echarts.init(divshzt);
    var gxxy = echarts.init(divgxxy);
 
    var zylxoption = {
        title: {
            text: '资源类型统计',
            x: 'left',
            textStyle:{
                color:'#4777FF',
                fontSize:20,
                fontWeight:600
            }
        },
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        color: ['#00afff', '#ff5654', '#fec100', '#9fff92', '#56dc2b'],
        series: [
            {
                name: '资源类型',
                type: 'pie',
                center:['50%','60%'],
                radius : ['50%', '40%'],
                itemStyle : {
                    normal : {
                        label : {
                            show : true,
                            textStyle:{
                                // color:'#bfbfbf',
                                fontSize:14
                            }
                        }
                    }
                },
                data: resourceclassSeries
            }
        ]
    };
    zylx.setOption(zylxoption);
    var zylyoption = {
        title: {
            show:false,
            text: '资源来源排行',
            x: 'left',
            textStyle:{
                color:'#4777FF',
                fontSize:20,
                fontWeight:600
            }
        },
        grid:{
            y:30,
            x:100,
            width:'65%',
            height:'77%',
        },
        color:['#008aff'],
        tooltip: {
            trigger: 'axis'
        },
        xAxis: [
            {
                type: 'value',
                splitLine: {
                    show: true
                },
                axisLabel:{
                    textStyle: {
                        fontSize: 14,
                        color:'#bfbfbf'
                    },
                },
                axisLine: {
                    lineStyle: {
                        color: '#bfbfbf'
                    }
                },
            }
        ],
        yAxis : [
            {
                type : 'category',
                data : DataSourceLegends,
                splitLine: {
                    show: false
                },
                axisLabel:{
                    textStyle: {
                        fontSize: 14,
                        color:'#bfbfbf'
                    },
                },
                axisLine: {
                    lineStyle: {
                        color: '#bfbfbf'
                    }
                },
            }
        ],
        series: [
            {
                name: '资源数量',
                type: 'bar',
                barWidth:18,
                data: DataSourceSeries,
            }
        ]
    };
    zyly.setOption(zylyoption);
    var zymloption = {
        tooltip: {
            trigger: 'axis'
        },
        grid: {
            y:30,
            x:70,
            x2:40,
            borderWidth: 0,
            height:'77%',
        },
        calculable: false,
        xAxis: [
            {
                type: 'category',
                // axisLabel: {
                //     interval: 0,
                //     rotate: 40
                // },
                axisLine: {
                    lineStyle: {
                        color: '#bfbfbf'
                    }
                },
                boundaryGap: false,
                data: MuLuLegends,
                splitLine: {
                    show: true,
                    lineStyle: {
                        color: 'rgba(205,223,255,0.9)' //分隔线的颜色
                    }
                },
                axisLabel:{
                    textStyle: {
                        fontSize: 14,
                        color:'#bfbfbf'
                    },
                }
            }
        ],
        yAxis: [
            {
                type: 'value',
                axisLabel: {
                    formatter: '{value}'
                },
                axisLine: {
                    lineStyle: {
                        color: '#bfbfbf'
                    }
                },
                splitLine: {
                    show: true,
                    lineStyle: {
                        color: 'rgba(205,223,255,0.9)' //分隔线的颜色
                    }
                },
                axisLabel:{
                    textStyle: {
                        fontSize: 14,
                        color:'#bfbfbf'
                    },
                }
            }
        ],
        series: [
            {
                name: '资源数量',
                type: 'line',
                data: MuLuSeries,
                symbol:'circle',
                symbolSize: 4,   //拐点大小
                smooth: true,    //线条光滑
                itemStyle: {
                    normal: {
                        lineStyle: {
                            color: '#0079ff',
                            width:2
                        },
                        label: {
                            show: true,
                            textStyle: {
                                fontSize: 14,
                                color: '#000000'
                            },
                        },
                        color: '#FFFFFF',        //legend的颜色,也是拐点圆圈的填充颜色
                        borderColor: '#0079ff',  //拐点圆圈边框的颜色
                        borderWidth:2            //拐点圆圈边框的宽度
                    }
                },
            },
        ]
    };
    zyml.setOption(zymloption);
 
    var gxxyoption = {
        title: {
            text: '共享协议',
            x: 'left',
            textStyle:{
                color:'#4777FF',
                fontSize:20,
                fontWeight:600
            }
        },
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        color: ['#00afff', '#ff5654', '#fec100', '#9fff92', '#56dc2b'],
        series: [
            {
                name: '共享协议',
                type: 'pie',
                center:['50%','60%'],
                radius : ['50%', '40%'],
                itemStyle : {
                    normal : {
                        label : {
                            show : true,
                            textStyle:{
                                fontSize:14
                            }
                        }
                    }
                },
                data: sharprotocolSeries[0].seriesData
            }
        ]
    };
    gxxy.setOption(gxxyoption);
   $('#zylyHide').hide()
}
 
//F12.我的申请详情
function showApplyInfo(appid) {
    var url = "/res/resApplyRecommend/applyRecommendInfo?appid=" + appid;
    // winPro.openFullwin(url, "查看资源申请", "yes");
    openFullWindow(url, "查看资源申请");
}
 
//F13 换一批(0定向推送1资源推荐)
var indexp = 2;
var indexr = 2;
 
function ChangeNext(type) {
    var totalIndex = 0;
    if (type == 0) {
        totalIndex = (totalpNum % 3) > 0 ? (totalpNum / 3) + 1 : (totalpNum / 3);
        if (indexp > totalIndex) {
            indexp = 1;
        }
        TuiJianZiYuan(1, indexp);
        indexp++;
    } else {
        totalIndex = (totalrNum % 3) > 0 ? (totalrNum / 3) + 1 : (totalrNum / 3);
        if (indexr > totalIndex) {
            indexr = 1;
        }
        ZiYuanRecommend(1, indexr);
        indexr++;
    }
 
}
 
//F14 资源推荐
function ZiYuanRecommend(type, num) {
    var url = (type == 0 ? '/res/ditufuwu/getMainInfoRecommends?isDiTuFuwu=false&limit=6&page=1' : ('/res/ditufuwu/getMainInfoRecommends?isDiTuFuwu=false&limit=6&page=' + num));
    $.ajax({
        url: url,
        type: 'get',
        success: function (data) {
            var html = "";
            var jsonb = data.result;
            for (var i = 0; i < (jsonb.length > 6 ? 6 : jsonb.length); i++) {
                var description = decodeURIComponent(jsonb[i].description);
                var fulldescription = decodeURIComponent(jsonb[i].fulldescription);
                var tit = htmlEncodeByRegExp(jsonb[i].title);
 
                html += "<li>";
                html += "<a title='" + tit + "' style=\"color: black;\" onclick=\"OpenZiYuan('" + jsonb[i].resourceid + "')\">"
                html += getTypeName(jsonb[i].resourceclass);
                html += tit+"</a>";
                html += "</li>";
            }
            $("#rrzy").html(html);
        },
        error: function (e) {
         //   alert(e.message);
        }
    });
}
 
function getTypeName(name) {
    var typeName = "";
    var html = "";
    if(name == "JKFW") {
        typeName = "接口";
        html = "<span class='label label-danger'>接口</span>";
    }
    if(name == "SJWJ") {
        typeName = "数据";
        html = "<span class='label label-default'>文件</span>"
    }
    if(name == "SJKB") {
        typeName = "库表";
        html = "<span class='label label-primary'>库表</span>"
    }
    if(name == "YWJC") {
        typeName = "集成";
        html = "<span class='label label-info'>集成</span>"
    }
    if(name == "KJ_JCDT") {
        typeName = "地图";
        html = "<span class='label label-success'>底图</span>"
    }
    if(name == "KJ_ZTDT") {
        typeName = "专题";
        html = "<span class='label label-pink'>专题</span>"
    }
    if(name == "KJ_KJFX") {
        typeName = "空间";
        html = "<span class='label label-warning'>空间</span>"
    }
    if(name == "KJ_SWFW") {
        typeName = "三维";
        html = "<span class='label label-primary'>三维</span>"
    }
    if(name == "KJ_YWTC") {
        typeName = "业务";
        html = "<span class='label label-danger'>业务</span>"
    }
 
    return html;
}
 
 
//获取统计图数据 -- 公共方法(异步调用)
function getChartData() {
    var chartData = null;
    $.ajax({
        url: '/res/ziyuanmulu/getChart?flag=sjtj',
        data: '',
        type: 'get',
        success: function(data) {
            chartData = eval('(' + data + ')');
            createShiJianTongJiChart(chartData);
        },
        error: function(e) {
           // alert(e.message);
        }
    });
}
 
//时间统计统计图
function createShiJianTongJiChart(chartData) {
    var Time = document.getElementById("div_Time");
    var TimeChart = echarts.init(Time);
    var strSeries = "";
    var key = "";
    for (var i = 0; i < chartData.Legend.length; i++) {
        var name = chartData.Legend[i].name;
        var key = chartData.Legend[i].key;
        if (strSeries != "") {
            strSeries += ",";
        }
        strSeries += "{name: '" + name + "',type: 'line',smooth: true,data: [" + eval("chartData.Series." + key) + "],markPoint: {data: [{type: 'max', name: '最大值'}],itemStyle:{normal:{label:{textStyle:{fontWeight:600}}}}}}";
    }
    var Series = eval("([" + strSeries + "])")
 
    //构造 Option
    var option = {
        tooltip: {
            trigger: 'axis'
        },
        color: [
            '#FFC200', '#FF3A3A', '#E52F70', '#982CD5', '#5768F0', '#0066FF', '#25AE6A', '#1E7532', '#FFF000',
            '#CA6821', '#D04311', '#BBA767'
        ],
        legend: {
            top: 10,
            right: 50,
            textStyle: {
                fontSize: 14
            },
            data: chartData.Legend
        },
        calculable: true,
        grid: {
            // top: 80,
            right: 60,
            // bottom: 50,
            left: 60,
            height:'64%'
        },
        xAxis: [
            {
                type: 'category',
                boundaryGap: false,
                data: chartData.xAxis,
                axisLabel:{
                    textStyle: {
                        fontSize: 14,
                        color:'#bfbfbf'
                    },
                }
            }
        ],
        yAxis: [
            {
                type: 'value',
                axisLine: {
                    color: '#78B9EF',
                    opacity: 0.5,
                },
                axisLabel:{
                    textStyle: {
                        fontSize: 14,
                        color:'#bfbfbf'
                    },
                }
            }
        ],
        series: Series
    };
 
    TimeChart.setOption(option);
}