From bec142aff18463c7ca1c7ca2fb081b36801d15bd Mon Sep 17 00:00:00 2001 From: gaohaifeng Date: Thu, 28 Aug 2025 10:11:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(Charts):=20=E4=BF=AE=E6=94=B9=E5=8D=B1?= =?UTF-8?q?=E9=99=A9=E5=8C=96=E5=AD=A6=E5=93=81=E7=A9=BA=E9=97=B4=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=BB=A5=E6=94=AF=E6=8C=81API=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将静态数据替换为从API获取的动态数据 - 新增fetchCorpsData方法处理API请求 - 修改calculateWidth逻辑以适应新数据结构 - 添加组件挂载时的数据初始化 - 调整SmallBorder组件样式确保SVG宽度适配 --- .../SmallBorder/index.vue | 3 + .../TopAlarmsHaz/index.vue | 62 +++++++++++++------ 2 files changed, 45 insertions(+), 20 deletions(-) diff --git a/src/packages/components/Charts/HazardousChemicalsSpace/SmallBorder/index.vue b/src/packages/components/Charts/HazardousChemicalsSpace/SmallBorder/index.vue index 7a2f947..e2e91d8 100644 --- a/src/packages/components/Charts/HazardousChemicalsSpace/SmallBorder/index.vue +++ b/src/packages/components/Charts/HazardousChemicalsSpace/SmallBorder/index.vue @@ -67,6 +67,9 @@ $border-gradient-end: rgba(128, 128, 128, 0); // z-index: 2; width: 100%; height: 12%; + .svg{ + width: 100%; + } // background-color: antiquewhite; } } diff --git a/src/packages/components/Charts/HazardousChemicalsSpace/TopAlarmsHaz/index.vue b/src/packages/components/Charts/HazardousChemicalsSpace/TopAlarmsHaz/index.vue index f994fd2..72c3507 100644 --- a/src/packages/components/Charts/HazardousChemicalsSpace/TopAlarmsHaz/index.vue +++ b/src/packages/components/Charts/HazardousChemicalsSpace/TopAlarmsHaz/index.vue @@ -28,23 +28,21 @@
-