This commit is contained in:
duanliang
2025-04-02 23:45:00 +08:00
parent 15f15a9ee0
commit 16b9d8e3c7
5 changed files with 79 additions and 17 deletions

View File

@@ -101,13 +101,19 @@
<div class="pt-10">
<Title3 title="车辆归属地占比" />
</div>
<PieRow
label="停车总数"
:dataList="scenicStore.stopCarData.dataLists"
:total="carTotal"
:width="360"
:height="300"
/>
<div v-if="dataLists.length">
<PieRow
label="停车总数"
:dataList="dataLists"
:total="carTotal"
:width="360"
:height="300"
/>
</div>
<div class="null-box" v-else>
暂无数据
</div>
</div>
</div>
</div>
@@ -115,7 +121,7 @@
<Title1 title="异常信息 " />
<div @click="handleToWorkOrder" class="count-box flex">
<count-item
v-for="item in scenicStore.secureData.headList"
v-for="item in headList"
:label="item.name"
:count="item.count"
:type="item.type"
@@ -339,11 +345,11 @@
let latitude = ref('')
let longitude = ref('')
const hanldeLookMap = ()=>{
router.replace('/traffic')
router.push('/traffic')
// traMapShow.value = true
}
const handleToWorkOrder = ()=>{
router.replace('/workOrder')
router.push('/workOrder')
}
const garageList = computed(() => {
return scenicStore.stopCarData.headList
@@ -354,9 +360,11 @@
return pre + cur.count
}, 0)
})
const stopCarDataLists = computed(()=>{
return scenicStore.stopCarData.dataLists
})
const carTotal = computed(() => {
return scenicStore.stopCarData.dataLists.reduce((pre, cur) => {
return dataLists.value.reduce((pre, cur) => {
return pre + parseInt(cur.count)
}, 0)
})
@@ -381,7 +389,31 @@
const scenicQueueXAxisData = computed(() => {
return scenicStore.scenicQueueData.dataList.map((item) => item.name)
})
let dataLists = ref([])
watch(
()=>scenicStore.stopCarData.dataLists,
(val) =>{
console.log(val.length,'watch 监听')
if(val.length){
dataLists.value = val
}else{
dataLists.value = []
}
},
{ immediate: true }
)
let headList = ref([])
watch(
()=>scenicStore.secureData.headList,
(val) =>{
if(val.length){
headList.value = scenicStore.secureData.headList
}else{
headList.value = []
}
},
{ immediate: true }
)
watch(
() => scenicStore.carShipData,
(val) => {
@@ -465,6 +497,16 @@
</script>
<style scoped lang="scss">
.null-box{
width:vw(360);
height:vh(300);
display:flex;
align-items:center;
color:#fff;
text-align:center;
font-size:vw(20);
justify-content: center;
}
.look-box{
position:relative;
.look-btn{