From c11e5ded59129b3105595a989f227a95e32f2475 Mon Sep 17 00:00:00 2001 From: Free-sss <630042479@qq.com> Date: Wed, 3 Sep 2025 11:27:20 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E4=BF=AE=E6=94=B9=EF=BC=88?= =?UTF-8?q?=E8=B4=B9=E7=94=A8=E6=80=BB=E8=A7=88=EF=BC=89=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IntegratedEnergy/EnergyOverview/config.ts | 37 +++- .../IntegratedEnergy/EnergyOverview/data.json | 8 +- .../IntegratedEnergy/EnergyOverview/index.vue | 174 ++++++++++-------- 3 files changed, 139 insertions(+), 80 deletions(-) diff --git a/src/packages/components/Charts/IntegratedEnergy/EnergyOverview/config.ts b/src/packages/components/Charts/IntegratedEnergy/EnergyOverview/config.ts index bd7b419..045e252 100644 --- a/src/packages/components/Charts/IntegratedEnergy/EnergyOverview/config.ts +++ b/src/packages/components/Charts/IntegratedEnergy/EnergyOverview/config.ts @@ -3,9 +3,44 @@ import { CreateComponentType } from '@/packages/index.d' import { EnergyOverviewConfig } from './index' import cloneDeep from 'lodash/cloneDeep' import { chartInitConfig } from '@/settings/designSetting' + //导入数据 +import costIcon from './assets/cost.svg' import dataJson from './data.json' +const otherOption = { + gridItems: [ + { + icon: costIcon, + label: '费用', + field: 'cost', + unit: '单位', + valueClass: 'value-cost' + }, + { + icon: costIcon, + label: '市电', + field: 'mainsElectricity', + unit: '单位', + valueClass: 'value-electricity' + }, + { + icon: costIcon, + label: '供水', + field: 'waterSupply', + unit: '单位', + valueClass: 'value-water' + }, + { + icon: costIcon, + label: '燃气', + field: 'gasSupply', + unit: '单位', + valueClass: 'value-gas' + } + ] +} export const option = { + ...otherOption, dataset: dataJson } @@ -13,5 +48,5 @@ export default class Config extends PublicConfigClass implements CreateComponent public key = EnergyOverviewConfig.key public chartConfig = cloneDeep(EnergyOverviewConfig) public option = cloneDeep(option) - public attr = { ...chartInitConfig, x: 0, y: 0, w: 1000, h: 240, zIndex: 1 } + public attr = { ...chartInitConfig, x: 0, y: 0, w: 889, h: 267, zIndex: 1 } } diff --git a/src/packages/components/Charts/IntegratedEnergy/EnergyOverview/data.json b/src/packages/components/Charts/IntegratedEnergy/EnergyOverview/data.json index 855d1a2..f2aa49a 100644 --- a/src/packages/components/Charts/IntegratedEnergy/EnergyOverview/data.json +++ b/src/packages/components/Charts/IntegratedEnergy/EnergyOverview/data.json @@ -1,6 +1,6 @@ { - "cost":1000, - "mainsElectricity":1000, - "waterSupply":1000, - "gasSupply":1000 + "cost": 1000, + "mainsElectricity": 1000, + "waterSupply": 1000, + "gasSupply": 1000 } \ No newline at end of file diff --git a/src/packages/components/Charts/IntegratedEnergy/EnergyOverview/index.vue b/src/packages/components/Charts/IntegratedEnergy/EnergyOverview/index.vue index 5abf40f..4aaf997 100644 --- a/src/packages/components/Charts/IntegratedEnergy/EnergyOverview/index.vue +++ b/src/packages/components/Charts/IntegratedEnergy/EnergyOverview/index.vue @@ -1,59 +1,48 @@ -