demo.html
49.5 KB
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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>运能运力一盘棋</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="//api.map.baidu.com/api?v=2.0&ak=1TgEKvYqohJyeGXnN6yHSSTb4psOarQw"></script>
<style>
.BMap_cpyCtrl {
display: none;
}
.anchorBL {
display: none;
}
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 3px;
}
::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: #a8a8a8;
}
* {
-ms-overflow-style: -ms-autohiding-scrollbar;
scrollbar-width: thin;
scrollbar-color: #c1c1c1 #f1f1f1;
}
.condition-panel {
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease-out;
}
.condition-panel.open {
max-height: 500px;
}
.search-tag {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 2px 8px;
background: #1e6bb8;
color: white;
border-radius: 4px;
font-size: 12px;
margin: 2px;
}
.search-tag .remove-tag {
cursor: pointer;
font-size: 14px;
line-height: 1;
}
.search-tag .remove-tag:hover {
opacity: 0.8;
}
.line-search-dropdown {
position: absolute;
top: 100%;
left: 0;
right: 0;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
max-height: 150px;
overflow-y: auto;
z-index: 100;
display: none;
}
.line-search-dropdown.show {
display: block;
}
.line-option {
padding: 8px 12px;
cursor: pointer;
font-size: 13px;
display: flex;
align-items: center;
}
.line-option:hover {
background: #f0f7ff;
}
.location-marker {
cursor: crosshair;
}
</style>
</head>
<body class="m-0 p-0 box-border w-full h-full overflow-hidden font-['Microsoft_YaHei',Arial,sans-serif]">
<div id="map" class="w-full h-full absolute top-0 left-0 z-10"></div>
<div class="absolute top-0 left-0 right-0 h-[50px] bg-[rgba(30,107,184,0.9)] text-white flex items-center justify-center text-[18px] font-bold z-[100] shadow-[0_2px_4px_rgba(0,0,0,0.1)]">
运能运力一盘棋
</div>
<div class="absolute top-[60px] left-[20px] w-[400px] h-[30vh] bg-[rgba(255,255,255,0.95)] rounded-lg shadow-[0_2px_10px_rgba(0,0,0,0.15)] overflow-hidden z-[60]">
<div class="px-[15px] py-3 bg-[rgba(233,245,255,0.95)] border-b border-[#ddd] text-[14px] font-bold text-[#1e6bb8] text-center">
车辆运营概览
</div>
<div class="p-4 grid grid-cols-2 gap-5">
<div class="flex items-start">
<div class="relative w-[60px] h-[60px] flex flex-col items-center">
<div class="w-[50px] h-[50px] bg-[#1e6bb8] rounded-full opacity-80 flex items-center justify-center">
<div class="w-[30px] h-[30px] bg-white rounded-full flex items-center justify-center shadow-[0_2px_4px_rgba(0,0,0,0.1)]" style="background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22%231e6bb8%22%3E%3Cpath d=%22M18.92 6.01C18.72 5.42 18.16 5 17.5 5H6.5c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z%22/%3E%3C/svg%3E'); background-size: 60%; background-position: center; background-repeat: no-repeat;"></div>
</div>
</div>
<div class="flex flex-col ml-[15px]">
<div class="text-[12px] text-[#666] mb-1 whitespace-nowrap">总车辆数</div>
<div class="text-[18px] font-bold text-[#1e6bb8]">500<span class="text-[12px] text-[#999] font-normal">辆</span></div>
</div>
</div>
<div class="flex items-start">
<div class="relative w-[60px] h-[60px] flex flex-col items-center">
<div class="w-[50px] h-[50px] bg-[#1e6bb8] rounded-full opacity-80 flex items-center justify-center">
<div class="w-[30px] h-[30px] bg-white rounded-full flex items-center justify-center shadow-[0_2px_4px_rgba(0,0,0,0.1)]" style="background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22%231e6bb8%22%3E%3Cpath d=%22M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z%22/%3E%3C/svg%3E'); background-size: 60%; background-position: center; background-repeat: no-repeat;"></div>
</div>
</div>
<div class="flex flex-col ml-[15px]">
<div class="text-[12px] text-[#666] mb-1 whitespace-nowrap">当前运营车辆</div>
<div class="text-[18px] font-bold text-[#1e6bb8]">200<span class="text-[12px] text-[#999] font-normal">辆</span></div>
</div>
</div>
<div class="flex items-start">
<div class="relative w-[60px] h-[60px] flex flex-col items-center">
<div class="w-[50px] h-[50px] bg-[#1e6bb8] rounded-full opacity-80 flex items-center justify-center">
<div class="w-[30px] h-[30px] bg-white rounded-full flex items-center justify-center shadow-[0_2px_4px_rgba(0,0,0,0.1)]" style="background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22%231e6bb8%22%3E%3Cpath d=%22M19 3h-1V1h-2v2H8V1H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z%22/%3E%3C/svg%3E'); background-size: 60%; background-position: center; background-repeat: no-repeat;"></div>
</div>
</div>
<div class="flex flex-col ml-[15px]">
<div class="text-[12px] text-[#666] mb-1 whitespace-nowrap">今日计划出车</div>
<div class="text-[18px] font-bold text-[#1e6bb8]">300<span class="text-[12px] text-[#999] font-normal">辆</span></div>
</div>
</div>
<div class="flex items-start">
<div class="relative w-[60px] h-[60px] flex flex-col items-center">
<div class="w-[50px] h-[50px] bg-[#1e6bb8] rounded-full opacity-80 flex items-center justify-center">
<div class="w-[30px] h-[30px] bg-white rounded-full flex items-center justify-center shadow-[0_2px_4px_rgba(0,0,0,0.1)]" style="background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22%231e6bb8%22%3E%3Cpath d=%22M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z%22/%3E%3C/svg%3E'); background-size: 60%; background-position: center; background-repeat: no-repeat;"></div>
</div>
</div>
<div class="flex flex-col ml-[15px]">
<div class="text-[12px] text-[#666] mb-1 whitespace-nowrap">今日已出车</div>
<div class="text-[18px] font-bold text-[#1e6bb8]">210<span class="text-[12px] text-[#999] font-normal">辆</span></div>
</div>
</div>
<div class="flex items-start">
<div class="relative w-[60px] h-[60px] flex flex-col items-center">
<div class="w-[50px] h-[50px] bg-[#1e6bb8] rounded-full opacity-80 flex items-center justify-center">
<div class="w-[30px] h-[30px] bg-white rounded-full flex items-center justify-center shadow-[0_2px_4px_rgba(0,0,0,0.1)]" style="background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22%231e6bb8%22%3E%3Cpath d=%22M19.79 13.42c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39l-1.43-1.43c.64-.66.99-1.53.99-2.54 0-.55-.1-1.07-.29-1.56zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93z%22/%3E%3C/svg%3E'); background-size: 60%; background-position: center; background-repeat: no-repeat;"></div>
</div>
</div>
<div class="flex flex-col ml-[15px]">
<div class="text-[12px] text-[#666] mb-1 whitespace-nowrap">当前维保车辆</div>
<div class="text-[18px] font-bold text-[#1e6bb8]">5<span class="text-[12px] text-[#999] font-normal">辆</span></div>
</div>
</div>
<div class="flex items-start">
<div class="relative w-[60px] h-[60px] flex flex-col items-center">
<div class="w-[50px] h-[50px] bg-[#1e6bb8] rounded-full opacity-80 flex items-center justify-center">
<div class="w-[30px] h-[30px] bg-white rounded-full flex items-center justify-center shadow-[0_2px_4px_rgba(0,0,0,0.1)]" style="background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22%231e6bb8%22%3E%3Cpath d=%22M19.43 12.98c.04-.3.07-.61.07-.98 0-.37-.03-.74-.07-1.1l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.36-.07.73-.07 1.1 0 .37.03.74.07 1.1l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z%22/%3E%3C/svg%3E'); background-size: 60%; background-position: center; background-repeat: no-repeat;"></div>
</div>
</div>
<div class="flex flex-col ml-[15px]">
<div class="text-[12px] text-[#666] mb-1 whitespace-nowrap">当前空驶率</div>
<div class="text-[18px] font-bold text-[#1e6bb8]">15<span class="text-[12px] text-[#999] font-normal">%</span></div>
</div>
</div>
</div>
</div>
<div class="absolute top-[calc(60px+30vh+20px)] left-[20px] w-[400px] h-[30vh] bg-[rgba(255,255,255,0.95)] rounded-lg shadow-[0_2px_10px_rgba(0,0,0,0.15)] overflow-hidden z-[60]">
<div class="px-[15px] py-3 bg-[rgba(233,245,255,0.95)] border-b border-[#ddd] text-[14px] font-bold text-[#1e6bb8] text-center">
人员运营概览
</div>
<div class="p-4 grid grid-cols-2 gap-5">
<div class="flex items-start">
<div class="relative w-[60px] h-[60px] flex flex-col items-center">
<div class="w-[50px] h-[50px] bg-[#1e6bb8] rounded-full opacity-80 flex items-center justify-center">
<div class="w-[30px] h-[30px] bg-white rounded-full flex items-center justify-center shadow-[0_2px_4px_rgba(0,0,0,0.1)]" style="background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22%231e6bb8%22%3E%3Cpath d=%22M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z%22/%3E%3C/svg%3E'); background-size: 60%; background-position: center; background-repeat: no-repeat;"></div>
</div>
</div>
<div class="flex flex-col ml-[15px]">
<div class="text-[12px] text-[#666] mb-1 whitespace-nowrap">总人员数</div>
<div class="text-[18px] font-bold text-[#1e6bb8]">600<span class="text-[12px] text-[#999] font-normal">人</span></div>
</div>
</div>
<div class="flex items-start">
<div class="relative w-[60px] h-[60px] flex flex-col items-center">
<div class="w-[50px] h-[50px] bg-[#1e6bb8] rounded-full opacity-80 flex items-center justify-center">
<div class="w-[30px] h-[30px] bg-white rounded-full flex items-center justify-center shadow-[0_2px_4px_rgba(0,0,0,0.1)]" style="background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22%231e6bb8%22%3E%3Cpath d=%22M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z%22/%3E%3C/svg%3E'); background-size: 60%; background-position: center; background-repeat: no-repeat;"></div>
</div>
</div>
<div class="flex flex-col ml-[15px]">
<div class="text-[12px] text-[#666] mb-1 whitespace-nowrap">当前运营人员</div>
<div class="text-[18px] font-bold text-[#1e6bb8]">200<span class="text-[12px] text-[#999] font-normal">人</span></div>
</div>
</div>
<div class="flex items-start">
<div class="relative w-[60px] h-[60px] flex flex-col items-center">
<div class="w-[50px] h-[50px] bg-[#1e6bb8] rounded-full opacity-80 flex items-center justify-center">
<div class="w-[30px] h-[30px] bg-white rounded-full flex items-center justify-center shadow-[0_2px_4px_rgba(0,0,0,0.1)]" style="background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22%231e6bb8%22%3E%3Cpath d=%22M19 3h-1V1h-2v2H8V1H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z%22/%3E%3C/svg%3E'); background-size: 60%; background-position: center; background-repeat: no-repeat;"></div>
</div>
</div>
<div class="flex flex-col ml-[15px]">
<div class="text-[12px] text-[#666] mb-1 whitespace-nowrap">今日计划出人</div>
<div class="text-[18px] font-bold text-[#1e6bb8]">350<span class="text-[12px] text-[#999] font-normal">人</span></div>
</div>
</div>
<div class="flex items-start">
<div class="relative w-[60px] h-[60px] flex flex-col items-center">
<div class="w-[50px] h-[50px] bg-[#1e6bb8] rounded-full opacity-80 flex items-center justify-center">
<div class="w-[30px] h-[30px] bg-white rounded-full flex items-center justify-center shadow-[0_2px_4px_rgba(0,0,0,0.1)]" style="background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22%231e6bb8%22%3E%3Cpath d=%22M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z%22/%3E%3C/svg%3E'); background-size: 60%; background-position: center; background-repeat: no-repeat;"></div>
</div>
</div>
<div class="flex flex-col ml-[15px]">
<div class="text-[12px] text-[#666] mb-1 whitespace-nowrap">今日已出人</div>
<div class="text-[18px] font-bold text-[#1e6bb8]">230<span class="text-[12px] text-[#999] font-normal">人</span></div>
</div>
</div>
<div class="flex items-start">
<div class="relative w-[60px] h-[60px] flex flex-col items-center">
<div class="w-[50px] h-[50px] bg-[#1e6bb8] rounded-full opacity-80 flex items-center justify-center">
<div class="w-[30px] h-[30px] bg-white rounded-full flex items-center justify-center shadow-[0_2px_4px_rgba(0,0,0,0.1)]" style="background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22%231e6bb8%22%3E%3Cpath d=%22M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z%22/%3E%3C/svg%3E'); background-size: 60%; background-position: center; background-repeat: no-repeat;"></div>
</div>
</div>
<div class="flex flex-col ml-[15px]">
<div class="text-[12px] text-[#666] mb-1 whitespace-nowrap">当前病休人员</div>
<div class="text-[18px] font-bold text-[#1e6bb8]">1<span class="text-[12px] text-[#999] font-normal">人</span></div>
</div>
</div>
<div class="flex items-start">
<div class="relative w-[60px] h-[60px] flex flex-col items-center">
<div class="w-[50px] h-[50px] bg-[#1e6bb8] rounded-full opacity-80 flex items-center justify-center">
<div class="w-[30px] h-[30px] bg-white rounded-full flex items-center justify-center shadow-[0_2px_4px_rgba(0,0,0,0.1)]" style="background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22%231e6bb8%22%3E%3Cpath d=%22M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z%22/%3E%3C/svg%3E'); background-size: 60%; background-position: center; background-repeat: no-repeat;"></div>
</div>
</div>
<div class="flex flex-col ml-[15px]">
<div class="text-[12px] text-[#666] mb-1 whitespace-nowrap">当日已完成运营</div>
<div class="text-[18px] font-bold text-[#1e6bb8]">30<span class="text-[12px] text-[#999] font-normal">人</span></div>
</div>
</div>
</div>
</div>
<div id="search-panel-container" class="absolute top-[60px] left-[calc(400px+40px)] right-[20px] z-[60]">
<div id="search-condition-panel" class="bg-[rgba(255,255,255,0.95)] rounded-lg shadow-[0_2px_10px_rgba(0,0,0,0.15)] p-4 mb-4">
<div class="flex gap-2 mb-4">
<div class="flex-1 relative">
<div id="search-input" class="min-h-[40px] px-3 py-2 border border-[#ddd] rounded text-[13px] focus:outline-none focus:border-[#1e6bb8] cursor-text flex flex-wrap items-center gap-1">
<span id="search-tags"></span>
<input type="text" id="search-text" class="flex-1 min-w-[100px] outline-none border-none text-[13px]" placeholder="点击选择搜索条件...">
</div>
</div>
<button id="btn-search" class="bg-[#1e6bb8] text-white px-6 py-2 rounded text-[13px] font-medium hover:bg-[#155a96] transition-colors">
搜索
</button>
</div>
<div id="toggle-arrow" class="flex justify-center items-center h-6 cursor-pointer mb-2">
<svg id="arrow-icon" class="w-5 h-5 text-gray-500 transition-transform duration-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
</div>
<div id="condition-panel" class="condition-panel">
<div class="grid grid-cols-2 gap-4 mb-4">
<div>
<label class="block text-[12px] text-[#666] mb-1">任务类型</label>
<div class="flex gap-2">
<label class="flex items-center cursor-pointer">
<input type="radio" name="dispatchType" value="urgent" class="mr-1" data-type="dispatchType" data-label="紧急" data-value="urgent">
<span class="text-[13px]">紧急</span>
</label>
<label class="flex items-center cursor-pointer">
<input type="radio" name="dispatchType" value="normal" class="mr-1" data-type="dispatchType" data-label="普通" data-value="normal">
<span class="text-[13px]">普通</span>
</label>
</div>
</div>
<div>
<label class="block text-[12px] text-[#666] mb-1">线路选择</label>
<div class="relative">
<div id="lineSelectContainer" class="min-h-[40px] px-3 py-2 border border-[#ddd] rounded text-[13px] focus:outline-none focus:border-[#1e6bb8] cursor-pointer flex flex-wrap items-center gap-1">
<span id="lineSelectedTags"></span>
<input type="text" id="lineSearchInput" class="flex-1 min-w-[100px] outline-none border-none text-[13px]" placeholder="搜索线路...">
</div>
<div id="lineDropdown" class="line-search-dropdown">
<div class="line-option" data-value="803111" data-label="线路1">
<input type="checkbox" class="line-checkbox mr-2" data-value="803111" data-label="线路1">
<span>803111 - 线路1</span>
</div>
<div class="line-option" data-value="803112" data-label="线路2">
<input type="checkbox" class="line-checkbox mr-2" data-value="803112" data-label="线路2">
<span>803112 - 线路2</span>
</div>
<div class="line-option" data-value="803113" data-label="线路3">
<input type="checkbox" class="line-checkbox mr-2" data-value="803113" data-label="线路3">
<span>803113 - 线路3</span>
</div>
<div class="line-option" data-value="803114" data-label="线路4">
<input type="checkbox" class="line-checkbox mr-2" data-value="803114" data-label="线路4">
<span>803114 - 线路4</span>
</div>
<div class="line-option" data-value="803115" data-label="线路5">
<input type="checkbox" class="line-checkbox mr-2" data-value="803115" data-label="线路5">
<span>803115 - 线路5</span>
</div>
</div>
</div>
</div>
</div>
<div class="grid grid-cols-2 gap-4 mb-4">
<div>
<label class="block text-[12px] text-[#666] mb-1">停运时长</label>
<select id="stopDuration" class="w-full px-3 py-2 border border-[#ddd] rounded text-[13px] focus:outline-none focus:border-[#1e6bb8]" data-type="stopDuration">
<option value="">请选择</option>
<option value="30" data-label="30分钟">30分钟</option>
<option value="60" data-label="1小时">1小时</option>
<option value="120" data-label="2小时">2小时</option>
</select>
</div>
<div>
<label class="block text-[12px] text-[#666] mb-1">任务位置 <span id="locationHint" class="text-[#999] text-[11px]">(右键地图设置)</span></label>
<div class="flex gap-2">
<input type="text" id="taskLocation" class="flex-1 px-3 py-2 border border-[#ddd] rounded text-[13px] focus:outline-none focus:border-[#1e6bb8]" readonly placeholder="未设置">
<button id="clearLocation" class="px-3 py-2 bg-gray-200 text-gray-700 rounded text-[13px] hover:bg-gray-300 transition-colors">
清除
</button>
</div>
</div>
</div>
<div class="grid grid-cols-2 gap-4 mb-4">
<div>
<label class="block text-[12px] text-[#666] mb-1">开始时间</label>
<input type="datetime-local" id="startTime" class="w-full px-3 py-2 border border-[#ddd] rounded text-[13px] focus:outline-none focus:border-[#1e6bb8]" data-type="startTime">
</div>
<div>
<label class="block text-[12px] text-[#666] mb-1">结束时间</label>
<input type="datetime-local" id="endTime" class="w-full px-3 py-2 border border-[#ddd] rounded text-[13px] focus:outline-none focus:border-[#1e6bb8]" data-type="endTime">
</div>
</div>
</div>
</div>
<div id="results-panel" class="bg-[rgba(255,255,255,0.95)] rounded-lg shadow-[0_2px_10px_rgba(0,0,0,0.15)] p-4 hidden">
<div class="flex justify-between items-center mb-3">
<div class="text-[14px] font-bold text-[#1e6bb8]">搜索结果</div>
<button id="close-results" class="text-gray-500 hover:text-gray-700 p-1">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
</div>
<div class="max-h-[300px] overflow-y-auto">
<table class="w-full text-[12px]">
<thead class="bg-[#f5f8fc] sticky top-0">
<tr>
<th class="px-2 py-2 text-left font-medium text-[#666]">序号</th>
<th class="px-2 py-2 text-left font-medium text-[#666]">车辆编码</th>
<th class="px-2 py-2 text-left font-medium text-[#666]">设备编码</th>
<th class="px-2 py-2 text-left font-medium text-[#666]">线路</th>
<th class="px-2 py-2 text-left font-medium text-[#666]">上下行</th>
</tr>
</thead>
<tbody id="results-tbody">
</tbody>
</table>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
var map = new BMap.Map("map");
var point = new BMap.Point(121.0, 31.2);
map.centerAndZoom(point, 8);
map.enableScrollWheelZoom(true);
var searchConditions = {};
var locationMarker = null;
var locationCircle = null;
var taskLocation = null;
var selectedLines = {};
var vehicleLocations = [
{lng: 120.7, lat: 31.1, name: "W105-01", status: "正常"},
{lng: 120.8, lat: 31.3, name: "W105-02", status: "正常"},
{lng: 120.9, lat: 31.2, name: "W107-01", status: "正常"},
{lng: 121.1, lat: 31.4, name: "W107-02", status: "正常"},
{lng: 121.2, lat: 31.1, name: "W108-01", status: "正常"},
{lng: 121.0, lat: 31.3, name: "W108-02", status: "正常"}
];
vehicleLocations.forEach(function(vehicle) {
var point = new BMap.Point(vehicle.lng, vehicle.lat);
var fillColor = vehicle.status === "正常" ? "%231e6bb8" : "%23e67e22";
var icon = new BMap.Icon("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='" + fillColor + "' stroke='white' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='6' fill='white' fill-opacity='0.3'/%3E%3C/svg%3E", new BMap.Size(32, 32));
var marker = new BMap.Marker(point, {icon: icon});
var infoWindow = new BMap.InfoWindow("<div style='padding:10px;'><strong>车辆编号:</strong> " + vehicle.name + "<br/><strong>状态:</strong> " + vehicle.status + "</div>");
marker.addEventListener("click", function() {
this.openInfoWindow(infoWindow);
});
map.addOverlay(marker);
});
/**
* 在地图上绘制路线
* @param {Array} points - 地图点数组
* @param {string} color - 路线颜色
*/
function drawRoute(points, color) {
var polyline = new BMap.Polyline(points, {
strokeColor: color,
strokeWeight: 8,
strokeOpacity: 0.7,
strokeStyle: "solid"
});
map.addOverlay(polyline);
}
var routes = [
[
new BMap.Point(120.5, 31.1),
new BMap.Point(120.7, 31.1),
new BMap.Point(120.9, 31.1),
new BMap.Point(121.1, 31.1),
new BMap.Point(121.3, 31.1),
new BMap.Point(121.5, 31.1)
]
];
routes.forEach(function(route) {
drawRoute(route, "#1e6bb8");
});
map.addControl(new BMap.NavigationControl({
type: BMAP_NAVIGATION_CONTROL_ZOOM,
anchor: BMAP_ANCHOR_TOP_LEFT,
offset: new BMap.Size(10, 70)
}));
map.addControl(new BMap.ScaleControl({
anchor: BMAP_ANCHOR_BOTTOM_LEFT
}));
var searchInput = document.getElementById('search-input');
var searchText = document.getElementById('search-text');
var conditionPanel = document.getElementById('condition-panel');
var searchTags = document.getElementById('search-tags');
var toggleArrow = document.getElementById('toggle-arrow');
var arrowIcon = document.getElementById('arrow-icon');
/**
* 切换条件面板展开/收拢状态
*/
function toggleConditionPanel() {
if (conditionPanel.classList.contains('open')) {
conditionPanel.classList.remove('open');
arrowIcon.style.transform = 'rotate(0deg)';
} else {
conditionPanel.classList.add('open');
arrowIcon.style.transform = 'rotate(180deg)';
}
}
toggleArrow.addEventListener('click', function(e) {
e.stopPropagation();
toggleConditionPanel();
});
searchInput.addEventListener('click', function(e) {
if (!conditionPanel.classList.contains('open')) {
toggleConditionPanel();
}
searchText.focus();
});
document.querySelectorAll('input[type="radio"][data-type]').forEach(function(radio) {
radio.addEventListener('change', function() {
if (this.checked) {
var type = this.dataset.type;
var label = this.dataset.label;
var value = this.dataset.value;
addCondition(type, label, value);
}
});
});
document.getElementById('stopDuration').addEventListener('change', function() {
var selectedOption = this.options[this.selectedIndex];
if (selectedOption.value) {
addCondition('stopDuration', selectedOption.dataset.label, selectedOption.value);
} else {
removeCondition('stopDuration');
}
});
document.getElementById('startTime').addEventListener('change', function() {
if (this.value) {
addCondition('startTime', '开始:' + this.value, this.value);
} else {
removeCondition('startTime');
}
});
document.getElementById('endTime').addEventListener('change', function() {
if (this.value) {
addCondition('endTime', '结束:' + this.value, this.value);
} else {
removeCondition('endTime');
}
});
var lineSelectContainer = document.getElementById('lineSelectContainer');
var lineSearchInput = document.getElementById('lineSearchInput');
var lineDropdown = document.getElementById('lineDropdown');
var lineSelectedTags = document.getElementById('lineSelectedTags');
/**
* 渲染已选择的线路标签
*/
function renderLineTags() {
lineSelectedTags.innerHTML = '';
for (var value in selectedLines) {
var tag = document.createElement('span');
tag.className = 'search-tag';
tag.innerHTML = selectedLines[value] + '<span class="remove-tag" data-value="' + value + '">×</span>';
lineSelectedTags.appendChild(tag);
}
document.querySelectorAll('#lineSelectedTags .remove-tag').forEach(function(btn) {
btn.addEventListener('click', function(e) {
e.stopPropagation();
var value = this.dataset.value;
removeLine(value);
});
});
updateLineCondition();
}
/**
* 添加线路选择
* @param {string} value - 线路值
* @param {string} label - 线路标签
*/
function addLine(value, label) {
selectedLines[value] = label;
renderLineTags();
updateLineCheckboxes();
}
/**
* 移除线路选择
* @param {string} value - 线路值
*/
function removeLine(value) {
delete selectedLines[value];
renderLineTags();
updateLineCheckboxes();
}
/**
* 更新搜索条件中的线路
*/
function updateLineCondition() {
var values = Object.keys(selectedLines);
var labels = Object.values(selectedLines);
if (values.length > 0) {
searchConditions['line'] = { label: labels.join(','), value: values.join(',') };
} else {
delete searchConditions['line'];
}
renderTags();
}
/**
* 更新下拉框中复选框的选中状态
*/
function updateLineCheckboxes() {
document.querySelectorAll('.line-checkbox').forEach(function(checkbox) {
checkbox.checked = !!selectedLines[checkbox.dataset.value];
});
}
lineSelectContainer.addEventListener('click', function(e) {
if (e.target.classList.contains('remove-tag')) {
return;
}
lineDropdown.classList.add('show');
lineSearchInput.focus();
});
lineSearchInput.addEventListener('focus', function() {
lineDropdown.classList.add('show');
});
lineSearchInput.addEventListener('input', function() {
var filter = this.value.toLowerCase();
var options = lineDropdown.querySelectorAll('.line-option');
options.forEach(function(option) {
var text = option.textContent.toLowerCase();
option.style.display = text.indexOf(filter) > -1 ? 'flex' : 'none';
});
});
document.querySelectorAll('.line-checkbox').forEach(function(checkbox) {
checkbox.addEventListener('change', function(e) {
e.stopPropagation();
var value = this.dataset.value;
var label = this.dataset.label;
if (this.checked) {
addLine(value, label);
} else {
removeLine(value);
}
});
});
document.querySelectorAll('.line-option').forEach(function(option) {
option.addEventListener('click', function(e) {
if (e.target.type === 'checkbox') {
return;
}
var checkbox = this.querySelector('.line-checkbox');
checkbox.checked = !checkbox.checked;
var value = checkbox.dataset.value;
var label = checkbox.dataset.label;
if (checkbox.checked) {
addLine(value, label);
} else {
removeLine(value);
}
});
});
document.addEventListener('click', function(e) {
if (!lineSelectContainer.contains(e.target) && !lineDropdown.contains(e.target)) {
lineDropdown.classList.remove('show');
}
});
map.addEventListener('rightclick', function(e) {
taskLocation = e.point;
var lng = e.point.lng.toFixed(4);
var lat = e.point.lat.toFixed(4);
document.getElementById('taskLocation').value = lng + ', ' + lat;
addCondition('location', '位置:' + lng + ',' + lat, lng + ',' + lat);
if (locationMarker) {
map.removeOverlay(locationMarker);
}
if (locationCircle) {
map.removeOverlay(locationCircle);
}
var locationIcon = new BMap.Icon("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M24 4C15.163 4 8 11.163 8 20c0 5.219 3.438 11.641 8.203 17.484a31.841 31.841 0 0 0 7.797 9.672 31.807 31.807 0 0 0 7.797-9.672C36.562 31.641 40 25.219 40 20c0-8.837-7.163-16-16-16zm0 24a8 8 0 1 1 0-16 8 8 0 0 1 0 16z' fill='%231e6bb8'/%3E%3Ccircle cx='24' cy='20' r='5' fill='white'/%3E%3C/svg%3E", new BMap.Size(48, 48));
locationIcon.setAnchor(new BMap.Size(24, 48));
locationMarker = new BMap.Marker(e.point, {icon: locationIcon});
map.addOverlay(locationMarker);
});
document.getElementById('clearLocation').addEventListener('click', function() {
document.getElementById('taskLocation').value = '';
removeCondition('location');
if (locationMarker) {
map.removeOverlay(locationMarker);
locationMarker = null;
}
if (locationCircle) {
map.removeOverlay(locationCircle);
locationCircle = null;
}
taskLocation = null;
});
/**
* 添加搜索条件
* @param {string} type - 条件类型
* @param {string} label - 条件显示标签
* @param {*} value - 条件值
*/
function addCondition(type, label, value) {
removeCondition(type);
searchConditions[type] = { label: label, value: value };
renderTags();
}
/**
* 移除搜索条件
* @param {string} type - 要移除的条件类型
*/
function removeCondition(type) {
delete searchConditions[type];
renderTags();
}
/**
* 渲染搜索标签
*/
function renderTags() {
searchTags.innerHTML = '';
for (var type in searchConditions) {
var tag = document.createElement('span');
tag.className = 'search-tag';
tag.innerHTML = searchConditions[type].label + '<span class="remove-tag" data-type="' + type + '">×</span>';
searchTags.appendChild(tag);
}
document.querySelectorAll('.remove-tag').forEach(function(btn) {
btn.addEventListener('click', function(e) {
e.stopPropagation();
var type = this.dataset.type;
removeCondition(type);
if (type === 'dispatchType') {
document.querySelectorAll('input[name="dispatchType"]').forEach(function(r) { r.checked = false; });
} else if (type === 'stopDuration') {
document.getElementById('stopDuration').value = '';
} else if (type === 'startTime') {
document.getElementById('startTime').value = '';
} else if (type === 'endTime') {
document.getElementById('endTime').value = '';
} else if (type === 'location') {
document.getElementById('taskLocation').value = '';
if (locationMarker) {
map.removeOverlay(locationMarker);
locationMarker = null;
}
if (locationCircle) {
map.removeOverlay(locationCircle);
locationCircle = null;
}
taskLocation = null;
} else if (type === 'line') {
selectedLines = {};
renderLineTags();
updateLineCheckboxes();
}
});
});
}
document.getElementById('btn-search').addEventListener('click', function() {
if (conditionPanel.classList.contains('open')) {
toggleConditionPanel();
}
var mockData = {
"gpsList": [
{
"lineId": "803111",
"subLineId": 0,
"deviceId": "77L0K001",
"carparkNo": "",
"stopNo": "",
"lon": 0.0,
"lat": 0.0,
"timestamp": 1772591197000,
"serverTimestamp": 1772591194152,
"speed": 0.0,
"direction": 0.0,
"state": 0,
"upDown": 1,
"nbbm": "L0K-001",
"schId": 1067376191,
"version": 69,
"instation": 0,
"signalState": "normal",
"abnormalStatus": "outBounds",
"outOfBoundDistance": 1.3019440198864643E7,
"valid": 1,
"source": -1,
"offline": false,
"service": true
},
{
"lineId": "803112",
"subLineId": 0,
"deviceId": "77L0K002",
"carparkNo": "",
"stopNo": "",
"lon": 0.0,
"lat": 0.0,
"timestamp": 1772591197000,
"serverTimestamp": 1772591194152,
"speed": 0.0,
"direction": 0.0,
"state": 0,
"upDown": 0,
"nbbm": "L0K-002",
"schId": 1067376192,
"version": 70,
"instation": 0,
"signalState": "normal",
"abnormalStatus": "",
"outOfBoundDistance": 0,
"valid": 1,
"source": -1,
"offline": false,
"service": true
},
{
"lineId": "803113",
"subLineId": 0,
"deviceId": "77L0K003",
"carparkNo": "",
"stopNo": "",
"lon": 0.0,
"lat": 0.0,
"timestamp": 1772591197000,
"serverTimestamp": 1772591194152,
"speed": 0.0,
"direction": 0.0,
"state": 0,
"upDown": 1,
"nbbm": "L0K-003",
"schId": 1067376193,
"version": 71,
"instation": 0,
"signalState": "normal",
"abnormalStatus": "",
"outOfBoundDistance": 0,
"valid": 1,
"source": -1,
"offline": false,
"service": true
}
],
"overspeedList": [],
"scis": []
};
displayResults(mockData.gpsList);
});
/**
* 关闭搜索结果面板
*/
document.getElementById('close-results').addEventListener('click', function() {
document.getElementById('results-panel').classList.add('hidden');
});
/**
* 显示搜索结果表格
* @param {Array} data - 搜索结果数据数组
*/
function displayResults(data) {
var tbody = document.getElementById('results-tbody');
tbody.innerHTML = '';
data.forEach(function(item, index) {
var row = document.createElement('tr');
row.className = 'border-b border-[#eee] hover:bg-[#f5f8fc]';
row.innerHTML =
'<td class="px-2 py-2">' + (index + 1) + '</td>' +
'<td class="px-2 py-2">' + item.nbbm + '</td>' +
'<td class="px-2 py-2">' + item.deviceId + '</td>' +
'<td class="px-2 py-2">' + item.lineId + '</td>' +
'<td class="px-2 py-2">' + (item.upDown === 1 ? '上行' : '下行') + '</td>';
tbody.appendChild(row);
});
document.getElementById('results-panel').classList.remove('hidden');
}
/**
* 监听文档点击,当点击搜索面板外部时收拢条件项
*/
document.addEventListener('click', function(e) {
var searchPanel = document.getElementById('search-panel-container');
if (searchPanel && !searchPanel.contains(e.target)) {
if (conditionPanel.classList.contains('open')) {
toggleConditionPanel();
}
}
});
});
</script>
</body>
</html>