From cc43098ca717e1197d57cc2d8a5e55f28f76a450 Mon Sep 17 00:00:00 2001 From: duanliang Date: Wed, 23 Apr 2025 02:00:16 +0800 Subject: [PATCH] 422 --- src/components/Line/index.vue | 7 +-- src/components/PieRow/index.vue | 13 +++-- src/components/RegionTop/index.vue | 51 +++++++++++++++----- src/components/TicketSource/index.vue | 6 ++- src/hooks/echart.js | 10 +++- src/views/home/components/box-3.vue | 2 +- src/views/home/components/jam-count.vue | 7 ++- src/views/home/components/jam-duration.vue | 4 +- src/views/scenic/components/big-map.vue | 4 +- src/views/scenic/components/jam.vue | 3 +- src/views/scenic/components/traffic-flow.vue | 36 ++++++++++++-- src/views/vehicles/components/big-map.vue | 4 +- 12 files changed, 114 insertions(+), 33 deletions(-) diff --git a/src/components/Line/index.vue b/src/components/Line/index.vue index d592bcf..11f3cc1 100644 --- a/src/components/Line/index.vue +++ b/src/components/Line/index.vue @@ -4,7 +4,8 @@ :id="id" :style="{ width: styleUtil.px2vw(width), - height: styleUtil.px2vh(height) + height: styleUtil.px2vh(height), + opacity:data.length?1:0, }" />
加载中...
@@ -172,7 +173,7 @@ [() => props.data, () => props.xAxisData], (val) => { aIndex+=1 - if(aIndex>=3&&!val[0].length){ + if(aIndex>=3&&!val[0][0].data.length){ condShow.value = 1 } if (val[0].length > 0 && val[1].length > 0) { @@ -181,7 +182,7 @@ init() }, 1000) }else{ - + // condShow.value = 1 } }, { immediate: true } diff --git a/src/components/PieRow/index.vue b/src/components/PieRow/index.vue index f24e456..7487e30 100644 --- a/src/components/PieRow/index.vue +++ b/src/components/PieRow/index.vue @@ -4,7 +4,8 @@ :id="id" :style="{ width: styleUtil.px2vw(width), - height: styleUtil.px2vh(height) + height: styleUtil.px2vh(height), + opacity:dataList.length?1:0, }" />
加载中...
@@ -47,7 +48,7 @@ } }) - const { id, setOption } = useEchart() + const { id, setOption,chartVal,dispose ,clearOption} = useEchart() var colorList = ['#FDC40A', '#FF5232', '#50F0A6', '#5FDFFA'] @@ -106,6 +107,7 @@ watch( () => props.dataList, (newVal) => { + console.log(chartVal.value,newVal,'newValnewValnewValnewValnewVal') aIndex+=1 if(aIndex>=3&&!newVal.length){ condShow.value = 1 @@ -125,8 +127,12 @@ ...defaultCofig, ...props.config }) + }) - } + }else{ + + + } }, { immediate: true } ) @@ -146,5 +152,6 @@ display: flex; align-items: center; justify-content: center; + } diff --git a/src/components/RegionTop/index.vue b/src/components/RegionTop/index.vue index c9cf03b..93aee20 100644 --- a/src/components/RegionTop/index.vue +++ b/src/components/RegionTop/index.vue @@ -1,12 +1,18 @@