赣州市洪水风险预警系统三维版本
guoshilong
2023-02-27 4d8c6dd77427e8e581fda17b6b65ba86bfb7a815
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
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
///////////////////////////////////////////////////////////////////////////
// Copyright © 2019 zhongsong. All Rights Reserved.
// 模块描述:水文要素
///////////////////////////////////////////////////////////////////////////
define(['dojo/_base/declare', 'dojo/_base/lang', 'dojo/_base/array', 'dojo/_base/html', 'dojo/topic', 'jimu/BaseWidget'], function (declare, lang, array, html, topic, BaseWidget) {
    return declare([BaseWidget], {
        baseClass: 'jimu-widget-Hydrology',
        name: 'Hydrology',
        // 保存鼠标点击事件
        hydroHandler3D: null,
        dataListEntity: [],
        flag: true,
        flagyl: false,
        flagsw: false,
        flagll: false,
        flagdxs: false,
        flagzf: false,
        flagsq: false,
        flagswen: false,
        flagaw: false,
        flagsz: false,
        flagns: false,
        hydroWellTabel: { lgtd: [], lttd: [], tabletm: [], tablename: [], tabledata: [], num: null, str: [], comparisonValue: [] },
        hydrofaultTabel: { lgtd: [], lttd: [], tabletm: [], tablename: [], tabledata: [], num: null, str: [], comparisonValue: [] },
        hydroQueryTabel: { lgtd: [], lttd: [], tabletm: [], tablename: [], tabledata: [], num: null, str: [], comparisonValue: [] },
        startup: function startup() {
            // this.inherited(arguments);
            // 暴露在外的接口
            topic.subscribe("closehydrology", lang.hitch(this, this.closeHydro));
            var that = this;
            // 注册点击事件
            $(".jimu-widget-Hydrology .hydro-list-mean li a").click(function () {
                that.hydroWellTabel = { lgtd: [], lttd: [], tabletm: [], tablename: [], tabledata: [], num: null, str: [], comparisonValue: [] };
                that.hydrofaultTabel = { lgtd: [], lttd: [], tabletm: [], tablename: [], tabledata: [], num: null, str: [], comparisonValue: [] };
                that.hydroQueryTabel = { lgtd: [], lttd: [], tabletm: [], tablename: [], tabledata: [], num: null, str: [], comparisonValue: [] };
                // 存放表格数据
                that.flag = true;
                var tableObj = { tableTM: [], tableName: [], tableData: [], lgtd: [], lttd: [], num: null, comparisonValue: [] };
                // 检测当前点击的A标签是否已经拥有类名ON,如已经如有,则删除地图上的实体,并且移除类名
                if ($(this).hasClass('on')) {
                    that.flag = false;
                    // 并且删除实体
                    that.entityDelete();
                    $(this).removeClass('on');
                    return;
                }
 
                // 删除实体
                that.entityDelete();
 
                // 当前点击的a标签添加类名,兄弟移除类名
                $(this).addClass('on').parent().siblings().children('a').removeClass('on');
                // ind 记录当前点击的下标
                var ind = $(this).parent().index();
                that.flagyl = false;
                that.flagsw = false;
                that.flagll = false;
                that.flagdxs = false;
                that.flagzf = false;
                that.flagsq = false;
                that.flagswen = false;
                that.flagaw = false;
                that.flagsz = false;
                that.flagns = false;
 
                if (ind == 0) {
 
                    that.flagyl = true;
                    $.ajax({
                        url: 'http://localhost:82/blade-ycreal/pptnr/drpOne?parttype=yl',
                        type: "get",
                        dataType: 'json',
                        success: function success(data) {
                            if (that.flagyl == true && that.flag != false) {
                                tableObj.num = ind;
                                data.data.forEach(function (item, index) {
                                    if (item.SiteList != '') {
 
                                        if (item.list && item.list != {} && ((Date.parse(new Date()) - Date.parse(new Date(item.list.TM.substring(0, 11).replace(/-/g, '/') + item.list.TM.substring(11)))) < 86400000)) {
                                            that.entitys({
                                                id: item.SiteList.site_code + "yl",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/js.png',
                                                text: item.list.DRP + " mm" + '\n' + item.SiteList.site_name,
                                                labOutColor: Cesium.Color.fromBytes(103, 188, 214),
                                                het: 20
                                            });
                                        } else {
                                            that.whiteEntities({
                                                id: item.SiteList.site_code + "yl",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/hy0.png',
                                                text: item.SiteList.site_name,
                                                het: 20
                                            });
                                        }
                                        that.dataListEntity.push(item.SiteList.site_code + "yl");
                                        tableObj.tableTM.push(item.list.TM);
                                        tableObj.tableName.push(item.SiteList.site_name);
                                        tableObj.tableData.push(item.list.DRP + '');
                                        tableObj.lgtd.push(item.SiteList.lgtd);
                                        tableObj.lttd.push(item.SiteList.lttd);
                                    }
                                });
 
                                that.hydroTableSort(tableObj);
                            }
                        }
                    });
                } else if (ind == 1) {
                    that.flagsw = true;
 
                    $.ajax({
                        url: 'http://localhost:82/blade-ycreal/riverr/rthyinfo?parttype=sw',
                        type: 'post',
                        dataType: "json",
                        success: function success(data) {
                            if (that.flagsw == true && that.flag != false) {
                                that.flag = true;
                                tableObj.num = ind;
                                var colorSl;
                                data.data.forEach(function (item, index) {
                                    if (item.SiteList != '') {
 
                                        if (item.list && item.list != {} && Date.parse(new Date()) - Date.parse(new Date(item.list.TM.substring(0, 11).replace(/-/g, '/') + item.list.TM.substring(11))) < 86400000) {
                                            if (item.list.Z > item.list.yjsw) {
                                                colorSl = Cesium.Color.RED;
                                            } else {
                                                colorSl = Cesium.Color.SKYBLUE;
                                            }
                                            that.entitys({
                                                id: item.SiteList.site_code + "sw",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/swei.png',
                                                text: item.list.Z + " M" + '\n' + item.SiteList.site_name,
                                                labOutColor: colorSl,
                                                het: 20
                                            });
                                        } else {
                                            that.whiteEntities({
                                                id: item.SiteList.site_code + "sw",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/hy1.png',
                                                text: item.SiteList.site_name,
                                                het: 20
                                            });
                                        }
                                        that.dataListEntity.push(item.SiteList.site_code + "sw");
                                        tableObj.tableTM.push(item.list ? item.list.TM : '');
                                        tableObj.tableName.push(item.SiteList.site_name);
                                        tableObj.tableData.push(item.list ? item.list.Z + "" : '');
                                        tableObj.comparisonValue.push(item.list ? item.list.yjsw + "" : '');
                                        tableObj.lgtd.push(item.SiteList.lgtd);
                                        tableObj.lttd.push(item.SiteList.lttd);
                                    }
                                });
 
                                that.hydroTableSort(tableObj);
                            }
                        }
                    });
                } else if (ind == 2) {
 
                    that.flagll = true;
                    $.ajax({
                        url: 'http://localhost:82/blade-ycreal/riverr/rthyinfo?parttype=ll',
                        type: 'post',
                        dataType: "json",
                        success: function success(data) {
                            if (that.flagll == true && that.flag != false) {
                                that.flag = true;
                                tableObj.num = ind;
                                var colorSl;
                                data.data.forEach(function (item, index) {
                                    if (item.SiteList != '') {
 
                                        if (item.list && item.list != {} && Date.parse(new Date()) - Date.parse(new Date(item.list.TM.substring(0, 11).replace(/-/g, '/') + item.list.TM.substring(11))) < 86400000) {
                                            if (item.list.Q > item.list.yjll) {
                                                colorSl = Cesium.Color.RED;
                                            } else {
                                                colorSl = Cesium.Color.SKYBLUE;
                                            }
                                            that.entitys({
                                                id: item.SiteList.site_code + "ll",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/ll.png',
                                                text: item.list.Q + "m3/s" + '\n' + item.SiteList.site_name,
                                                labOutColor: colorSl,
                                                het: 20
                                            });
                                        } else {
                                            that.whiteEntities({
                                                id: item.SiteList.site_code + "ll",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/hy2.png',
                                                text: item.SiteList.site_name,
                                                het: 20
                                            });
                                        }
                                        that.dataListEntity.push(item.SiteList.site_code + "ll");
                                        tableObj.tableTM.push(item.list ? item.list.TM : '');
                                        tableObj.tableName.push(item.SiteList.site_name);
                                        tableObj.tableData.push(item.list ? item.list.Q + "" : '');
                                        tableObj.comparisonValue.push(item.list ? item.list.yjll + "" : '');
                                        tableObj.lgtd.push(item.SiteList.lgtd);
                                        tableObj.lttd.push(item.SiteList.lttd);
                                    }
                                });
 
                                that.hydroTableSort(tableObj);
                            }
                        }
                    });
                } else if (ind == 4) {
 
                    that.flagzf = true;
 
                    $.ajax({
                        url: 'http://localhost:82/blade-ycreal/history/selectRealTimeByEv?parttype=zf',
                        type: "post",
                        dataType: 'json',
                        success: function success(data) {
                            if (that.flagzf == true && that.flag != false) {
                                that.flag = true;
                                tableObj.num = ind;
                                data.data.forEach(function (item, index) {
                                    if (item.SiteList != '') {
 
                                        if (item.list && item.list.sum_ev == undefined) {
                                            item.list.sum_ev = '0';
                                        }
                                        if (item.list && item.list != {} && Date.parse(new Date()) - Date.parse(new Date(item.list.tm.substring(0, 11).replace(/-/g, '/') + item.list.tm.substring(11))) < 86400000) {
                                            that.entitys({
                                                id: item.SiteList.site_code + "zf",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/zf.png',
                                                text: item.list.sum_ev + "%" + '\n' + item.SiteList.site_name,
                                                labOutColor: Cesium.Color.SKYBLUE,
                                                het: 20
                                            });
                                        } else {
                                            that.whiteEntities({
                                                id: item.SiteList.site_code + "zf",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/hy4.png',
                                                text: item.SiteList.site_name,
                                                het: 20
                                            });
                                        }
                                        that.dataListEntity.push(item.SiteList.site_code + "zf");
                                        tableObj.tableTM.push(item.list ? item.list.tm : '');
                                        tableObj.tableName.push(item.SiteList.site_name);
                                        tableObj.tableData.push(item.list ? item.list.sum_ev + "" : '');
                                        tableObj.lgtd.push(item.SiteList.lgtd);
                                        tableObj.lttd.push(item.SiteList.lttd);
                                    }
                                });
 
                                that.hydroTableSort(tableObj);
                            }
                        }
                    });
                } else if (ind == 5) {
 
                    that.flagsq = true;
 
                    $.ajax({
                        url: 'http://localhost:82/blade-ycreal/soilr/selectRealTimeBySoil?parttype=sq',
                        type: "post",
                        dataType: 'json',
                        success: function success(data) {
                            if (that.flagsq == true && that.flag != false) {
                                that.flag = true;
                                tableObj.num = ind;
 
                                data.data.forEach(function (item, index) {
                                    if (item.SiteList != '') {
                                        if (item.list && item.list != {} && Date.parse(new Date()) - Date.parse(new Date(item.list.tm.substring(0, 11).replace(/-/g, '/') + item.list.tm.substring(11))) < 86400000) {
                                            that.entitys({
                                                id: item.SiteList.site_code + "zf",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/sq.png',
                                                text: item.list.srlslm + "%" + '\n' + item.SiteList.site_name,
                                                labOutColor: Cesium.Color.SKYBLUE,
                                                het: 20
                                            });
                                        } else {
                                            that.whiteEntities({
                                                id: item.SiteList.site_code + "zf",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/hy5.png',
                                                text: item.SiteList.site_name,
                                                het: 20
                                            });
                                        }
                                        that.dataListEntity.push(item.SiteList.site_code + "zf");
                                        tableObj.tableTM.push(item.list ? item.list.tm : '');
                                        tableObj.tableName.push(item.SiteList.site_name);
                                        tableObj.tableData.push(item.list ? item.list.srlslm + "" : '');
                                        tableObj.lgtd.push(item.SiteList.lgtd);
                                        tableObj.lttd.push(item.SiteList.lttd);
                                    }
                                });
 
                                that.hydroTableSort(tableObj);
                            }
                        }
                    });
                } else if (ind == 6) {
 
                    that.flagswen = true;
 
                    $.ajax({
                        url: 'http://localhost:82/blade-ycreal/tmpr/selectRealTimeByTmp?parttype=sw',
                        type: "GET",
                        dataType: 'json',
                        success: function success(data) {
                            if (that.flagswen == true && that.flag != false) {
                                that.flag = true;
                                tableObj.num = ind;
                                data.data.forEach(function (item, index) {
                                    if (item.SiteList != '') {
                                        if (item.list && item.list != {} && Date.parse(new Date()) - Date.parse(new Date(item.list.TM.substring(0, 11).replace(/-/g, '/') + item.list.TM.substring(11))) < 86400000) {
                                            that.entitys({
                                                id: item.SiteList.site_code + "sw",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/sw.png',
                                                text: item.list.WTMP + "℃" + '\n' + item.SiteList.site_name,
                                                labOutColor: Cesium.Color.SKYBLUE,
                                                het: 20
                                            });
                                        } else {
                                            that.whiteEntities({
                                                id: item.SiteList.site_code + "sw",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/hy6.png',
                                                text: item.SiteList.site_name,
                                                het: 20
                                            });
                                        }
                                        that.dataListEntity.push(item.SiteList.site_code + "sw");
                                        tableObj.tableTM.push(item.list ? item.list.TM : '');
                                        tableObj.tableName.push(item.SiteList.site_name);
                                        tableObj.tableData.push(item.list ? item.list.WTMP + "" : '');
                                        tableObj.lgtd.push(item.SiteList.lgtd);
                                        tableObj.lttd.push(item.SiteList.lttd);
                                    }
                                });
 
                                that.hydroTableSort(tableObj);
                            }
                        }
                    });
                } else if (ind == 7) {
 
                    that.flagaw = true;
 
                    $.ajax({
                        url: 'http://localhost:82/blade-ycreal/tmpr/selectRealTimeByTmp?parttype=qw',
                        type: "GET",
                        dataType: 'json',
                        success: function success(data) {
                            if (that.flagaw == true && that.flag != false) {
                                that.flag = true;
                                tableObj.num = ind;
 
                                data.data.forEach(function (item, index) {
                                    if (item.SiteList != '') {
 
                                        if (item.list && item.list != {} && Date.parse(new Date()) - Date.parse(new Date(item.list.TM.substring(0, 11).replace(/-/g, '/') + item.list.TM.substring(11))) < 86400000) {
                                            that.entitys({
                                                id: item.SiteList.site_code + "sw",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/jw.png',
                                                text: item.list.ATMP + "℃" + '\n' + item.SiteList.site_name,
                                                labOutColor: Cesium.Color.SKYBLUE,
                                                het: 20
                                            });
                                        } else {
                                            that.whiteEntities({
                                                id: item.SiteList.site_code + "sw",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/hy7.png',
                                                text: item.SiteList.site_name,
                                                het: 20
                                            });
                                        }
                                        that.dataListEntity.push(item.SiteList.site_code + "sw");
                                        tableObj.tableTM.push(item.list ? item.list.TM : '');
                                        tableObj.tableName.push(item.SiteList.site_name);
                                        tableObj.tableData.push(item.list ? item.list.ATMP + "" : '');
                                        tableObj.lgtd.push(item.SiteList.lgtd);
                                        tableObj.lttd.push(item.SiteList.lttd);
                                    }
                                });
 
                                that.hydroTableSort(tableObj);
                            }
                        }
                    });
                } else if (ind == 8) {
 
                    that.flagsz = true;
 
                    $.ajax({
                        url: 'http://localhost:82/blade-ycreal/wq/selectWqRPage?parttype=sz',
                        type: "post",
                        dataType: 'json',
                        success: function success(data) {
                            if (that.flagsz == true && that.flag != false) {
                                that.flag = true;
                                tableObj.num = ind;
 
                                data.data.forEach(function (item, index) {
                                    if (item.SiteList != '') {
                                        console.log(item)
                                        that.entitys({
                                            id: item.SiteList.site_code + "sw",
                                            name: item.SiteList.site_name,
                                            x: Number(item.SiteList.lgtd),
                                            y: Number(item.SiteList.lttd),
                                            img: './images/sz.png',
                                            text: item.list.WCHRCD + "类" + '\n' + item.SiteList.site_name,
                                            labOutColor: Cesium.Color.SKYBLUE,
                                            het: 20
                                        });
                                        that.dataListEntity.push(item.SiteList.site_code + "sw");
                                        tableObj.tableTM.push(item.list ? item.list.TM : '');
                                        tableObj.tableName.push(item.SiteList.site_name);
                                        tableObj.tableData.push(item.list ? item.list.WCHRCD + "" : '');
                                        tableObj.lgtd.push(item.SiteList.lgtd);
                                        tableObj.lttd.push(item.SiteList.lttd);
                                    }
                                });
                                that.hydroTableSort(tableObj);
                            }
                        }
                    });
                } else if (ind == 9) {
 
                    that.flagns = true;
                    $.ajax({
                        url: 'http://localhost:82/blade-ycreal/sedr/selectRealTimeBySed?parttype=ns',
                        type: "GET",
                        dataType: 'json',
                        success: function success(data) {
                            if (that.flagns == true && that.flag != false) {
                                that.flag = true;
                                tableObj.num = ind;
                                console.log(data);
                                data.data.forEach(function (item, index) {
                                    if (item.SiteList != '') {
                                        if (item.List && item.List != {} && Date.parse(new Date()) - Date.parse(new Date(item.List.TM.substring(0, 11).replace(/-/g, '/') + item.List.TM.substring(11))) < 86400000) {
                                            that.entitys({
                                                id: item.SiteList.site_code + "sw",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/ns.png',
                                                text: item.List.S + "kg" + '\n' + +item.SiteList.site_name,
                                                labOutColor: Cesium.Color.SKYBLUE,
                                                het: 20
                                            });
                                        } else {
                                            that.whiteEntities({
                                                id: item.SiteList.site_code + "sw",
                                                name: item.SiteList.site_name,
                                                x: Number(item.SiteList.lgtd),
                                                y: Number(item.SiteList.lttd),
                                                img: './images/hy9.png',
                                                text: item.SiteList.site_name,
                                                het: 20
                                            });
                                        }
                                        that.dataListEntity.push(item.SiteList.site_code + "sw");
                                        tableObj.tableTM.push(item.List ? item.List.TM : '');
                                        tableObj.tableName.push(item.SiteList.site_name);
                                        tableObj.tableData.push(item.List ? item.List.S + "" : '');
                                        tableObj.lgtd.push(item.SiteList.lgtd);
                                        tableObj.lttd.push(item.SiteList.lttd);
                                    }
                                });
 
                                that.hydroTableSort(tableObj);
                            }
                        }
                    });
                } else if (ind == 3) {
 
                    that.flagdxs = true;
 
                    $.ajax({
                        url: "widgets/Hydrology/riverInformation.json",
                        type: "GET",
                        dataType: "json",
                        success: function success(data) {
                            if (that.flagdxs == true && that.flag != false) {
                                var data = eval(data); // eval() 计算字符串
                                var enId, cnx, cny, fieldName;
                                that.createHydroTable({ data: data.features, num: ind });
                                data.features.forEach(function (item, index) {
                                    // cnx, cny 定义经纬度,获取json文件里面定义好的
                                    cnx = item.geometry.center.x;
                                    cny = item.geometry.center.y;
                                    // 获取ID
                                    enId = item.ID;
                                    var dataTry = data.features.length;
                                    if (dataTry == 0) {
                                        return;
                                    }
                                    fieldName = item.fieldValues[8];
                                    if (fieldName == 'undefined' || fieldName == null || fieldName == 0) return;
                                    // 添加图层
                                    that.map.entities.add({
                                        id: enId,
                                        name: fieldName,
                                        position: Cesium.Cartesian3.fromDegrees(Number(cnx), Number(cny), 100),
                                        // 与实体相关的点
                                        point: {
                                            show: true,
                                            pixelSize: 8,
                                            color: Cesium.Color.fromBytes(13, 80, 143),
                                            outlineColor: Cesium.Color.fromBytes(13, 80, 143),
                                            outlineWidth: 2,
                                            disableDepthTestDistance: Number.POSITIVE_INFINITY
                                        },
                                        label: {
                                            show: true,
                                            text: fieldName,
                                            font: "700 16px '黑体'",
                                            color: Cesium.Color.fromBytes(13, 80, 143),
                                            backgroundColor: Cesium.Color.DEEPSKYBLUE,
                                            style: Cesium.LabelStyle.FILL_AND_OUTLINE,
                                            outlineWidth: 2,
                                            outlineColor: Cesium.Color.SKYBLUE,
                                            pixelOffset: new Cesium.Cartesian2(30, 0),
                                            scale: 0.8,
                                            disableDepthTestDistance: Number.POSITIVE_INFINITY
                                        }
                                    });
                                    // 将ID追加到存放ID值得数组里面
                                    that.dataListEntity.push(enId);
                                    // 取消默认双击事件
                                    that.map.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
                                });
                                /**
         * 动态添加气泡窗口
         */
                                that.hydroHandler3D = new Cesium.ScreenSpaceEventHandler(that.map.scene.canvas);
                                var scene = that.map.scene;
                                //绑定鼠标单击
                                that.hydroHandler3D.setInputAction(function (movement) {
                                    var ray = that.map.camera.getPickRay(movement.position);
                                    var cartesian = scene.globe.pick(ray, scene);
                                    var pick = scene.pick(movement.position);
                                    if (pick && pick.id) {
                                        var infoWindow = function infoWindow(obj) {
                                            var picked = scene.pick(obj.position);
                                            if (Cesium.defined(picked)) {
                                                var id = Cesium.defaultValue(picked.id, picked.primitive.id);
                                                if (id instanceof Cesium.Entity) {
                                                    $('#trackPopUpLink').empty();
                                                    $('#trackPopUpLink').append(obj.content);
                                                    var c = new Cesium.Cartesian2(obj.position.x, obj.position.y);
                                                    $('#trackPopUp').show();
                                                    $('.leaflet-popup-close-button').click(function () {
                                                        $('#trackPopUp').hide();
                                                        $('#trackPopUpLink').empty();
                                                        return false;
                                                    });
                                                    return id;
                                                }
                                            }
                                        };
 
                                        var updataPopupPosition = function updataPopupPosition(cartesian) {
                                            if (!cartesian) return;
                                            var px_position = Cesium.SceneTransforms.wgs84ToWindowCoordinates(scene, cartesian);
                                            var trackPopUpContent = window.document.getElementById("trackPopUpContent");
                                            var popw = document.getElementById("trackPopUpContent").offsetWidth;
                                            var poph = document.getElementById("trackPopUpContent").offsetHeight;
                                            trackPopUpContent.style.left = px_position.x - (popw / 2 + 70) + "px";
                                            trackPopUpContent.style.top = px_position.y - (poph + 60) + "px";
                                        };
 
                                        var inv = pick.id._id;
                                        // 获取属性
                                        var feat = data.features[inv - 1].fieldValues;
                                        // 内容
                                        var content = '<ul>' + '<li>' + '<p>测站位置</p><input type="text" name="" id="" value=' + feat[13] + ' readonly="readonly" />' + '</li>' + '<li>' + '<p>建站类型</p><input type="text" name="" id="" value=' + feat[14] + ' readonly="readonly" />' + '</li>' + '<li>' + '<p>站点类型</p><input type="text" name="" id="" value=' + feat[15] + ' readonly="readonly" />' + '</li>' + '<li>' + '<p>水文地质单元</p><input type="text" name="" id="" value=' + feat[19] + ' readonly="readonly" />' + '</li>' + '<li>' + '<p>地貌类型</p><input type="text" name="" id="" value=' + feat[20] + ' readonly="readonly" />' + '</li>' + '<li>' + '<p>地下水类型</p><input type="text" name="" id="" value=' + feat[21] + ' readonly="readonly" />' + '</li>' + '<li>' + '<p>监测层位</p><input type="text" name="" id="" value=' + feat[22] + ' readonly="readonly" />' + '</li>' + '<li>' + '<p>井管管材</p><input type="text" name="" id="" value=' + feat[23] + ' readonly="readonly" />' + '</li>' + '<li>' + '<p>管材标准(口径)MM</p><input type="text" name="" id="" value=' + feat[24] + ' readonly="readonly" />' + '</li>' + '</ul>';
                                        var obj = {
                                            position: movement.position,
                                            content: content
                                        };
                                        infoWindow(obj);
 
                                        that.map.scene.postRender.addEventListener(function () {
                                            if (cartesian) {
                                                updataPopupPosition(cartesian);
                                            }
                                        });
                                    } else {
                                        $('#trackPopUp').hide();
                                    }
                                }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
                                // //绑定地图移动
                                // that.hydroHandler3D.setInputAction(function (movement) {
                                //     $('#trackPopUp').hide();
                                // }, Cesium.ScreenSpaceEventType.LEFT_UP);
                                //绑定地图缩放
                                that.hydroHandler3D.setInputAction(function (movement) {
                                    $('#trackPopUp').hide();
                                }, Cesium.ScreenSpaceEventType.WHEEL);
                                //绑定滚轮点击事件
                                that.hydroHandler3D.setInputAction(function (movement) {
                                    $('#trackPopUp').hide();
                                }, Cesium.ScreenSpaceEventType.MIDDLE_DOWN);
                            }
                            // var height = Math.ceil(viewer.camera.positionCartographic.height);   //获取相机高度
                            // viewer.scene.screenSpaceCameraController.minimumZoomDistance = -1000;//设置相机最小缩放距离,距离地表-1000米
                        }
                    });
                    return;
                }
            });
 
            $('.jimu-widget-Hydrology .hydro-status-hint input').click(function () {
                that.entityDelete();
                if ($(this).prop("checked")) {
                    $(this).siblings('input').prop('checked', false);
                }
                var entities = null;
                var img = null;
                var whiteimg = null;
 
                var ind = $(this).index();
                if (ind == 0) {
                    that.createHydroTable(that.hydroQueryTabel);
                    entities = that.hydroQueryTabel;
                } else if (ind == 2) {
                    that.createHydroTable(that.hydroWellTabel);
                    entities = that.hydroWellTabel;
                } else if (ind == 5) {
                    that.createHydroTable(that.hydrofaultTabel);
                    entities = that.hydrofaultTabel;
                }
 
                if (entities.num == 0) {
                    img = './images/js.png';
                    whiteimg = './images/hy0.png';
                } else if (entities.num == 1) {
                    img = './images/swei.png';
                    whiteimg = './images/hy1.png';
                } else if (entities.num == 2) {
                    img = './images/ll.png';
                    whiteimg = './images/hy2.png';
                } else if (entities.num == 4) {
                    img = './images/zf.png';
                    whiteimg = './images/hy4.png';
                } else if (entities.num == 5) {
                    img = './images/sq.png';
                    whiteimg = './images/hy5.png';
                } else if (entities.num == 6) {
                    img = './images/sw.png';
                    whiteimg = './images/hy6.png';
                } else if (entities.num == 7) {
                    img = './images/jw.png';
                    whiteimg = './images/hy7.png';
                } else if (entities.num == 9) {
                    img = './images/ns.png';
                    whiteimg = './images/hy9.png';
                }
                that.tableEntitys(entities, ind, img, whiteimg);
            });
 
            $('.jimu-widget-Hydrology .hydro-content .tbody').on('click', 'tr', function () {
                that.map.camera.flyTo({
                    destination: Cesium.Cartesian3.fromDegrees(Number($(this).attr('lgtd')), Number($(this).attr('lttd')), 10000),
                    easingFunction: Cesium.EasingFunction.QUADRACTIC_IN_OUT
                });
            });
        },
 
        onOpen: function onOpen() {
            //面板打开的时候触发 (when open this panel trigger)
            // $('.jimu-widget-Hydrology .num a').trigger('click');
 
        },
 
        onClose: function onClose() {
            //面板关闭的时候触发 (when this panel is closed trigger)
        },
 
        onMinimize: function onMinimize() {
            this.resize();
        },
 
        onMaximize: function onMaximize() {
            this.resize();
        },
 
        resize: function resize() {},
 
        destroy: function destroy() {
            //销毁的时候触发
            //todo
            //do something before this func
            this.inherited(arguments);
        },
 
        // 添加实体的方法
        entitys: function entitys(object) {
            if (this.flag == false) return;
 
            this.map.entities.add({
                id: object.id, // 实体ID
                name: object.name, // 实体名称
                position: Cesium.Cartesian3.fromDegrees(Number(object.x), Number(object.y), 100), // x,y 实体经纬度
                billboard: {
                    image: object.img, // img 与实体相关的图片
                    show: true,
                    width: 20,
                    height: 20,
                    heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
                    disableDepthTestDistance: Number.POSITIVE_INFINITY
                },
                //字体标签样式
                label: {
                    show: true,
                    text: object.text, // text 与实体相关的文字
                    font: "700 16px '黑体'",
                    color: new Cesium.Color(0, 0, 0, 1),
                    backgroundColor: Cesium.Color.DEEPSKYBLUE,
                    style: Cesium.LabelStyle.FILL_AND_OUTLINE,
                    outlineWidth: 2,
                    outlineColor: object.labOutColor, // 文字轮廓的颜色
                    verticalOrigin: Cesium.VerticalOrigin.CENTER, //垂直位置
                    horizontalOrigin: Cesium.HorizontalOrigin.LEFT, //水平位置
                    pixelOffset: new Cesium.Cartesian2(object.het, 0), // 文字位置
                    heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
                    disableDepthTestDistance: Number.POSITIVE_INFINITY
                }
            });
        },
 
        whiteEntities: function whiteEntities(object) {
            if (this.flag == false) return;
 
            this.map.entities.add({
                id: object.id, // 实体ID
                name: object.name, // 实体名称
                position: Cesium.Cartesian3.fromDegrees(Number(object.x), Number(object.y), 100), // x,y 实体经纬度
                billboard: {
                    image: object.img, // img 与实体相关的图片
                    show: true,
                    color: Cesium.Color.fromBytes(147, 147, 147),
                    width: 20,
                    height: 20,
                    heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
                    disableDepthTestDistance: Number.POSITIVE_INFINITY
                },
                //字体标签样式
                label: {
                    show: true,
                    text: object.text, // text 与实体相关的文字
                    font: "700 16px '黑体'",
                    color: Cesium.Color.fromBytes(147, 147, 147),
                    backgroundColor: Cesium.Color.WHITE,
                    style: Cesium.LabelStyle.FILL_AND_OUTLINE,
                    outlineWidth: 2,
                    outlineColor: Cesium.Color.fromBytes(147, 147, 147), // 文字轮廓的颜色
                    verticalOrigin: Cesium.VerticalOrigin.CENTER, //垂直位置
                    horizontalOrigin: Cesium.HorizontalOrigin.LEFT, //水平位置
                    pixelOffset: new Cesium.Cartesian2(object.het, 0), // 文字位置
                    heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
                    disableDepthTestDistance: Number.POSITIVE_INFINITY
                }
            });
        },
 
        entityDelete: function entityDelete() {
            var that = this;
            if (this.dataListEntity.length != 0) {
                this.dataListEntity.forEach(function (item, index) {
                    that.map.entities.removeById(item);
                });
                this.dataListEntity = [];
            }
        },
 
        tableEntitys: function tableEntitys(entities, ind, img, whiteimg) {
            var _this = this;
 
            var colorSl = Cesium.Color.fromBytes(103, 188, 214);
            entities.str.forEach(function (item, index) {
                if (entities.comparisonValue.length > 0) {
                    if (entities.tabledata[index] > entities.comparisonValue[index]) {
                        colorSl = Cesium.Color.RED;
                    } else {
                        colorSl = Cesium.Color.fromBytes(103, 188, 214);
                    }
                }
                if (ind == 0) {
                    if (item == '正常') {
                        _this.entitys({
                            id: entities.tablename[index] + entities.num + "yl" + index,
                            name: entities.tablename[index],
                            x: Number(entities.lgtd[index]),
                            y: Number(entities.lttd[index]),
                            img: img,
                            text: entities.tabledata[index] + " mm" + '\n' + entities.tablename[index],
                            labOutColor: colorSl,
                            het: 20
                        });
                    } else {
                        _this.whiteEntities({
                            id: entities.tablename[index] + entities.num + "yl" + index,
                            name: entities.tablename[index],
                            x: Number(entities.lgtd[index]),
                            y: Number(entities.lttd[index]),
                            img: whiteimg,
                            text: entities.tablename[index],
                            het: 20
                        });
                    }
                } else if (ind == 2) {
                    _this.entitys({
                        id: entities.tablename[index] + entities.num + "yl" + index,
                        name: entities.tablename[index],
                        x: Number(entities.lgtd[index]),
                        y: Number(entities.lttd[index]),
                        img: img,
                        text: entities.tabledata[index] + " mm" + '\n' + entities.tablename[index],
                        labOutColor: colorSl,
                        het: 20
                    });
                } else if (ind == 5) {
                    _this.whiteEntities({
                        id: entities.tablename[index] + entities.num + "yl" + index,
                        name: entities.tablename[index],
                        x: Number(entities.lgtd[index]),
                        y: Number(entities.lttd[index]),
                        img: whiteimg,
                        text: entities.tablename[index],
                        het: 20
                    });
                }
                _this.dataListEntity.push(entities.tablename[index] + entities.num + "yl" + index);
            });
        },
 
        createHydroTable: function createHydroTable(data) {
 
            $('.jimu-widget-Hydrology .hydro-content table').empty();
            var tbody = $('<tbody></tbody>');
            var time = null;
            if (data.num == 3) {
                $('.jimu-widget-Hydrology .hydro-content .thead table').append($('<thead></thead>').html('<tr> <th>序号</th> <th>站点名称</th> <th>地貌类型</th> <th style="width: 70px;">地下水类型</th> </tr>'));
                data.data.forEach(function (item, index) {
                    tbody.append($('<tr lgtd=\'' + item.fieldValues[1] + '\' lttd=\'' + item.fieldValues[2] + '\'></tr>').html('<td>' + (index + 1) + '</td> <td>' + item.fieldValues[8] + '</td> <td>' + item.fieldValues[20] + '</td> <td style="width: 70px;">' + item.fieldValues[21] + '</td>'));
                });
                $('.jimu-widget-Hydrology .hydro-content').css('bottom', 0);
                $('.hydro-status-hint').stop().hide();
            } else {
                if (data.num == 0) {
                    $('.jimu-widget-Hydrology .hydro-content .thead table').append($('<thead></thead>').html('<tr><th>序号</th><th>站点名称</th><th>降雨量(mm)</th><th>时间</th><th>状态</th></tr>'));
                } else if (data.num == 1) {
                    $('.jimu-widget-Hydrology .hydro-content .thead table').append($('<thead></thead>').html('<tr><th>序号</th><th>站点名称</th><th>水位(M)</th><th>时间</th><th>状态</th></tr>'));
                } else if (data.num == 2) {
                    $('.jimu-widget-Hydrology .hydro-content .thead table').append($('<thead></thead>').html('<tr><th>序号</th><th>站点名称</th><th>流量(m³/s)</th><th>时间</th><th>状态</th></tr>'));
                } else if (data.num == 4) {
                    $('.jimu-widget-Hydrology .hydro-content .thead table').append($('<thead></thead>').html('<tr><th>序号</th><th>站点名称</th><th>蒸发(%)</th><th>时间</th><th>状态</th></tr>'));
                } else if (data.num == 5) {
                    $('.jimu-widget-Hydrology .hydro-content .thead table').append($('<thead></thead>').html('<tr><th>序号</th><th>站点名称</th><th>墒情(%)</th><th>时间</th><th>状态</th></tr>'));
                } else if (data.num == 6) {
                    $('.jimu-widget-Hydrology .hydro-content .thead table').append($('<thead></thead>').html('<tr><th>序号</th><th>站点名称</th><th>水温(℃)</th><th>时间</th><th>状态</th></tr>'));
                } else if (data.num == 7) {
                    $('.jimu-widget-Hydrology .hydro-content .thead table').append($('<thead></thead>').html('<tr><th>序号</th><th>站点名称</th><th>岸温(℃)</th><th>时间</th><th>状态</th></tr>'));
                } else if (data.num == 8) {
                    $('.jimu-widget-Hydrology .hydro-content .thead table').append($('<thead></thead>').html('<tr><th>序号</th><th>站点名称</th><th>水质(类)</th><th>时间</th></tr>'));
                } else if (data.num == 9) {
                    $('.jimu-widget-Hydrology .hydro-content .thead table').append($('<thead></thead>').html('<tr><th>序号</th><th>站点名称</th><th>泥沙(kg)</th><th>时间</th><th>状态</th></tr>'));
                }
                data.tablename.forEach(function (item, index) {
                    time = data.tabletm[index].substring(0, 16);
                    if (data.num == 8) {
                        $('.jimu-widget-Hydrology .hydro-content').css('bottom', 0);
                        $('.hydro-status-hint').stop().hide();
                        tbody.append($('<tr lgtd=\'' + data.lgtd[index] + '\' lttd=\'' + data.lttd[index] + '\'></tr>').html('<td>' + (index + 1) + '</td> <td>' + item + '</td> <td>' + data.tabledata[index] + '</td> <td> <a href=\'javascript:;\' title=\'' + time + '\'>' + time.substring(5, 16) + '</a></td>'));
                    } else {
                        if (data.str.length == 0) {
                            $('.jimu-widget-Hydrology .hydro-content table').empty();
                            return;
                        }
                        $('.jimu-widget-Hydrology .hydro-content').css('bottom', '24px');
                        $('.hydro-status-hint').stop().show();
                        if (data.str[index] == '正常') {
                            tbody.append($('<tr lgtd=\'' + data.lgtd[index] + '\' lttd=\'' + data.lttd[index] + '\'></tr>').html('<td>' + (index + 1) + '</td> <td>' + item + '</td> <td>' + data.tabledata[index] + '</td> <td> <a href=\'javascript:;\' title=\'' + time + '\'>' + time.substring(5, 16) + '</a></td> <td> <img src="./images/hydro-normal.png"> </td>'));
                        } else {
                            tbody.append($('<tr lgtd=\'' + data.lgtd[index] + '\' lttd=\'' + data.lttd[index] + '\'></tr>').html('<td>' + (index + 1) + '</td> <td>' + item + '</td> <td>' + data.tabledata[index] + '</td> <td> <a href=\'javascript:;\' title=\'' + time + '\'>' + time.substring(5, 16) + '</a></td> <td> <img src="./images/hydro-fault.png"> </td>'));
                        }
                    }
                });
            }
            $('.jimu-widget-Hydrology .hydro-content .tbody table').append(tbody);
            $('.jimu-widget-Hydrology .hydro-content .tbody').scrollTop(0);
        },
 
        closeHydro: function closeHydro(item) {
            if (item == this.name) {
                this.flag = false;
                $('.jimu-widget-Hydrology').stop().hide();
                this.entityDelete();
                if ($('ul li a').hasClass('on')) {
                    $('ul li a').removeClass('on');
                }
                if (this.hydroHandler3D != null) this.hydroHandler3D.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
            }
        },
 
        hydroTableSort: function hydroTableSort(data) {
            var that = this;
            var oject = { tm: [], name: [], val: [], num: data.num, str: [], lgtd: [], lttd: [], comparisonValue: [] };
 
            data.tableTM.forEach(function (item, index) {
                if (item == '') {
                    oject.tm.push(item);
                    oject.name.push(data.tableName[index]);
                    oject.val.push(data.tableData[index]);
                    oject.lgtd.push(data.lgtd[index]);
                    oject.lttd.push(data.lttd[index]);
                    oject.str.push("故障");
                    if (data.comparisonValue.length > 0) {
                        oject.comparisonValue.push(data.comparisonValue[index]);
                    }
                } else {
                    if (Date.parse(new Date()) - Date.parse(new Date(item)) > 86400000) {
                        oject.tm.push(item);
                        oject.name.push(data.tableName[index]);
                        oject.val.push(data.tableData[index]);
                        oject.lgtd.push(data.lgtd[index]);
                        oject.lttd.push(data.lttd[index]);
                        oject.str.push("故障");
                        if (data.comparisonValue.length > 0) {
                            oject.comparisonValue.push(data.comparisonValue[index]);
                        }
                    } else {
                        oject.tm.unshift(item);
                        oject.name.unshift(data.tableName[index]);
                        oject.val.unshift(data.tableData[index]);
                        oject.lgtd.unshift(data.lgtd[index]);
                        oject.lttd.unshift(data.lttd[index]);
                        oject.str.unshift("正常");
                        if (data.comparisonValue.length > 0) {
                            oject.comparisonValue.unshift(data.comparisonValue[index]);
                        }
                    }
                }
            });
 
            var tableOject = { tabletm: [], tablename: [], tabledata: [], num: data.num, str: [], lgtd: [], lttd: [], comparisonValue: [] };
            oject.name.forEach(function (item, index) {
                if (oject.tm[index] != '' || oject.val[index] != '') {
                    tableOject.tabletm.unshift(oject.tm[index]);
                    tableOject.tablename.unshift(item);
                    tableOject.tabledata.unshift(oject.val[index]);
                    tableOject.str.unshift(oject.str[index]);
                    tableOject.lgtd.unshift(oject.lgtd[index]);
                    tableOject.lttd.unshift(oject.lttd[index]);
                    if (oject.comparisonValue.length > 0) {
                        tableOject.comparisonValue.unshift(oject.comparisonValue[index]);
                    }
                } else {
                    tableOject.tabletm.push(oject.tm[index]);
                    tableOject.tablename.push(item);
                    tableOject.tabledata.push(oject.val[index]);
                    tableOject.str.push(oject.str[index]);
                    tableOject.lgtd.push(oject.lgtd[index]);
                    tableOject.lttd.push(oject.lttd[index]);
                    if (oject.comparisonValue.length > 0) {
                        tableOject.comparisonValue.push(oject.comparisonValue[index]);
                    }
                }
            });
 
            this.createHydroTable(tableOject);
            if (data.num != 3 || data.num != 8) {
                $('.jimu-widget-Hydrology .hydro-status-hint input:eq(0)').prop('checked', true).siblings('input').prop('checked', false);
                that.hydroQueryTabel.num = data.num;
                that.hydroWellTabel.num = data.num;
                that.hydrofaultTabel.num = data.num;
                tableOject.str.forEach(function (item, index) {
                    that.hydroQueryTabel.tabletm.push(tableOject.tabletm[index]);
                    that.hydroQueryTabel.tablename.push(tableOject.tablename[index]);
                    that.hydroQueryTabel.tabledata.push(tableOject.tabledata[index]);
                    that.hydroQueryTabel.lgtd.push(tableOject.lgtd[index]);
                    that.hydroQueryTabel.lttd.push(tableOject.lttd[index]);
                    that.hydroQueryTabel.str.push(item);
                    if (tableOject.comparisonValue.length > 0) {
                        that.hydroQueryTabel.comparisonValue.push(tableOject.comparisonValue[index]);
                    }
                    if (item == '正常') {
                        that.hydroWellTabel.tabletm.push(tableOject.tabletm[index]);
                        that.hydroWellTabel.tablename.push(tableOject.tablename[index]);
                        that.hydroWellTabel.tabledata.push(tableOject.tabledata[index]);
                        that.hydroWellTabel.lgtd.push(tableOject.lgtd[index]);
                        that.hydroWellTabel.lttd.push(tableOject.lttd[index]);
                        that.hydroWellTabel.str.push(item);
                        if (tableOject.comparisonValue.length > 0) {
                            that.hydroWellTabel.comparisonValue.push(tableOject.comparisonValue[index]);
                        }
                    } else if (item == '故障') {
                        that.hydrofaultTabel.tabletm.push(tableOject.tabletm[index]);
                        that.hydrofaultTabel.tablename.push(tableOject.tablename[index]);
                        that.hydrofaultTabel.tabledata.push(tableOject.tabledata[index]);
                        that.hydrofaultTabel.lgtd.push(tableOject.lgtd[index]);
                        that.hydrofaultTabel.lttd.push(tableOject.lttd[index]);
                        that.hydrofaultTabel.str.push(item);
                        if (tableOject.comparisonValue.length > 0) {
                            that.hydrofaultTabel.comparisonValue.push(tableOject.comparisonValue[index]);
                        }
                    }
                });
            }
        }
    });
});