From e74bcd7e5bf5f43b2ceba0885aaf71bfdb0d8535 Mon Sep 17 00:00:00 2001 From: geting <13585118195@163.com> Date: Thu, 28 Nov 2024 17:17:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/statAnalysis/trendComparison.vue | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ui/dasadmin/src/views/backend/statAnalysis/trendComparison.vue b/ui/dasadmin/src/views/backend/statAnalysis/trendComparison.vue index 14dabebc..d2f0bf55 100644 --- a/ui/dasadmin/src/views/backend/statAnalysis/trendComparison.vue +++ b/ui/dasadmin/src/views/backend/statAnalysis/trendComparison.vue @@ -50,7 +50,7 @@ row-key="id" > - + - + @@ -200,7 +200,7 @@ onMounted(() => { }) const tableDataLeft = ref([]) const tableDataRight = ref([]) - +const iotModelId = ref('') const selectedLeft = ref([]) const selectedRight = ref([]) @@ -213,9 +213,12 @@ const queryWindTurbines = () => { queryWindTurbinesPages().then((res) => { if (res.code == 200) { const resData = res.data - const middleIndex = Math.ceil(resData.length / 2) - tableDataLeft.value = resData.slice(0, middleIndex) - tableDataRight.value = resData.slice(middleIndex) + if (resData.length) { + iotModelId.value = resData[0]['modelId'] + const middleIndex = Math.ceil(resData.length / 2) + tableDataLeft.value = resData.slice(0, middleIndex) + tableDataRight.value = resData.slice(middleIndex) + } } }) } @@ -233,7 +236,7 @@ const getcurrentPage = () => { const getCompleteData = () => { const requestData: any = { - iotModelId: '', + iotModelId: iotModelId.value, pageNum: pageSetting.current, pageSize: pageSetting.pageSize, attributeType: radioActiveName.value,