From 6e61679c1f5e0da39d859b439970144fe34c4970 Mon Sep 17 00:00:00 2001 From: ko1234 Date: Thu, 24 Jul 2025 14:32:48 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A0=90=E8=A8=AD=E7=B9=81=E9=AB=94=E4=B8=AD?= =?UTF-8?q?=E6=96=87=20|=20=E6=8B=BF=E6=8E=89=E5=8F=B3=E4=B8=8A=E5=91=8A?= =?UTF-8?q?=E8=AD=A6icon=20|=20=E6=96=B0=E5=89=B5=E8=B3=A6=E8=83=BD=20:=20?= =?UTF-8?q?=E5=91=8A=E8=AD=A6=E5=88=9D=E5=A7=8B=E5=8C=96=E5=BE=8C=E5=85=A8?= =?UTF-8?q?=E9=81=B8+search=20|=20=E6=AD=B7=E5=8F=B2=E8=B3=87=E6=96=99?= =?UTF-8?q?=E5=8A=A0=E6=9C=80=E5=A4=A7=E6=9C=80=E5=B0=8F=E5=80=BCchart?= =?UTF-8?q?=E3=80=81table?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/system/api.js | 4 +- src/apis/system/index.js | 9 + src/components/navbar/Navbar.vue | 4 +- src/components/navbar/NavbarBuilding.vue | 2 +- src/components/navbar/NavbarLang.vue | 2 +- src/components/navbar/NavbarUser.vue | 15 +- src/main.js | 4 +- src/router/index.js | 1 + src/stores/useBuildingStore.js | 21 +- src/util/request.js | 44 +++- .../components/AssetSubList.vue | 3 + .../components/AssetSubListAddModal.vue | 19 +- .../components/AlertQuery/AlertQuery.vue | 32 ++- .../AlertQuery/AlertSearchNormalBtns.vue | 4 - .../AlertQuery/AlertSearchTypesButton.vue | 5 +- src/views/dashboard/Dashboard.vue | 14 +- .../dashboard/components/DashboardAlert.vue | 8 +- .../components/DashboardEffectScatter.vue | 2 +- .../components/DashboardElectricityModal.vue | 2 +- .../components/DashboardEmissionModal.vue | 2 +- .../components/DashboardHumidity.vue | 213 ++++++++++++++++++ .../dashboard/components/DashboardProduct.vue | 153 +++++++++++++ .../components/DashboardProductComplete.vue | 95 ++++++++ .../DashboardProductCompleteModal.vue | 104 +++++++++ .../DashboardProductCompleteModalRecord.vue | 125 ++++++++++ .../DashboardProductCompleteModalTarget.vue | 74 ++++++ .../dashboard/components/DashboardTemp.vue | 86 +++---- .../components/UsageInformation.vue | 17 +- src/views/history/History.vue | 20 +- .../components/HistoryActionButton.vue | 11 +- .../history/components/HistoryDataCahrt.vue | 164 ++++++++++++++ .../history/components/HistorySidebar.vue | 8 +- src/views/history/components/HistoryTable.vue | 85 ++++++- 33 files changed, 1233 insertions(+), 119 deletions(-) create mode 100644 src/views/dashboard/components/DashboardHumidity.vue create mode 100644 src/views/dashboard/components/DashboardProduct.vue create mode 100644 src/views/dashboard/components/DashboardProductComplete.vue create mode 100644 src/views/dashboard/components/DashboardProductCompleteModal.vue create mode 100644 src/views/dashboard/components/DashboardProductCompleteModalRecord.vue create mode 100644 src/views/dashboard/components/DashboardProductCompleteModalTarget.vue create mode 100644 src/views/history/components/HistoryDataCahrt.vue diff --git a/src/apis/system/api.js b/src/apis/system/api.js index a57d55f..10fe396 100644 --- a/src/apis/system/api.js +++ b/src/apis/system/api.js @@ -1,3 +1,5 @@ export const GET_SYSTEM_FLOOR_LIST_API = `/api/Device/GetFloor`; export const GET_SYSTEM_DEVICE_LIST_API = `/api/Device/GetDeviceList`; -export const GET_SYSTEM_REALTIME_API = `/api/Device/GetRealTimeData`; \ No newline at end of file +export const GET_SYSTEM_REALTIME_API = `/api/Device/GetRealTimeData`; + +export const GET_SYSTEM_CONFIG_API = `/api/GetSystemConfig`; \ No newline at end of file diff --git a/src/apis/system/index.js b/src/apis/system/index.js index 7eb0813..8dd497a 100644 --- a/src/apis/system/index.js +++ b/src/apis/system/index.js @@ -2,6 +2,7 @@ import { GET_SYSTEM_FLOOR_LIST_API, GET_SYSTEM_DEVICE_LIST_API, GET_SYSTEM_REALTIME_API, + GET_SYSTEM_CONFIG_API } from "./api"; import instance from "@/util/request"; import apihandler from "@/util/apihandler"; @@ -36,3 +37,11 @@ export const getSystemRealTime = async (device_list) => { code: res.code, }); }; + +export const getSystemConfig = async (building_guid) => { + const res = await instance.post(GET_SYSTEM_CONFIG_API, { building_guid }); + return apihandler(res.code, res.data, { + msg: res.msg, + code: res.code, + }); +}; diff --git a/src/components/navbar/Navbar.vue b/src/components/navbar/Navbar.vue index db2279d..4a0c8e7 100644 --- a/src/components/navbar/Navbar.vue +++ b/src/components/navbar/Navbar.vue @@ -121,9 +121,9 @@ watch(locale, () => {
  • -
  • +
  • diff --git a/src/components/navbar/NavbarBuilding.vue b/src/components/navbar/NavbarBuilding.vue index ce4bbe7..05238ac 100644 --- a/src/components/navbar/NavbarBuilding.vue +++ b/src/components/navbar/NavbarBuilding.vue @@ -6,7 +6,7 @@ const store = useBuildingStore(); const selectBuilding = (bui) => { store.selectedBuilding = bui; // 改變 selectedBuilding,watch 會自動更新資料 - localStorage.setItem("CviBuilding", JSON.stringify(bui)); + localStorage.setItem("EmpowerBuilding", JSON.stringify(bui)); }; onMounted(() => { diff --git a/src/components/navbar/NavbarLang.vue b/src/components/navbar/NavbarLang.vue index bfbe884..bff9147 100644 --- a/src/components/navbar/NavbarLang.vue +++ b/src/components/navbar/NavbarLang.vue @@ -6,7 +6,7 @@ const { locale } = useI18n(); // 使用 I18n // 切換語言 const toggleLanguage = (lang) => { locale.value = lang; - localStorage.setItem("CviLanguage", lang); + localStorage.setItem("EmpowerLanguage", lang); }; diff --git a/src/components/navbar/NavbarUser.vue b/src/components/navbar/NavbarUser.vue index 9bc4f44..5e31aeb 100644 --- a/src/components/navbar/NavbarUser.vue +++ b/src/components/navbar/NavbarUser.vue @@ -1,9 +1,16 @@ @@ -101,7 +102,7 @@ const onOk = async () => { >