From a82e38df4c920efaf94848a0158e470d474e1629 Mon Sep 17 00:00:00 2001 From: GGJ <357021191@qq.com> Date: Mon, 3 Jun 2024 13:32:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../harmonicMonitoring/reportForms/statistics/index.vue | 5 +++++ src/views/system/reportForms/look.vue | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/views/pqs/harmonicMonitoring/reportForms/statistics/index.vue b/src/views/pqs/harmonicMonitoring/reportForms/statistics/index.vue index bfcdbca2..b2db2fbe 100644 --- a/src/views/pqs/harmonicMonitoring/reportForms/statistics/index.vue +++ b/src/views/pqs/harmonicMonitoring/reportForms/statistics/index.vue @@ -96,6 +96,11 @@ const tableStore = new TableStore({ }, loadCallback: () => { console.log(tableStore.table.data) + tableStore.table.data.forEach((item: any) => { + item.celldata.forEach((k: any) => { + item.data[k.r][k.c].v = k.v + }) + }) luckysheet.create({ container: 'luckysheet', title: '', // 表 头名 diff --git a/src/views/system/reportForms/look.vue b/src/views/system/reportForms/look.vue index 634facd3..ba06ec9b 100644 --- a/src/views/system/reportForms/look.vue +++ b/src/views/system/reportForms/look.vue @@ -27,7 +27,6 @@ import LuckyExcel from 'luckyexcel' import { ref, onMounted } from 'vue' import { ElMessage } from 'element-plus' import { viewCustomReportTemplateById } from '@/api/harmonic-boot/luckyexcel' - const emit = defineEmits(['shutDown']) const height = mainHeight(65).height @@ -84,7 +83,13 @@ const beforeUpload = (file: any) => { } const open = async (row: any) => { - await viewCustomReportTemplateById({ id: row.id }).then(Response => { + + await viewCustomReportTemplateById({ id: row.id }).then((Response:any) => { + Response.forEach((item: any) => { + item.celldata.forEach((k: any) => { + item.data[k.r][k.c].v = k.v + }) + }) options.value.data = Response })