From 16b9d8e3c77bb58e99702b3bee7a3e8ee6d12981 Mon Sep 17 00:00:00 2001 From: duanliang Date: Wed, 2 Apr 2025 23:45:00 +0800 Subject: [PATCH] 4.2 --- src/stores/scenic.js | 2 +- src/views/scenic/components/age.vue | 20 ++++++++ src/views/scenic/components/big-map.vue | 2 +- src/views/scenic/components/box-2.vue | 68 ++++++++++++++++++++----- src/views/scenic/index.vue | 4 +- 5 files changed, 79 insertions(+), 17 deletions(-) diff --git a/src/stores/scenic.js b/src/stores/scenic.js index c2a75ab..570c9ba 100644 --- a/src/stores/scenic.js +++ b/src/stores/scenic.js @@ -102,7 +102,7 @@ export const useScenicStore = defineStore('scenic', () => { secureData.value = val } const setStopCarData = (val) => { - stopCarData.value = val + stopCarData.value = val } const setScenicBearData = (val) => { scenicBearData.value = val diff --git a/src/views/scenic/components/age.vue b/src/views/scenic/components/age.vue index f5be94f..28e1202 100644 --- a/src/views/scenic/components/age.vue +++ b/src/views/scenic/components/age.vue @@ -58,6 +58,26 @@ } } }, + polar: { + center: ['50%', '40%'] + }, + angleAxis: { + max: 100, + show: false + }, + radiusAxis: { + type: 'category', + show: true, + axisLabel: { + show: false + }, + axisLine: { + show: false + }, + axisTick: { + show: false + } + }, series: [ { type: 'pie', diff --git a/src/views/scenic/components/big-map.vue b/src/views/scenic/components/big-map.vue index 4a42d80..80b1409 100644 --- a/src/views/scenic/components/big-map.vue +++ b/src/views/scenic/components/big-map.vue @@ -366,7 +366,7 @@ onMounted(() => { scenicChange = PubSub.subscribe('scenicChange', (msg, data) => { - console.log(data,'99999999999999999999999999999999999999') + // console.log(data,'99999999999999999999999999999999999999') scenicSpotId.value = data.scenicSpotId lat.value = data.lat lng.value = data.lng diff --git a/src/views/scenic/components/box-2.vue b/src/views/scenic/components/box-2.vue index 40db316..13e8632 100644 --- a/src/views/scenic/components/box-2.vue +++ b/src/views/scenic/components/box-2.vue @@ -101,13 +101,19 @@
- +
+ +
+
+ 暂无数据 +
+ @@ -115,7 +121,7 @@
{ - 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 @@