59939518 by zhangmeng

大屏

1 parent 881defcf
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
25 </div> 25 </div>
26 26
27 <div class="bottom"> 27 <div class="bottom">
28 <div class="father"> 28 <div class="father dong">
29 <div style="display: flex"> 29 <div style="display: flex">
30 <div class="bing" style="width: 30%"> 30 <div class="bing" style="width: 30%">
31 <div class="bingTitle"> 31 <div class="bingTitle">
...@@ -173,13 +173,11 @@ const handelBing1 = () => { ...@@ -173,13 +173,11 @@ const handelBing1 = () => {
173 name: '1', 173 name: '1',
174 type: 'pie', 174 type: 'pie',
175 radius: ['99%', '100%'], 175 radius: ['99%', '100%'],
176 center: ['50%', '70%'], 176 center: ['50%', '60%'],
177 label: { 177 label: {
178 show: false 178 show: false
179 }, 179 },
180 itemStyle: { 180
181 borderWidth: 2
182 },
183 emphasis: { 181 emphasis: {
184 scale: false 182 scale: false
185 }, 183 },
...@@ -189,13 +187,17 @@ const handelBing1 = () => { ...@@ -189,13 +187,17 @@ const handelBing1 = () => {
189 {value: 48, name: '1'}, 187 {value: 48, name: '1'},
190 {value: 1, name: '1'}, 188 {value: 1, name: '1'},
191 {value: 48, name: '1'} 189 {value: 48, name: '1'}
192 ] 190 ],
191 itemStyle: {
192 color: 'rgba(1, 162, 237, 1)',
193 },
194 barWidth: 2
193 }, 195 },
194 { 196 {
195 name: '2', 197 name: '2',
196 type: 'pie', 198 type: 'pie',
197 radius: ['75%', '95%'], 199 radius: ['75%', '95%'],
198 center: ['50%', '70%'], 200 center: ['50%', '60%'],
199 label: { 201 label: {
200 show: false 202 show: false
201 }, 203 },
...@@ -206,15 +208,18 @@ const handelBing1 = () => { ...@@ -206,15 +208,18 @@ const handelBing1 = () => {
206 scale: false 208 scale: false
207 }, 209 },
208 data: [ 210 data: [
211 {value: 735, name: 'Direct', itemStyle: {color: "rgb(255,217,0)"}},
209 {value: 1048, name: 'Search Engine'}, 212 {value: 1048, name: 'Search Engine'},
210 {value: 735, name: 'Direct'} 213 ],
211 ] 214 itemStyle: {
215 color: 'rgba(1, 162, 237, .5)',
216 },
212 }, 217 },
213 { 218 {
214 name: '3', 219 name: '3',
215 type: 'pie', 220 type: 'pie',
216 radius: ['55%', '70%'], 221 radius: ['55%', '70%'],
217 center: ['50%', '70%'], 222 center: ['50%', '60%'],
218 label: { 223 label: {
219 show: true, 224 show: true,
220 position: 'center', 225 position: 'center',
...@@ -227,15 +232,18 @@ const handelBing1 = () => { ...@@ -227,15 +232,18 @@ const handelBing1 = () => {
227 startAngle: 180, 232 startAngle: 180,
228 endAngle: 360, 233 endAngle: 360,
229 data: [ 234 data: [
230 {value: 1048, name: '2025'}, 235 {value: 1048, name: '2025', itemStyle: {color: "rgba(240, 255, 0, .5)"}},
231 {value: 735, name: '2025'} 236 {value: 735, name: '2025'}
232 ] 237 ],
238 itemStyle: {
239 color: 'rgba(1, 162, 237, .5)',
240 },
233 }, 241 },
234 { 242 {
235 name: '4', 243 name: '4',
236 type: 'pie', 244 type: 'pie',
237 radius: ['38%', '50%'], 245 radius: ['38%', '50%'],
238 center: ['50%', '70%'], 246 center: ['50%', '60%'],
239 label: { 247 label: {
240 show: false 248 show: false
241 }, 249 },
...@@ -245,7 +253,18 @@ const handelBing1 = () => { ...@@ -245,7 +253,18 @@ const handelBing1 = () => {
245 // adjust the start and end angle 253 // adjust the start and end angle
246 startAngle: 180, 254 startAngle: 180,
247 endAngle: 360, 255 endAngle: 360,
248 data: [{value: 1048, name: ''}] 256 data: [{value: 1048, name: ''}],
257 itemStyle: {
258 color: {
259 type: 'linear',
260 x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变
261 colorStops: [
262 {offset: 0, color: 'rgba(1, 162, 237, 1)'}, // 顶部颜色
263 {offset: 1, color: 'rgba(16, 123, 184, 1)'} // 底部颜色
264 ]
265 },
266 },
267 barWidth: '40%'
249 } 268 }
250 ] 269 ]
251 } 270 }
...@@ -265,7 +284,7 @@ const handelBing2 = () => { ...@@ -265,7 +284,7 @@ const handelBing2 = () => {
265 name: '1', 284 name: '1',
266 type: 'pie', 285 type: 'pie',
267 radius: ['99%', '100%'], 286 radius: ['99%', '100%'],
268 center: ['50%', '70%'], 287 center: ['50%', '60%'],
269 label: { 288 label: {
270 show: false 289 show: false
271 }, 290 },
...@@ -287,7 +306,7 @@ const handelBing2 = () => { ...@@ -287,7 +306,7 @@ const handelBing2 = () => {
287 name: '2', 306 name: '2',
288 type: 'pie', 307 type: 'pie',
289 radius: ['75%', '95%'], 308 radius: ['75%', '95%'],
290 center: ['50%', '70%'], 309 center: ['50%', '60%'],
291 label: { 310 label: {
292 show: false 311 show: false
293 }, 312 },
...@@ -306,7 +325,7 @@ const handelBing2 = () => { ...@@ -306,7 +325,7 @@ const handelBing2 = () => {
306 name: '3', 325 name: '3',
307 type: 'pie', 326 type: 'pie',
308 radius: ['55%', '70%'], 327 radius: ['55%', '70%'],
309 center: ['50%', '70%'], 328 center: ['50%', '60%'],
310 label: { 329 label: {
311 show: true, 330 show: true,
312 position: 'center', 331 position: 'center',
...@@ -341,7 +360,7 @@ const handelBing3 = () => { ...@@ -341,7 +360,7 @@ const handelBing3 = () => {
341 name: '1', 360 name: '1',
342 type: 'pie', 361 type: 'pie',
343 radius: ['99%', '100%'], 362 radius: ['99%', '100%'],
344 center: ['50%', '70%'], 363 center: ['50%', '60%'],
345 label: { 364 label: {
346 show: false 365 show: false
347 }, 366 },
...@@ -363,7 +382,7 @@ const handelBing3 = () => { ...@@ -363,7 +382,7 @@ const handelBing3 = () => {
363 name: '2', 382 name: '2',
364 type: 'pie', 383 type: 'pie',
365 radius: ['75%', '95%'], 384 radius: ['75%', '95%'],
366 center: ['50%', '70%'], 385 center: ['50%', '60%'],
367 label: { 386 label: {
368 show: false 387 show: false
369 }, 388 },
...@@ -382,7 +401,7 @@ const handelBing3 = () => { ...@@ -382,7 +401,7 @@ const handelBing3 = () => {
382 name: '3', 401 name: '3',
383 type: 'pie', 402 type: 'pie',
384 radius: ['55%', '70%'], 403 radius: ['55%', '70%'],
385 center: ['50%', '70%'], 404 center: ['50%', '60%'],
386 label: { 405 label: {
387 show: true, 406 show: true,
388 position: 'center', 407 position: 'center',
...@@ -422,31 +441,62 @@ const handelZhu1 = () => { ...@@ -422,31 +441,62 @@ const handelZhu1 = () => {
422 }, 441 },
423 }, 442 },
424 grid: { 443 grid: {
425 left: '3%', 444 left: '0%',
426 right: '4%', 445 right: '0%',
427 bottom: '3%', 446 bottom: '1%',
428 containLabel: true 447 containLabel: true
429 }, 448 },
430 xAxis: [ 449 xAxis: [
431 { 450 {
432 type: 'category', 451 type: 'category',
433 data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] 452 data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
453 axisLine: {
454 show: true,
455 lineStyle: {
456 color: '#fff',
457 width: 2,
458 type: 'solid'
459 }
460 },
434 } 461 }
435 ], 462 ],
436 yAxis: [ 463 yAxis: [
437 { 464 {
438 type: 'value', 465 type: 'value',
439 name: '单位(万)', 466 name: '单位(万)',
467 axisLine: {
468 show: true,
469 lineStyle: {
470 color: '#fff',
471 width: 2,
472 type: 'solid'
473 }
474 },
440 } 475 }
441 ], 476 ],
442 series: [ 477 series: [
443 { 478 {
444 name: '2025年', 479 name: '2025年',
445 type: 'bar', 480 type: 'bar',
481 barGap: 0,
446 emphasis: { 482 emphasis: {
447 focus: 'series' 483 focus: 'series'
448 }, 484 },
449 data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290,] 485 data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290,],
486 itemStyle: {
487 color: {
488 type: 'linear',
489 x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变
490 colorStops: [
491 {offset: 0, color: 'rgba(242, 196, 0, 1)'}, // 顶部颜色
492 {offset: 1, color: 'rgba(153, 101, 0, 1)'} // 底部颜色
493 ]
494 },
495 borderColor: 'rgba(240, 255, 0, 1)',
496 borderWidth: 1
497 },
498 barWidth: '35%',
499 borderColor: 'rgba(240, 255, 0, 1)'
450 }, 500 },
451 { 501 {
452 name: '2024年', 502 name: '2024年',
...@@ -454,7 +504,20 @@ const handelZhu1 = () => { ...@@ -454,7 +504,20 @@ const handelZhu1 = () => {
454 emphasis: { 504 emphasis: {
455 focus: 'series' 505 focus: 'series'
456 }, 506 },
457 data: [150, 232, 201, 154, 190, 330, 410, 201, 154, 190, 330, 410] 507 data: [150, 232, 201, 154, 190, 330, 410, 201, 154, 190, 330, 410],
508 itemStyle: {
509 color: {
510 type: 'linear',
511 x: 0, y: 0, x2: 1, y2: 1, // 垂直渐变
512 colorStops: [
513 {offset: 0, color: 'rgba(242, 196, 0, .5)'}, // 顶部颜色
514 {offset: 1, color: 'rgba(153, 101, 0, .5)'} // 底部颜色
515 ]
516 },
517 borderColor: 'rgba(240, 255, 0, 1)',
518 borderWidth: 1
519 },
520 barWidth: '35%',
458 }, 521 },
459 ] 522 ]
460 } 523 }
...@@ -691,6 +754,23 @@ function autoHover(myChart, option, index, time) { ...@@ -691,6 +754,23 @@ function autoHover(myChart, option, index, time) {
691 754
692 .father { 755 .father {
693 position: relative; 756 position: relative;
757
758 }
759
760 .dong {
761 position: relative;
762
763 &::after {
764 content: '';
765 width: 40%;
766 height: 40%;
767 background: url("@/assets/img/line2.png") no-repeat;
768 background-size: contain;
769 position: absolute;
770 top: -25%;
771 left: 0;
772 animation: movelr 4s ease-in infinite;
773 }
694 } 774 }
695 775
696 .top { 776 .top {
...@@ -707,6 +787,7 @@ function autoHover(myChart, option, index, time) { ...@@ -707,6 +787,7 @@ function autoHover(myChart, option, index, time) {
707 width: calc(140 * 100vw / 1920); 787 width: calc(140 * 100vw / 1920);
708 height: calc(210 * 100vh / 1920); 788 height: calc(210 * 100vh / 1920);
709 789
790
710 .titleTop { 791 .titleTop {
711 text-align: center; 792 text-align: center;
712 font-family: PingFang SC, serif; 793 font-family: PingFang SC, serif;
...@@ -802,6 +883,7 @@ function autoHover(myChart, option, index, time) { ...@@ -802,6 +883,7 @@ function autoHover(myChart, option, index, time) {
802 position: relative; 883 position: relative;
803 overflow: hidden; 884 overflow: hidden;
804 885
886
805 .bing { 887 .bing {
806 text-align: center; 888 text-align: center;
807 889
...@@ -826,8 +908,8 @@ function autoHover(myChart, option, index, time) { ...@@ -826,8 +908,8 @@ function autoHover(myChart, option, index, time) {
826 908
827 .bingBottom { 909 .bingBottom {
828 position: absolute; 910 position: absolute;
829 z-index: 99; 911 z-index: 9;
830 bottom: 0; 912 bottom: 4%;
831 left: 0; 913 left: 0;
832 width: 30%; 914 width: 30%;
833 915
...@@ -842,4 +924,15 @@ function autoHover(myChart, option, index, time) { ...@@ -842,4 +924,15 @@ function autoHover(myChart, option, index, time) {
842 } 924 }
843 } 925 }
844 926
927 @keyframes movelr {
928 0% {
929 left: 0;
930 opacity: 1;
931 }
932 100% {
933 left: calc(220 * 100vw / 1920);
934 opacity: 0;
935 }
936 }
937
845 </style> 938 </style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!