From a4d9192e0e937d0ecd09a1213731834ceddc915e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Tue, 5 Nov 2024 15:12:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ems/report/energyPreview/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/ems/report/energyPreview/index.vue b/src/views/ems/report/energyPreview/index.vue index 6912902..db11599 100644 --- a/src/views/ems/report/energyPreview/index.vue +++ b/src/views/ems/report/energyPreview/index.vue @@ -112,6 +112,7 @@ header-cell-class-name="columnClassName" id="bootstrap-table" v-loading="loading" + row-key="objId" :data="dataList" @selection-change="handleSelectionChange" > @@ -157,7 +158,7 @@ import { getYearsBetween } from '@/utils/dateReportUtils.js' import { handleExport } from '@/utils/export.js' -import { parseTime } from '@/utils/ruoyi' +import {handleTree, parseTime} from '@/utils/ruoyi' let data = {} let optionData = {} @@ -436,7 +437,7 @@ export default { myChart.setOption(option) energyPreviewReportList(this.queryParams).then((response) => { - this.dataList = response.data + this.dataList = this.handleTree(response.data,'objId') this.loading = false const data = response.data || []