This commit is contained in:
duanliang
2025-04-23 02:00:16 +08:00
parent 5ce6f4c899
commit cc43098ca7
12 changed files with 114 additions and 33 deletions

View File

@@ -27,7 +27,7 @@
<img class="icon" src="@/assets/images/icon-4.png" alt="" />
<div>
<countup :end-val="homeStore.trafficInfoData.info.zdydsc" />
<div class="label">最大拥堵时长 </div>
<div class="label">最大拥堵时长(分钟) </div>
</div>
</div>
</div>

View File

@@ -1,7 +1,9 @@
<!-- 拥堵次数占比 -->
<template>
<div style="position: relative;">
<div class="jam-count" :id="id" />
<div class="jam-count" :style="{
opacity:list.length?1:0,
}" :id="id" />
<div v-if="condShow==0" class="nYong-du">加载中...</div>
<div v-if="condShow==1" class="nYong-du">{{text}}</div>
</div>
@@ -81,7 +83,8 @@
itemGap: fitChartSize(6),
formatter: (name) => {
let obj = props.list.find((item) => item.name == name)
return '{name|' + name + '} {value|' + obj?.count + '}{value|%}'
console.log(obj,'5555555555555555555')
return '{name|' + name + '} {value|' + obj?.value + '}{value|%}'
},
textStyle: {
rich: {

View File

@@ -1,7 +1,9 @@
<template>
<!-- 拥堵时长 -->
<div style="position:relative;">
<div class="jam" :id="id" />
<div class="jam" :style="{
opacity:list.length?1:0,
}" :id="id" />
<div v-if="condShow==0" class="nYong-du">加载中...</div>
<div v-if="condShow==1" class="nYong-du">{{text}}</div>
</div>

View File

@@ -131,8 +131,8 @@
number: 0
},
{
label: '行',
value: '行',
label: '行',
value: '行',
number: 0
},
{

View File

@@ -5,7 +5,8 @@
:id="id"
:style="{
width: styleUtil.px2vw(width),
height: styleUtil.px2vh(height)
height: styleUtil.px2vh(height),
opacity:list.length?1:0,
}"
/>
<div v-if="condShow==0" class="nYong-du">加载中...</div>

View File

@@ -1,6 +1,13 @@
<!-- 交通负载 -->
<template>
<div class="traffic-flow" :id="id" />
<div style="position: relative;">
<div class="traffic-flow" :style="{
opacity:list.length?1:0,
}" :id="id" />
<div v-if="condShow==0" class="nYong-du">加载中...</div>
<div v-if="condShow==1" class="nYong-du">{{text}}</div>
</div>
</template>
<script setup>
@@ -13,14 +20,24 @@
list: {
type: Array,
default: () => []
}
},
text:{
type: String,
default: '暂无数据'
}
})
let condShow = ref(0)
let aIndex = 1
watch(
() => props.list,
(val) => {
aIndex+=1
if(aIndex>=3&&!val.length){
condShow.value = 1
}
if (val.length) {
setTimeout(() => {
condShow.value = 2
init()
}, 1000)
}
@@ -126,6 +143,19 @@
</script>
<style scoped lang="scss">
.nYong-du{
position:absolute;
left:0;
top:0;
width: 100%;
height: 100%;
font-size:vw(18);
// color:#999;
color:#02f9fa;
display: flex;
align-items: center;
justify-content: center;
}
.traffic-flow {
width: vw(260);
height: vh(300);

View File

@@ -133,8 +133,8 @@ import PubSub from 'pubsub-js'
number: 0
},
{
label: '行',
value: '行',
label: '行',
value: '行',
number: 0
},
{