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

@@ -239,7 +239,7 @@
] ]
navRight.value = [ navRight.value = [
{ name:'车船', path:'/vehicles'}, { name:'车船', path:'/vehicles'},
{ name: '工单', path: '/workOrder' }, // { name: '工单', path: '/workOrder' },
{ name: '舆情', path: '/sentiment' }, { name: '舆情', path: '/sentiment' },
{ name: '酒店', path: '/hotel' } { name: '酒店', path: '/hotel' }
] ]

View File

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

View File

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

View File

@@ -42,7 +42,7 @@
itemGap: fitChartSize(6), itemGap: fitChartSize(6),
formatter: (name) => { formatter: (name) => {
let obj = props.dataList.find((item) => item.name == name) let obj = props.dataList.find((item) => item.name == name)
return `{name|${name}} {value|${obj?.value}}{value|}` return `{name|${name}} {value|${obj?.value}}{value|%}`
}, },
textStyle: { textStyle: {
rich: { rich: {

View File

@@ -500,7 +500,6 @@
console.log(regionList.value, ' regionList.value') console.log(regionList.value, ' regionList.value')
} }
const onMonitorChange = () => { const onMonitorChange = () => {
monitorChange = pubSub.subscribe('monitorChange', (res, data) => { monitorChange = pubSub.subscribe('monitorChange', (res, data) => {
cameraName.value = '' cameraName.value = ''
current.value = 0 current.value = 0
@@ -509,8 +508,12 @@
videoList.value = [] videoList.value = []
regionList.value = [] regionList.value = []
total.value = 0 total.value = 0
getVideoType() setTimeout(()=>{
getVideoRegions() getVideoType()
getVideoRegions()
},1500)
}) })
} }
onMounted(() => { onMounted(() => {