From 77ea86cdbeca40bdd52a12a266a552462172f289 Mon Sep 17 00:00:00 2001 From: ko1234 Date: Mon, 14 Oct 2024 14:57:00 +0800 Subject: [PATCH] =?UTF-8?q?forge=E6=9C=AC=E5=9C=B0=20|=20=E8=83=BD?= =?UTF-8?q?=E6=BA=90=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.production | 4 +- src/components/forge/Forge.vue | 263 ++++-------------- .../components/DashboardSysProgress.vue | 2 +- .../energyManagement/EnergyManagement.vue | 50 ++-- .../components/BillingDegreeChart.vue | 88 +++--- .../components/CarbonEmissionChart.vue | 99 +++++++ .../components/ElecConsumption.vue | 33 ++- .../components/ElectricityBillChart.vue | 80 ------ .../components/ImmediateDemandChart.vue | 34 ++- .../components/IntervalBillChart.vue | 111 ++++++++ .../components/MonthlyElecBillChart.vue | 112 ++++++++ .../components/UsageInformation.vue | 77 +++-- vite.config.js | 2 +- 14 files changed, 556 insertions(+), 401 deletions(-) create mode 100644 src/views/energyManagement/components/CarbonEmissionChart.vue delete mode 100644 src/views/energyManagement/components/ElectricityBillChart.vue create mode 100644 src/views/energyManagement/components/IntervalBillChart.vue create mode 100644 src/views/energyManagement/components/MonthlyElecBillChart.vue diff --git a/.env.development b/.env.development index 9fe4572..b5dd21c 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ VITE_API_BASEURL = "http://192.168.0.206:8060" -VITE_FILE_API_BASEURL = "" +VITE_FILE_API_BASEURL = "http://192.168.0.206:8088" VITE_FORGE_BASEURL = "http://localhost:5173" \ No newline at end of file diff --git a/.env.production b/.env.production index 7b0e2d0..013439b 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ -VITE_API_BASEURL = "http://220.132.206.5:8060" -VITE_FILE_API_BASEURL = "http://220.132.206.5:8085/file" +VITE_API_BASEURL = "http://192.168.0.206:8060" +VITE_FILE_API_BASEURL = "http://192.168.0.206:8088" VITE_FORGE_BASEURL = "http://202.39.218.221:8080/file/netzero" \ No newline at end of file diff --git a/src/components/forge/Forge.vue b/src/components/forge/Forge.vue index e01517f..5013130 100644 --- a/src/components/forge/Forge.vue +++ b/src/components/forge/Forge.vue @@ -1,221 +1,79 @@ diff --git a/src/views/dashboard/components/DashboardSysProgress.vue b/src/views/dashboard/components/DashboardSysProgress.vue index 231f73e..b443226 100644 --- a/src/views/dashboard/components/DashboardSysProgress.vue +++ b/src/views/dashboard/components/DashboardSysProgress.vue @@ -80,7 +80,7 @@ const getProgressValue = (group) => { {{ group[1].value }} diff --git a/src/views/energyManagement/components/BillingDegreeChart.vue b/src/views/energyManagement/components/BillingDegreeChart.vue index bfdca33..38a5f15 100644 --- a/src/views/energyManagement/components/BillingDegreeChart.vue +++ b/src/views/energyManagement/components/BillingDegreeChart.vue @@ -6,81 +6,101 @@ const defaultChartOption = ref({ tooltip: { trigger: "axis", axisPointer: { - type: "shadow" - } + type: "shadow", + }, }, legend: { - data: ['尖峰', '半尖峰', '離峰度數'], + data: ["尖峰", "半尖峰", "離峰度數"], textStyle: { color: "#ffffff", fontSize: 16, }, - orient: "horizontal", + orient: "horizontal", bottom: "0%", }, grid: { - top: '5%', - left: '0%', - right: '0%', - bottom: '10%', - containLabel: true + top: "5%", + left: "0%", + right: "0%", + bottom: "15%", + containLabel: true, }, xAxis: { - type: 'category', - data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], + type: "category", + data: [ + "1月", + "2月", + "3月", + "4月", + "5月", + "6月", + "7月", + "8月", + "9月", + "10月", + "11月", + "12月", + ], axisLabel: { color: "#ffffff", }, }, yAxis: { - type: 'value', + type: "value", axisLabel: { color: "#ffffff", }, }, series: [ { - name: '尖峰', - type: 'bar', - stack: 'total', - data: [5000, 5500, 7000, 7500, 9000, 9500, 11000, 11500, 11000, 7500, 6500, 5500], + name: "尖峰", + type: "bar", + stack: "total", + data: [ + 5000, 5500, 7000, 7500, 9000, 9500, 11000, 11500, 11000, 7500, 6500, + 5500, + ], itemStyle: { - color: '#3c50e0', + color: "#45f4ef", }, }, { - name: '半尖峰', - type: 'bar', - stack: 'total', - data: [3000, 3200, 4500, 4800, 5200, 5800, 6000, 6100, 6200, 5300, 4500, 4000], + name: "半尖峰", + type: "bar", + stack: "total", + data: [ + 3000, 3200, 4500, 4800, 5200, 5800, 6000, 6100, 6200, 5300, 4500, 4000, + ], itemStyle: { - color: '#6577f3', + color: "#ffd345", }, }, { - name: '離峰度數', - type: 'bar', - stack: 'total', - data: [2000, 2500, 3500, 4000, 4500, 5000, 5200, 5300, 5400, 4500, 4000, 3500], + name: "離峰度數", + type: "bar", + stack: "total", + data: [ + 2000, 2500, 3500, 4000, 4500, 5000, 5200, 5300, 5400, 4500, 4000, 3500, + ], itemStyle: { - color: '#8fd0ef', + color: "#64ed81", }, - } - ] + }, + ], }); onMounted(() => { - // + // });