From ba16a89aceb31c30e9b0bd59bdd9431c8e4995b6 Mon Sep 17 00:00:00 2001 From: JouChun Date: Sat, 12 Oct 2024 09:59:46 -0400 Subject: [PATCH 1/4] =?UTF-8?q?=E8=A8=AD=E5=82=99=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E8=99=95=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 2 +- src/apis/system/api.js | 2 + src/apis/system/index.js | 32 ++++ src/assets/img/equipment/replay01.svg | 1 + src/assets/img/equipment/replay02.svg | 1 + src/assets/img/equipment/state-background.svg | 1 + src/assets/img/equipment/state-title.svg | 1 + src/assets/img/equipment/table-item-w.svg | 7 + src/components/customUI/ButtonGroup.vue | 24 ++- src/components/navbar/Navbar.vue | 4 +- src/components/navbar/NavbarItem.vue | 81 ++++------ src/constant/authPage.js | 2 +- src/hooks/baja/useAlarmData.js | 2 +- src/router/index.js | 20 +++ src/stores/useBuildingStore.js | 10 ++ src/views/system/System.vue | 54 +++++++ src/views/system/SystemFloor.vue | 10 ++ src/views/system/SystemMain.vue | 11 ++ src/views/system/components/SystemCard.vue | 140 ++++++++++++++++++ .../system/components/SystemFloorBar.vue | 55 +++++++ 20 files changed, 386 insertions(+), 74 deletions(-) create mode 100644 src/apis/system/api.js create mode 100644 src/apis/system/index.js create mode 100644 src/assets/img/equipment/replay01.svg create mode 100644 src/assets/img/equipment/replay02.svg create mode 100644 src/assets/img/equipment/state-background.svg create mode 100644 src/assets/img/equipment/state-title.svg create mode 100644 src/assets/img/equipment/table-item-w.svg create mode 100644 src/views/system/System.vue create mode 100644 src/views/system/SystemFloor.vue create mode 100644 src/views/system/SystemMain.vue create mode 100644 src/views/system/components/SystemCard.vue create mode 100644 src/views/system/components/SystemFloorBar.vue diff --git a/src/App.vue b/src/App.vue index 731f6d6..6fa9f2c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -39,7 +39,7 @@ provide("app_toast", { openToast }); />
-
+
diff --git a/src/apis/system/api.js b/src/apis/system/api.js new file mode 100644 index 0000000..f2e5715 --- /dev/null +++ b/src/apis/system/api.js @@ -0,0 +1,2 @@ +export const GET_SYSTEM_FLOOR_LIST_API = `/api/Device/GetFloor`; +export const GET_SYSTEM_DEVICE_LIST_API = `/api/Device/GetDeviceList`; \ No newline at end of file diff --git a/src/apis/system/index.js b/src/apis/system/index.js new file mode 100644 index 0000000..4054f3f --- /dev/null +++ b/src/apis/system/index.js @@ -0,0 +1,32 @@ +import { GET_SYSTEM_FLOOR_LIST_API, GET_SYSTEM_DEVICE_LIST_API } from "./api"; +import instance from "@/util/request"; +import apihandler from "@/util/apihandler"; + +export const getSystemFloors = async (building_tag, sub_system_tag) => { + const res = await instance.post(GET_SYSTEM_FLOOR_LIST_API, { + building_tag, + sub_system_tag, + }); + + return apihandler(res.code, res.data, { + msg: res.msg, + code: res.code, + }); +}; + +export const getSystemDevices = async ({ + sub_system_tag, + building_tag, + floor_tag, +}) => { + const res = await instance.post(GET_SYSTEM_DEVICE_LIST_API, { + sub_system_tag, + building_tag, + floor_tag, + }); + + return apihandler(res.code, res.data, { + msg: res.msg, + code: res.code, + }); +}; diff --git a/src/assets/img/equipment/replay01.svg b/src/assets/img/equipment/replay01.svg new file mode 100644 index 0000000..639e6eb --- /dev/null +++ b/src/assets/img/equipment/replay01.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/equipment/replay02.svg b/src/assets/img/equipment/replay02.svg new file mode 100644 index 0000000..62e067b --- /dev/null +++ b/src/assets/img/equipment/replay02.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/equipment/state-background.svg b/src/assets/img/equipment/state-background.svg new file mode 100644 index 0000000..8334698 --- /dev/null +++ b/src/assets/img/equipment/state-background.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/equipment/state-title.svg b/src/assets/img/equipment/state-title.svg new file mode 100644 index 0000000..6202385 --- /dev/null +++ b/src/assets/img/equipment/state-title.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/equipment/table-item-w.svg b/src/assets/img/equipment/table-item-w.svg new file mode 100644 index 0000000..74bbc0c --- /dev/null +++ b/src/assets/img/equipment/table-item-w.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/src/components/customUI/ButtonGroup.vue b/src/components/customUI/ButtonGroup.vue index 3c4621d..4a90fd6 100644 --- a/src/components/customUI/ButtonGroup.vue +++ b/src/components/customUI/ButtonGroup.vue @@ -7,28 +7,22 @@ const props = defineProps({ withLine: Boolean, // this is for change active button onclick: Function, + className: String });