78c0c8e3 by zhangmeng

看板

1 parent dff07a15
...@@ -98,8 +98,6 @@ import {onMounted, ref} from 'vue' ...@@ -98,8 +98,6 @@ import {onMounted, ref} from 'vue'
98 import {dayjs} from 'element-plus' 98 import {dayjs} from 'element-plus'
99 import {getYS001, getYS002, getYS003, getYS004, getYS005} from '@/api/server.js' 99 import {getYS001, getYS002, getYS003, getYS004, getYS005} from '@/api/server.js'
100 100
101
102 const dataItems = ref([]);
103 const zhuRef1 = ref(null) 101 const zhuRef1 = ref(null)
104 const zhuRef2 = ref(null) 102 const zhuRef2 = ref(null)
105 const zhuRef3 = ref(null) 103 const zhuRef3 = ref(null)
...@@ -330,13 +328,24 @@ const handelBing1 = (arr1, arr2) => { ...@@ -330,13 +328,24 @@ const handelBing1 = (arr1, arr2) => {
330 tooltip: { 328 tooltip: {
331 trigger: 'item', 329 trigger: 'item',
332 position: ['20%', '30%'], 330 position: ['20%', '30%'],
333 valueFormatter: (value) => value + '万', 331 // valueFormatter: (value) => value + '万',
334 backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色 332 backgroundColor: 'rgba(5, 28, 51, 1)', // 背景色
335 borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色 333 borderColor: 'rgba(46, 151, 198, 1)', // 边框颜色
336 borderWidth: 1, // 边框宽度 334 borderWidth: 1, // 边框宽度
337 textStyle: { 335 textStyle: {
338 color: '#fff', // 文字颜色 336 color: '#fff', // 文字颜色
339 fontSize: 12, // 文字大小 337 fontSize: 12, // 文字大小
338 },
339 formatter: function (params) {
340 // params.seriesIndex 可以判断是哪个系列(外环或内环)
341 // params.seriesName 可以获取系列名称
342 if (params.seriesIndex === 1) {
343 // 外环的提示内容
344 return `营业收入<br/>${arr1.YEAR}: ${(arr1.TOTAL / 10000).toFixed()}万`;
345 } else if (params.seriesIndex === 2) {
346 // 内环的提示内容
347 return `营业收入<br/>${arr2.YEAR}: ${(arr2.TOTAL / 10000).toFixed()}万`;
348 }
340 } 349 }
341 }, 350 },
342 series: [ 351 series: [
...@@ -498,20 +507,31 @@ const handelBing2 = (row1, row2) => { ...@@ -498,20 +507,31 @@ const handelBing2 = (row1, row2) => {
498 textStyle: { 507 textStyle: {
499 color: '#fff', // 文字颜色 508 color: '#fff', // 文字颜色
500 fontSize: 12, // 文字大小 509 fontSize: 12, // 文字大小
510 },
511 formatter: function (params) {
512 // params.seriesIndex 可以判断是哪个系列(外环或内环)
513 // params.seriesName 可以获取系列名称
514 if (params.seriesIndex === 1) {
515 // 外环的提示内容
516 return `应收余额<br/>${params.name}: ${params.value}万`;
517 }
501 } 518 }
502 }, 519 },
503 520
504 series: [ 521 series: [
505 { 522 {
506 name: '应收余额', 523 name: '',
507 type: 'pie', 524 type: 'pie',
508 radius: ['99%', '100%'], 525 radius: ['99%', '100%'],
509 center: ['50%', '60%'], 526 center: ['50%', '60%'],
527 emphasis: {
528 scale: false,
529 },
510 label: { 530 label: {
511 show: false, 531 show: false,
512 }, 532 emphasis: {
513 emphasis: { 533 show: false
514 scale: false 534 }
515 }, 535 },
516 startAngle: 180, 536 startAngle: 180,
517 endAngle: 360, 537 endAngle: 360,
...@@ -607,6 +627,14 @@ const handelBing3 = (row1, row2) => { ...@@ -607,6 +627,14 @@ const handelBing3 = (row1, row2) => {
607 textStyle: { 627 textStyle: {
608 color: '#fff', // 文字颜色 628 color: '#fff', // 文字颜色
609 fontSize: 12, // 文字大小 629 fontSize: 12, // 文字大小
630 },
631 formatter: function (params) {
632 // params.seriesIndex 可以判断是哪个系列(外环或内环)
633 // params.seriesName 可以获取系列名称
634 if (params.seriesIndex === 1) {
635 // 外环的提示内容
636 return `应收余额<br/>${params.name}: ${params.value}万`;
637 }
610 } 638 }
611 }, 639 },
612 640
......
...@@ -119,6 +119,10 @@ onUnmounted(() => { ...@@ -119,6 +119,10 @@ onUnmounted(() => {
119 color: #FFFFFF; 119 color: #FFFFFF;
120 height: calc(40 * 100vh / 1920); 120 height: calc(40 * 100vh / 1920);
121 margin: calc(8 * 100vw / 1920) 0; 121 margin: calc(8 * 100vw / 1920) 0;
122 white-space: nowrap; /* 强制文本不换行 */
123 overflow: hidden; /* 隐藏溢出内容 */
124 text-overflow: ellipsis; /* 显示省略号 */
125 width: 99%; /* 必须指定宽度 */
122 126
123 span { 127 span {
124 display: inline-block; 128 display: inline-block;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!