Report.vue
102 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
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
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
<template>
<div class="app-container">
<!-- 页面标题 -->
<div class="page-header">
<h2>拓客活动报表</h2>
</div>
<!-- 筛选条件 -->
<div class="filter-container">
<el-form :inline="true" :model="queryParams" class="demo-form-inline">
<el-form-item label="拓客活动">
<!-- <el-select
v-model="queryParams.eventId"
placeholder="请选择拓客活动"
style="width: 300px"
@change="handleQuery"
:loading="eventLoading"
>
<el-option
v-for="event in eventList"
:key="event.id"
:label="event.eventName"
:value="event.id"
/>
</el-select> -->
<el-select
:style='{"width":"100%"}'
v-model="queryParams.eventId"
filterable
remote
reserve-keyword
placeholder="请输入关键词"
:remote-method="remoteMethod"
:loading="tkhdLoading">
<el-option
v-for="item in eventList"
:key="item.id"
:label="item.eventName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="resetQuery">重置</el-button>
<el-button type="success" icon="el-icon-camera" @click="saveScreenshot" :loading="screenshotLoading">
保存截图
</el-button>
</el-form-item>
</el-form>
</div>
<!-- 选项卡 -->
<div class="tabs-container">
<el-tabs v-model="activeTab" @tab-click="handleTabClick">
<el-tab-pane label="团队数据" name="team">
<div class="tab-content" v-loading="teamLoading">
<div v-if="teamData.length === 0" class="no-data">
暂无数据
</div>
<div v-else>
<!-- 统计概览卡片 -->
<div class="statistics-overview">
<el-row :gutter="20">
<el-col :span="6">
<div class="stat-card">
<div class="stat-icon">
<i class="el-icon-s-shop"></i>
</div>
<div class="stat-content">
<div class="stat-number">{{ teamData.length }}</div>
<div class="stat-label">参与门店</div>
</div>
</div>
</el-col>
<el-col :span="6">
<div class="stat-card">
<div class="stat-icon">
<i class="el-icon-s-custom"></i>
</div>
<div class="stat-content">
<div class="stat-number">{{ getTotalTeams() }}</div>
<div class="stat-label">参与战队</div>
</div>
</div>
</el-col>
<el-col :span="6">
<div class="stat-card">
<div class="stat-icon">
<i class="el-icon-s-custom"></i>
</div>
<div class="stat-content">
<div class="stat-number">{{ getTotalMembers() }}</div>
<div class="stat-label">参与人员</div>
</div>
</div>
</el-col>
<el-col :span="6">
<div class="stat-card">
<div class="stat-icon">
<i class="el-icon-trophy-1"></i>
</div>
<div class="stat-content">
<div class="stat-number">{{ getTotalExpansionCount() }}</div>
<div class="stat-label">总拓客数</div>
</div>
</div>
</el-col>
</el-row>
</div>
<div class="waterfall-container">
<div v-for="store in sortedTeamData" :key="store.StoreId" class="store-card-waterfall">
<div class="store-header">
<div class="store-title-row">
<h4>{{ store.StoreName }}</h4>
<div class="store-summary">
<span class="summary-text">
目标: <span class="summary-value">{{ getStoreTotalTarget(store) }}</span>
</span>
<span class="summary-text">
完成: <span class="summary-value">{{ getStoreTotalCompleted(store) }}</span>
</span>
<span class="summary-text">
完成率: <span class="summary-value" :class="getStoreCompletionRateClass(store)">
{{ getStoreCompletionRate(store) }}%
</span>
</span>
</div>
</div>
</div>
<div class="teams-container">
<div v-for="team in store.TeamList" :key="team.TeamName" class="team-card">
<div class="team-header">
<span class="team-name">{{ team.TeamName }}</span>
</div>
<div class="team-members">
<div v-for="member in team.TeamUserInfo" :key="member.ExpansionUserId" class="member-row">
<div class="member-info">
<span class="member-name">{{ member.ExpansionUserName }}</span>
</div>
<div class="member-stats">
<span class="target">目标: {{ member.EventTarget }}</span>
<span class="count">完成: {{ member.ExpansionCount }}</span>
<span class="rate" :class="getCompletionRateClass(member.ExpansionCount, member.EventTarget)">
完成率: {{ getCompletionRate(member.ExpansionCount, member.EventTarget) }}%
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="排行榜" name="ranking">
<div class="tab-content">
<!-- 门店排行榜 -->
<div class="ranking-section">
<h3 class="ranking-title">
<i class="el-icon-s-shop"></i>
门店排行榜
</h3>
<div class="ranking-cards">
<div
v-for="(store, index) in topStoreData"
:key="store.StoreId"
class="ranking-card"
:class="'rank-' + (index + 1)"
>
<div class="rank-number">{{ index + 1 }}</div>
<div class="rank-content">
<div class="rank-name">{{ store.StoreName }}</div>
<div class="rank-stats">
<div class="stat-row">
<span class="stat-label">目标</span>
<span class="stat-value target">{{ store.TotalTarget }}</span>
</div>
<div class="stat-row">
<span class="stat-label">完成</span>
<span class="stat-value completed">{{ store.CompletedTarget }}</span>
</div>
<div class="stat-row">
<span class="stat-label">完成率</span>
<span class="stat-value rate" :class="getCompletionRateClass(store.CompletedTarget, store.TotalTarget)">
{{ store.CompletionRate }}%
</span>
</div>
</div>
</div>
<div class="rank-medal" v-if="index < 3">
<!-- <i class="el-icon-trophy" v-if="index === 0"></i>
<i class="el-icon-medal" v-else-if="index === 1"></i>
<i class="el-icon-medal-1" v-else></i> -->
</div>
</div>
</div>
</div>
<!-- 个人排行榜 -->
<div class="ranking-section">
<h3 class="ranking-title">
<i class="el-icon-s-custom"></i>
个人排行榜
</h3>
<div class="ranking-cards">
<div
v-for="(person, index) in topPersonData"
:key="person.UserId"
class="ranking-card person-card"
:class="'rank-' + (index + 1)"
>
<div class="rank-number">{{ index + 1 }}</div>
<div class="rank-content">
<div class="rank-name">{{ person.UserName }}</div>
<div class="rank-store">{{ person.StoreName }} - {{ person.TeamName }}</div>
<div class="rank-stats">
<div class="stat-row">
<span class="stat-label">目标</span>
<span class="stat-value target">{{ person.PersonalTarget }}</span>
</div>
<div class="stat-row">
<span class="stat-label">完成</span>
<span class="stat-value completed">{{ person.CompletedTarget }}</span>
</div>
<div class="stat-row">
<span class="stat-label">完成率</span>
<span class="stat-value rate" :class="getCompletionRateClass(person.CompletedTarget, person.PersonalTarget)">
{{ person.CompletionRate }}%
</span>
</div>
</div>
</div>
<div class="rank-medal" v-if="index < 3">
<!-- <i class="el-icon-trophy" v-if="index === 0"></i>
<i class="el-icon-medal" v-else-if="index === 1"></i>
<i class="el-icon-medal-1" v-else></i> -->
</div>
</div>
</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="未拓客人员" name="no-expansion">
<div class="tab-content" v-loading="personLoading">
<div v-if="noExpansionData.length === 0" class="no-data">
暂无未拓客人员
</div>
<div v-else>
<div class="no-expansion-summary">
未拓客人员总数:{{ noExpansionData.length }}人
</div>
<div class="no-expansion-table">
<el-table :data="noExpansionData" stripe style="width: 100%">
<el-table-column prop="UserName" label="姓名" />
<el-table-column prop="StoreName" label="门店" />
<el-table-column prop="TeamName" label="团队" />
<el-table-column prop="PersonalTarget" label="个人目标" align="center" />
<el-table-column prop="CompletedTarget" label="完成数量" align="center">
<template slot-scope="scope">
<span class="zero-count">{{ scope.row.CompletedTarget }}</span>
</template>
</el-table-column>
<el-table-column label="完成率" min-width="150" align="center">
<template slot-scope="scope">
<div class="progress-container">
<div class="progress-bar">
<div
class="progress-fill zero-progress"
:style="{ width: Math.min(scope.row.CompletionRate, 100) + '%' }"
></div>
</div>
<span class="progress-text">{{ scope.row.CompletionRate }}%</span>
</div>
</template>
</el-table-column>
<el-table-column label="最后拓客时间" align="center">
<template slot-scope="scope">
{{ formatTime(scope.row.LastExpansionTime) }}
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="门店排行榜" name="store-ranking">
<div class="tab-content" v-loading="storeLoading">
<div v-if="storeData.length === 0" class="no-data">
暂无门店数据
</div>
<div v-else>
<!-- 门店排行榜表格 -->
<div class="store-ranking-table">
<el-table :data="sortedStoreData" :show-header="true" style="width: auto">
<el-table-column prop="StoreName" label="门店" width="110" align="center">
<template slot-scope="scope">
<span :class="{ 'total-label': scope.row.isTotal }">{{ scope.row.StoreName }}</span>
</template>
</el-table-column>
<el-table-column prop="TotalTarget" label="目标张数" width="85" align="center">
<template slot-scope="scope">
<span :class="{ 'total-value': scope.row.isTotal }">{{ scope.row.TotalTarget }}</span>
</template>
</el-table-column>
<el-table-column prop="CompletedTarget" label="总张数" width="85" align="center">
<template slot-scope="scope">
<span :class="{ 'total-value': scope.row.isTotal }">{{ scope.row.CompletedTarget }}</span>
</template>
</el-table-column>
<el-table-column label="完成率" width="85" align="center">
<template slot-scope="scope">
<span :class="{ 'total-value': scope.row.isTotal }">{{ formatCompletionRate(scope.row.CompletionRate) }}%</span>
</template>
</el-table-column>
<el-table-column label="排名" width="70" align="center">
<template slot-scope="scope">
<span v-if="!scope.row.isTotal" class="ranking" :class="getRankingClass(scope.$index + 1)">
{{ scope.$index + 1 }}
</span>
<span v-else></span>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="到店情况" name="store-visit">
<div class="tab-content" v-loading="funnelLoading">
<div v-if="funnelData.length === 0" class="no-data">
暂无到店情况数据
</div>
<div v-else>
<!-- 统计概览 -->
<div class="store-visit-summary">
<div class="summary-item">
<span class="summary-label">参与门店总数:</span>
<span class="summary-value">{{ funnelData.length }}家</span>
</div>
<div class="summary-item">
<span class="summary-label">总拓客数量:</span>
<span class="summary-value">{{ getTotalTkCount() }}</span>
</div>
<div class="summary-item">
<span class="summary-label">总邀约数量:</span>
<span class="summary-value">{{ getTotalYaoyCount() }}</span>
</div>
<div class="summary-item">
<span class="summary-label">总预约数量:</span>
<span class="summary-value">{{ getTotalYyCount() }}</span>
</div>
<div class="summary-item">
<span class="summary-label">总开单数量:</span>
<span class="summary-value">{{ getTotalKdCount() }}</span>
</div>
<div class="summary-item">
<span class="summary-label">总耗卡数量:</span>
<span class="summary-value">{{ getTotalHkCount() }}</span>
</div>
<div class="summary-item">
<span class="summary-label">总耗卡金额:</span>
<span class="summary-value">{{ formatMoney(getTotalHkAmount()) }}</span>
</div>
<div class="summary-item">
<span class="summary-label">总开单金额:</span>
<span class="summary-value">{{ formatMoney(getTotalKdAmount()) }}</span>
</div>
</div>
<!-- 到店情况表格 -->
<div class="store-visit-table">
<el-table :data="sortedFunnelData" stripe style="width: 100%">
<el-table-column prop="store_name" label="门店" align="center">
<template slot-scope="scope">
<span class="store-name-link" @click="handleStoreClick(scope.row)">
{{ scope.row.store_name }}
</span>
</template>
</el-table-column>
<el-table-column prop="tk_count" label="拓客数量" align="center" sortable />
<el-table-column prop="yaoy_count" label="邀约数量" align="center" sortable />
<el-table-column prop="yy_count" label="预约数量" align="center" sortable />
<el-table-column prop="kd_count" label="开单数量" align="center" sortable />
<el-table-column prop="hk_count" label="耗卡数量" align="center" sortable />
<el-table-column prop="hk_amount" label="耗卡金额" align="center" sortable>
<template slot-scope="scope">
{{ formatMoney(scope.row.hk_amount) }}
</template>
</el-table-column>
<el-table-column prop="kd_amount" label="开单金额" align="center" sortable>
<template slot-scope="scope">
{{ formatMoney(scope.row.kd_amount) }}
</template>
</el-table-column>
<el-table-column prop="visit_rate" label="到店率" align="center" sortable>
<template slot-scope="scope">
{{ scope.row.visit_rate ? scope.row.visit_rate + '%' : '0%' }}
</template>
</el-table-column>
<el-table-column prop="deal_rate" label="成交率" align="center" sortable>
<template slot-scope="scope">
{{ scope.row.deal_rate ? scope.row.deal_rate + '%' : '0%' }}
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<!-- 报表内容容器 -->
<div class="report-sections-container" style="display: none;">
<!-- 团队数据报表 -->
<div class="report-section">
<div class="section-header">
<h3>团队数据报表</h3>
</div>
<div v-loading="teamLoading" class="report-content">
<div v-if="teamData.length === 0" class="no-data">
暂无数据
</div>
<div v-else>
<!-- 统计概览卡片 -->
<div class="statistics-overview">
<el-row :gutter="20">
<el-col :span="6">
<div class="stat-card">
<div class="stat-icon">
<i class="el-icon-s-shop"></i>
</div>
<div class="stat-content">
<div class="stat-number">{{ teamData.length }}</div>
<div class="stat-label">参与门店</div>
</div>
</div>
</el-col>
<el-col :span="6">
<div class="stat-card">
<div class="stat-icon">
<i class="el-icon-s-custom"></i>
</div>
<div class="stat-content">
<div class="stat-number">{{ getTotalTeams() }}</div>
<div class="stat-label">参与战队</div>
</div>
</div>
</el-col>
<el-col :span="6">
<div class="stat-card">
<div class="stat-icon">
<i class="el-icon-s-custom"></i>
</div>
<div class="stat-content">
<div class="stat-number">{{ getTotalMembers() }}</div>
<div class="stat-label">参与人员</div>
</div>
</div>
</el-col>
<el-col :span="6">
<div class="stat-card">
<div class="stat-icon">
<i class="el-icon-trophy-1"></i>
</div>
<div class="stat-content">
<div class="stat-number">{{ getTotalExpansionCount() }}</div>
<div class="stat-label">总拓客数</div>
</div>
</div>
</el-col>
</el-row>
</div>
<div class="waterfall-container">
<div v-for="store in teamData" :key="store.StoreId" class="store-card-waterfall">
<div class="store-header">
<div class="store-title-row">
<h4>{{ store.StoreName }}</h4>
<div class="store-summary">
<span class="summary-text">
目标: <span class="summary-value">{{ getStoreTotalTarget(store) }}</span>
</span>
<span class="summary-text">
完成: <span class="summary-value">{{ getStoreTotalCompleted(store) }}</span>
</span>
<span class="summary-text">
完成率: <span class="summary-value" :class="getStoreCompletionRateClass(store)">
{{ getStoreCompletionRate(store) }}%
</span>
</span>
</div>
</div>
</div>
<div class="teams-container">
<div v-for="team in store.TeamList" :key="team.TeamName" class="team-card">
<div class="team-header">
<span class="team-name">{{ team.TeamName }}</span>
</div>
<div class="team-members">
<div v-for="member in team.TeamUserInfo" :key="member.ExpansionUserId" class="member-row">
<div class="member-info">
<span class="member-name">{{ member.ExpansionUserName }}</span>
</div>
<div class="member-stats">
<span class="target">目标: {{ member.EventTarget }}</span>
<span class="count">完成: {{ member.ExpansionCount }}</span>
<span class="rate" :class="getCompletionRateClass(member.ExpansionCount, member.EventTarget)">
完成率: {{ getCompletionRate(member.ExpansionCount, member.EventTarget) }}%
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 门店数据报表 -->
<div class="report-section">
<div class="section-header">
<h3>门店数据报表</h3>
</div>
<div v-loading="storeLoading" class="report-content">
<div v-if="storeData.length === 0" class="no-data">
暂无数据
</div>
<div v-else class="store-table">
<el-table :data="storeData" stripe style="width: 100%">
<el-table-column prop="StoreName" label="门店名称" />
<el-table-column prop="TotalTarget" label="目标数据" align="center" />
<el-table-column prop="CompletedTarget" label="完成数量" align="center" />
<el-table-column label="完成率" min-width="180" align="center">
<template slot-scope="scope">
<div class="progress-container">
<div class="progress-bar">
<div
class="progress-fill"
:style="{ width: scope.row.CompletionRate + '%' }"
></div>
</div>
<span class="progress-text">{{ scope.row.CompletionRate }}%</span>
</div>
</template>
</el-table-column>
<el-table-column prop="Ranking" label="排名" width="80" align="center">
<template slot-scope="scope">
<span class="ranking" :class="getRankingClass(scope.row.Ranking)">
{{ scope.row.Ranking }}
</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
<!-- 个人数据报表 -->
<div class="report-section">
<div class="section-header">
<h3>个人数据报表</h3>
</div>
<div v-loading="personLoading" class="report-content">
<div v-if="personData.length === 0" class="no-data">
暂无数据
</div>
<div v-else class="person-table">
<el-table :data="personData" stripe style="width: 100%">
<el-table-column prop="UserName" label="姓名" />
<el-table-column prop="StoreName" label="门店" />
<el-table-column prop="TeamName" label="团队" />
<el-table-column prop="PersonalTarget" label="个人目标" align="center" />
<el-table-column prop="CompletedTarget" label="完成数量" align="center" />
<el-table-column label="完成率" min-width="150" align="center">
<template slot-scope="scope">
<div class="progress-container">
<div class="progress-bar">
<div
class="progress-fill"
:style="{ width: Math.min(scope.row.CompletionRate, 100) + '%' }"
></div>
</div>
<span class="progress-text">{{ scope.row.CompletionRate }}%</span>
</div>
</template>
</el-table-column>
<el-table-column prop="Ranking" label="排名" width="80" align="center">
<template slot-scope="scope">
<span class="ranking" :class="getRankingClass(scope.row.Ranking)">
{{ scope.row.Ranking }}
</span>
</template>
</el-table-column>
<el-table-column label="最后拓客时间" align="center">
<template slot-scope="scope">
{{ formatTime(scope.row.LastExpansionTime) }}
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</div>
<!-- 截图预览对话框 -->
<el-dialog
title="截图预览"
:visible.sync="previewVisible"
width="80%"
:before-close="closePreview"
center
>
<div class="screenshot-preview">
<img
v-if="screenshotDataUrl"
:src="screenshotDataUrl"
alt="报表截图"
style="width: 100%; max-height: 70vh; object-fit: contain;"
/>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closePreview">取消</el-button>
<el-button type="primary" @click="downloadScreenshot">下载图片</el-button>
</span>
</el-dialog>
<!-- 门店详情对话框 -->
<el-dialog
:title="selectedStore ? selectedStore.store_name + ' - 客户详情' : '客户详情'"
:visible.sync="storeDetailVisible"
width="90%"
:before-close="closeStoreDetail"
center
>
<div class="store-detail-content" v-loading="customerDetailsLoading">
<div v-if="storeCustomerDetails.length === 0" class="no-data">
暂无客户数据
</div>
<div v-else>
<el-table :data="storeCustomerDetails" stripe style="width: 100%">
<el-table-column prop="customer_name" label="客户姓名" align="center" />
<el-table-column prop="customer_phone" label="客户电话" align="center" width="120"/>
<el-table-column prop="expansion_user_name" label="拓客人员" align="center" width="120"/>
<el-table-column prop="invitation_status" label="邀约状态" align="center" />
<el-table-column prop="appointment_status" label="预约状态" align="center" />
<el-table-column prop="consume_status" label="耗卡状态" align="center" />
<el-table-column prop="billing_status" label="开卡状态" align="center" />
<el-table-column prop="tk_time" label="拓客时间" width="150" align="center">
<template slot-scope="scope">
{{ formatCustomerTime(scope.row.tk_time) }}
</template>
</el-table-column>
<el-table-column prop="yaoy_time" label="邀约创建时间" width="150" align="center">
<template slot-scope="scope">
{{ formatCustomerTime(scope.row.yaoy_time) }}
</template>
</el-table-column>
<el-table-column prop="yaoy_appointment_time" label="邀约预约时间" width="150" align="center">
<template slot-scope="scope">
{{ formatCustomerTime(scope.row.yaoy_appointment_time) }}
</template>
</el-table-column>
<el-table-column prop="yy_time" label="预约创建时间" width="150" align="center">
<template slot-scope="scope">
{{ formatCustomerTime(scope.row.yy_time) }}
</template>
</el-table-column>
<el-table-column prop="appointment_time" label="预约到店时间" width="150" align="center">
<template slot-scope="scope">
{{ formatCustomerTime(scope.row.appointment_time) }}
</template>
</el-table-column>
<!-- <el-table-column prop="first_consume_time" label="首次耗卡时间" width="150" align="center">
<template slot-scope="scope">
{{ formatCustomerTime(scope.row.first_consume_time) }}
</template>
</el-table-column>
<el-table-column prop="last_consume_time" label="最后耗卡时间" width="150" align="center">
<template slot-scope="scope">
{{ formatCustomerTime(scope.row.last_consume_time) }}
</template>
</el-table-column>
<el-table-column prop="first_billing_time" label="首次开卡时间" width="150" align="center">
<template slot-scope="scope">
{{ formatCustomerTime(scope.row.first_billing_time) }}
</template>
</el-table-column>
<el-table-column prop="last_billing_time" label="最后开卡时间" width="150" align="center">
<template slot-scope="scope">
{{ formatCustomerTime(scope.row.last_billing_time) }}
</template>
</el-table-column> -->
<el-table-column prop="total_consume_amount" label="耗卡金额" align="center">
<template slot-scope="scope">
{{ formatMoney(scope.row.total_consume_amount) }}
</template>
</el-table-column>
<el-table-column prop="consume_count" label="耗卡次数" align="center">
<template slot-scope="scope">
{{ scope.row.consume_count || 0 }}
</template>
</el-table-column>
<el-table-column prop="total_billing_amount" label="开卡金额" align="center">
<template slot-scope="scope">
{{ formatMoney(scope.row.total_billing_amount) }}
</template>
</el-table-column>
<el-table-column prop="billing_count" label="开卡次数" align="center" >
<template slot-scope="scope">
{{ scope.row.billing_count || 0 }}
</template>
</el-table-column>
<el-table-column prop="total_debt_amount" label="欠款金额" align="center">
<template slot-scope="scope">
{{ formatMoney(scope.row.total_debt_amount) }}
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<div class="pagination-container" v-if="customerDetailsTotal > 0">
<el-pagination
@size-change="handleCustomerDetailsPageSizeChange"
@current-change="handleCustomerDetailsPageChange"
:current-page="customerDetailsPageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="customerDetailsPageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="customerDetailsTotal"
/>
</div>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { getEventList, getTeamData, getStoreData, getPersonData } from '@/api/lqTkjlb'
import request from '@/utils/request'
export default {
name: 'TkjlbReport',
data() {
return {
tkhdLoading: false,
queryParams: {
eventId: ''
},
eventList: [],
teamData: [],
storeData: [],
personData: [],
funnelData: [],
storeCustomerDetails: [],
customerDetailsTotal: 0,
customerDetailsPageIndex: 1,
customerDetailsPageSize: 10,
eventLoading: false,
teamLoading: false,
storeLoading: false,
personLoading: false,
funnelLoading: false,
customerDetailsLoading: false,
screenshotLoading: false,
screenshotDataUrl: '',
previewVisible: false,
storeDetailVisible: false,
selectedStore: null,
activeTab: 'team'
}
},
computed: {
// 按门店完成率排序的团队数据
sortedTeamData() {
return [...this.teamData].sort((a, b) => {
const rateA = this.getStoreCompletionRate(a)
const rateB = this.getStoreCompletionRate(b)
return rateB - rateA // 降序排列
})
},
// 门店前三名(按完成率排序)
topStoreData() {
return this.storeData.slice(0, 3)
},
// 按完成率排序的门店数据(用于总门店排行榜)
sortedStoreData() {
const sorted = [...this.storeData].sort((a, b) => {
return b.CompletionRate - a.CompletionRate // 按完成率降序排列
})
// 添加总计行
sorted.push({
StoreName: '总计',
TotalTarget: this.getTotalStoreTarget(),
CompletedTarget: this.getTotalStoreCompleted(),
CompletionRate: this.getTotalCompletionRate(),
isTotal: true
})
return sorted
},
// 个人前三名
topPersonData() {
return this.personData
.slice()
.sort((a, b) => b.CompletedTarget - a.CompletedTarget)
.slice(0, 3)
},
// 未拓客人员(完成数量为0)
noExpansionData() {
return this.personData.filter(person => person.CompletedTarget === 0)
},
// 按耗卡金额排序的漏斗数据
sortedFunnelData() {
if (!Array.isArray(this.funnelData)) {
return []
}
return [...this.funnelData].sort((a, b) => {
return (b.hk_amount || 0) - (a.hk_amount || 0) // 按耗卡金额降序排列
})
}
},
created() {
this.getEventList()
// 添加测试数据,确保页面正常显示
// this.addTestData()
},
methods: {
async remoteMethod(query){
if (query !== '') {
this.tkhdLoading = true;
await request({
url: '/api/Extend/lqevent?page=1&pageSize=10&eventName='+query,
method: 'GET',
}).then((res) => {
this.tkhdLoading = false;
if (res.code == 200 && res.data.list.length > 0) {
this.eventList = res.data.list;
} else {
this.eventList = [];
}
console.error(this.eventList)
})
} else {
// this.kdhyOptions = [];
}
},
// 获取活动列表
async getEventList() {
this.eventLoading = true
try {
console.log('正在获取活动列表...')
const response = await getEventList()
console.log('活动列表响应:', response)
this.eventList = response.data.list || []
// 默认选中第一个活动
if (this.eventList.length > 0) {
this.queryParams.eventId = this.eventList[0].id
console.log('默认选中活动:', this.eventList[0])
// 自动查询第一个活动的数据
this.handleQuery()
}
} catch (error) {
console.error('获取活动列表失败:', error)
this.$message.error('获取活动列表失败: ' + error.message)
this.eventList = []
} finally {
this.eventLoading = false
}
},
// 查询数据
handleQuery() {
if (!this.queryParams.eventId) {
this.$message.warning('请选择拓客活动')
return
}
this.getTeamData()
this.getStoreData()
this.getPersonData()
this.getFunnelData()
},
// 重置查询
resetQuery() {
if (this.eventList.length > 0) {
this.queryParams.eventId = this.eventList[0].id
this.handleQuery()
} else {
this.queryParams.eventId = ''
this.teamData = []
this.storeData = []
this.personData = []
this.funnelData = []
}
},
// 选项卡切换
handleTabClick(tab) {
this.activeTab = tab.name
console.log('切换到选项卡:', tab.name)
},
// 获取团队数据
async getTeamData() {
this.teamLoading = true
try {
console.log('正在获取团队数据...')
const response = await getTeamData(this.queryParams.eventId)
console.log('团队数据响应:', response)
this.teamData = response.data || []
console.log('团队数据:', this.teamData)
} catch (error) {
console.error('获取团队数据失败:', error)
this.$message.error('获取团队数据失败: ' + error.message)
this.teamData = []
} finally {
this.teamLoading = false
}
},
// 获取门店数据
async getStoreData() {
this.storeLoading = true
try {
console.log('正在获取门店数据...')
const response = await getStoreData(this.queryParams.eventId)
console.log('门店数据响应:', response)
this.storeData = response.data || []
console.log('门店数据:', this.storeData)
} catch (error) {
console.error('获取门店数据失败:', error)
this.$message.error('获取门店数据失败: ' + error.message)
this.storeData = []
} finally {
this.storeLoading = false
}
},
// 获取个人数据
async getPersonData() {
this.personLoading = true
try {
console.log('正在获取个人数据...')
const response = await getPersonData(this.queryParams.eventId)
console.log('个人数据响应:', response)
this.personData = response.data || []
console.log('个人数据:', this.personData)
} catch (error) {
console.error('获取个人数据失败:', error)
this.$message.error('获取个人数据失败: ' + error.message)
this.personData = []
} finally {
this.personLoading = false
}
},
// 获取到店情况数据
async getFunnelData() {
this.funnelLoading = true
try {
console.log('正在获取到店情况数据...')
const response = await request({
url: `/api/Extend/lqtkjlb/GetFunnelStatisticsFast/${this.queryParams.eventId}`,
method: 'GET'
})
console.log('到店情况数据响应:', response)
if (response.code === 200 && response.data) {
this.funnelData = Array.isArray(response.data) ? response.data : (response.data.data || [])
} else {
this.funnelData = []
}
console.log('到店情况数据:', this.funnelData)
} catch (error) {
console.error('获取到店情况数据失败:', error)
this.$message.error('获取到店情况数据失败: ' + (error.message || '未知错误'))
this.funnelData = []
} finally {
this.funnelLoading = false
}
},
// 获取门店客户详情
async getStoreCustomerDetails(storeId, pageIndex = 1, pageSize = 10) {
this.customerDetailsLoading = true
try {
console.log('正在获取门店客户详情...', storeId, pageIndex, pageSize)
const response = await request({
url: `/api/Extend/lqtkjlb/GetStoreCustomerDetailsPaged/${this.queryParams.eventId}/${storeId}?pageIndex=${pageIndex}&pageSize=${pageSize}`,
method: 'GET'
})
console.log('门店客户详情响应:', response)
if (response.code === 200 && response.data && response.data.data) {
this.storeCustomerDetails = response.data.data.list || []
this.customerDetailsTotal = response.data.data.total || 0
} else {
this.storeCustomerDetails = []
this.customerDetailsTotal = 0
}
this.customerDetailsPageIndex = pageIndex
this.customerDetailsPageSize = pageSize
console.log('门店客户详情:', this.storeCustomerDetails)
console.log('总数量:', this.customerDetailsTotal)
} catch (error) {
console.error('获取门店客户详情失败:', error)
this.$message.error('获取门店客户详情失败: ' + (error.message || '未知错误'))
this.storeCustomerDetails = []
this.customerDetailsTotal = 0
} finally {
this.customerDetailsLoading = false
}
},
// 点击门店名称显示详情
async handleStoreClick(store) {
// 需要从store中获取store_id,如果没有则尝试其他字段
const storeId = store.store_id || store.id || store.StoreId
if (!storeId) {
this.$message.warning('无法获取门店ID')
return
}
this.selectedStore = store
this.storeDetailVisible = true
this.customerDetailsPageIndex = 1 // 重置到第一页
await this.getStoreCustomerDetails(storeId, 1, this.customerDetailsPageSize)
},
// 关闭门店详情弹窗
closeStoreDetail() {
this.storeDetailVisible = false
this.selectedStore = null
this.storeCustomerDetails = []
this.customerDetailsTotal = 0
this.customerDetailsPageIndex = 1
},
// 处理分页变化
async handleCustomerDetailsPageChange(pageIndex) {
if (this.selectedStore) {
const storeId = this.selectedStore.store_id || this.selectedStore.id || this.selectedStore.StoreId
if (storeId) {
await this.getStoreCustomerDetails(storeId, pageIndex, this.customerDetailsPageSize)
}
}
},
// 处理每页显示数量变化
async handleCustomerDetailsPageSizeChange(pageSize) {
this.customerDetailsPageSize = pageSize
if (this.selectedStore) {
const storeId = this.selectedStore.store_id || this.selectedStore.id || this.selectedStore.StoreId
if (storeId) {
await this.getStoreCustomerDetails(storeId, 1, pageSize)
}
}
},
// 格式化客户时间
formatCustomerTime(timestamp) {
if (!timestamp) return '无'
const date = new Date(timestamp)
return date.toLocaleString('zh-CN')
},
// 格式化金额
formatMoney(amount) {
if (amount === null || amount === undefined || amount === '') return '0.00'
return Number(amount).toFixed(2)
},
// 计算总拓客数量
getTotalTkCount() {
if (!Array.isArray(this.funnelData) || this.funnelData.length === 0) return 0
return this.funnelData.reduce((total, item) => total + (item.tk_count || 0), 0)
},
// 计算总邀约数量
getTotalYaoyCount() {
if (!Array.isArray(this.funnelData) || this.funnelData.length === 0) return 0
return this.funnelData.reduce((total, item) => total + (item.yaoy_count || 0), 0)
},
// 计算总预约数量
getTotalYyCount() {
if (!Array.isArray(this.funnelData) || this.funnelData.length === 0) return 0
return this.funnelData.reduce((total, item) => total + (item.yy_count || 0), 0)
},
// 计算总开单数量
getTotalKdCount() {
if (!Array.isArray(this.funnelData) || this.funnelData.length === 0) return 0
return this.funnelData.reduce((total, item) => total + (item.kd_count || 0), 0)
},
// 计算总耗卡数量
getTotalHkCount() {
if (!Array.isArray(this.funnelData) || this.funnelData.length === 0) return 0
return this.funnelData.reduce((total, item) => total + (item.hk_count || 0), 0)
},
// 计算总耗卡金额
getTotalHkAmount() {
if (!Array.isArray(this.funnelData) || this.funnelData.length === 0) return 0
return this.funnelData.reduce((total, item) => total + (Number(item.hk_amount) || 0), 0)
},
// 计算总开单金额
getTotalKdAmount() {
if (!Array.isArray(this.funnelData) || this.funnelData.length === 0) return 0
return this.funnelData.reduce((total, item) => total + (Number(item.kd_amount) || 0), 0)
},
// 计算完成率
getCompletionRate(completed, target) {
if (target === 0) return 0
return Math.round((completed / target) * 100)
},
// 获取完成率样式类
getCompletionRateClass(completed, target) {
const rate = this.getCompletionRate(completed, target)
if (rate >= 100) return 'rate-excellent'
if (rate >= 80) return 'rate-good'
if (rate >= 60) return 'rate-normal'
return 'rate-poor'
},
// 获取排名样式类
getRankingClass(ranking) {
if (ranking <= 3) return 'ranking-top'
if (ranking <= 6) return 'ranking-good'
return 'ranking-normal'
},
// 格式化时间
formatTime(timestamp) {
if (!timestamp) return '无'
const date = new Date(timestamp)
return date.toLocaleString('zh-CN')
},
// 格式化完成率,保留1位小数
formatCompletionRate(rate) {
if (rate === null || rate === undefined) return '0.0'
return parseFloat(rate).toFixed(1)
},
// 计算门店总目标
getStoreTotalTarget(store) {
if (!store.TeamList) return 0
let total = 0
store.TeamList.forEach(team => {
if (team.TeamUserInfo) {
team.TeamUserInfo.forEach(member => {
total += member.EventTarget || 0
})
}
})
return total
},
// 计算门店总完成数
getStoreTotalCompleted(store) {
if (!store.TeamList) return 0
let total = 0
store.TeamList.forEach(team => {
if (team.TeamUserInfo) {
team.TeamUserInfo.forEach(member => {
total += member.ExpansionCount || 0
})
}
})
return total
},
// 计算门店完成率
getStoreCompletionRate(store) {
const target = this.getStoreTotalTarget(store)
const completed = this.getStoreTotalCompleted(store)
if (target === 0) return 0
return Math.round((completed / target) * 100)
},
// 获取门店完成率样式类
getStoreCompletionRateClass(store) {
const rate = this.getStoreCompletionRate(store)
if (rate >= 100) return 'rate-excellent'
if (rate >= 80) return 'rate-good'
if (rate >= 60) return 'rate-normal'
return 'rate-poor'
},
// 计算总战队数
getTotalTeams() {
if (!this.teamData || this.teamData.length === 0) return 0
let total = 0
this.teamData.forEach(store => {
if (store.TeamList) {
total += store.TeamList.length
}
})
return total
},
// 计算总参与人员数
getTotalMembers() {
if (!this.teamData || this.teamData.length === 0) return 0
let total = 0
this.teamData.forEach(store => {
if (store.TeamList) {
store.TeamList.forEach(team => {
if (team.TeamUserInfo) {
total += team.TeamUserInfo.length
}
})
}
})
return total
},
// 计算总拓客数
getTotalExpansionCount() {
if (!this.teamData || this.teamData.length === 0) return 0
let total = 0
this.teamData.forEach(store => {
if (store.TeamList) {
store.TeamList.forEach(team => {
if (team.TeamUserInfo) {
team.TeamUserInfo.forEach(member => {
total += member.ExpansionCount || 0
})
}
})
}
})
return total
},
// 计算门店总目标数
getTotalStoreTarget() {
if (!this.storeData || this.storeData.length === 0) return 0
return this.storeData.reduce((total, store) => total + (store.TotalTarget || 0), 0)
},
// 计算门店总完成数
getTotalStoreCompleted() {
if (!this.storeData || this.storeData.length === 0) return 0
return this.storeData.reduce((total, store) => total + (store.CompletedTarget || 0), 0)
},
// 计算总完成率
getTotalCompletionRate() {
const totalTarget = this.getTotalStoreTarget()
const totalCompleted = this.getTotalStoreCompleted()
if (totalTarget === 0) return 0
return (totalCompleted / totalTarget) * 100
},
// 获取总完成率样式类
getTotalCompletionRateClass() {
const rate = this.getTotalCompletionRate()
if (rate >= 100) return 'rate-excellent'
if (rate >= 80) return 'rate-good'
if (rate >= 60) return 'rate-normal'
return 'rate-poor'
},
// 添加测试数据
addTestData() {
// 如果API调用失败,添加一些测试数据确保页面正常显示
setTimeout(() => {
// 如果没有活动列表,添加测试活动
if (this.eventList.length === 0) {
this.eventList = [
{
id: '740360861859710213',
name: '测试拓客活动'
}
]
this.queryParams.eventId = this.eventList[0].id
}
if (this.teamData.length === 0) {
this.teamData = [
{
"StoreId": "1649328471923847186",
"StoreName": "绿纤骑士郡店",
"TeamList": [
{
"TeamName": "咕噜队",
"TeamUserInfo": [
{
"ExpansionUserId": "17882512738",
"ExpansionUserName": "梁诗雨",
"ExpansionCount": 6,
"EventTarget": 100
},
{
"ExpansionUserId": "admin",
"ExpansionUserName": "管理员",
"ExpansionCount": 0,
"EventTarget": 6
}
]
}
]
}
]
}
if (this.storeData.length === 0) {
this.storeData = [
{
"StoreId": "1649328471923847190",
"StoreName": "绿纤亚洲湾店",
"TotalTarget": 6,
"CompletedTarget": 6,
"CompletionRate": 100,
"Ranking": 1
},
{
"StoreId": "1649328471923847169",
"StoreName": "绿纤紫荆店",
"TotalTarget": 3,
"CompletedTarget": 3,
"CompletionRate": 100,
"Ranking": 2
}
]
}
if (this.personData.length === 0) {
this.personData = [
{
"UserId": "19982024821",
"UserName": "谢珂欣",
"StoreId": "1649328471923847190",
"StoreName": "绿纤亚洲湾店",
"TeamName": "9444",
"PersonalTarget": 1,
"CompletedTarget": 6,
"CompletionRate": 600,
"Ranking": 1,
"LastExpansionTime": 1758699730000
},
{
"UserId": "17780181798",
"UserName": "王任燕",
"StoreId": "1649328471923847175",
"StoreName": "绿纤468店",
"TeamName": "222",
"PersonalTarget": 1,
"CompletedTarget": 3,
"CompletionRate": 300,
"Ranking": 2,
"LastExpansionTime": 1758699412000
}
]
}
}, 2000) // 2秒后添加测试数据
},
// 保存截图
async saveScreenshot() {
this.screenshotLoading = true
try {
// 动态导入html2canvas
const html2canvas = await import('html2canvas')
// 根据当前选中的选项卡获取要截图的容器
let element
console.log('当前选中的选项卡:', this.activeTab)
// 尝试多种选择器来找到正确的元素
const selectors = [
`.el-tabs__content .el-tab-pane[name="${this.activeTab}"] .tab-content`,
`.el-tab-pane[name="${this.activeTab}"] .tab-content`,
`.el-tabs__content .el-tab-pane[aria-labelledby*="${this.activeTab}"] .tab-content`,
`.el-tab-pane[aria-labelledby*="${this.activeTab}"] .tab-content`,
`.tabs-container .tab-content`
]
for (const selector of selectors) {
element = document.querySelector(selector)
if (element) {
console.log('使用选择器找到元素:', selector, element)
break
}
}
// 如果还是找不到,尝试通过选项卡内容查找
if (!element) {
const tabPanes = document.querySelectorAll('.el-tab-pane')
for (const pane of tabPanes) {
if (pane.classList.contains('is-active') || pane.style.display !== 'none') {
element = pane.querySelector('.tab-content')
if (element) {
console.log('通过活动选项卡找到元素:', element)
break
}
}
}
}
console.log('最终找到的截图元素:', element)
// 如果还是找不到,使用整个选项卡容器作为备用
if (!element) {
element = document.querySelector('.tabs-container')
console.log('使用备用方案 - 整个选项卡容器:', element)
}
if (!element) {
this.$message.error('未找到要截图的内容')
return
}
// 等待页面完全渲染
await new Promise(resolve => setTimeout(resolve, 1000))
// 滚动到页面顶部确保所有内容可见
window.scrollTo(0, 0)
await new Promise(resolve => setTimeout(resolve, 500))
// 临时保存原始样式
const originalStyles = {
height: element.style.height,
overflow: element.style.overflow,
maxHeight: element.style.maxHeight,
position: element.style.position
}
// 临时修改样式以确保完整截图
element.style.height = 'auto'
element.style.overflow = 'visible'
element.style.maxHeight = 'none'
element.style.position = 'static'
// 确保所有报表区域都可见
const reportSections = element.querySelectorAll('.report-section')
reportSections.forEach(section => {
section.style.height = 'auto'
section.style.overflow = 'visible'
section.style.maxHeight = 'none'
section.style.display = 'block'
})
// 确保统计概览完整显示
const statisticsOverview = element.querySelector('.statistics-overview')
if (statisticsOverview) {
statisticsOverview.style.height = 'auto'
statisticsOverview.style.overflow = 'visible'
statisticsOverview.style.maxHeight = 'none'
statisticsOverview.style.display = 'block'
statisticsOverview.style.visibility = 'visible'
statisticsOverview.style.opacity = '1'
}
// 确保瀑布流容器完整显示
const waterfallContainer = element.querySelector('.waterfall-container')
if (waterfallContainer) {
waterfallContainer.style.height = 'auto'
waterfallContainer.style.overflow = 'visible'
waterfallContainer.style.maxHeight = 'none'
}
// 确保所有卡片完整显示
const storeCards = element.querySelectorAll('.store-card-waterfall')
storeCards.forEach(card => {
card.style.height = 'auto'
card.style.overflow = 'visible'
card.style.maxHeight = 'none'
})
// 确保背景色统一为白色
element.style.backgroundColor = '#ffffff'
// 确保所有子元素背景色统一
const allElements = element.querySelectorAll('*')
allElements.forEach(el => {
// 只处理有背景色的元素,避免影响其他样式
if (el.style.backgroundColor && el.style.backgroundColor !== 'transparent') {
el.style.backgroundColor = '#ffffff'
}
})
// 特别处理表格背景色和宽度
const elementTables = element.querySelectorAll('.el-table')
elementTables.forEach(table => {
table.style.backgroundColor = '#ffffff'
table.style.width = '100%'
table.style.minWidth = '100%'
table.style.maxWidth = 'none'
table.style.tableLayout = 'auto'
})
// 特别处理表格单元格背景色
const tableCells = element.querySelectorAll('.el-table td')
tableCells.forEach(cell => {
cell.style.backgroundColor = '#ffffff'
})
// 特别处理表格头部
const tableHeaders = element.querySelectorAll('.el-table th')
tableHeaders.forEach(header => {
header.style.backgroundColor = '#f8f9fa'
})
// 确保表格容器和表格保持实际渲染宽度,避免被拉伸
const tableContainers = element.querySelectorAll('.store-ranking-table, .no-expansion-table, .store-table, .person-table')
tableContainers.forEach(container => {
// 保持表格容器的原始宽度,避免被拉伸
const originalWidth = container.offsetWidth || container.clientWidth
if (originalWidth) {
container.style.width = originalWidth + 'px'
container.style.minWidth = originalWidth + 'px'
container.style.maxWidth = originalWidth + 'px'
}
container.style.overflow = 'visible'
})
// 等待样式应用
await new Promise(resolve => setTimeout(resolve, 500))
// 对于门店排行榜表格,保持auto宽度,不要拉伸
elementTables.forEach(table => {
const tableContainer = table.closest('.store-ranking-table')
if (tableContainer) {
// 门店排行榜表格保持auto宽度
table.style.width = 'auto'
table.style.minWidth = 'auto'
table.style.maxWidth = 'none'
} else {
// 其他表格保持原有逻辑
table.style.width = 'auto'
table.style.minWidth = 'auto'
// 触发重新布局
table.offsetHeight
// 重新设置宽度
table.style.width = '100%'
table.style.minWidth = '100%'
}
})
// 计算实际内容高度和宽度
const actualHeight = Math.max(
element.scrollHeight,
element.offsetHeight,
element.clientHeight
)
// 对于门店排行榜,使用表格的实际宽度,而不是整个容器宽度
const storeRankingTable = element.querySelector('.store-ranking-table .el-table')
let actualWidth
let isStoreRanking = false
if (storeRankingTable) {
// 门店排行榜:使用表格的实际宽度,不添加额外边距
actualWidth = storeRankingTable.offsetWidth || storeRankingTable.clientWidth || storeRankingTable.scrollWidth
isStoreRanking = true
} else {
// 其他情况:使用元素的实际渲染宽度
actualWidth = element.offsetWidth || element.clientWidth
// 对于其他表格,使用表格的实际宽度
const widthCheckTables = element.querySelectorAll('.el-table')
widthCheckTables.forEach(table => {
const tableWidth = table.offsetWidth || table.clientWidth
if (tableWidth > actualWidth) {
actualWidth = tableWidth
}
})
// 确保宽度不超过容器的实际宽度
const containerWidth = (element.parentElement && element.parentElement.offsetWidth) || element.offsetWidth
if (actualWidth > containerWidth) {
actualWidth = containerWidth
}
}
// 进一步限制宽度,避免截图过大
const maxWidth = Math.min(actualWidth, window.innerWidth || 1200)
// 只有门店排行榜除以2
actualWidth = isStoreRanking ? maxWidth / 2 : maxWidth
console.log('容器尺寸信息:', {
scrollWidth: element.scrollWidth,
scrollHeight: element.scrollHeight,
offsetWidth: element.offsetWidth,
offsetHeight: element.offsetHeight,
clientWidth: element.clientWidth,
clientHeight: element.clientHeight,
actualHeight: actualHeight,
actualWidth: actualWidth
})
// 对于门店排行榜,创建一个只包含表格的临时容器用于截图
let screenshotElement = element
let shouldRemoveTempContainer = false
if (storeRankingTable) {
// 创建临时容器,只包含表格
const tempContainer = document.createElement('div')
tempContainer.style.position = 'absolute'
tempContainer.style.left = '-9999px'
tempContainer.style.width = actualWidth + 'px'
tempContainer.style.padding = '0'
tempContainer.style.margin = '0'
tempContainer.style.backgroundColor = '#ffffff'
// 克隆表格容器
const tableContainer = storeRankingTable.closest('.store-ranking-table')
if (tableContainer) {
const clonedContainer = tableContainer.cloneNode(true)
// 确保克隆的容器宽度也是auto
clonedContainer.style.width = 'auto'
clonedContainer.style.minWidth = 'auto'
clonedContainer.style.maxWidth = 'none'
tempContainer.appendChild(clonedContainer)
document.body.appendChild(tempContainer)
screenshotElement = tempContainer
shouldRemoveTempContainer = true
}
}
// 配置截图选项
const options = {
allowTaint: true,
useCORS: true,
scale: 2,
backgroundColor: '#ffffff',
logging: true,
imageTimeout: 30000,
removeContainer: true,
foreignObjectRendering: false,
scrollX: 0,
scrollY: 0,
width: actualWidth,
height: shouldRemoveTempContainer ? screenshotElement.scrollHeight : actualHeight,
ignoreElements: (element) => {
// 忽略可能影响截图的元素
return element.classList.contains('el-loading-mask') ||
element.classList.contains('el-loading-spinner') ||
element.classList.contains('el-message') ||
element.classList.contains('el-dialog__wrapper') ||
element.classList.contains('el-tooltip__popper')
},
onclone: (clonedDoc) => {
// 在克隆的文档中确保所有容器都能完整显示
const clonedElement = clonedDoc.querySelector('.report-sections-container')
if (clonedElement) {
clonedElement.style.height = 'auto'
clonedElement.style.overflow = 'visible'
clonedElement.style.maxHeight = 'none'
clonedElement.style.position = 'static'
clonedElement.style.width = '100%'
clonedElement.style.backgroundColor = '#ffffff'
}
// 确保克隆文档中所有元素背景色统一
const allClonedElements = clonedDoc.querySelectorAll('*')
allClonedElements.forEach(el => {
// 处理有背景色的元素
if (el.style.backgroundColor && el.style.backgroundColor !== 'transparent') {
el.style.backgroundColor = '#ffffff'
}
})
// 特别处理表格背景色和宽度
const clonedTables = clonedDoc.querySelectorAll('.el-table')
clonedTables.forEach(table => {
table.style.backgroundColor = '#ffffff'
table.style.width = '100%'
table.style.minWidth = '100%'
table.style.maxWidth = 'none'
table.style.tableLayout = 'auto'
})
// 特别处理表格单元格背景色
const clonedTableCells = clonedDoc.querySelectorAll('.el-table td')
clonedTableCells.forEach(cell => {
cell.style.backgroundColor = '#ffffff'
})
// 特别处理表格头部
const clonedTableHeaders = clonedDoc.querySelectorAll('.el-table th')
clonedTableHeaders.forEach(header => {
header.style.backgroundColor = '#f8f9fa'
})
// 确保表格容器宽度足够
const clonedTableContainers = clonedDoc.querySelectorAll('.store-ranking-table, .no-expansion-table, .store-table, .person-table')
clonedTableContainers.forEach(container => {
// 保持表格容器的原始宽度,避免被拉伸
const originalWidth = container.offsetWidth || container.clientWidth || container.scrollWidth
if (originalWidth) {
container.style.width = originalWidth + 'px'
container.style.minWidth = originalWidth + 'px'
container.style.maxWidth = originalWidth + 'px'
} else {
container.style.width = '100%'
container.style.minWidth = '100%'
container.style.maxWidth = 'none'
}
container.style.overflow = 'visible'
})
// 对于门店排行榜表格,确保表格本身保持auto宽度
const clonedStoreRankingTables = clonedDoc.querySelectorAll('.store-ranking-table .el-table')
clonedStoreRankingTables.forEach(table => {
table.style.width = 'auto'
table.style.minWidth = 'auto'
table.style.maxWidth = 'none'
})
// 确保所有报表区域完整显示
const reportSections = clonedDoc.querySelectorAll('.report-section')
reportSections.forEach(section => {
section.style.height = 'auto'
section.style.overflow = 'visible'
section.style.maxHeight = 'none'
section.style.display = 'block'
section.style.visibility = 'visible'
section.style.opacity = '1'
})
// 确保统计概览完整显示
const statisticsOverview = clonedDoc.querySelector('.statistics-overview')
if (statisticsOverview) {
statisticsOverview.style.height = 'auto'
statisticsOverview.style.overflow = 'visible'
statisticsOverview.style.maxHeight = 'none'
statisticsOverview.style.display = 'block'
statisticsOverview.style.visibility = 'visible'
statisticsOverview.style.opacity = '1'
statisticsOverview.style.position = 'static'
}
// 确保统计卡片完整显示
const statCards = clonedDoc.querySelectorAll('.stat-card')
statCards.forEach(card => {
card.style.height = 'auto'
card.style.overflow = 'visible'
card.style.maxHeight = 'none'
card.style.display = 'flex'
card.style.visibility = 'visible'
card.style.opacity = '1'
card.style.position = 'static'
})
// 确保栅格系统完整显示
const elRows = clonedDoc.querySelectorAll('.el-row')
elRows.forEach(row => {
row.style.height = 'auto'
row.style.overflow = 'visible'
row.style.maxHeight = 'none'
})
const elCols = clonedDoc.querySelectorAll('.el-col')
elCols.forEach(col => {
col.style.height = 'auto'
col.style.overflow = 'visible'
col.style.maxHeight = 'none'
})
// 确保排行榜卡片完整显示
const rankingSections = clonedDoc.querySelectorAll('.ranking-section')
rankingSections.forEach(section => {
section.style.height = 'auto'
section.style.overflow = 'visible'
section.style.maxHeight = 'none'
section.style.display = 'block'
section.style.visibility = 'visible'
section.style.opacity = '1'
})
const rankingCards = clonedDoc.querySelectorAll('.ranking-card')
rankingCards.forEach(card => {
card.style.height = 'auto'
card.style.overflow = 'visible'
card.style.maxHeight = 'none'
card.style.display = 'flex'
card.style.visibility = 'visible'
card.style.opacity = '1'
card.style.position = 'static'
})
const rankingCardsContainer = clonedDoc.querySelectorAll('.ranking-cards')
rankingCardsContainer.forEach(container => {
container.style.display = 'flex'
container.style.visibility = 'visible'
container.style.opacity = '1'
container.style.height = 'auto'
container.style.overflow = 'visible'
})
// 确保瀑布流容器完整显示
const waterfallContainer = clonedDoc.querySelector('.waterfall-container')
if (waterfallContainer) {
waterfallContainer.style.height = 'auto'
waterfallContainer.style.overflow = 'visible'
waterfallContainer.style.maxHeight = 'none'
waterfallContainer.style.display = 'flex'
waterfallContainer.style.flexWrap = 'wrap'
}
// 确保所有卡片完整显示
const storeCards = clonedDoc.querySelectorAll('.store-card-waterfall')
storeCards.forEach(card => {
card.style.height = 'auto'
card.style.overflow = 'visible'
card.style.maxHeight = 'none'
card.style.display = 'block'
})
// 确保所有团队和成员数据完整显示
const teamCards = clonedDoc.querySelectorAll('.team-card')
teamCards.forEach(card => {
card.style.height = 'auto'
card.style.overflow = 'visible'
card.style.display = 'block'
})
// 确保表格完整显示
const tables = clonedDoc.querySelectorAll('.el-table')
tables.forEach(table => {
table.style.height = 'auto'
table.style.overflow = 'visible'
table.style.maxHeight = 'none'
table.style.width = '100%'
table.style.minWidth = '100%'
table.style.maxWidth = 'none'
table.style.tableLayout = 'auto'
})
// 确保表格行完整显示
const tableRows = clonedDoc.querySelectorAll('.el-table__row')
tableRows.forEach(row => {
row.style.height = 'auto'
row.style.overflow = 'visible'
})
// 确保表格列完整显示
const tableCols = clonedDoc.querySelectorAll('.el-table__column')
tableCols.forEach(col => {
col.style.width = 'auto'
col.style.minWidth = 'auto'
col.style.maxWidth = 'none'
})
// 确保表格主体完整显示
const tableBody = clonedDoc.querySelectorAll('.el-table__body')
tableBody.forEach(body => {
body.style.width = '100%'
body.style.minWidth = '100%'
body.style.maxWidth = 'none'
body.style.overflow = 'visible'
})
// 确保表格头部完整显示
const tableHead = clonedDoc.querySelectorAll('.el-table__header')
tableHead.forEach(head => {
head.style.width = '100%'
head.style.minWidth = '100%'
head.style.maxWidth = 'none'
head.style.overflow = 'visible'
})
// 确保表格包装器完整显示
const tableWrapper = clonedDoc.querySelectorAll('.el-table__body-wrapper, .el-table__header-wrapper')
tableWrapper.forEach(wrapper => {
wrapper.style.width = '100%'
wrapper.style.minWidth = '100%'
wrapper.style.maxWidth = 'none'
wrapper.style.overflow = 'visible'
})
}
}
console.log('开始生成截图,配置选项:', options)
// 生成截图
const canvas = await html2canvas.default(screenshotElement, options)
console.log('截图生成完成,画布尺寸:', {
width: canvas.width,
height: canvas.height
})
// 清理临时容器
if (shouldRemoveTempContainer && screenshotElement.parentElement) {
screenshotElement.parentElement.removeChild(screenshotElement)
}
// 恢复原始样式
element.style.height = originalStyles.height
element.style.overflow = originalStyles.overflow
element.style.maxHeight = originalStyles.maxHeight
element.style.position = originalStyles.position
// 恢复报表区域样式
reportSections.forEach(section => {
section.style.height = ''
section.style.overflow = ''
section.style.maxHeight = ''
})
// 转换为DataURL
this.screenshotDataUrl = canvas.toDataURL('image/png', 1.0)
// 显示预览对话框
this.previewVisible = true
this.$message.success('截图生成成功')
} catch (error) {
console.error('截图生成失败:', error)
// 清理临时容器(如果存在)
if (shouldRemoveTempContainer && screenshotElement && screenshotElement.parentElement) {
screenshotElement.parentElement.removeChild(screenshotElement)
}
this.$message.error('截图生成失败: ' + error.message)
} finally {
this.screenshotLoading = false
}
},
// 下载截图
downloadScreenshot() {
if (!this.screenshotDataUrl) {
this.$message.error('没有可下载的图片')
return
}
try {
// 创建下载链接
const link = document.createElement('a')
link.download = `拓客活动报表_${new Date().toISOString().slice(0, 19).replace(/:/g, '-')}.png`
link.href = this.screenshotDataUrl
// 触发下载
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
this.$message.success('图片下载成功')
} catch (error) {
console.error('下载失败:', error)
this.$message.error('下载失败,请重试')
}
},
// 关闭预览
closePreview() {
this.previewVisible = false
this.screenshotDataUrl = ''
}
}
}
</script>
<style lang="scss" scoped>
.app-container {
padding: 12px;
// background-color: #f5f5f5;
// height: 100vh;
overflow-y: scroll;
// box-sizing: border-box;
}
.page-header {
margin-bottom: 12px;
h2 {
margin: 0;
color: #303133;
font-size: 20px;
font-weight: 500;
}
}
.filter-container {
background: white;
padding: 12px 16px;
border-radius: 6px;
margin-bottom: 12px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.report-section {
background: white;
border-radius: 6px;
margin-bottom: 12px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.section-header {
background: #409EFF;
color: white;
padding: 10px 16px;
h3 {
margin: 0;
font-size: 16px;
font-weight: 500;
}
}
.report-content {
padding: 12px;
}
.no-data {
text-align: center;
color: #909399;
padding: 20px 0;
font-size: 14px;
}
// 统计概览样式
.statistics-overview {
margin-bottom: 20px;
.stat-card {
background: white;
border-radius: 8px;
padding: 20px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
display: flex;
align-items: center;
height: 100px;
transition: all 0.3s ease;
&:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.stat-icon {
width: 60px;
height: 60px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16px;
i {
font-size: 24px;
color: white;
}
&:nth-child(1) {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
}
.stat-content {
flex: 1;
.stat-number {
font-size: 28px;
font-weight: bold;
color: #303133;
line-height: 1;
margin-bottom: 4px;
}
.stat-label {
font-size: 14px;
color: #909399;
line-height: 1;
}
}
// 不同卡片的图标背景色
&:nth-child(1) .stat-icon {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
&:nth-child(2) .stat-icon {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
&:nth-child(3) .stat-icon {
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
&:nth-child(4) .stat-icon {
background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}
}
}
// 瀑布流容器
.waterfall-container {
display: flex;
flex-wrap: wrap;
gap: 12px;
align-items: flex-start;
}
// 团队数据样式 - 瀑布流版本
.store-card-waterfall {
width: calc(25% - 9px); // 25%宽度减去gap的一半
margin-bottom: 12px;
border: 1px solid #e4e7ed;
border-radius: 6px;
overflow: hidden;
background: white;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
// 响应式设计
@media (max-width: 1200px) {
width: calc(33.333% - 8px); // 3列
}
@media (max-width: 900px) {
width: calc(50% - 6px); // 2列
}
@media (max-width: 600px) {
width: 100%; // 1列
}
}
// 原有的store-card样式保留,用于其他报表
.store-card {
margin-bottom: 12px;
border: 1px solid #e4e7ed;
border-radius: 6px;
overflow: hidden;
&:last-child {
margin-bottom: 0;
}
}
.store-header {
background: #f8f9fa;
padding: 8px 12px;
border-bottom: 1px solid #e4e7ed;
}
.store-title-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
h4 {
margin: 0;
color: #303133;
font-size: 14px;
font-weight: 500;
flex: 1;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.store-summary {
display: flex;
gap: 8px;
font-size: 10px;
flex-shrink: 0;
}
.summary-text {
color: #606266;
.summary-value {
font-weight: 500;
color: #303133;
&.rate-excellent {
color: #67C23A;
}
&.rate-good {
color: #409EFF;
}
&.rate-normal {
color: #E6A23C;
}
&.rate-poor {
color: #F56C6C;
}
}
}
.teams-container {
padding: 8px;
}
.team-card {
margin-bottom: 8px;
border: 1px solid #e4e7ed;
border-radius: 4px;
overflow: hidden;
&:last-child {
margin-bottom: 0;
}
}
.team-header {
background: #f0f2f5;
padding: 6px 8px;
border-bottom: 1px solid #e4e7ed;
.team-name {
font-weight: 500;
color: #606266;
font-size: 13px;
}
}
.team-members {
padding: 6px;
}
.member-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 4px 0;
border-bottom: 1px solid #f0f2f5;
&:last-child {
border-bottom: none;
}
}
.member-info {
flex: 1;
min-width: 0; // 防止内容溢出
.member-name {
font-weight: 500;
color: #303133;
font-size: 12px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.member-stats {
display: flex;
gap: 8px;
flex-shrink: 0; // 防止统计信息被压缩
span {
font-size: 10px;
white-space: nowrap;
&.target {
color: #606266;
}
&.count {
color: #409EFF;
font-weight: 500;
}
&.rate {
font-weight: 500;
&.rate-excellent {
color: #67C23A;
}
&.rate-good {
color: #409EFF;
}
&.rate-normal {
color: #E6A23C;
}
&.rate-poor {
color: #F56C6C;
}
}
}
}
// 表格样式
.store-table, .person-table {
.el-table {
border-radius: 4px;
overflow: hidden;
font-size: 12px;
}
.el-table th {
padding: 8px 0;
font-size: 12px;
}
.el-table td {
padding: 6px 0;
font-size: 12px;
}
}
.progress-container {
display: flex;
align-items: center;
gap: 6px;
}
.progress-bar {
flex: 1;
height: 6px;
background: #f0f2f5;
border-radius: 3px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: #409EFF;
border-radius: 3px;
transition: width 0.3s ease;
}
.progress-text {
font-size: 11px;
color: #606266;
min-width: 35px;
text-align: right;
}
.ranking {
font-weight: 500;
font-size: 12px;
&.ranking-top {
color: #F56C6C;
}
&.ranking-good {
color: #E6A23C;
}
&.ranking-normal {
color: #606266;
}
}
// 响应式设计
@media (max-width: 768px) {
.app-container {
padding: 8px;
}
.waterfall-container {
gap: 8px;
}
.store-card-waterfall {
width: 100% !important; // 移动端强制单列
}
.statistics-overview {
.stat-card {
height: 80px;
padding: 16px;
.stat-icon {
width: 50px;
height: 50px;
margin-right: 12px;
i {
font-size: 20px;
}
}
.stat-content {
.stat-number {
font-size: 24px;
}
.stat-label {
font-size: 12px;
}
}
}
}
.store-title-row {
flex-direction: column;
align-items: flex-start;
gap: 4px;
}
.store-summary {
gap: 6px;
font-size: 9px;
}
.member-stats {
gap: 4px;
span {
font-size: 9px;
}
}
.progress-container {
flex-direction: column;
align-items: flex-start;
gap: 2px;
}
// 总门店排行榜响应式
.store-ranking-summary {
flex-direction: column;
gap: 12px;
padding: 12px;
.summary-item {
justify-content: space-between;
.summary-label {
font-size: 13px;
}
.summary-value {
font-size: 15px;
}
}
}
.store-ranking-table {
.el-table {
font-size: 12px;
}
.el-table th {
padding: 8px 0;
font-size: 12px;
}
.el-table td {
padding: 6px 0;
font-size: 12px;
}
.progress-container {
flex-direction: column;
align-items: flex-start;
gap: 4px;
}
.progress-bar {
height: 6px;
}
.progress-text {
font-size: 11px;
min-width: 35px;
}
}
}
// 报表内容容器样式
.report-sections-container {
// 确保容器能完整显示所有内容
min-height: 100vh;
width: 100%;
}
// 选项卡容器样式
.tabs-container {
background: white;
border-radius: 6px;
margin-bottom: 12px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
overflow: hidden;
.el-tabs__header {
margin: 0;
background: #f8f9fa;
border-bottom: 1px solid #e4e7ed;
}
.el-tabs__nav-wrap {
padding: 0 16px;
}
.el-tabs__item {
font-weight: 500;
color: #606266;
&.is-active {
color: #409EFF;
}
}
}
// 选项卡内容样式
.tab-content {
padding: 16px;
min-height: 400px;
background: #ffffff; // 确保内容区域背景为纯白色
}
// 排行榜样式 - 商务高端版
.ranking-section {
margin-bottom: 40px;
background: #ffffff; // 使用纯白色背景,去掉渐变效果
border-radius: 20px;
padding: 32px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
border: 1px solid rgba(0, 0, 0, 0.04);
&:last-child {
margin-bottom: 0;
}
}
.ranking-title {
display: flex;
align-items: center;
margin: 0 0 28px 0;
font-size: 22px;
font-weight: 700;
color: #1a202c;
position: relative;
text-align: center;
justify-content: center;
// &::before {
// content: '';
// position: absolute;
// top: 50%;
// left: 0;
// right: 0;
// height: 1px;
// background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
// z-index: 1;
// }
&::after {
content: '';
position: absolute;
bottom: -12px;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 4px;
background: linear-gradient(90deg, #667eea, #764ba2);
border-radius: 2px;
z-index: 2;
}
i {
margin-right: 12px;
color: #667eea;
font-size: 24px;
background: linear-gradient(135deg, #667eea, #764ba2);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
span {
background: white;
padding: 0 20px;
position: relative;
z-index: 3;
}
}
.ranking-cards {
display: flex;
gap: 24px;
flex-wrap: wrap;
justify-content: center;
align-items: stretch;
}
.ranking-card {
flex: 1;
min-width: 300px;
max-width: 360px;
background: white;
border-radius: 20px;
padding: 32px 28px;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
position: relative;
transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
border: 1px solid rgba(0, 0, 0, 0.06);
overflow: hidden;
&::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 6px;
background: linear-gradient(90deg, #e2e8f0, #e2e8f0);
transition: all 0.4s ease;
}
&::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
opacity: 0;
transition: opacity 0.3s ease;
}
&:hover {
transform: translateY(-12px) scale(1.03);
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
&::after {
opacity: 1;
}
}
&.rank-1 {
&::before {
background: linear-gradient(90deg, #ffd700, #ffb347, #ffd700);
}
.rank-number {
background: linear-gradient(135deg, #ffd700 0%, #ffb347 50%, #ff8c00 100%);
color: white;
box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
border: 3px solid rgba(255, 215, 0, 0.3);
}
.rank-medal i {
filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.4));
}
.rank-name {
color: #b8860b;
}
}
&.rank-2 {
&::before {
background: linear-gradient(90deg, #c0c0c0, #d3d3d3, #c0c0c0);
}
.rank-number {
background: linear-gradient(135deg, #c0c0c0 0%, #d3d3d3 50%, #a9a9a9 100%);
color: white;
box-shadow: 0 8px 25px rgba(192, 192, 192, 0.4);
border: 3px solid rgba(192, 192, 192, 0.3);
}
.rank-medal i {
filter: drop-shadow(0 4px 8px rgba(192, 192, 192, 0.4));
}
.rank-name {
color: #708090;
}
}
&.rank-3 {
&::before {
background: linear-gradient(90deg, #cd7f32, #daa520, #cd7f32);
}
.rank-number {
background: linear-gradient(135deg, #cd7f32 0%, #daa520 50%, #b8860b 100%);
color: white;
box-shadow: 0 8px 25px rgba(205, 127, 50, 0.4);
border: 3px solid rgba(205, 127, 50, 0.3);
}
.rank-medal i {
filter: drop-shadow(0 4px 8px rgba(205, 127, 50, 0.4));
}
.rank-name {
color: #8b4513;
}
}
}
.rank-number {
width: 70px;
height: 70px;
border-radius: 50%;
background: #f1f5f9;
color: #64748b;
display: flex;
align-items: center;
justify-content: center;
font-weight: 800;
font-size: 24px;
margin-bottom: 20px;
flex-shrink: 0;
transition: all 0.4s ease;
position: relative;
border: 3px solid transparent;
&::before {
content: '';
position: absolute;
inset: -6px;
border-radius: 50%;
background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
opacity: 0;
transition: opacity 0.3s ease;
}
&:hover::before {
opacity: 1;
}
}
.rank-content {
flex: 1;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.rank-name {
font-size: 20px;
font-weight: 700;
color: #1a202c;
margin-bottom: 8px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.4;
max-width: 100%;
}
.rank-store {
font-size: 14px;
color: #64748b;
margin-bottom: 16px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-weight: 500;
background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
padding: 6px 12px;
border-radius: 20px;
display: inline-block;
border: 1px solid rgba(0, 0, 0, 0.05);
max-width: 100%;
}
.rank-stats {
display: flex;
flex-direction: column;
gap: 12px;
width: 100%;
.stat-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 12px;
background: #f8fafc;
border-radius: 12px;
border: 1px solid rgba(0, 0, 0, 0.05);
.stat-label {
font-size: 13px;
color: #64748b;
font-weight: 500;
}
.stat-value {
font-size: 14px;
font-weight: 600;
&.target {
color: #64748b;
}
&.completed {
color: #3b82f6;
}
&.rate {
&.rate-excellent {
color: #10b981;
background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.2));
padding: 4px 8px;
border-radius: 8px;
border: 1px solid rgba(16, 185, 129, 0.3);
}
&.rate-good {
color: #3b82f6;
background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.2));
padding: 4px 8px;
border-radius: 8px;
border: 1px solid rgba(59, 130, 246, 0.3);
}
&.rate-normal {
color: #f59e0b;
background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.2));
padding: 4px 8px;
border-radius: 8px;
border: 1px solid rgba(245, 158, 11, 0.3);
}
&.rate-poor {
color: #ef4444;
background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.2));
padding: 4px 8px;
border-radius: 8px;
border: 1px solid rgba(239, 68, 68, 0.3);
}
}
}
}
}
.rank-medal {
position: absolute;
top: 20px;
right: 20px;
font-size: 28px;
transition: all 0.4s ease;
z-index: 10;
&:hover {
transform: scale(1.2) rotate(5deg);
}
i {
&.el-icon-trophy {
color: #ffd700;
}
&.el-icon-medal {
color: #c0c0c0;
}
&.el-icon-medal-1 {
color: #cd7f32;
}
}
}
// 个人排行榜特殊样式
.person-card {
.rank-content {
.rank-name {
font-size: 22px;
margin-bottom: 10px;
}
.rank-store {
font-size: 13px;
margin-bottom: 18px;
}
}
}
// 未拓客人员统计样式
.no-expansion-summary {
margin-bottom: 16px;
font-size: 14px;
color: #606266;
}
// 总门店排行榜样式
.store-ranking-summary {
display: flex;
gap: 24px;
margin-bottom: 20px;
padding: 16px;
background: #ffffff; // 使用纯白色背景
border-radius: 8px;
border: 1px solid #e4e7ed;
flex-wrap: wrap;
.summary-item {
display: flex;
align-items: center;
gap: 8px;
.summary-label {
font-size: 14px;
color: #606266;
font-weight: 500;
}
.summary-value {
font-size: 16px;
font-weight: 600;
color: #303133;
&.rate-excellent {
color: #67C23A;
}
&.rate-good {
color: #409EFF;
}
&.rate-normal {
color: #E6A23C;
}
&.rate-poor {
color: #F56C6C;
}
}
}
}
.store-ranking-table {
.el-table {
border: 1px solid #e4e7ed;
font-size: 12px;
background: #ffffff;
border-collapse: separate;
border-spacing: 0;
}
.el-table th {
background: #92d04f !important;
color: #000 !important;
font-weight: 500;
padding: 6px 4px;
font-size: 12px;
border-bottom: 1px solid #7ab83a;
border-right: 1px solid #7ab83a;
line-height: 1.4;
&:last-child {
border-right: none;
}
}
// 确保表头背景色正确应用
::v-deep .el-table__header-wrapper {
.el-table__header {
th {
background-color: #92d04f !important;
color: #000 !important;
padding: 6px 4px;
font-size: 12px;
line-height: 1.4;
}
}
}
.el-table td {
padding: 6px 4px;
font-size: 12px;
background: #ffffff;
border-bottom: 1px solid #f0f0f0;
border-right: 1px solid #f0f0f0;
color: #303133;
line-height: 1.4;
&:last-child {
border-right: none;
}
}
.el-table__body tr:hover > td {
background-color: #ffffff !important;
}
.el-table__body tr:last-child td {
border-bottom: none;
}
.ranking-number {
font-weight: 600;
font-size: 12px;
&.ranking-top {
color: #F56C6C;
}
&.ranking-good {
color: #E6A23C;
}
&.ranking-normal {
color: #606266;
}
}
.progress-container {
display: flex;
align-items: center;
gap: 8px;
}
.progress-bar {
flex: 1;
height: 8px;
background: #f0f2f5;
border-radius: 4px;
overflow: hidden;
}
.progress-fill {
height: 100%;
border-radius: 4px;
transition: width 0.3s ease;
background: linear-gradient(90deg, #409EFF, #66b1ff);
}
.progress-text {
font-size: 13px;
font-weight: 600;
min-width: 40px;
text-align: right;
color: #409EFF;
}
.ranking {
font-weight: 600;
font-size: 12px;
&.ranking-top {
color: #F56C6C;
}
&.ranking-good {
color: #E6A23C;
}
&.ranking-normal {
color: #606266;
}
}
// 总计行样式
::v-deep .el-table__body-wrapper {
.el-table__body {
tbody tr:last-child {
background-color: #92d04f !important;
td {
background-color: #92d04f !important;
border-bottom: none !important;
padding: 6px 4px;
font-size: 12px;
line-height: 1.4;
.total-label {
font-weight: 600;
color: #000;
font-size: 12px;
}
.total-value {
font-weight: 600;
color: #000;
font-size: 12px;
}
}
}
}
}
}
// 未拓客人员表格样式
.no-expansion-table {
.zero-count {
color: #F56C6C;
font-weight: 500;
}
.zero-progress {
background: #F56C6C !important;
}
}
// 到店情况统计概览样式
.store-visit-summary {
display: flex;
gap: 24px;
margin-bottom: 20px;
padding: 16px;
background: #ffffff;
border-radius: 8px;
border: 1px solid #e4e7ed;
flex-wrap: wrap;
.summary-item {
display: flex;
align-items: center;
gap: 8px;
.summary-label {
font-size: 14px;
color: #606266;
font-weight: 500;
}
.summary-value {
font-size: 16px;
font-weight: 600;
color: #303133;
}
}
}
// 到店情况表格样式
.store-visit-table {
.el-table {
border-radius: 8px;
overflow: hidden;
font-size: 14px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
background: #ffffff;
}
.el-table th {
background: #f8f9fa;
color: #606266;
font-weight: 600;
padding: 12px 0;
font-size: 14px;
}
.el-table td {
padding: 10px 0;
font-size: 14px;
background: #ffffff;
}
// 确保斑马纹效果正常显示
.el-table--striped .el-table__body tr.el-table__row--striped td {
background: #fafafa;
}
// 门店名称链接样式
.store-name-link {
color: #409EFF;
cursor: pointer;
text-decoration: none;
font-weight: 500;
&:hover {
color: #66b1ff;
text-decoration: underline;
}
}
}
// 门店详情弹窗样式
.store-detail-content {
.el-table {
border-radius: 6px;
overflow: hidden;
font-size: 14px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
background: #ffffff;
border: 1px solid #dcdfe6;
}
.el-table th {
background: #f8f9fa;
color: #303133;
font-weight: 600;
padding: 14px 12px;
font-size: 14px;
text-align: center;
border-bottom: 1px solid #dcdfe6;
border-right: 1px solid #dcdfe6;
&:last-child {
border-right: none;
}
}
.el-table td {
padding: 12px 12px;
font-size: 14px;
background: #ffffff;
text-align: center;
border-bottom: 1px solid #ebeef5;
border-right: 1px solid #ebeef5;
vertical-align: middle;
&:last-child {
border-right: none;
}
}
// 确保斑马纹效果正常显示
.el-table--striped .el-table__body tr.el-table__row--striped td {
background: #fafafa;
}
// 表格行悬停效果
.el-table__body tr:hover > td {
background-color: #f5f7fa !important;
}
}
// 分页组件样式
.pagination-container {
margin-top: 16px;
text-align: center;
.el-pagination {
justify-content: center;
}
}
// 截图预览样式
.screenshot-preview {
text-align: center;
background: #f5f5f5;
border-radius: 4px;
padding: 10px;
img {
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
}
// 响应式设计 - 排行榜
@media (max-width: 1200px) {
.ranking-section {
padding: 24px;
}
.ranking-cards {
gap: 20px;
}
.ranking-card {
min-width: 280px;
max-width: 320px;
}
}
@media (max-width: 768px) {
.ranking-section {
margin-bottom: 32px;
padding: 20px;
border-radius: 16px;
}
.ranking-title {
font-size: 18px;
margin-bottom: 20px;
i {
font-size: 20px;
}
}
.ranking-cards {
flex-direction: column;
gap: 16px;
}
.ranking-card {
min-width: auto;
max-width: none;
padding: 24px 20px;
border-radius: 16px;
&:hover {
transform: translateY(-6px) scale(1.02);
}
}
.rank-number {
width: 60px;
height: 60px;
font-size: 20px;
margin-bottom: 16px;
}
.rank-name {
font-size: 18px;
}
.rank-store {
font-size: 12px;
padding: 4px 8px;
margin-bottom: 14px;
}
.rank-stats {
gap: 10px;
.stat-row {
padding: 6px 10px;
.stat-label {
font-size: 12px;
}
.stat-value {
font-size: 13px;
&.rate {
padding: 3px 6px;
}
}
}
}
.rank-medal {
top: 16px;
right: 16px;
font-size: 24px;
}
}
@media (max-width: 480px) {
.ranking-section {
padding: 16px;
margin-bottom: 24px;
}
.ranking-title {
font-size: 16px;
margin-bottom: 16px;
i {
font-size: 18px;
}
}
.ranking-card {
padding: 20px 16px;
border-radius: 12px;
&:hover {
transform: translateY(-4px) scale(1.01);
}
}
.rank-number {
width: 50px;
height: 50px;
font-size: 18px;
margin-bottom: 12px;
}
.rank-name {
font-size: 16px;
margin-bottom: 6px;
}
.rank-store {
font-size: 11px;
padding: 3px 6px;
margin-bottom: 12px;
}
.rank-stats {
gap: 8px;
.stat-row {
padding: 5px 8px;
.stat-label {
font-size: 11px;
}
.stat-value {
font-size: 12px;
&.rate {
padding: 2px 4px;
}
}
}
}
.rank-medal {
top: 12px;
right: 12px;
font-size: 20px;
}
// 到店情况统计概览响应式
.store-visit-summary {
flex-direction: column;
gap: 12px;
padding: 12px;
.summary-item {
justify-content: space-between;
.summary-label {
font-size: 13px;
}
.summary-value {
font-size: 15px;
}
}
}
// 到店情况表格响应式
.store-visit-table {
.el-table {
font-size: 12px;
}
.el-table th {
padding: 8px 0;
font-size: 12px;
}
.el-table td {
padding: 6px 0;
font-size: 12px;
}
.store-name-link {
font-size: 12px;
}
}
// 门店详情弹窗响应式
.store-detail-content {
.el-table {
font-size: 12px;
}
.el-table th {
padding: 8px 0;
font-size: 12px;
}
.el-table td {
padding: 6px 0;
font-size: 12px;
}
}
}
</style>