From 74eb51c52ed414d15666230d95f55e6dbafd1c50 Mon Sep 17 00:00:00 2001 From: huangchengfa <171504222@qq.com> Date: Thu, 11 Dec 2025 17:57:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9A=B4=E9=9C=B2=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E7=BB=99=E7=88=B6=E7=BB=84=E4=BB=B6=EF=BC=8C=E7=94=A8=E4=BA=8E?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=9B=BE=E8=A1=A8=E5=9B=BE=E7=89=87=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AnalysisReport/components/histogram.vue | 19 +++++++++++++++++++ .../components/maleNightingalePicture.vue | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/src/views/backOfficeSystem/JudgmentHome/ResearchHome/components/AnalysisReport/components/histogram.vue b/src/views/backOfficeSystem/JudgmentHome/ResearchHome/components/AnalysisReport/components/histogram.vue index c2040b5..f1fe4db 100644 --- a/src/views/backOfficeSystem/JudgmentHome/ResearchHome/components/AnalysisReport/components/histogram.vue +++ b/src/views/backOfficeSystem/JudgmentHome/ResearchHome/components/AnalysisReport/components/histogram.vue @@ -161,6 +161,25 @@ const initChart = () => { } }, 100); }; + +// 暴露方法给父组件,用于获取图表图片数据 +defineExpose({ + getChartImage: () => { + if (myChart.value) { + return myChart.value.getDataURL({ + type: 'png', + pixelRatio: 2, + backgroundColor: '#fff' + }); + } + return null; + }, + resizeChart: () => { + if (myChart.value) { + myChart.value.resize(); + } + } +});