From 30d47df4bd5d2e35cd9abdad1843efa65e1a39c1 Mon Sep 17 00:00:00 2001 From: Free-sss <630042479@qq.com> Date: Thu, 4 Sep 2025 15:31:16 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E6=97=A0?= =?UTF-8?q?=E9=99=90=E5=8F=91=E9=80=81=E8=AF=B7=E6=B1=82=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=B8=8D=E8=83=BD=E7=8B=AC=E7=AB=8B=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=83=BD=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/staticData/static.json | 4 +- .../TopAlarmsHaz/config.ts | 3 +- .../TopAlarmsHaz/index.vue | 22 +++---- .../MyComponents/ParkingScene/config.ts | 3 +- .../MyComponents/ParkingScene/index.vue | 60 ++++++++++++++----- .../MyComponents/SceneDistribution/config.ts | 3 +- .../MyComponents/SceneDistribution/index.vue | 56 ++++++++++++++--- 7 files changed, 114 insertions(+), 37 deletions(-) diff --git a/public/staticData/static.json b/public/staticData/static.json index c872c94..3ced647 100644 --- a/public/staticData/static.json +++ b/public/staticData/static.json @@ -27,7 +27,7 @@ { "rank": "TOP1", "name": "株机公司", - "value": 932 + "value": 101 }, { "rank": "TOP2", @@ -330,7 +330,7 @@ { "title": "调漆作业室", "label": "智控场景", - "value": null, + "value": 0, "color": "#FFD700", "image": "scene-control.png" } diff --git a/src/packages/components/Charts/HazardousChemicalsSpace/TopAlarmsHaz/config.ts b/src/packages/components/Charts/HazardousChemicalsSpace/TopAlarmsHaz/config.ts index def22ce..cbaddb5 100644 --- a/src/packages/components/Charts/HazardousChemicalsSpace/TopAlarmsHaz/config.ts +++ b/src/packages/components/Charts/HazardousChemicalsSpace/TopAlarmsHaz/config.ts @@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public' import { CreateComponentType } from '@/packages/index.d' import { TopAlarmsConfig } from './index' import dataJson from './data.json' +import { cloneDeep } from 'lodash' export const option = { sceneCode: 'T04', componentIndexKey: "a", @@ -51,6 +52,6 @@ export const option = { export default class Config extends PublicConfigClass implements CreateComponentType { public key = TopAlarmsConfig.key public chartConfig = TopAlarmsConfig - public option = option + public option = cloneDeep(option) } diff --git a/src/packages/components/Charts/HazardousChemicalsSpace/TopAlarmsHaz/index.vue b/src/packages/components/Charts/HazardousChemicalsSpace/TopAlarmsHaz/index.vue index 4c93f3e..553ebe1 100644 --- a/src/packages/components/Charts/HazardousChemicalsSpace/TopAlarmsHaz/index.vue +++ b/src/packages/components/Charts/HazardousChemicalsSpace/TopAlarmsHaz/index.vue @@ -30,15 +30,15 @@ {{ index + 1 }} - {{ item.enterpriseName }} + {{ item.name }}
- {{ item.alarmCount }} + {{ item.value }}
@@ -112,14 +112,14 @@ const fetchCorpsData = async (option: string) => { const response: any = // await axiosInstance.get(`/awjt/screen/corpsFive/${option}/${props.chartConfig.option.sceneCode}`, { baseURL: '' }) - // if (response.state === true) { - // displayData.value = response.value || [] - // } else { - // console.error('API调用失败:', response) - // displayData.value = [] - // } - // 使用静态数据 - await getStaticData(key, props.chartConfig.option.componentIndexKey, props.chartConfig.option.sceneCode); + // if (response.state === true) { + // displayData.value = response.value || [] + // } else { + // console.error('API调用失败:', response) + // displayData.value = [] + // } + // 使用静态数据 + await getStaticData(key, props.chartConfig.option.componentIndexKey, props.chartConfig.option.sceneCode); displayData.value = response['source'] props.chartConfig.option.titleText = response['titleText'] } catch (error) { diff --git a/src/packages/components/Charts/MyComponents/ParkingScene/config.ts b/src/packages/components/Charts/MyComponents/ParkingScene/config.ts index 5431c17..e6a2093 100644 --- a/src/packages/components/Charts/MyComponents/ParkingScene/config.ts +++ b/src/packages/components/Charts/MyComponents/ParkingScene/config.ts @@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public' import { CreateComponentType } from '@/packages/index.d' import { ParkingSceneConfig } from './index' import dataJson from './data.json' +import { cloneDeep } from 'lodash' export const option = { sceneCode: "", @@ -25,5 +26,5 @@ export const option = { export default class Config extends PublicConfigClass implements CreateComponentType { public key = ParkingSceneConfig.key public chartConfig = ParkingSceneConfig - public option = option + public option = cloneDeep(option) } diff --git a/src/packages/components/Charts/MyComponents/ParkingScene/index.vue b/src/packages/components/Charts/MyComponents/ParkingScene/index.vue index 7aa9fb1..eb3d160 100644 --- a/src/packages/components/Charts/MyComponents/ParkingScene/index.vue +++ b/src/packages/components/Charts/MyComponents/ParkingScene/index.vue @@ -225,52 +225,84 @@
-