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 () => { >