diff --git a/src/views/data-connection/Req15RateDistributionView.vue b/src/views/data-connection/Req15RateDistributionView.vue index 86a3380..89d349a 100644 --- a/src/views/data-connection/Req15RateDistributionView.vue +++ b/src/views/data-connection/Req15RateDistributionView.vue @@ -31,7 +31,8 @@ interface DataConnectionItem { const mapContainer = ref(null) const operator = ref('CMCC') // 默认选择中国移动 -const date = ref('') +const startDate = ref('') +const endDate = ref('') const loading = ref(false) const dataLoaded = ref(false) const dataList = ref([]) @@ -151,9 +152,10 @@ const fetchData = async () => { } try { - const body: { operator?: string; date?: string } = {} + const body: { operator?: string; startDate?: string; endDate?: string } = {} if (operator.value) body.operator = operator.value - if (date.value) body.date = date.value + if (startDate.value) body.startDate = startDate.value + if (endDate.value) body.endDate = endDate.value const response = await fetch('http://localhost:8081/dataConnection', { method: 'POST', @@ -229,7 +231,7 @@ const initMapAfterData = async () => { } // 监听筛选条件变化 -watch([operator, date], () => { +watch([operator, startDate, endDate], () => { if (map && dataLoaded.value) fetchData() }) @@ -262,14 +264,31 @@ onUnmounted(() => {
- - + + +
+
+ +