浏览代码

v2版本修改

v2.0
suomingxiang 7 个月前
父节点
当前提交
98f0001c2d
共有 7 个文件被更改,包括 139 次插入115 次删除
  1. 二进制
      public/images/bj.jpg
  2. 二进制
      public/images/videoMask.png
  3. 二进制
      public/video/animation.mp4
  4. 10
    10
      src/pages/components/Header/Header.less
  5. 62
    58
      src/pages/index.less
  6. 17
    27
      src/pages/index.tsx
  7. 50
    20
      src/services/chartOption.ts

二进制
public/images/bj.jpg 查看文件


二进制
public/images/videoMask.png 查看文件


二进制
public/video/animation.mp4 查看文件


+ 10
- 10
src/pages/components/Header/Header.less 查看文件

1
 .header{
1
 .header{
2
     width: 100%;
2
     width: 100%;
3
-    height: 84px;
3
+    height: 102px;
4
     // background-color: rgb(228, 228, 236);
4
     // background-color: rgb(228, 228, 236);
5
     display: flex;
5
     display: flex;
6
     align-items: center;
6
     align-items: center;
19
         height: 84px;
19
         height: 84px;
20
         position: relative;
20
         position: relative;
21
         .logo{
21
         .logo{
22
-            width: 116px;
23
-            height: 44px;
22
+            width: 140px;
23
+            height: 54px;
24
             margin-right: 30px;
24
             margin-right: 30px;
25
             margin-top: 28px;
25
             margin-top: 28px;
26
-            margin-left: 116px;
26
+            margin-left: 192px;
27
         }
27
         }
28
         .title{
28
         .title{
29
-            width: 618px;
30
-            height: 49px;
29
+            width: 746px;
30
+            height: 60px;
31
             margin-top: 34px;
31
             margin-top: 34px;
32
         }
32
         }
33
         &::after{
33
         &::after{
34
             content: '';
34
             content: '';
35
             width: 2px;
35
             width: 2px;
36
-            height: 52px;
36
+            height: 64px;
37
             position: absolute;
37
             position: absolute;
38
-            left: 255px;
39
-            top: 28px;
38
+            left: 354px;
39
+            top: 25px;
40
             background-color: #606060;
40
             background-color: #606060;
41
         }
41
         }
42
     }
42
     }
43
     .time{
43
     .time{
44
         width: 25%;
44
         width: 25%;
45
         font-family: Source Han Sans CN;
45
         font-family: Source Han Sans CN;
46
-        font-size: 16px;
46
+        font-size: 20px;
47
         font-weight: 700;
47
         font-weight: 700;
48
         color: #606060;
48
         color: #606060;
49
         text-align: right;
49
         text-align: right;

+ 62
- 58
src/pages/index.less 查看文件

14
         justify-content: space-between;
14
         justify-content: space-between;
15
     }
15
     }
16
     .contLeft{
16
     .contLeft{
17
-        width: 584px;
17
+        width: 656px;
18
         // max-width: 494px;
18
         // max-width: 494px;
19
         flex-shrink: 0;
19
         flex-shrink: 0;
20
-        padding: 75px 42px 0 48px;
20
+        padding: 90px 0 0 58px;
21
         box-sizing: border-box;
21
         box-sizing: border-box;
22
 
22
 
23
         display: flex;
23
         display: flex;
29
         }
29
         }
30
         .numTitle{
30
         .numTitle{
31
             color: #606060;
31
             color: #606060;
32
-            font-size: 20px;
32
+            font-size: 24px;
33
             margin-bottom: 10px;
33
             margin-bottom: 10px;
34
         }
34
         }
35
         .numTxt{
35
         .numTxt{
36
             color: #000000;
36
             color: #000000;
37
-            font-size: 32px;
37
+            font-size: 38px;
38
             font-weight: bold;
38
             font-weight: bold;
39
             text-wrap: nowrap;
39
             text-wrap: nowrap;
40
             font-family: DIN;
40
             font-family: DIN;
41
         }
41
         }
42
 
42
 
43
         .chartTitle{
43
         .chartTitle{
44
-            height: 26px;
45
-            font-size: 17px;
44
+            height: 32px;
45
+            font-size: 21px;
46
             font-weight: 700;
46
             font-weight: 700;
47
             margin-left: 8px;
47
             margin-left: 8px;
48
             border-bottom: 1px solid #BBC2CB;
48
             border-bottom: 1px solid #BBC2CB;
49
             display: flex;
49
             display: flex;
50
             align-items: center;
50
             align-items: center;
51
             position: relative;
51
             position: relative;
52
-            margin-bottom: 12px;
52
+            margin-bottom: 16px;
53
             text-indent: 5px;
53
             text-indent: 5px;
54
             text-wrap: nowrap;
54
             text-wrap: nowrap;
55
             font-family: 'Source Han Sans CN';
55
             font-family: 'Source Han Sans CN';
59
                 left: -5px;
59
                 left: -5px;
60
                 top: 50%;
60
                 top: 50%;
61
                 width: 2px;
61
                 width: 2px;
62
-                height: 18px;
63
-                margin-top: -9px;
62
+                height: 22px;
63
+                margin-top: -11px;
64
                 background-color: #1A5FE1;
64
                 background-color: #1A5FE1;
65
             }
65
             }
66
 
66
 
83
             }
83
             }
84
         }
84
         }
85
         .chartBox1{
85
         .chartBox1{
86
-            width: calc(100% - 185px);
86
+            width: calc(100% - 211px);
87
             position: relative;
87
             position: relative;
88
             &:hover{
88
             &:hover{
89
                 .magnifier{
89
                 .magnifier{
96
             .chartTarbar{
96
             .chartTarbar{
97
                 width: 100%;
97
                 width: 100%;
98
                 // height: 24px;
98
                 // height: 24px;
99
-                font-size: 14px;
99
+                font-size: 18px;
100
                 font-family: Source Han Sans CN;
100
                 font-family: Source Han Sans CN;
101
                 color: #606060;
101
                 color: #606060;
102
                 display: flex;
102
                 display: flex;
121
 
121
 
122
         .videoBox{
122
         .videoBox{
123
             width: 100%;
123
             width: 100%;
124
-            height: 148px;
124
+            height: 178px;
125
             video{
125
             video{
126
                 width: 100%;
126
                 width: 100%;
127
                 height: 100%;
127
                 height: 100%;
137
         box-sizing: border-box;
137
         box-sizing: border-box;
138
         .cont1{
138
         .cont1{
139
             width: 100%;
139
             width: 100%;
140
-            padding: 60px 74px 16px;
140
+            padding: 80px 74px 0;
141
             box-sizing: border-box;
141
             box-sizing: border-box;
142
             display: flex;
142
             display: flex;
143
             align-items: center;
143
             align-items: center;
145
             z-index: 2;
145
             z-index: 2;
146
             position: relative;
146
             position: relative;
147
             .contLi{
147
             .contLi{
148
-                width: 200px;
148
+                width: 250px;
149
                 div:first-child{
149
                 div:first-child{
150
                     color: #000000;
150
                     color: #000000;
151
-                    font-size: 20px;
151
+                    font-size: 24px;
152
                     font-family: Source Han Sans CN;
152
                     font-family: Source Han Sans CN;
153
                     text-wrap: nowrap;
153
                     text-wrap: nowrap;
154
                 }
154
                 }
155
                 div:last-child{
155
                 div:last-child{
156
                     color: #1A5FE1;
156
                     color: #1A5FE1;
157
-                    font-size: 40px;
157
+                    font-size: 48px;
158
                     font-weight: bold;
158
                     font-weight: bold;
159
                     font-family: DIN;
159
                     font-family: DIN;
160
                     margin-top: 15px;
160
                     margin-top: 15px;
168
                 // }
168
                 // }
169
             }
169
             }
170
             .contLi+.contLi{
170
             .contLi+.contLi{
171
-                margin-left: 40px;
171
+                margin-left: 50px;
172
             }
172
             }
173
         }
173
         }
174
         .cont2{
174
         .cont2{
175
             width: 100%;
175
             width: 100%;
176
-            height: 74vh;
176
+            height: 88vh;
177
             position: relative;
177
             position: relative;
178
             z-index: 1;
178
             z-index: 1;
179
             .contVideo{
179
             .contVideo{
180
                 position: absolute;
180
                 position: absolute;
181
-                top: -62px;
182
-                left: -99px;
183
-                width: 1268px;
184
-                height: 850px;
181
+                // top: -62px;
182
+                // left: -99px;
183
+                // width: 1268px;
184
+                // height: 850px;
185
+                left: -80px;
186
+                top: -38px;
187
+                width: 1534px;
188
+                height: 1028px;
185
                 z-index: 1;
189
                 z-index: 1;
186
                 video{
190
                 video{
187
                     width: 100%;
191
                     width: 100%;
200
                 width: 36px;
204
                 width: 36px;
201
                 height: 36px; 
205
                 height: 36px; 
202
                 position: absolute;
206
                 position: absolute;
203
-                right: 0;
204
-                top: 0;
207
+                right: 50px;
208
+                top: 15px;
205
                 z-index: 3;
209
                 z-index: 3;
206
             }
210
             }
207
             // background-color: rgb(241, 240, 245);
211
             // background-color: rgb(241, 240, 245);
209
     }
213
     }
210
 
214
 
211
     .contRight{
215
     .contRight{
212
-        width: 584px;
216
+        width: 656px;
213
         // width: 25%;
217
         // width: 25%;
214
         // max-width: 494px;
218
         // max-width: 494px;
215
         flex-shrink: 0;
219
         flex-shrink: 0;
216
-        padding: 75px 48px 0 42px;
220
+        padding: 90px 58px 0 0;
217
         box-sizing: border-box;
221
         box-sizing: border-box;
218
         z-index: 999;
222
         z-index: 999;
219
         display: flex;
223
         display: flex;
224
         }
228
         }
225
         .numTitle{
229
         .numTitle{
226
             color: #606060;
230
             color: #606060;
227
-            font-size: 20px;
231
+            font-size: 24px;
228
             margin-bottom: 10px;
232
             margin-bottom: 10px;
229
         }
233
         }
230
         .numTxt{
234
         .numTxt{
231
             color: #000000;
235
             color: #000000;
232
-            font-size: 32px;
236
+            font-size: 38px;
233
             font-weight: bold;
237
             font-weight: bold;
234
             text-wrap: nowrap;
238
             text-wrap: nowrap;
235
             font-family: DIN;
239
             font-family: DIN;
236
         }
240
         }
237
 
241
 
238
         .chartTitle{
242
         .chartTitle{
239
-            height: 26px;
240
-            font-size: 17px;
243
+            height: 32px;
244
+            font-size: 21px;
241
             font-weight: 700;
245
             font-weight: 700;
242
             margin-left: 8px;
246
             margin-left: 8px;
243
             border-bottom: 1px solid #BBC2CB;
247
             border-bottom: 1px solid #BBC2CB;
254
                 left: -5px;
258
                 left: -5px;
255
                 top: 50%;
259
                 top: 50%;
256
                 width: 2px;
260
                 width: 2px;
257
-                height: 18px;
258
-                margin-top: -9px;
261
+                height: 22px;
262
+                margin-top: -11px;
259
                 background-color: #1A5FE1;
263
                 background-color: #1A5FE1;
260
             }
264
             }
261
 
265
 
278
             }
282
             }
279
         }
283
         }
280
         .chartBox1{
284
         .chartBox1{
281
-            width: calc(100% - 185px);
285
+            width: calc(100% - 224px);
282
             position: relative;
286
             position: relative;
283
             overflow: hidden;
287
             overflow: hidden;
284
             &:hover{
288
             &:hover{
290
                 content: '';
294
                 content: '';
291
                 position: absolute;
295
                 position: absolute;
292
                 left: 50%;
296
                 left: 50%;
293
-                margin-left: -60px;
297
+                margin-left: -30px;
294
                 bottom: -60px;
298
                 bottom: -60px;
295
                 width: 120px;
299
                 width: 120px;
296
                 height: 120px;
300
                 height: 120px;
303
                 content: '';
307
                 content: '';
304
                 position: absolute;
308
                 position: absolute;
305
                 left: 50%;
309
                 left: 50%;
306
-                margin-left: -108px;
307
-                bottom: -108px;
308
-                width: 216px;
309
-                height: 216px;
310
+                margin-left: -100px;
311
+                bottom: -130px;
312
+                width: 260px;
313
+                height: 260px;
310
                 border-radius: 50%;
314
                 border-radius: 50%;
311
                 border: 1px solid #606060;
315
                 border: 1px solid #606060;
312
                 opacity: 0.2;
316
                 opacity: 0.2;
321
                 content: '';
325
                 content: '';
322
                 position: absolute;
326
                 position: absolute;
323
                 left: -20px;
327
                 left: -20px;
324
-                top: 2px;
325
-                width: 10px;
326
-                height: 10px;
328
+                top: 5px;
329
+                width: 12px;
330
+                height: 12px;
327
                 background-color: #1A5FE1;
331
                 background-color: #1A5FE1;
328
             }
332
             }
329
             div:first-child{
333
             div:first-child{
330
-                font-size: 14px;
334
+                font-size: 18px;
331
                 color: #606060;
335
                 color: #606060;
332
                 font-family: Source Han Sans CN;
336
                 font-family: Source Han Sans CN;
333
                 margin-bottom: 5px;
337
                 margin-bottom: 5px;
334
             }
338
             }
335
             div:last-child{
339
             div:last-child{
336
-                font-size: 28px;
340
+                font-size: 34px;
337
                 color: #000000;
341
                 color: #000000;
338
-                font-weight: 500;
342
+                font-weight: 800;
339
                 font-family: DIN;
343
                 font-family: DIN;
340
             }
344
             }
341
             &:nth-child(1){
345
             &:nth-child(1){
480
 .popCircular1{
484
 .popCircular1{
481
     position: absolute;
485
     position: absolute;
482
     left: 50%;
486
     left: 50%;
483
-    margin-left: -191px;
484
-    bottom: -218px;
485
-    width: 430px;
486
-    height: 430px;
487
+    margin-left: -220px;
488
+    bottom: -247px;
489
+    width: 490px;
490
+    height: 490px;
487
     border-radius: 50%;
491
     border-radius: 50%;
488
     border: 2px dashed #606060;
492
     border: 2px dashed #606060;
489
     opacity: 0.2;
493
     opacity: 0.2;
493
 .popCircular2{
497
 .popCircular2{
494
     position: absolute;
498
     position: absolute;
495
     left: 50%;
499
     left: 50%;
496
-    margin-left: -402px;
497
-    bottom: -420px;
498
-    width: 850px;
499
-    height: 850px;
500
+    margin-left: -475px;
501
+    bottom: -498px;
502
+    width: 1000px;
503
+    height: 1000px;
500
     border-radius: 50%;
504
     border-radius: 50%;
501
     border: 2px solid #606060;
505
     border: 2px solid #606060;
502
     opacity: 0.2;
506
     opacity: 0.2;
511
             border-radius: 0;
515
             border-radius: 0;
512
         } 
516
         } 
513
         .ant-modal-title{
517
         .ant-modal-title{
514
-            font-size: 52px;
515
-            padding-left: 100px;
518
+            font-size: 64px;
519
+            padding-left: 140px;
516
             padding-top: 50px;
520
             padding-top: 50px;
517
             background-color: transparent;
521
             background-color: transparent;
518
         }
522
         }
519
         .ant-modal-close{
523
         .ant-modal-close{
520
-            width: 64px;
521
-            height: 64px;
524
+            width: 80px;
525
+            height: 80px;
522
             top: 80px;
526
             top: 80px;
523
-            inset-inline-end:70px;
527
+            inset-inline-end:130px;
524
             transition: all .2s;
528
             transition: all .2s;
525
             &:hover{
529
             &:hover{
526
                 color: #1A5FE1;
530
                 color: #1A5FE1;
528
             }
532
             }
529
         }
533
         }
530
         .ant-modal-close-x{
534
         .ant-modal-close-x{
531
-            font-size: 56px;
535
+            font-size: 74px;
532
         }
536
         }
533
     }
537
     }
534
 }
538
 }

+ 17
- 27
src/pages/index.tsx 查看文件

125
     useEffect(() => {
125
     useEffect(() => {
126
         getChartData()
126
         getChartData()
127
         const interval = setInterval(()=>{
127
         const interval = setInterval(()=>{
128
-            // getChartData()
128
+            getChartData()
129
             if(barIndexRef.current == 0){
129
             if(barIndexRef.current == 0){
130
                 setBarIndex(1)
130
                 setBarIndex(1)
131
             }else{
131
             }else{
141
             setOptions(null)
141
             setOptions(null)
142
             setTitle('')
142
             setTitle('')
143
             setChartIndex(0)
143
             setChartIndex(0)
144
-        }else{
145
-            // setTimeout(()=>{
146
-                if(chartIndex != 10){
147
-                    // chartRef?.current?.resize();
148
-                }
149
-            // },300)
150
         }
144
         }
151
     }, [isModalOpen])
145
     }, [isModalOpen])
152
 
146
 
257
             res.dataAbroad = filterList(res.dataAbroad).reverse()
251
             res.dataAbroad = filterList(res.dataAbroad).reverse()
258
             res.nameList = res.nameList.reverse()
252
             res.nameList = res.nameList.reverse()
259
             res.nameListAbroad = res.nameListAbroad.reverse()
253
             res.nameListAbroad = res.nameListAbroad.reverse()
260
-            console.log('res3',res)
261
             setChart3Data(res)
254
             setChart3Data(res)
262
             setChartOptions3({
255
             setChartOptions3({
263
                 yAxis: {
256
                 yAxis: {
347
         // chart9 用户画像
340
         // chart9 用户画像
348
         try {
341
         try {
349
             const res = await getUserProfile();
342
             const res = await getUserProfile();
350
-            console.log(res)
351
             res.data = filterList3(res.data)
343
             res.data = filterList3(res.data)
352
             setChartRequestData9(res)
344
             setChartRequestData9(res)
353
             const { data } = res;
345
             const { data } = res;
354
-            console.log(res)
355
             let data2:any = [];
346
             let data2:any = [];
356
             let data3:any = [];
347
             let data3:any = [];
357
             data[0].data.forEach((item,index)=>{
348
             data[0].data.forEach((item,index)=>{
460
           video.currentTime = 0;
451
           video.currentTime = 0;
461
           video.play();
452
           video.play();
462
         }
453
         }
463
-      }, [videoRef]);
454
+    }, [videoRef]);
464
     return (
455
     return (
465
         <div className={styles.main}>
456
         <div className={styles.main}>
466
             <Header />
457
             <Header />
467
             <div className={styles.contLeft}>
458
             <div className={styles.contLeft}>
468
                 <div className={`${styles.leftLi} ${styles.displayFlex}`}>
459
                 <div className={`${styles.leftLi} ${styles.displayFlex}`}>
469
-                    <div style={{ width: '165px' }}>
460
+                    <div style={{ width: '200px' }}>
470
                         <div className={styles.numTitle}>当日销售额(万元)</div>
461
                         <div className={styles.numTitle}>当日销售额(万元)</div>
471
                         <div className={styles.numTxt}>{formatNumberWithCommas(numericalData2.todaySalesVolume)}</div>
462
                         <div className={styles.numTxt}>{formatNumberWithCommas(numericalData2.todaySalesVolume)}</div>
472
                         <div className={styles.numTitle} style={{ marginTop: 30 }}>全年销售额(万元)</div>
463
                         <div className={styles.numTitle} style={{ marginTop: 30 }}>全年销售额(万元)</div>
474
                     </div>
465
                     </div>
475
                     <div className={styles.chartBox1} onClick={() => openChart(1)}>
466
                     <div className={styles.chartBox1} onClick={() => openChart(1)}>
476
                         <div className={styles.chartTitle}>销售额趋势</div>
467
                         <div className={styles.chartTitle}>销售额趋势</div>
477
-                        <ReactEcharts option={chartOptions1} style={{ height: '148px', width: '100%' }} />
468
+                        <ReactEcharts option={chartOptions1} style={{ height: '178px', width: '100%' }} />
478
                         <div className={`${styles.magnifier2}`} ><img src={`${magnifierImg}`} alt="" /></div>
469
                         <div className={`${styles.magnifier2}`} ><img src={`${magnifierImg}`} alt="" /></div>
479
                     </div>
470
                     </div>
480
                 </div>
471
                 </div>
481
                 <div className={`${styles.leftLi} ${styles.displayFlex}`}>
472
                 <div className={`${styles.leftLi} ${styles.displayFlex}`}>
482
                     <div className={styles.chartBox2} style={{ width: '155px' }} onClick={() => openChart(2)}>
473
                     <div className={styles.chartBox2} style={{ width: '155px' }} onClick={() => openChart(2)}>
483
                         <div className={styles.chartTitle}>国际销售额占比</div>
474
                         <div className={styles.chartTitle}>国际销售额占比</div>
484
-                        <ReactEcharts option={chartOptions2} style={{ height: '148px', width: '100%' }} />
475
+                        <ReactEcharts option={chartOptions2} style={{ height: '178px', width: '100%' }} />
485
                         <div className={`${styles.magnifier2}`}><img src={`${magnifierImg}`} alt="" /></div>
476
                         <div className={`${styles.magnifier2}`}><img src={`${magnifierImg}`} alt="" /></div>
486
                     </div>
477
                     </div>
487
                     <div className={styles.chartBox1}>
478
                     <div className={styles.chartBox1}>
491
                             <div className={`${styles.barLi} ${barIndex == 1 ? styles.barLis : ''}`} onClick={() => setBarIndex(1)}>国际</div>
482
                             <div className={`${styles.barLi} ${barIndex == 1 ? styles.barLis : ''}`} onClick={() => setBarIndex(1)}>国际</div>
492
                             <div className={`${styles.magnifier}`} onClick={() => openChart(3)}><img src={`${magnifierImg}`} alt="" /></div>
483
                             <div className={`${styles.magnifier}`} onClick={() => openChart(3)}><img src={`${magnifierImg}`} alt="" /></div>
493
                         </div>
484
                         </div>
494
-                        <div style={{ height: '123px', width: '100%' }} onClick={() => openChart(3)}>
495
-                            <ReactEcharts option={chartOptions3} style={{ height: '123px', width: '100%' }} />
485
+                        <div style={{ height: '155px', width: '100%' }} onClick={() => openChart(3)}>
486
+                            <ReactEcharts option={chartOptions3} style={{ height: '155px', width: '100%' }} />
496
                         </div>
487
                         </div>
497
                     </div>
488
                     </div>
498
                 </div>
489
                 </div>
499
                 <div className={styles.leftLi}>
490
                 <div className={styles.leftLi}>
500
                     <div className={styles.chartBox2} onClick={() => openChart(4)}>
491
                     <div className={styles.chartBox2} onClick={() => openChart(4)}>
501
                         <div className={styles.chartTitle}>客单价趋势</div>
492
                         <div className={styles.chartTitle}>客单价趋势</div>
502
-                        <ReactEcharts option={chartOptions4} style={{ height: '148px', width: '100%' }} />
493
+                        <ReactEcharts option={chartOptions4} style={{ height: '178px', width: '100%' }} />
503
                         <div className={`${styles.magnifier2}`}><img src={`${magnifierImg}`} alt="" /></div>
494
                         <div className={`${styles.magnifier2}`}><img src={`${magnifierImg}`} alt="" /></div>
504
                     </div>
495
                     </div>
505
                 </div>
496
                 </div>
549
             </div>
540
             </div>
550
             <div className={styles.contRight}>
541
             <div className={styles.contRight}>
551
                 <div className={`${styles.rightLi} ${styles.displayFlex}`}>
542
                 <div className={`${styles.rightLi} ${styles.displayFlex}`}>
552
-                    <div style={{ width: '180px' }}>
543
+                    <div style={{ width: '200px' }}>
553
                         <div className={styles.numTitle}>当日订单数(张)</div>
544
                         <div className={styles.numTitle}>当日订单数(张)</div>
554
                         <div className={styles.numTxt}>{formatNumberWithCommas(numericalData3.todayOrder)}</div>
545
                         <div className={styles.numTxt}>{formatNumberWithCommas(numericalData3.todayOrder)}</div>
555
                         <div className={styles.numTitle} style={{ marginTop: 30 }}>全年订单数(张)</div>
546
                         <div className={styles.numTitle} style={{ marginTop: 30 }}>全年订单数(张)</div>
557
                     </div>
548
                     </div>
558
                     <div className={styles.chartBox1} onClick={() => openChart(5)}>
549
                     <div className={styles.chartBox1} onClick={() => openChart(5)}>
559
                         <div className={styles.chartTitle}>国内外订单对比</div>
550
                         <div className={styles.chartTitle}>国内外订单对比</div>
560
-                        <ReactEcharts option={chartOptions5} style={{ height: '148px', width: '100%' }} />
551
+                        <ReactEcharts option={chartOptions5} style={{ height: '178px', width: '100%' }} />
561
                         <div className={`${styles.magnifier2}`}><img src={`${magnifierImg}`} alt="" /></div>
552
                         <div className={`${styles.magnifier2}`}><img src={`${magnifierImg}`} alt="" /></div>
562
                     </div>
553
                     </div>
563
                 </div>
554
                 </div>
564
                 <div className={`${styles.rightLi} ${styles.displayFlex}`}>
555
                 <div className={`${styles.rightLi} ${styles.displayFlex}`}>
565
-                    <div className={styles.chartBox2} style={{ width: '49%' }} onClick={() => openChart(6)}>
556
+                    <div className={styles.chartBox2} style={{ width: '280px' }} onClick={() => openChart(6)}>
566
                         <div className={styles.chartTitle}>出发机场排名(国内)</div>
557
                         <div className={styles.chartTitle}>出发机场排名(国内)</div>
567
-                        <ReactEcharts option={chartOptions6} style={{ height: '148px', width: '100%' }} />
558
+                        <ReactEcharts option={chartOptions6} style={{ height: '178px', width: '100%' }} />
568
                         <div className={`${styles.magnifier2}`} ><img src={`${magnifierImg}`} alt="" /></div>
559
                         <div className={`${styles.magnifier2}`} ><img src={`${magnifierImg}`} alt="" /></div>
569
                     </div>
560
                     </div>
570
-                    <div className={styles.chartBox2} style={{ width: '49%' }} onClick={() => openChart(7)}>
561
+                    <div className={styles.chartBox2} style={{ width: '280px' }} onClick={() => openChart(7)}>
571
                         <div className={styles.chartTitle}>出发机场排名(国际)</div>
562
                         <div className={styles.chartTitle}>出发机场排名(国际)</div>
572
-                        <ReactEcharts option={chartOptions7} style={{ height: '148px', width: '100%' }} />
563
+                        <ReactEcharts option={chartOptions7} style={{ height: '178px', width: '100%' }} />
573
                         <div className={`${styles.magnifier2}`} ><img src={`${magnifierImg}`} alt="" /></div>
564
                         <div className={`${styles.magnifier2}`} ><img src={`${magnifierImg}`} alt="" /></div>
574
                     </div>
565
                     </div>
575
                 </div>
566
                 </div>
577
                     <div className={styles.chartBox2} onClick={() => openChart(8)}>
568
                     <div className={styles.chartBox2} onClick={() => openChart(8)}>
578
                         <div className={styles.chartTitle}>服务类型</div>
569
                         <div className={styles.chartTitle}>服务类型</div>
579
                         <div className={`${styles.displayFlex}`}>
570
                         <div className={`${styles.displayFlex}`}>
580
-                            <ReactEcharts option={chartOptions8} style={{ height: '148px', width: '30%' }} />
571
+                            <ReactEcharts option={chartOptions8} style={{ height: '178px', width: '30%' }} />
581
                             <div style={{ width: '60%', display: 'flex', flexWrap: 'wrap' }}>
572
                             <div style={{ width: '60%', display: 'flex', flexWrap: 'wrap' }}>
582
                                 {chart8Data && chart8Data.map((item, index) => {
573
                                 {chart8Data && chart8Data.map((item, index) => {
583
                                     return (
574
                                     return (
595
                 <div className={styles.rightLi}>
586
                 <div className={styles.rightLi}>
596
                     <div className={styles.chartBox2} onClick={() => openChart(9)}>
587
                     <div className={styles.chartBox2} onClick={() => openChart(9)}>
597
                         <div className={styles.chartTitle}>用户画像</div>
588
                         <div className={styles.chartTitle}>用户画像</div>
598
-                        <ReactEcharts option={chartOptions9} style={{ height: '148px', width: '100%' }} />
589
+                        <ReactEcharts option={chartOptions9} style={{ height: '178px', width: '100%' }} />
599
                         <div className={`${styles.magnifier2}`} ><img src={`${magnifierImg}`} alt="" /></div>
590
                         <div className={`${styles.magnifier2}`} ><img src={`${magnifierImg}`} alt="" /></div>
600
                     </div>
591
                     </div>
601
                 </div>
592
                 </div>
608
                         <div className={`${styles.barLi} ${barIndex == 0 ? styles.barLis : ''}`} onClick={() => setBarIndex(0)}>国内</div>
599
                         <div className={`${styles.barLi} ${barIndex == 0 ? styles.barLis : ''}`} onClick={() => setBarIndex(0)}>国内</div>
609
                         <div className={`${styles.barLi} ${barIndex == 1 ? styles.barLis : ''}`} onClick={() => setBarIndex(1)}>国际</div>
600
                         <div className={`${styles.barLi} ${barIndex == 1 ? styles.barLis : ''}`} onClick={() => setBarIndex(1)}>国际</div>
610
                     </div>}
601
                     </div>}
611
-                    {[1,2,3,4,5,6,7,8,9].includes(chartIndex) &&  <ReactEcharts ref={chartRef} option={options} style={{ height: [3,5].includes(chartIndex)?'65vh':'80vh', width: [8].includes(chartIndex)?'40vw':'100vw' }} />}
602
+                    {[1,2,3,4,5,6,7,8,9].includes(chartIndex) && <ReactEcharts ref={chartRef} option={options} style={{ height: [3,5].includes(chartIndex)?'65vh':'80vh', width: [8].includes(chartIndex)?'40vw':'100vw' }} />}
612
                     {chartIndex == 8 && <div style={{ width: '60%', display: 'flex', flexWrap: 'wrap',paddingLeft:80 ,paddingTop:'8%' }}>
603
                     {chartIndex == 8 && <div style={{ width: '60%', display: 'flex', flexWrap: 'wrap',paddingLeft:80 ,paddingTop:'8%' }}>
613
                         {chart8Data && chart8Data.map((item, index) => {
604
                         {chart8Data && chart8Data.map((item, index) => {
614
                             return (
605
                             return (
629
                     {chartIndex == 5 && <div className={styles.popCircular2}></div>}
620
                     {chartIndex == 5 && <div className={styles.popCircular2}></div>}
630
                 </div>
621
                 </div>
631
             </Modal>
622
             </Modal>
632
-
633
         </div>
623
         </div>
634
     );
624
     );
635
 };
625
 };

+ 50
- 20
src/services/chartOption.ts 查看文件

15
             rotate: -45,
15
             rotate: -45,
16
             interval: 0,
16
             interval: 0,
17
             padding: [10, 0, 0, 0],
17
             padding: [10, 0, 0, 0],
18
-            fontSize: 12,
18
+            fontSize: 14,
19
         },
19
         },
20
         axisTick: {
20
         axisTick: {
21
             show: false
21
             show: false
34
             lineStyle: {
34
             lineStyle: {
35
                 color: 'rgba(96,96,96,0.15)' // 设置x轴网格线颜色为红色  
35
                 color: 'rgba(96,96,96,0.15)' // 设置x轴网格线颜色为红色  
36
             }
36
             }
37
+        },
38
+        axisLabel:{
39
+            fontSize: 14,
37
         }
40
         }
38
     },
41
     },
39
     grid: {
42
     grid: {
73
                 ),
76
                 ),
74
                 width: 2 // 折线宽度  
77
                 width: 2 // 折线宽度  
75
             },
78
             },
79
+            animation: true,
76
             animationDuration:allAnimationDuration,
80
             animationDuration:allAnimationDuration,
77
-            animationEasing:allAnimationEasing
81
+            animationEasing:allAnimationEasing,
82
+            animationDurationUpdate:allAnimationDuration
78
         }
83
         }
79
     ],
84
     ],
80
     animationEasing:allAnimationEasing
85
     animationEasing:allAnimationEasing
97
     legend: {
102
     legend: {
98
         orient: 'horizontal', // 设置图例为水平方向  
103
         orient: 'horizontal', // 设置图例为水平方向  
99
         bottom: '2%',        // 设置图例离容器底部的距离为10%  
104
         bottom: '2%',        // 设置图例离容器底部的距离为10%  
100
-        itemWidth: 10,
101
-        itemHeight: 10,
105
+        itemWidth: 12,
106
+        itemHeight: 12,
102
         textStyle: {
107
         textStyle: {
103
-            fontSize: 14
108
+            fontSize: 18,
104
         }
109
         }
105
     },
110
     },
106
     color: colors,
111
     color: colors,
151
     legend: { show: false },
156
     legend: { show: false },
152
     grid: {
157
     grid: {
153
         left: '0%',
158
         left: '0%',
154
-        right: '10%',
159
+        right: '5%',
155
         bottom: '3%',
160
         bottom: '3%',
156
         top: '5%',
161
         top: '5%',
157
         containLabel: true
162
         containLabel: true
188
             }
193
             }
189
         },
194
         },
190
         axisLabel: {
195
         axisLabel: {
191
-            color: '#606060'
196
+            color: '#606060',
197
+            fontSize:14
198
+            
192
         },
199
         },
193
         nameTextStyle: {
200
         nameTextStyle: {
194
             color: '#606060'
201
             color: '#606060'
232
         type: 'category',
239
         type: 'category',
233
         data: mouthData,
240
         data: mouthData,
234
         axisLabel: {
241
         axisLabel: {
235
-            interval: 0
242
+            interval: 0,
243
+            fontSize: 14,
236
         },
244
         },
237
         axisTick: { show: false },
245
         axisTick: { show: false },
238
     },
246
     },
243
         nameTextStyle: {
251
         nameTextStyle: {
244
             color: '#606060',
252
             color: '#606060',
245
             align: 'right',
253
             align: 'right',
246
-            padding: [0, 8, 0, 0]
254
+            padding: [0, 8, 0, 0],
255
+            fontSize:14
247
         },
256
         },
248
-        splitLine: { show: false }
257
+        splitLine: { show: false },
258
+        axisLabel:{
259
+            fontSize: 14,
260
+        }
249
 
261
 
250
     },
262
     },
251
     legend: {
263
     legend: {
253
         left: '2%',
265
         left: '2%',
254
         itemWidth: 10,
266
         itemWidth: 10,
255
         itemHeight: 10,
267
         itemHeight: 10,
268
+        textStyle: {
269
+            fontSize: 18,
270
+        }
256
         // 其他legend配置,如type、top、left、right、bottom、orient、textStyle等,根据需要设置  
271
         // 其他legend配置,如type、top、left、right、bottom、orient、textStyle等,根据需要设置  
257
     },
272
     },
258
     grid: {
273
     grid: {
259
         left: '10%',
274
         left: '10%',
260
-        right: '8%',
275
+        right: '0',
261
         top: '33%',
276
         top: '33%',
262
         bottom: '20%',
277
         bottom: '20%',
263
     },
278
     },
297
         trigger: 'item'
312
         trigger: 'item'
298
     },
313
     },
299
     legend: {
314
     legend: {
300
-        top: '5%',
301
-        left: 'center',
315
+        top: '1%',
316
+        left: '40%',
302
         itemWidth: 10,
317
         itemWidth: 10,
303
         itemHeight: 10,
318
         itemHeight: 10,
319
+        textStyle: {
320
+            fontSize: 18,
321
+        }
304
     },
322
     },
305
     grid: {
323
     grid: {
306
         left: '0%',
324
         left: '0%',
311
             name: '国内外订单对比',
329
             name: '国内外订单对比',
312
             type: 'pie',
330
             type: 'pie',
313
             radius: ['87%', '135%'],
331
             radius: ['87%', '135%'],
314
-            center: ['50%', '100%'],
332
+            center: ['58%', '100%'],
315
             // adjust the start and end angle
333
             // adjust the start and end angle
316
             startAngle: 180,
334
             startAngle: 180,
317
             endAngle: 360,
335
             endAngle: 360,
387
             }
405
             }
388
         },
406
         },
389
         axisLabel: {
407
         axisLabel: {
390
-            color: '#606060'
408
+            color: '#606060',
409
+            fontSize: 14,
391
         },
410
         },
392
         splitLine: {
411
         splitLine: {
393
             show: false // 隐藏网格线
412
             show: false // 隐藏网格线
469
         },
488
         },
470
         axisLabel: {
489
         axisLabel: {
471
             color: '#606060',
490
             color: '#606060',
491
+            fontSize: 14,
472
             formatter: function (value) {
492
             formatter: function (value) {
473
               if (value.length > 5) {
493
               if (value.length > 5) {
474
                 return value.substring(0, 5) + '...';
494
                 return value.substring(0, 5) + '...';
513
             // name: 'Access From',
533
             // name: 'Access From',
514
             type: 'pie',
534
             type: 'pie',
515
             radius: '85%',
535
             radius: '85%',
516
-            center: ['50%', '50%'],
536
+            center: ['50%', '55%'],
517
             data: [].sort(function (a, b) {
537
             data: [].sort(function (a, b) {
518
                 return b.value - a.value;
538
                 return b.value - a.value;
519
             }),
539
             }),
531
 }
551
 }
532
 
552
 
533
 const chartDefaultOptions9 = {
553
 const chartDefaultOptions9 = {
534
-    color: colors.concat('#8AC0F6'),
554
+    color: colors.concat('#8AC0F6').reverse(),
535
     legend: {
555
     legend: {
536
         top: 0,
556
         top: 0,
537
         left: '2%',
557
         left: '2%',
538
         itemWidth: 10,
558
         itemWidth: 10,
539
         itemHeight: 10,
559
         itemHeight: 10,
540
-        selectedMode: false
560
+        selectedMode: false,
561
+        textStyle: {
562
+            fontSize: 18,
563
+        }
541
     },
564
     },
542
     yAxis: [{
565
     yAxis: [{
543
         type: 'value',
566
         type: 'value',
545
         nameTextStyle: {
568
         nameTextStyle: {
546
             color: '#606060',
569
             color: '#606060',
547
             align: 'right',
570
             align: 'right',
548
-            padding: [0, 8, 0, 0]
571
+            padding: [0, 8, 0, 0],
572
+            fontSize:14
573
+        },
574
+        axisLabel: {
575
+            fontSize: 14,
549
         },
576
         },
550
     },{
577
     },{
551
         
578
         
560
     xAxis: {
587
     xAxis: {
561
         type: 'category',
588
         type: 'category',
562
         data: mouthData,
589
         data: mouthData,
590
+        axisLabel: {
591
+            fontSize: 14,
592
+        },
563
     },
593
     },
564
     grid: {
594
     grid: {
565
         top: '33%',
595
         top: '33%',
1161
     })
1191
     })
1162
 
1192
 
1163
     return {
1193
     return {
1164
-        color: colors.concat('#8AC0F6'),
1194
+        color: colors.concat('#8AC0F6').reverse(),
1165
         legend: {
1195
         legend: {
1166
             orient: 'horizontal', // 设置图例为水平方向  
1196
             orient: 'horizontal', // 设置图例为水平方向  
1167
             top: '15%',        // 设置图例离容器底部的距离为10%  
1197
             top: '15%',        // 设置图例离容器底部的距离为10%  

正在加载...
取消
保存