This commit is contained in:
duanliang
2025-04-22 23:19:40 +08:00
parent 3bff33bf03
commit c4210fed48
5 changed files with 23 additions and 9 deletions

View File

@@ -209,7 +209,7 @@
<div class="hotel">
<div>
<div class="item">
<div class="label">酒店总数</div>
<div class="label">接入总数</div>
<countup class="value" :end-val="homeStore.hotelData?.info?.hotel_count || 0" />
</div>
<div class="item">

View File

@@ -35,6 +35,7 @@
return {
...item,
value: item.occupiedSpaces,
total: item.total,
itemStyle: {
color: {
type: 'linear',
@@ -62,6 +63,7 @@
return {
...item,
value: item.occupiedSpaces,
total: item.total,
itemStyle: {
color: '#fff',
opacity: 1
@@ -70,7 +72,9 @@
})
}
const getYAxisData = () => {
return props.list.map((item) => item.occupiedSpaces)
return props.list.map((item) => {
return{value:item.occupiedSpaces,total:item.total}
})
}
const init = () => {
if (!params) {
@@ -129,7 +133,8 @@
padding: [0, 0, 6, 0],
inside: true,
formatter: function (value) {
return `{value|余}{value|${value}}`
let obj = props.list.find((item) => item.occupiedSpaces == value)
return `{value|余}{value|${value}}/{total|总}{total|${obj?.total}}`
},
rich: {
value: {
@@ -137,7 +142,13 @@
color: '#fff',
fontWeight: 600,
fontSize: fitChartSize(14)
}
},
total: {
align: 'center',
color: '#fff',
fontWeight: 600,
fontSize: fitChartSize(14)
},
}
},
data: getYAxisData()