广州市综治平台前端
xusd
2 days ago 9cbfaa22c35822e4f2f985907fce5da4c9ef7ac9
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
// 新版效能分析
import React, { useEffect, useState, useRef } from 'react';
import NewPage from '@/components/NewPage';
import NewTableSearch from '@/components/NewTableSearch';
import * as $$ from '../../utils/utility';
import { Form, Typography, Table, Empty, Space, Row, Col } from 'antd';
import { analysis, workEfficiency_2, empty, workEfficiency_3, workEfficiency_4, workEfficiency_5 } from '@/assets/images';
import { Modal, Alert, Radio, Select, Tooltip } from '@arco-design/web-react';
import { IconInfoCircle } from '@arco-design/web-react/icon';
import MyTabsNew from '../../components/MyTabsNew';
import TableView from '../../components/TableViewCanSort';
import SupervisingViews from '../../views/register/matterDetail/SupervisingViews';
import * as echarts from 'echarts';
import './index.less';
import TimeoutDialog from './component/TimeoutDialog.jsx';
 
const { Link } = Typography;
const RadioGroup = Radio.Group;
const Option = Select.Option;
function treeByUserIdApi(data) {
    return $$.ax.request({ url: 'syRegion/treeByUserId2', type: 'get', service: 'sys', data });
}
 
function getStatisticsData(data) {
    return $$.ax.request({ url: 'analysis/statistics', type: 'get', service: 'mediate', data });
}
 
// 效能分析-分组任务流转统计
function statisticsCirculationApi(data) {
    return $$.ax.request({ url: 'analysis/statisticsCirculation', type: 'get', service: 'mediate', data });
}
 
// 效能分析-办件时长-统计图
function AvgDurationChartsGroupApi(data) {
    return $$.ax.request({ url: 'analysis/AvgDurationChartsGroup', type: 'get', service: 'mediate', data });
}
 
// 效能分析-流转统计--统计图
function statisticsCirculationChartsApi(data) {
    return $$.ax.request({ url: 'analysis/statisticsCirculationCharts', type: 'get', service: 'mediate', data });
}
 
// 效能分析-分组统计
function listTimeOutTaskGroupApi(data) {
    return $$.ax.request({ url: 'analysis/listTimeOutTaskGroup', type: 'get', service: 'mediate', data });
}
 
// 效能分析-分页查询超时列表
function pageQuantityApi(data) {
    return $$.ax.request({ url: 'analysis/pageQuantity', type: 'get', service: 'mediate', data });
}
 
// 效能分析-超时任务数量查询
function timeoutTaskApi(data) {
    return $$.ax.request({ url: 'analysis/timeoutTask', type: 'get', service: 'mediate', data });
}
 
// 效能分析-平均时长-分组列表
function AvgDurationGroupApi(data) {
    return $$.ax.request({ url: 'analysis/AvgDurationGroup', type: 'get', service: 'mediate', data });
}
 
//督办次数
function pageCaseSuperviseApi(data) {
    return $$.ax.request({ url: 'caseSupervise/pageCaseSupervise', type: 'get', service: 'mediate', data });
}
 
//督办添加id
function getNewTimeIdApi(id) {
    return $$.ax.request({ url: `caseUtils/getNewTimeId`, type: 'get', service: 'utils' });
}
 
//批量添加督办
function addBatchCaseApi(data) {
    return $$.ax.request({ url: `caseSupervise/addBatchCaseSupervise`, type: 'post', service: 'mediate', data });
}
 
// 流转统计-查看数据列表
function listStatisticsCirculationApi(data) {
    return $$.ax.request({ url: `analysis/listStatisticsCirculation`, type: 'get', service: 'mediate', data });
}
 
const list = [
    {
        name: 'fp',
        style: {
            border: '1px solid #B6DDF1',
            background: '#e8f8ff',
        },
        label: '事项分派',
        className: 'img1',
    },
    {
        name: 'sl',
        style: {
            border: '1px solid #ddbef6',
            background: '#f5e8ff',
        },
        label: '事项受理',
        className: 'img3',
    },
    {
        name: 'blz',
        style: {
            border: '1px solid #b5f5ec',
            background: '#e6fffb',
        },
        label: '事项办理',
        className: 'img4',
    },
    {
        name: 'sp',
        style: {
            border: '1px solid #c3e7fe',
            background: '#e8f7ff',
        },
        label: '申请审批',
        className: 'img5',
    },
    {
        name: 'db',
        style: {
            border: '1px solid #ffe7ba',
            background: '#fff7e6',
        },
        label: '督办回复',
        className: 'img6',
    },
]; //平均时长list
 
//督办次数
const supervisingColumns = [
    {
        title: '督办部门',
        dataIndex: 'supUnitName',
        key: 'supUnitName',
        width: 50,
    },
    {
        title: '督办时间',
        dataIndex: 'supTime',
        key: 'supTime',
        width: 50,
    },
    {
        title: '回复时限',
        dataIndex: 'timeLimit',
        key: 'timeLimit',
        width: 80,
        render: (text, record) => {
            return record.supStatus === 1 ? '-' : $$.getDiffTime(record.timeLimit);
        },
    },
    {
        title: '督办意见',
        dataIndex: 'supContent',
        key: 'supContent',
        width: 100,
    },
    {
        title: '事项等级',
        dataIndex: 'caseGrade',
        key: 'caseGrade',
        width: 30,
        render: (text) => <span>{text === 3 ? '三级' : text === 2 ? '二级' : text === 1 ? '一级' : '-'}</span>,
    },
    {
        title: '回复状态',
        dataIndex: 'supStatus',
        key: 'supStatus',
        width: 30,
        render: (text, record) => (
            <div style={{ color: record.supStatus === 0 ? '#F53F3F' : '#00B42A' }}>{record.supStatus === 0 ? '未回复' : '已回复'}</div>
        ),
    },
    {
        title: '回复时间',
        dataIndex: 'replyTime',
        key: 'replyTime',
        width: 50,
    },
    {
        title: '回复内容',
        dataIndex: 'replyContent',
        key: 'replyContent',
        width: 50,
    },
    // {
    //   title: '操作',
    //   dataIndex: 'defendants',
    //   key: 'defendants',
    //   width: 50,
    //   fixed: 'right',
    //   render: (text, record) => (
    //     <Space>
    //       <div onClick={() => handleResponse(record.id, 'responseDetail')} style={{ cursor: 'pointer', color: '#1A6FB8' }}>详情</div>
    //       {record.supStatus == 0 &&
    //         <div onClick={() => handleResponse(record.id, 'response')} style={{ cursor: 'pointer', color: '#1A6FB8' }}>回复</div>
    //       }
    //     </Space>
    //   )
    // },
];
 
const dialogNameMap = {
    'fpcs': '分派超时列表',
    'qscs': '签收超时列表',
    'slcs': '受理超时列表',
    'dbcs': '督办回复超时列表',
};
const WorkEfficiency = () => {
    const [form] = Form.useForm();
 
    // tab切换
    const [tabKey, setTabKey] = useState('1');
 
    // 列表、统计图切换
    const [radioData, setRadioData] = useState({ radio1: '1', select1: '1', radio2: '1', tab2: '4', radio3: '1', select3: '1' });
    const [doChartsData, setDoChartsData] = useState([]);
    const [doData, setDoData] = useState([]);
    const [doTotal, setDoTotal] = useState({});
    const [doDataSearch, setDoDataSearch] = useState({});
    const [timeoutData, setTimeoutData] = useState({});
    //响应式数据
    const [timeoutKey, setTimeoutKey] = useState(''); //超时任务选中key
    const [visible, setVisible] = useState(false); //超时任务弹窗
    const [treeList, setTreeList] = useState([]); //查询的区域树数据
    const [labels, setLabels] = useState([]); // 筛选区域的中文
    const [temporary, setTemporary] = useState([]);
    const [search, setSearch] = useState({}); // 搜索数据
    const [caseTypeNames, setCaseTypeNames] = useState([]); // 显示纠纷类型中文
    const [temporaryCaseType, setTemporaryCaseType] = useState([]); // 筛选纠纷类型的中文
    const [avgDurationDTO, setAvgDurationDTO] = useState({}); //平均时长数据
    const [statisticsGroupDTO, setStatisticsGroupDTO] = useState({}); //超时任务数据
    const [normalSearch, setNormalSearch] = useState({}); // 默认查询询条件
    const [supervisingList, setSupervisingList] = useState(false); //督办次数
    const [searchSupervise, setSearchSupervise] = useState({ page: '1', size: 20, caseId: '', type: 0 });
    const [SuperviseListData, setSuperviseListData] = useState([]);
    const [supervising, setSupervising] = useState(false); //督办弹窗控制
    const [supervisingAddId, setSupervisingAddId] = useState('');
    const [supervisingId, setSupervisingId] = useState('');
    const [tableData, setTableData] = useState({ list: [] });
    const [timeoutSearch, setTimeoutSearch] = useState({ sortType: 2, sortColmn: 2, queryType: '4', page: 1, size: 10 });
    // table选择数据
    const [selectedRowsObj, setSelectedRowsObj] = useState({});
    const [selectedRowKeys, setSelectedRowKeys] = useState([]); //批量id
    const [selectedRows, setSelectedRows] = useState([]); //批量数据
    // 超时任务统计图
    const [listTimeOut, setListTimeOut] = useState([]);
    const [listTimeOutSearch, setListTimeOutSearch] = useState({ queryType: '4' });
    const [supervisingTitle, setSupervisingTitle] = useState('督办');
 
    // 流转
    const [circulationData, setCirculationData] = useState([]);
    const [circulationTotal, setCirculationTotal] = useState({});
    const [circulationChartsData, setCirculationChartsData] = useState([]);
 
    const [circulationSearch, setCirculationSearch] = useState({ sortType: 2, sortColmn: 1 });
 
    const [modalSearch, setModalSearch] = useState({ page: 1, size: 10 });
    const [modalVisible, setModalVisible] = useState(false);
    const [modalList, setModalList] = useState({ tableData: [], total: 0 });
 
    useEffect(() => {
        treeByUserId();
    }, []);
 
    useEffect(() => {
        if (normalSearch.level) {
            handleAllRequest();
        }
    }, [normalSearch]);
 
    // 流转情况统计
    async function statisticsCirculation(search, values = {}) {
        global.setSpinning(true);
        const res = await statisticsCirculationApi({ ...search, ...values });
        global.setSpinning(false);
        if (res.type) {
            setCirculationData(res.data?.statisticsCirculationDTOList || []);
            setCirculationTotal(res.data?.statisticsCirculationDTO || []);
            setCirculationSearch(search);
        }
    }
 
    async function statisticsCirculationCharts(search, values = {}) {
        global.setSpinning(true);
        const res = await statisticsCirculationChartsApi({ ...search, ...values });
        global.setSpinning(false);
        if (res.type) {
            setCirculationChartsData(res.data || []);
        }
    }
 
    // 超时办件列表
    async function pageQuantity(search, values = {}) {
        global.setSpinning(true);
        try {
            const res = await pageQuantityApi({ ...search, ...values });
            if (res.type) {
                let data = res.data.content || [];
                let total = res?.data?.totalElements || 0;
                setTableData({ 
                    list: data, 
                    total,
                    page: search.page || 1,
                    size: search.size || 10
                });
                setTimeoutSearch(search);
            } else {
                // API调用失败时,确保数据状态正确
                setTableData({ 
                    list: [], 
                    total: 0,
                    page: search.page || 1,
                    size: search.size || 10
                });
            }
        } catch (error) {
            console.error('获取超时办件列表失败:', error);
            // 异常时,确保数据状态正确
            setTableData({ 
                list: [], 
                total: 0,
                page: search.page || 1,
                size: search.size || 10
            });
        } finally {
            global.setSpinning(false);
        }
    }
 
    // 超时办件统计图
    async function listTimeOutTaskGroup(search, values = {}) {
        global.setSpinning(true);
        const res = await listTimeOutTaskGroupApi({ ...search, ...values });
        global.setSpinning(false);
        if (res.type) {
            setListTimeOut(res.data || []);
            setListTimeOutSearch(search);
        }
    }
 
    async function timeoutTask(data) {
        global.setSpinning(true);
        const res = await timeoutTaskApi(data);
        global.setSpinning(false);
        if (res.type) {
            setTimeoutData(res.data || {});
        }
    }
 
    async function AvgDurationChartsGroup(data, values = {}) {
        global.setSpinning(true);
        const res = await AvgDurationChartsGroupApi({ ...data, ...values });
        global.setSpinning(false);
        if (res.type) {
            setDoChartsData(res?.data?.avgDurationGroupDTOList || []);
        }
    }
 
    async function AvgDurationGroup(data, values = {}) {
        global.setSpinning(true);
        const res = await AvgDurationGroupApi({ ...data, ...values });
        global.setSpinning(false);
        if (res.type) {
            setDoData(res?.data?.avgDurationGroupDTOList || []);
            setDoTotal(res?.data?.avgDurationDTO || []);
            setDoDataSearch(data);
        }
    }
 
    // 获取区域字典值
    const treeByUserId = async () => {
        const res = await treeByUserIdApi({ areaType: '2' });
        if (res.type) {
            let list = res.data || [];
            setTreeList(list);
            form.setFieldValue('queCode', [list[0].value]);
            setLabels([list[0].label]);
            setNormalSearch({ level: list[0].level });
        }
    };
 
    //查询、重置、请求集合
    const handleAllRequest = (type) => {
        global.setSpinning(true);
        let values = form.getFieldsValue();
        //删除原本的时间字段,添加开始结束时间
        $$.changeTimNeweFormat(values, 'createTime', 'createStart', 'createEnd');
        $$.changeTimNeweFormat(values, 'closeTime', 'closeStart', 'closeEnd');
        //转换成开始时间结束时间字段
        values.createStart = values.createStart ? $$.dateFormat(values.createStart) : '';
        values.createEnd = values.createEnd ? $$.dateFormat(values.createEnd) : '';
        values.closeStart = values.closeStart ? $$.dateFormat(values.closeStart) : '';
        values.closeEnd = values.closeEnd ? $$.dateFormat(values.closeEnd) : '';
        //纠纷类型处理
        values.caseType = values.caseType?.length > 0 ? values.caseType[1] : '';
        //区域处理
        if (normalSearch.level === '1') {
            values.queCity = values.queCode?.length >= 1 ? values.queCode[0] : '';
            values.queArea = values.queCode?.length >= 2 ? values.queCode[1] : '';
            values.queRoad = values.queCode?.length >= 3 ? values.queCode[2] : '';
        } else if (normalSearch.level === '2') {
            values.queArea = values.queCode?.length >= 1 ? values.queCode[0] : '';
            values.queRoad = values.queCode?.length >= 2 ? values.queCode[1] : '';
        } else if (normalSearch.level === '3') {
            values.queRoad = values.queCode?.length >= 1 ? values.queCode[0] : '';
        }
        delete values.queCode;
        Promise.all([
            getAnalysisData(values),
            timeoutTask(values),
            listTimeOutTaskGroup(listTimeOutSearch, values),
            AvgDurationGroup(doDataSearch, values),
            AvgDurationChartsGroup(doDataSearch, values),
            pageQuantity(timeoutSearch, values),
            statisticsCirculation(circulationSearch, values),
            statisticsCirculationCharts(circulationSearch, values),
        ]).then((res) => {
            setSearch(values);
            if (temporary?.length > 0) {
                setLabels(temporary);
                setTemporary([]);
            }
            if (setTemporary?.length > 0) {
                setCaseTypeNames(temporaryCaseType);
                setTemporaryCaseType([]);
            }
            global.setSpinning(false);
        });
    };
 
    const onChange = (value, selectedOptions) => {
        const label = selectedOptions.map((option) => option.label);
        setTemporary(label);
    };
 
    //获取效能分析接口
    async function getAnalysisData(data) {
        global.setSpinning(true);
        const res = await getStatisticsData(data);
        global.setSpinning(false);
        if (res.type) {
            setAvgDurationDTO(res.data || {});
        }
    }
 
    // 切换tabs页
    function tabsOnchange(activeKey) {
        setTabKey(activeKey);
        if (activeKey !== tabKey) {
            if (activeKey === '1') {
                // delete search.canal;
                // getListData({ ...search }, listDataSearch)
            }
            // else if (activeKey === '2') {
            //   getListData({ ...search, canal: '22_00001-1' }, listDataSearch)
            // } else if (activeKey === '3') {
            //   getListData({ ...search, canal: '22_00001-2' }, listDataSearch)
            // }
        }
    }
 
    // 批量督办
    async function handleBatchDB() {
        setSupervising(!supervising);
        // setSupervisingAddId(caseId)
        // setSupervisingList(!supervisingList)
        setSupervisingTitle('批量督办');
        // $$.arcoModalInfo({
        //   icon: <IconInfoCircle style={{ color: '#1A6FB8' }} />,
        //   title: '提醒',
        //   content: <span>确定批量督办选中的<span className='public-color'>{selectedRowKeys?.length}</span>条数据吗?</span>,
        //   okText: '确定',
        //   cancelText: '我再想想',
        //   onOk: async () => {
        //     global.setSpinning(true);
        //     const res = await addBatchCaseApi();
        //     global.setSpinning(false);
        //     if (res.type) {
        //       $$.infoSuccess({ content: '批量督办成功' });
        //       setSelectedRowsObj({});
        //       // handleSearch('reset', '', '', mediateTab);
        //     }
        //   },
        // });
    }
 
    //督办次数
    const handleSupervising = (caseId) => {
        // setSupervisingId(caseId)
        pageCaseSupervise(caseId);
        setSupervisingList(!supervisingList);
    };
 
    //督办次数列表
    const pageCaseSupervise = async (caseId) => {
        const res = await pageCaseSuperviseApi({ ...searchSupervise, caseId: caseId });
        if (res.type) {
            let data = res.data.content;
            setSuperviseListData(data);
        }
    };
 
    //添加督办
    const handleSupervisingAdd = (caseId) => {
        setSupervisingTitle('督办');
        setSupervising(!supervising);
        setSupervisingAddId(caseId);
        getNewTimeId();
    };
 
    //获取添加督办id
    const getNewTimeId = async () => {
        const res = await getNewTimeIdApi();
        if (res.type) {
            setSupervisingId(res.data);
        }
    };
 
    //排序
    const handleSort = (page, pageSize, sort) => {
        console.log(sort);
 
        let sortColmn =
            sort.column?.dataIndex === 'timeLimit'
                ? '2'
                : sort.column?.dataIndex === 'turnaroundTime'
                ? '1'
                : sort.column?.dataIndex === 'caseGrade'
                ? '3'
                : sort.column?.dataIndex === 'superviseCount'
                ? '4'
                : '';
        let sortType = sort.order == 'descend' ? 2 : 1; //1:正序;2:倒序
        pageQuantity({ ...timeoutSearch, page, size: pageSize, sortType, sortColmn }, search);
        // sortType: 2, sortColmn: 1, queryType: '4', page: 1, size: 10
    };
 
    const fxColumns = [
        {
            title: '流转时间',
            dataIndex: 'turnaroundTime',
            width: 150,
            sorter: true,
            sortNumber: 1, //设置这个传给后端的
            render: (text) => {
                return <span>{$$.myTimeFormat(text, 'YYYY-M-D hh:mm')}</span>;
            },
        },
        {
            title: '任务节点',
            dataIndex: 'nodeName',
            width: 150,
            sorter: true,
            sortNumber: 1, //设置这个传给后端的
        },
        {
            title: '处理时限',
            dataIndex: 'timeLimit',
            defaultSortOrder: 'descend',
            width: 150,
            sorter: true,
            render: (text, record) => {
                return (
                    <div className="courtList-flex public-tag-tagRed public-danger">
                        <div className="public-roundDot-red"></div>
                        {`超${$$.formatHoursToDaysAndHours(text)}`}
                    </div>
                );
            },
        },
        {
            title: '是否处理',
            dataIndex: 'taskStatus',
            width: 80,
            render: (text) => {
                return <span>{text === 1 ? '是' : '否'}</span>;
            },
        },
        {
            title: '事项状态',
            dataIndex: 'statusName',
            width: 120,
        },
        {
            title: '承办部门',
            dataIndex: 'candeUnitName',
            width: 150,
            render: (text) => (
                <span>
                    {' '}
                    <Tooltip content={text}>{$$.ellipsis(text, 7)}</Tooltip>
                </span>
            ),
        },
        {
            title: '经办人',
            dataIndex: 'mediator',
            key: 'mediator',
            width: 180,
        },
        {
            title: '事项等级',
            dataIndex: 'caseGrade',
            key: 'caseGrade',
            sorter: true,
            sortNumber: 2, //设置这个传给后端的
            width: 100,
            render: (text) => <span>{text === 3 ? '三级' : text === 2 ? '二级' : text === 1 ? '一级' : '-'}</span>,
        },
        {
            title: '事项来源',
            dataIndex: 'caseSource',
            key: 'caseSource',
            width: 120,
        },
        {
            title: '问题属地',
            dataIndex: 'queAddress',
            key: 'queAddress',
            width: 180,
        },
        {
            title: '纠纷类型',
            dataIndex: 'caseType',
            key: 'caseType',
            width: 150,
            render: (text) => (
                <span>
                    {' '}
                    <Tooltip content={text}>{$$.ellipsis(text, 7)}</Tooltip>
                </span>
            ),
        },
        {
            title: '督办次数',
            dataIndex: 'superviseCount',
            key: 'superviseCount',
            width: 100,
            render: (text, record, index) => (
                <div
                    onClick={() => {
                        text !== 0 && handleSupervising(record.caseId);
                    }}
                    style={{ cursor: 'pointer', color: text !== 0 ? '#1A6FB8' : '#000' }}
                >
                    {text}
                    {/* {text !== 0 && <span className="timeTip-red-tipsRed" style={{ marginLeft: '8px' }}>督</span>} */}
                </div>
            ),
            sorter: true,
            sortNumber: 3,
        },
        {
            title: '操作',
            dataIndex: 'action',
            width: 100,
            render: (_, record) => {
                return (
                    <Space>
                        <span
                            onClick={() => window.open(`${$$.windowUrl}/windowDetail?caseTaskId=${record.caseTaskId}&caseId=${record.caseId}`)}
                            className="public-color public-a"
                        >
                            详情
                        </span>
                        {record.statusName === '待分派' && (
                            <div onClick={() => handleSupervisingAdd(record.caseId, 'response')} style={{ cursor: 'pointer', color: '#1A6FB8' }}>
                                督办
                            </div>
                        )}
                        {record.statusName === '待签收' && (
                            <div onClick={() => handleSupervisingAdd(record.caseId, 'response')} style={{ cursor: 'pointer', color: '#1A6FB8' }}>
                                督办
                            </div>
                        )}
                        {record.statusName === '待受理' && (
                            <div onClick={() => handleSupervisingAdd(record.caseId, 'response')} style={{ cursor: 'pointer', color: '#1A6FB8' }}>
                                督办
                            </div>
                        )}
                        {record.statusName === '化解中' && (
                            <div onClick={() => handleSupervisingAdd(record.caseId, 'response')} style={{ cursor: 'pointer', color: '#1A6FB8' }}>
                                督办
                            </div>
                        )}
                        {record.statusName === '结案审核' && (
                            <div onClick={() => handleSupervisingAdd(record.caseId, 'response')} style={{ cursor: 'pointer', color: '#1A6FB8' }}>
                                督办
                            </div>
                        )}
                    </Space>
                );
            },
        },
    ];
 
    //批量选择
    const onSelectChange = (newSelectedRowKeys, selectedRows) => {
        setSelectedRowKeys(newSelectedRowKeys);
        setSelectedRows(selectedRows);
    };
 
    //草稿 获取table选择数据
    function handleGetSelectedRowKeys(type) {
        let arr = [];
        for (let item in selectedRowsObj) {
            arr = arr.concat(selectedRowsObj[item][type]);
        }
        return arr;
    }
 
    // 点击办件时长概况弹窗
    async function modalListClick(record, type) {
        console.log(record);
        console.log('search', search);
        console.log('modalSearch', modalSearch);
        let nowSearch = { ...modalSearch, ...search, regionCode: record.groupCode, regionName: record.groupName, caseStatus: type };
        listStatisticsCirculation(nowSearch);
    }
 
    async function listStatisticsCirculation(params) {
        global.setSpinning(true);
        const res = await listStatisticsCirculationApi(params);
        global.setSpinning(false);
        if (res.type) {
            // params.caseStatus  0:总登记   1、自行受理 2、流转受理 3、流转中 4、不予受理
            setModalList({
                name:
                    params.regionName +
                    '(' +
                    (params.caseStatus === 0
                        ? '总登记'
                        : params.caseStatus === 1
                        ? '自行受理'
                        : params.caseStatus === 2
                        ? '流转受理'
                        : params.caseStatus === 3
                        ? '流转中'
                        : params.caseStatus === 4
                        ? '不予受理'
                        : '') +
                    ')',
                tableData: res.data?.content || [], // 接口返回的列表数据
                total: res.data?.totalElements || 0,
            });
            setModalVisible(true);
            setModalSearch(params);
        }
    }
 
    // 跳转详情页
    function handleJump(record) {
        const newWindow = window.open(`${$$.windowUrl}/windowDetail?caseTaskId=${record.caseTaskId}&caseId=${record.id}`);
    }
 
    return (
        <NewPage pageHead={{ breadcrumbData: [{ title: '工作台' }, { title: '效能分析' }], title: '效能分析' }}>
            <div style={{ padding: '0 16px 0 16px' }}>
                <div>
                    <div className="card">
                        <div className="comprehensive-title">查询条件</div>
                        <NewTableSearch
                            exportButtonShow={false}
                            labelLength={6}
                            rowNum={4.5}
                            form={form}
                            itemData={[
                                {
                                    type: 'Cascader',
                                    name: 'queCode',
                                    label: '区域',
                                    placeholder: '请选择',
                                    onChange,
                                    changeSelect: true,
                                    allowClear: false,
                                    treedata: treeList,
                                },
                                { type: 'RangePicker', name: 'createTime', label: '登记时间', shortcutsPlacementLeft: true, shortcuts: $$.shortcutsList(), span: 8 },
                                { type: 'RangePicker', name: 'closeTime', label: '办结时间', shortcutsPlacementLeft: true, shortcuts: $$.shortcutsList(), span: 8 },
                                {
                                    type: 'Cascader',
                                    name: 'caseType',
                                    label: '纠纷类型',
                                    placeholder: '请选择',
                                    onChange: (value, selectedOptions) => {
                                        const names = selectedOptions.map((option) => option.label);
                                        setTemporaryCaseType(names);
                                    },
                                    span: 8,
                                    treedata: $$.caseTypeSelect.caseTypeSelect,
                                },
                                { type: 'Select', name: 'canal', label: '事项来源', placeholder: '请选择', span: 8, selectdata: $$.options.caseCanal },
                                { type: 'Select', name: 'taskStatus', label: '任务是否处理', placeholder: '请选择', span: 8, selectdata: $$.options.isOrNot },
                            ]}
                            handleReset={() => {
                                form.resetFields();
                                setLabels([treeList[0].label]);
                                handleAllRequest();
                            }}
                            handleSearch={() => {
                                handleAllRequest();
                            }}
                            searchDom={
                                <div style={{}}>
                                    <img style={{ width: '14px' }} src={analysis} />
                                    &nbsp;&nbsp;分析
                                </div>
                            }
                            initialValues={{
                                queCode: treeList[0] ? [treeList[0]?.value] : '',
                                createTime: [$$.myMoment().startOf('month'), $$.myMoment().endOf('month')],
                            }}
                        />
                    </div>
                    {/* <div style={{ marginTop: '12px' }}>
            <Alert
              type='success'
              content={<span className='alertTips'>已为您生成
                <i>{labels.join('/')}</i>{(search.createStart || search.closeStart || search.caseType) && '在'}
                {search.createStart && <i>登记时间({$$.myTimeFormat(search.createStart, 'YYYY.M.D')}-{$$.myTimeFormat(search.createEnd, 'YYYY.M.D')})</i>}
                {search.closeStart && <i>{search.createStart && '、'}办结时间({$$.myTimeFormat(search.closeStart, 'YYYY.M.D')}-{$$.myTimeFormat(search.closeEnd, 'YYYY.M.D')})</i>}
                {search.caseType && <i>{(search.createStart || search.closeStart) && '、'}纠纷类型({caseTypeNames.join('/')})</i>}
                的效能分析数据
              </span>}
            />
          </div> */}
                    <div className="workEfficiency-tab-row">
                        <Row gutter={32}>
                            <Col span={8}>
                                <div
                                    className={`workEfficiency-tab-title ${tabKey === '1' ? 'workEfficiency-tab-title-active' : ''}`}
                                    onClick={() => tabsOnchange('1')}
                                >
                                    <div className="workEfficiency-tab-img-box">
                                        <img className="workEfficiency-tab-img" src={workEfficiency_3} alt="" srcset="" />
                                    </div>
                                    <div>办件时长</div>
                                </div>
                            </Col>
                            <Col span={8}>
                                <div
                                    className={`workEfficiency-tab-title ${tabKey === '2' ? 'workEfficiency-tab-title-active' : ''}`}
                                    onClick={() => tabsOnchange('2')}
                                >
                                    <div className="workEfficiency-tab-img-box">
                                        <img className="workEfficiency-tab-img" src={workEfficiency_4} alt="" srcset="" />
                                    </div>
                                    <div>超时办件</div>
                                </div>
                            </Col>
                            <Col span={8}>
                                <div
                                    className={`workEfficiency-tab-title ${tabKey === '3' ? 'workEfficiency-tab-title-active' : ''}`}
                                    onClick={() => tabsOnchange('3')}
                                >
                                    <div className="workEfficiency-tab-img-box">
                                        <img className="workEfficiency-tab-img" src={workEfficiency_5} alt="" srcset="" />
                                    </div>
                                    <div>流转情况</div>
                                </div>
                            </Col>
                        </Row>
                    </div>
                    {/* <div style={{ width: '100%', position: 'relative' }}>
            <MyTabsNew
              tabs={[
                { label: <div style={{ height: '24px' }}>办件时长</div>, key: '1' },
                { label: <div style={{ height: '24px' }}>超时办件</div>, key: '2' },
                { label: <div style={{ height: '24px' }}>流转情况</div>, key: '3' },]}
              activeKey={tabKey}
              onChange={(activeKey) => tabsOnchange(activeKey)}
            />
            <div style={{ borderBottom: '1px solid #E5E6EB', position: 'absolute', width: '100%' }}></div>
          </div> */}
                    {tabKey === '1' && (
                        <div>
                            <div className="card">
                                {/* <div className="workEfficiency-title">
                                    <img className="workEfficiency-img" src={workEfficiency_2} alt="" srcset="" />
                                    <span className="public-color">{labels?.join('/') || '-'}</span>办件平均时长
                                </div> */}
                                <div style={{ marginBottom: '16px' }}>
                                    <Space size="small">
                                        <div className="MediationInfo-subTitle"></div>
                                        <div style={{ fontSize: '16px', fontWeight: '400' }}>办件时长概况({labels?.join('/') || '-'})</div>
                                    </Space>
                                </div>
                                <div className="cardList">
                                    {list?.map((item, index) => {
                                        return (
                                            <div className="timeCard" key={item.name}>
                                                {index !== 0 && <div className="cardLine"></div>}
                                                <div style={{ flex: 1 }}>
                                                    <div className="cardTop">
                                                        <div className="cardImg" style={{ ...item.style }}>
                                                            <div className={item.className}></div>
                                                        </div>
                                                        <div className="cardText">
                                                            <div>{item.label}</div>
                                                            <div>
                                                                <span>{avgDurationDTO[item.name] || 0}</span>小时/件
                                                            </div>
                                                        </div>
                                                    </div>
                                                    {labels?.length === 1 && labels[0] === '广州市' ? (
                                                        ''
                                                    ) : (
                                                        <></>
                                                        // <div className="cardBottom">
                                                        //     <div
                                                        //         className="cardPoint"
                                                        //         style={{
                                                        //             background:
                                                        //                 avgDurationDTO[item.name + 'pjz'] > 0 ? '#F53F3F' : avgDurationDTO[item.name + 'pjz'] < 0 ? '#00B42A' : '#3491FA',
                                                        //         }}
                                                        //     ></div>
                                                        //     <div className="cardTip">
                                                        //         <span style={{ color: '#4E5969' }}>
                                                        //             {avgDurationDTO[item.name + 'pjz'] > 0 ? '低于' : avgDurationDTO[item.name + 'pjz'] < 0 ? '高于' : '等于'}
                                                        //         </span>
                                                        //         <span>全市平均值</span>
                                                        //         <span
                                                        //             style={{
                                                        //                 color: avgDurationDTO[item.name + 'pjz'] > 0 ? '#F53F3F' : avgDurationDTO[item.name + 'pjz'] < 0 ? '#00B42A' : '',
                                                        //             }}
                                                        //         >
                                                        //             {avgDurationDTO[item.name + 'pjz'] && avgDurationDTO[item.name + 'pjz'] != 0
                                                        //                 ? Math.abs(avgDurationDTO[item.name + 'pjz'] || 0).toFixed(2) + '%'
                                                        //                 : ''}
                                                        //         </span>
                                                        //     </div>
                                                        // </div>
                                                    )}
                                                </div>
                                            </div>
                                        );
                                    })}
                                </div>
                            </div>
                            <div style={{ marginBottom: '16px', display: 'flex' }}>
                                <div className="card" style={{ flex: 2 }}>
                                    {/* <div className="workEfficiency-title">
                                        <img className="workEfficiency-img" src={workEfficiency_2} alt="" srcset="" />
                                        <span className="public-color">{labels?.join('/') || '-'}</span>各区域办件平均时长
                                    </div> */}
                                    <div style={{ marginBottom: '16px' }}>
                                        <Space size="small">
                                            <div className="MediationInfo-subTitle"></div>
                                            <div style={{ fontSize: '16px', fontWeight: '400' }}>办件时长统计({labels?.join('/') || '-'})</div>
                                        </Space>
                                    </div>
                                    <RadioGroup
                                        type="button"
                                        value={radioData.radio1}
                                        onChange={(v) => {
                                            setRadioData({ ...radioData, radio1: v });
                                        }}
                                        style={{ marginBottom: 12 }}
                                    >
                                        <Radio value="1">列表</Radio>
                                        <Radio value="2">统计图</Radio>
                                    </RadioGroup>
                                    <div>
                                        {radioData.radio1 === '1' && (
                                            <Table
                                                columns={[
                                                    { title: '区域', width: 120, dataIndex: 'groupName' },
                                                    { title: '分派数', width: 60, className: 'workEfficiency-table', dataIndex: 'fps' },
                                                    {
                                                        title: '分派平均时长',
                                                        width: 170,
                                                        sorter: true,
                                                        sortNumber: 1,
                                                        className: 'workEfficiency-table',
                                                        dataIndex: 'fp',
                                                        render: (text, record) => <div>{text ? `${$$.formatNumber(text)}小时` : record.fps === 0 ? '-' : '0'}</div>,
                                                    },
                                                    { title: '受理数', width: 60, className: 'workEfficiency-table-purple', dataIndex: 'sls' },
                                                    {
                                                        title: '受理平均时长',
                                                        width: 170,
                                                        className: 'workEfficiency-table-purple',
                                                        sorter: true,
                                                        sortNumber: 1,
                                                        dataIndex: 'sl',
                                                        render: (text, record) => <div>{text ? `${$$.formatNumber(text)}小时` : record.sls === 0 ? '-' : '0'}</div>,
                                                    },
                                                    { title: '办结数', width: 60, className: 'workEfficiency-table-green', dataIndex: 'bls' },
                                                    {
                                                        title: '办结平均时长',
                                                        width: 170,
                                                        className: 'workEfficiency-table-green',
                                                        sorter: true,
                                                        sortNumber: 1,
                                                        dataIndex: 'blz',
                                                        render: (text, record) => <div>{text ? `${$$.formatNumber(text)}小时` : record.bls === 0 ? '-' : '0'}</div>,
                                                    },
                                                    { title: '审批数', width: 60, className: 'workEfficiency-table-blue', dataIndex: 'sps' },
                                                    {
                                                        title: '审批平均时长',
                                                        width: 170,
                                                        className: 'workEfficiency-table-blue',
                                                        sorter: true,
                                                        sortNumber: 1,
                                                        dataIndex: 'sp',
                                                        render: (text, record) => <div>{text ? `${$$.formatNumber(text)}小时` : record.sps === 0 ? '-' : '0'}</div>,
                                                    },
                                                    { title: '回复数', width: 60, className: 'workEfficiency-table-orange', dataIndex: 'hfs' },
                                                    {
                                                        title: '督办回复平均时长',
                                                        width: 170,
                                                        className: 'workEfficiency-table-orange',
                                                        sorter: true,
                                                        sortNumber: 1,
                                                        dataIndex: 'db',
                                                        render: (text, record) => <div>{text ? `${$$.formatNumber(text)}小时` : record.hfs === 0 ? '-' : '0'}</div>,
                                                    },
                                                ]}
                                                locale={{
                                                    emptyText: (
                                                        <div className="public-noData">
                                                            <Empty imageStyle={{ height: '160px' }} description={<span style={{ color: '#86909C' }}>暂无数据</span>} image={empty}>
                                                                <div className="ledger-main-display" style={{ marginTop: '8px' }}></div>
                                                            </Empty>
                                                        </div>
                                                    ), // 使用自定义组件作为空状态的展示
                                                }}
                                                bordered
                                                onChange={(pagination, filters, sorter) => {
                                                    let sortType = sorter?.order === 'descend' ? '2' : sorter?.order === 'ascend' ? '1' : '';
                                                    let sortColmn =
                                                        sorter?.column?.dataIndex === 'fp'
                                                            ? '1'
                                                            : sorter?.column?.dataIndex === 'sl'
                                                            ? '2'
                                                            : sorter?.column?.dataIndex === 'blz'
                                                            ? '3'
                                                            : sorter?.column?.dataIndex === 'sp'
                                                            ? '4'
                                                            : sorter?.column?.dataIndex === 'db'
                                                            ? '5'
                                                            : '';
                                                    AvgDurationGroup({ sortType, sortColmn }, search);
                                                }}
                                                dataSource={doData}
                                                scroll={null}
                                                summary={() => (
                                                    <Table.Summary fixed>
                                                        <Table.Summary.Row style={{ background: '#fff' }}>
                                                            <Table.Summary.Cell index={0}>
                                                                <span style={{ fontWeight: '600' }}>平均值</span>
                                                            </Table.Summary.Cell>
                                                            <Table.Summary.Cell index={1}>
                                                                <span style={{ fontWeight: '600' }}>{doTotal.fps || 0}</span>
                                                            </Table.Summary.Cell>
                                                            <Table.Summary.Cell index={2}>
                                                                <span style={{ fontWeight: '600' }}>{doTotal.fp ? `${$$.formatNumber(doTotal.fp)}小时` : 0}</span>
                                                            </Table.Summary.Cell>
                                                            <Table.Summary.Cell index={3}>
                                                                <span style={{ fontWeight: '600' }}>{doTotal.sls || 0}</span>
                                                            </Table.Summary.Cell>
                                                            <Table.Summary.Cell index={4}>
                                                                <span style={{ fontWeight: '600' }}>{doTotal.sl ? `${$$.formatNumber(doTotal.sl)}小时` : 0}</span>
                                                            </Table.Summary.Cell>
                                                            <Table.Summary.Cell index={5}>
                                                                <span style={{ fontWeight: '600' }}>{doTotal.bls || 0}</span>
                                                            </Table.Summary.Cell>
                                                            <Table.Summary.Cell index={6}>
                                                                <span style={{ fontWeight: '600' }}>{doTotal.blz ? `${$$.formatNumber(doTotal.blz)}小时` : 0}</span>
                                                            </Table.Summary.Cell>
                                                            <Table.Summary.Cell index={7}>
                                                                <span style={{ fontWeight: '600' }}>{doTotal.sps}</span>
                                                            </Table.Summary.Cell>
                                                            <Table.Summary.Cell index={8}>
                                                                <span style={{ fontWeight: '600' }}>{doTotal.sp ? `${$$.formatNumber(doTotal.sp)}小时` : 0}</span>
                                                            </Table.Summary.Cell>
                                                            <Table.Summary.Cell index={9}>
                                                                <span style={{ fontWeight: '600' }}>{doTotal.hfs || 0}</span>
                                                            </Table.Summary.Cell>
                                                            <Table.Summary.Cell index={10}>
                                                                <span style={{ fontWeight: '600' }}>{doTotal.db ? `${$$.formatNumber(doTotal.db)}小时` : 0}</span>
                                                            </Table.Summary.Cell>
                                                        </Table.Summary.Row>
                                                    </Table.Summary>
                                                )}
                                                direction="暂无历史记录"
                                                pagination={false}
                                                size="small"
                                                rowKey="applyId"
                                            />
                                        )}
                                        {radioData.radio1 === '2' && (
                                            <div>
                                                <Select
                                                    style={{ width: '220px' }}
                                                    value={radioData.select1}
                                                    onChange={(v) => {
                                                        setRadioData({ ...radioData, select1: v });
                                                    }}
                                                >
                                                    {[
                                                        { label: '分派平均时长', value: '1' },
                                                        { label: '受理平均时长', value: '2' },
                                                        { label: '办结平均时长', value: '3' },
                                                        { label: '审批平均时长', value: '4' },
                                                        { label: '督办回复平均时长', value: '5' },
                                                    ].map((option, index) => (
                                                        <Option key={index} value={option.value}>
                                                            {'统计条件:' + option.label}
                                                        </Option>
                                                    ))}
                                                </Select>
                                                <div style={{ width: '100%', height: '300px' }}>
                                                    <MyChartBar
                                                        data={
                                                            doChartsData?.map((i) =>
                                                                radioData.select1 === '1'
                                                                    ? i.fp
                                                                    : radioData.select1 === '2'
                                                                    ? i.sl
                                                                    : radioData.select1 === '3'
                                                                    ? i.blz
                                                                    : radioData.select1 === '4'
                                                                    ? i.sp
                                                                    : radioData.select1 === '5'
                                                                    ? i.db
                                                                    : ''
                                                            ) || []
                                                        }
                                                        dataAxis={doChartsData?.map((i) => i.groupName) || []}
                                                    />
                                                </div>
                                            </div>
                                        )}
                                    </div>
                                </div>
                            </div>
                        </div>
                    )}
                    {tabKey === '2' && (
                        <div className="card" style={{ marginTop: '12px' }}>
                            <div style={{ width: '100%', position: 'relative' }}>
                                <MyTabsNew
                                    tabs={[
                                        { label: <div style={{ height: '24px' }}>全部({timeoutData.total || 0})</div>, key: '4' },
                                        { label: <div style={{ height: '24px' }}>分派超时({timeoutData.fpcs || 0})</div>, key: '1' },
                                        { label: <div style={{ height: '24px' }}>受理超时({timeoutData.slcs || 0})</div>, key: '2' },
                                        { label: <div style={{ height: '24px' }}>督办回复超时({timeoutData.dbcs || 0})</div>, key: '3' },
                                    ]}
                                    activeKey={radioData.tab2}
                                    onChange={(v) => {
                                        setRadioData({ ...radioData, tab2: v });
                                        // 立即清空数据,确保TableView显示清空状态
                                        setTableData({ list: [], total: 0, page: 1, size: 10 });
                                        // 重置分页状态,避免列表内容重复
                                        const resetSearch = { 
                                            ...timeoutSearch, 
                                            queryType: v, 
                                            page: 1 
                                        };
                                        pageQuantity(resetSearch, search);
                                        listTimeOutTaskGroup({ queryType: v }, search);
                                    }}
                                />
                                <div style={{ borderBottom: '1px solid #E5E6EB', position: 'absolute', width: '100%' }}></div>
                            </div>
                            <RadioGroup
                                type="button"
                                value={radioData.radio2}
                                onChange={(v) => {
                                    setRadioData({ ...radioData, radio2: v });
                                }}
                                style={{ marginBottom: 12, marginTop: 12 }}
                            >
                                <Radio value="1">列表</Radio>
                                <Radio value="2">统计图</Radio>
                            </RadioGroup>
                            <div>
                                {radioData.radio2 === '1' && (
                                    <TableView
                                        key={`timeout-table-${radioData.tab2}`} // 添加key强制重新渲染
                                        columns={fxColumns}
                                        dataSource={tableData.list}
                                        size="small"
                                        rowKey="caseTaskId"
                                        // rowSelection={{
                                        //   selectedRowKeys: selectedRowKeys,
                                        //   onChange: onSelectChange,
                                        // }}
                                        bordered={true}
                                        isScroll={true} //兼容以前的,当需要表格竖向滚动,请设置这个
                                        scroll={{
                                            x: 1300,
                                        }}
                                        offsetHeight={165}
                                        onChange={(pagination, filters, sorter) => {
                                            handleSort(pagination.current, pagination.pageSize, sorter);
                                        }}
                                        pagination={{
                                            current: tableData.page,
                                            pageSize: tableData.size,
                                            total: tableData.total,
                                            // showTotal: (total, range) => (
                                            //     <div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', alignItems: 'center' }}>
                                            //         {selectedRowKeys.length != 0 && (
                                            //             <div className="efficiency" style={{ bottom: '0' }}>
                                            //                 <span>已选{selectedRowKeys.length}项</span>
                                            //                 <span
                                            //                     className="linkBtnColor"
                                            //                     onClick={() => {
                                            //                         setSelectedRowKeys([]);
                                            //                         setSelectedRows([]);
                                            //                     }}
                                            //                 >
                                            //                     取消
                                            //                 </span>
                                            //                 <span className="linkBtnColor" onClick={handleBatchDB}>
                                            //                     批量督办
                                            //                 </span>
                                            //             </div>
                                            //         )}
                                            //         <span>共 {total} 页</span>
                                            //     </div>
                                            // ),
                                        }}
                                    />
                                )}
                                {radioData.radio2 === '2' && (
                                    <div style={{ width: '100%', height: '300px' }}>
                                        <MyChartBar1 data={listTimeOut?.map((i) => i.quantity) || []} dataAxis={listTimeOut?.map((i) => i.groupName) || []} />
                                    </div>
                                )}
                                {/* {selectedRowKeys.length != 0 && <div className='efficiency'>
                  <span>已选{selectedRowKeys.length}项</span>
                  <span className='linkBtnColor' onClick={() => {
                    setSelectedRowKeys([])
                    setSelectedRows([])
                  }}>取消</span>
                  <span className='linkBtnColor' onClick={handleBatchDB}>批量督办</span>
                </div>} */}
                            </div>
                        </div>
                    )}
                    {tabKey === '3' && (
                        <div className="card" style={{ marginTop: '12px' }}>
                            <RadioGroup
                                type="button"
                                value={radioData.radio3}
                                onChange={(v) => {
                                    setRadioData({ ...radioData, radio3: v });
                                }}
                                style={{ marginBottom: 12 }}
                            >
                                <Radio value="1">列表</Radio>
                                <Radio value="2">统计图</Radio>
                            </RadioGroup>
                            <div style={{ marginBottom: '12px', color: '#86909C' }}>流转率 =(流转中 + 流转受理) / 总登记</div>
                            <div>
                                {radioData.radio3 === '1' && (
                                    <Table
                                        columns={[
                                            { title: '区域', width: 170, dataIndex: 'groupName' },
                                            {
                                                title: '流转率',
                                                width: 140,
                                                defaultSortOrder: 'descend',
                                                sorter: true,
                                                sortNumber: 1,
                                                dataIndex: 'lzl',
                                                render: (text) => <div>{text ? `${text}%` : '0%'}</div>,
                                            },
                                            {
                                                title: '总登记',
                                                width: 200,
                                                sorter: true,
                                                sortNumber: 1,
                                                dataIndex: 'zdj',
                                                render: (text, record) => (
                                                    <div
                                                        onClick={() => {
                                                            text > 0 && modalListClick(record, 0);
                                                        }}
                                                        className={text > 0 ? 'public-color public-a' : ''}
                                                    >
                                                        {text || 0}
                                                    </div>
                                                ),
                                            },
                                            {
                                                title: '自行受理',
                                                width: 200,
                                                sorter: true,
                                                sortNumber: 1,
                                                dataIndex: 'zxsl',
                                                render: (text, record) => (
                                                    <div
                                                        onClick={() => {
                                                            text > 0 && modalListClick(record, 1);
                                                        }}
                                                        className={text > 0 ? 'public-color public-a' : ''}
                                                    >
                                                        {text || 0}
                                                    </div>
                                                ),
                                            },
                                            {
                                                title: '流转受理',
                                                width: 200,
                                                sorter: true,
                                                sortNumber: 1,
                                                dataIndex: 'lzsl',
                                                render: (text, record) => (
                                                    <div
                                                        onClick={() => {
                                                            text > 0 && modalListClick(record, 2);
                                                        }}
                                                        className={text > 0 ? 'public-color public-a' : ''}
                                                    >
                                                        {text || 0}
                                                    </div>
                                                ),
                                            },
                                            {
                                                title: '流转中',
                                                width: 200,
                                                sorter: true,
                                                sortNumber: 1,
                                                dataIndex: 'lzz',
                                                render: (text, record) => (
                                                    <div
                                                        onClick={() => {
                                                            text > 0 && modalListClick(record, 3);
                                                        }}
                                                        className={text > 0 ? 'public-color public-a' : ''}
                                                    >
                                                        {text || 0}
                                                    </div>
                                                ),
                                            },
                                            {
                                                title: '不予受理',
                                                width: 200,
                                                sorter: true,
                                                sortNumber: 1,
                                                dataIndex: 'bysl',
                                                render: (text, record) => (
                                                    <div
                                                        onClick={() => {
                                                            text > 0 && modalListClick(record, 4);
                                                        }}
                                                        className={text > 0 ? 'public-color public-a' : ''}
                                                    >
                                                        {text || 0}
                                                    </div>
                                                ),
                                            },
                                        ]}
                                        bordered
                                        dataSource={circulationData}
                                        onChange={(pagination, filters, sorter) => {
                                            let sortType = sorter?.order === 'descend' ? '2' : sorter?.order === 'ascend' ? '1' : '';
                                            let sortColmn =
                                                sorter?.column?.dataIndex === 'lzl'
                                                    ? '1'
                                                    : sorter?.column?.dataIndex === 'zdj'
                                                    ? '2'
                                                    : sorter?.column?.dataIndex === 'zxsl'
                                                    ? '3'
                                                    : sorter?.column?.dataIndex === 'lzsl'
                                                    ? '4'
                                                    : sorter?.column?.dataIndex === 'lzz'
                                                    ? '5'
                                                    : sorter?.column?.dataIndex === 'bysl'
                                                    ? '6'
                                                    : '';
                                            statisticsCirculation({ sortType, sortColmn }, search);
                                        }}
                                        direction="暂无历史记录"
                                        pagination={false}
                                        size="small"
                                        summary={() => (
                                            <Table.Summary>
                                                {circulationTotal?.map((i) => (
                                                    <Table.Summary.Row style={{ background: '#fff' }}>
                                                        <Table.Summary.Cell index={0}>
                                                            <span style={{ fontWeight: '600' }}>{i.groupName || '-'}</span>
                                                        </Table.Summary.Cell>
                                                        <Table.Summary.Cell index={1}>
                                                            <span style={{ fontWeight: '600' }}>{i.lzl ? `${$$.formatNumber(i.lzl)}%` : 0}</span>
                                                        </Table.Summary.Cell>
                                                        <Table.Summary.Cell index={2}>
                                                            <span style={{ fontWeight: '600' }}>{i.zdj || 0}</span>
                                                        </Table.Summary.Cell>
                                                        <Table.Summary.Cell index={3}>
                                                            <span style={{ fontWeight: '600' }}>{i.zxsl || 0}</span>
                                                        </Table.Summary.Cell>
                                                        <Table.Summary.Cell index={4}>
                                                            <span style={{ fontWeight: '600' }}>{i.lzsl || 0}</span>
                                                        </Table.Summary.Cell>
                                                        <Table.Summary.Cell index={5}>
                                                            <span style={{ fontWeight: '600' }}>{i.lzz || 0}</span>
                                                        </Table.Summary.Cell>
                                                        <Table.Summary.Cell index={6}>
                                                            <span style={{ fontWeight: '600' }}>{i.bysl || 0}</span>
                                                        </Table.Summary.Cell>
                                                    </Table.Summary.Row>
                                                ))}
                                            </Table.Summary>
                                        )}
                                    />
                                )}
                                {radioData.radio3 === '2' && (
                                    <div>
                                        <Select
                                            style={{ width: '220px' }}
                                            value={radioData.select3}
                                            onChange={(v) => {
                                                setRadioData({ ...radioData, select3: v });
                                            }}
                                        >
                                            {[
                                                { label: '流转率', value: '1' },
                                                { label: '总登记', value: '2' },
                                                { label: '自行受理', value: '3' },
                                                { label: '流转受理', value: '4' },
                                                { label: '流转中', value: '5' },
                                                { label: '不予受理', value: '6' },
                                            ].map((option, index) => (
                                                <Option key={index} value={option.value}>
                                                    {'统计条件:' + option.label}
                                                </Option>
                                            ))}
                                        </Select>
                                        <div style={{ width: '100%', height: '300px' }}>
                                            <MyChartBar2
                                                unit={radioData.select3 === '1' ? '%' : '件'}
                                                data={
                                                    circulationChartsData
                                                        ?.filter((i) => i.groupName !== '平均值')
                                                        ?.map((i) =>
                                                            radioData.select3 === '1'
                                                                ? i.lzl
                                                                : radioData.select3 === '2'
                                                                ? i.zdj
                                                                : radioData.select3 === '3'
                                                                ? i.zxsl
                                                                : radioData.select3 === '4'
                                                                ? i.lzsl
                                                                : radioData.select3 === '5'
                                                                ? i.lzz
                                                                : radioData.select3 === '6'
                                                                ? i.bysl
                                                                : ''
                                                        ) || []
                                                }
                                                dataAxis={circulationChartsData?.filter((i) => i.groupName !== '平均值')?.map((i) => i.groupName) || []}
                                            />
                                        </div>
                                    </div>
                                )}
                            </div>
                        </div>
                    )}
                    <SupervisingViews
                        visible={supervising}
                        title={supervisingTitle}
                        handleOnCancel={() => setSupervising(false)}
                        caseId={supervisingAddId}
                        supervisingId={supervisingId}
                        getTableData={() => {
                            // let newData = region ? { [region.key]: region.value } : {}
                            // pageExtremeCase({
                            //   ...search,
                            //   ...pageData,
                            //   ...newData,
                            // })
                        }}
                    />
                    <Modal title="督办信息" style={{ width: '938px' }} onCancel={() => setSupervisingList(false)} visible={supervisingList} footer={null}>
                        <TableView
                            showHeader
                            title=""
                            columns={supervisingColumns}
                            dataSource={SuperviseListData || []}
                            rowKey="id"
                            tableHeight={500}
                            style={{ marginTop: '-40px' }}
                        />
                    </Modal>
                    <Modal
                        title={<div style={{ textAlign: 'left', fontWeight: '600' }}>{dialogNameMap[timeoutKey]}</div>}
                        style={{ width: '80%' }}
                        onCancel={() => {
                            setVisible(false);
                        }}
                        visible={visible}
                        footer={null}
                        unmountOnExit={true}
                        maskClosable={false}
                    >
                        <TimeoutDialog timeoutKey={timeoutKey} search={search} />
                    </Modal>
                    <Modal
                        title={`${modalList.name || ''}`}
                        visible={modalVisible}
                        onCancel={() => {
                            setModalVisible(false);
                            setModalSearch({ ...modalSearch, page: 1 });
                        }}
                        footer={null}
                        style={{ width: '80%' }}
                    >
                        <div>
                            <TableView
                                columns={[
                                    {
                                        title: '登记时间',
                                        width: 100,
                                        dataIndex: 'createTime',
                                        // defaultSortOrder: 'descend',
                                        // order: 'ascend',
                                        // sorter: { compare: (a, b) => {} },
                                        render: (text) => <div>{$$.dateFormat(text)}</div>,
                                    },
                                    { title: '事项来源', width: 100, dataIndex: 'canalName' },
                                    { title: '事项状态', width: 100, dataIndex: 'statusName' },
                                    { title: '事项等级', width: 100, dataIndex: 'caseLevel' },
                                    { title: '纠纷类型', width: 100, dataIndex: 'caseTypeName' },
                                    { title: '问题属地', width: 100, dataIndex: 'areaName' },
                                    { title: '登记机构', width: 150, dataIndex: 'inputUnitName' },
                                    { title: '承办部门', width: 100, dataIndex: 'mediateUnitName' },
                                    {
                                        title: '办结时间',
                                        width: 100,
                                        dataIndex: 'closeTime',
                                        // order: 'ascend',
                                        // sorter: { compare: (a, b) => {} },
                                        render: (text) => <span>{$$.dateFormat(text)}</span>,
                                    },
                                    {
                                        title: '化解结果',
                                        width: 100,
                                        dataIndex: 'mediResult',
                                        render: (text) => (
                                            <div className={text === '22_00025-1' ? 'comprehensive-green' : text === '22_00025-2' ? 'comprehensive-red' : '-'}>
                                                {text === '22_00025-1' ? '化解成功' : text === '22_00025-2' ? '化解不成功' : '-'}
                                            </div>
                                        ),
                                    },
                                    {
                                        title: '操作',
                                        dataIndex: 'action',
                                        width: 50,
                                        render: (_, record) => {
                                            return <Link onClick={() => handleJump(record)}>详情</Link>;
                                        },
                                    },
                                ]}
                                dataSource={modalList.tableData}
                                onChange={(pagination, filters, sorter) => {
                                    listStatisticsCirculation({
                                        ...modalSearch,
                                        page: pagination.current,
                                        size: pagination.pageSize,
                                    });
                                }}
                                pagination={{
                                    current: modalSearch.page,
                                    pageSize: modalSearch.size,
                                    total: modalList.total,
                                    // onChange: (page, pageSize) => handleModalChangePage(page, pageSize),
                                }}
                            />
                        </div>
                    </Modal>
                </div>
            </div>
        </NewPage>
    );
};
 
export default WorkEfficiency;
 
// 办件时长
const MyChartBar = ({ data, dataAxis }) => {
    const myChartRef = useRef();
    // 图表
    const [myChart, setMyChart] = useState();
 
    // 加载图表数据
    useEffect(() => {
        var myChart = echarts.init(document.getElementById('chartBar'), 'dark');
 
        // 绘制图表
        myChart.setOption({
            backgroundColor: '#fff',
            grid: {
                x: 10,
                y: 28,
                x2: 20,
                y2: 0,
                containLabel: true,
            },
            tooltip: {
                trigger: 'item',
                formatter: '{b}: {c}小时',
            },
 
            xAxis: [
                {
                    type: 'category',
                    data: dataAxis,
                    axisTick: {
                        // 去除X轴刻度线
                        show: false,
                    },
                    axisLabel: {
                        color: '#1D2129',
                        interval: 0, // 强制显示所有标签
                        rotate: 45, // 旋转标签以避免重叠
                        overflow: 'truncate', // 截断过长的标签
                        width: 100, // 设置标签的最大宽度
                    },
                    scrollbar: {
                        show: true, // 显示滚动条
                        type: 'inside', // 内置滚动条
                        showDataShadow: true,
                        backgroundColor: 'rgba(0,0,0,0.05)',
                        fillerColor: 'rgba(0,0,0,0.2)',
                        handleColor: 'rgba(0,0,0,0.8)',
                    },
                },
            ],
            yAxis: {
                splitLine: {
                    lineStyle: {
                        type: 'dashed',
                        color: 'rgba(0,0,0,0.25)',
                    },
                },
            },
            dataZoom: [
                {
                    type: 'inside',
                },
            ],
 
            series: [
                {
                    type: 'bar',
                    name: '',
                    data: data,
                    barWidth: 24, // 设置柱子宽度
                    barCategoryGap: '100%', // 固定柱状图之间的间距
                    label: {
                        show: true,
                        color: 'rgba(0, 0, 0, 0.85)',
                        fontSize: '14px',
                        position: 'top',
                        valueAnimation: false,
                        formatter: function (params) {
                            return params.value ? params.value + '小时' : params.value; // 在数值后加上"小时"
                        },
                    },
                    emphasis: {
                        itemStyle: {
                            opacity: 0.7,
                        },
                    },
                    itemStyle: {
                        color: '#1a6fb8',
                        borderWidth: 2, // 设置边框宽度
                    },
                },
            ],
        });
 
        const zoomSize = 6;
        myChart.on('click', function (params) {
            console.log(dataAxis[Math.max(params.dataIndex - zoomSize / 2, 0)]);
            myChart.dispatchAction({
                type: 'dataZoom',
                startValue: dataAxis[Math.max(params.dataIndex - zoomSize / 2, 0)],
                endValue: dataAxis[Math.min(params.dataIndex + zoomSize / 2, data.length - 1)],
            });
        });
    }, [data]);
 
    return <div id="chartBar" ref={myChartRef} style={{ height: '290px', width: '100%' }} />;
};
 
// 超时办件
const MyChartBar1 = ({ data, dataAxis }) => {
    const myChartRef = useRef();
    // 图表
    const [myChart, setMyChart] = useState();
 
    // 加载图表数据
    useEffect(() => {
        var myChart = echarts.init(document.getElementById('chartBar1'), 'dark');
 
        // 绘制图表
        myChart.setOption({
            backgroundColor: '#fff',
            grid: {
                x: 10,
                y: 28,
                x2: 20,
                y2: 0,
                containLabel: true,
            },
            tooltip: {
                trigger: 'item',
                formatter: '{b}: {c}件',
            },
 
            xAxis: [
                {
                    type: 'category',
                    data: dataAxis,
                    axisTick: {
                        // 去除X轴刻度线
                        show: false,
                    },
                    axisLabel: {
                        color: '#1D2129',
                        interval: 0, // 强制显示所有标签
                        rotate: 45, // 旋转标签以避免重叠
                        overflow: 'truncate', // 截断过长的标签
                        width: 100, // 设置标签的最大宽度
                    },
                    scrollbar: {
                        show: true, // 显示滚动条
                    },
                },
            ],
            yAxis: {
                splitLine: {
                    lineStyle: {
                        type: 'dashed',
                        color: 'rgba(0,0,0,0.25)',
                    },
                },
            },
            dataZoom: [
                {
                    type: 'inside',
                },
            ],
            series: [
                {
                    type: 'bar',
                    name: '',
                    data: data,
                    barWidth: 24, // 设置柱子宽度
                    label: {
                        show: true,
                        color: 'rgba(0, 0, 0, 0.85)',
                        fontSize: '14px',
                        position: 'top',
                        valueAnimation: false,
                    },
                    emphasis: {
                        itemStyle: {
                            opacity: 0.7,
                        },
                    },
                    itemStyle: {
                        color: '#1a6fb8',
                        borderWidth: 2, // 设置边框宽度
                    },
                },
            ],
        });
        const zoomSize = 6;
        myChart.on('click', function (params) {
            console.log(dataAxis[Math.max(params.dataIndex - zoomSize / 2, 0)]);
            myChart.dispatchAction({
                type: 'dataZoom',
                startValue: dataAxis[Math.max(params.dataIndex - zoomSize / 2, 0)],
                endValue: dataAxis[Math.min(params.dataIndex + zoomSize / 2, data.length - 1)],
            });
        });
    }, [data]);
 
    return <div id="chartBar1" ref={myChartRef} style={{ height: '290px', width: '100%' }} />;
};
 
// 流转情况
const MyChartBar2 = ({ data, unit = '件', dataAxis }) => {
    const myChartRef = useRef();
    // 图表
    const [myChart, setMyChart] = useState();
 
    // 加载图表数据
    useEffect(() => {
        var myChart = echarts.init(document.getElementById('chartBar2'), 'dark');
 
        // 绘制图表
        myChart.setOption({
            backgroundColor: '#fff',
            grid: {
                x: 10,
                y: 28,
                x2: 20,
                y2: 0,
                containLabel: true,
            },
            tooltip: {
                trigger: 'item',
                formatter: '{b}: {c}' + unit,
            },
 
            xAxis: [
                {
                    type: 'category',
                    data: dataAxis,
                    axisTick: {
                        // 去除X轴刻度线
                        show: false,
                    },
                    axisLabel: {
                        color: '#1D2129',
                        interval: 0, // 强制显示所有标签
                        rotate: 45, // 旋转标签以避免重叠
                        overflow: 'truncate', // 截断过长的标签
                        width: 100, // 设置标签的最大宽度
                    },
                    scrollbar: {
                        show: true, // 显示滚动条
                    },
                },
            ],
            yAxis: {
                splitLine: {
                    lineStyle: {
                        type: 'dashed',
                        color: 'rgba(0,0,0,0.25)',
                    },
                },
            },
            dataZoom: [
                {
                    type: 'inside',
                },
            ],
            series: [
                {
                    type: 'bar',
                    name: '',
                    data: data,
                    barWidth: 24, // 设置柱子宽度
                    label: {
                        show: true,
                        color: 'rgba(0, 0, 0, 0.85)',
                        fontSize: '14px',
                        position: 'top',
                        valueAnimation: false,
                        formatter: function (params) {
                            return unit === '%' ? params.value + '%' : params.value; // 在数值后加上"小时"
                        },
                    },
                    emphasis: {
                        itemStyle: {
                            opacity: 0.7,
                        },
                    },
                    itemStyle: {
                        color: '#1a6fb8',
                        borderWidth: 2, // 设置边框宽度
                    },
                },
            ],
        });
        const zoomSize = 6;
        myChart.on('click', function (params) {
            console.log(dataAxis[Math.max(params.dataIndex - zoomSize / 2, 0)]);
            myChart.dispatchAction({
                type: 'dataZoom',
                startValue: dataAxis[Math.max(params.dataIndex - zoomSize / 2, 0)],
                endValue: dataAxis[Math.min(params.dataIndex + zoomSize / 2, data.length - 1)],
            });
        });
    }, [data]);
 
    return <div id="chartBar2" ref={myChartRef} style={{ height: '290px', width: '100%' }} />;
};