From 1dbd58b96502c5f322c08a6ab3b566f590df1954 Mon Sep 17 00:00:00 2001 From: ko1234 Date: Mon, 28 Oct 2024 10:21:57 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=A8=AD=E5=82=99=E7=AE=A1=E7=90=86:?= =?UTF-8?q?=E9=81=B8=E6=93=87=E5=9C=96=E8=B3=87=E5=9C=96=E7=89=87=E8=B3=87?= =?UTF-8?q?=E6=96=99=E5=A4=BE=E8=B7=AF=E5=BE=91=E3=80=81=E6=A8=93=E5=B1=A4?= =?UTF-8?q?=E7=B7=A8=E8=BC=AF=E8=88=87=E5=88=AA=E9=99=A4=20|=20=E7=B3=BB?= =?UTF-8?q?=E7=B5=B1=E7=9B=A3=E6=8E=A7=E7=85=A7=E7=89=87=E5=88=9D=E5=88=87?= =?UTF-8?q?=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/asset/api.js | 1 + src/apis/asset/index.js | 10 ++ src/components/customUI/Menu.vue | 35 +++++ src/components/customUI/Table.vue | 2 +- src/components/navbar/NavbarBuilding.vue | 12 +- src/util/request.js | 3 + .../components/AssetTableModalLeftInfo.vue | 6 +- .../AssetTableModalLeftInfoGraph.vue | 146 ++++++++++++++++++ .../components/AssetTableModalRightInfo.vue | 58 ++++++- src/views/system/components/SystemCard.vue | 6 +- .../components/SystemInfoModalContent.vue | 6 + .../components/SystemInfoModalImage.vue | 59 +++++++ 12 files changed, 326 insertions(+), 18 deletions(-) create mode 100644 src/components/customUI/Menu.vue create mode 100644 src/views/AssetManagement/components/AssetTableModalLeftInfoGraph.vue create mode 100644 src/views/system/components/SystemInfoModalImage.vue diff --git a/src/apis/asset/api.js b/src/apis/asset/api.js index 51b9bb0..6c0a0f0 100644 --- a/src/apis/asset/api.js +++ b/src/apis/asset/api.js @@ -11,6 +11,7 @@ export const DELETE_ASSET_ITEM_API = `/AssetManage/DeleteAsset`; export const GET_ASSET_FLOOR_LIST_API = `/AssetManage/GetFloorList`; export const POST_ASSET_FLOOR_API = `/AssetManage/SaveFloor`; +export const DELETE_ASSET_FLOOR_API = `/AssetManage/DeleteFloor`; export const GET_ASSET_IOT_LIST_API = `/AssetManage/GetIOTList`; export const GET_ASSET_SUB_POINT_API = `/AssetManage/GetSubPoint`; diff --git a/src/apis/asset/index.js b/src/apis/asset/index.js index 61bc0f2..b45fbc3 100644 --- a/src/apis/asset/index.js +++ b/src/apis/asset/index.js @@ -7,6 +7,7 @@ import { GET_ASSET_SINGLE_API, GET_ASSET_FLOOR_LIST_API, POST_ASSET_FLOOR_API, + DELETE_ASSET_FLOOR_API, GET_ASSET_IOT_LIST_API, DELETE_ASSET_ITEM_API, POST_ASSET_SINGLE_API, @@ -143,6 +144,15 @@ export const postAssetFloor = async (formData) => { }); }; +export const deleteAssetFloor = async (formData) => { + const res = await instance.post(DELETE_ASSET_FLOOR_API, formData); + + return apihandler(res.code, res.data, { + msg: res.msg, + code: res.code, + }); +}; + export const getAssetIOTList = async (sub_system_tag, points) => { const res = await instance.post(GET_ASSET_IOT_LIST_API, { sub_system_tag, diff --git a/src/components/customUI/Menu.vue b/src/components/customUI/Menu.vue new file mode 100644 index 0000000..157fae1 --- /dev/null +++ b/src/components/customUI/Menu.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/src/components/customUI/Table.vue b/src/components/customUI/Table.vue index 2b1335c..8b9c359 100644 --- a/src/components/customUI/Table.vue +++ b/src/components/customUI/Table.vue @@ -166,7 +166,7 @@ watch( :class=" twMerge( withStyle ? 'table' : 'table border', - currentDataSource.length === 0 ? 'h-96' : '' + currentDataSource.length === 0 ? 'h-28' : '' ) " > diff --git a/src/components/navbar/NavbarBuilding.vue b/src/components/navbar/NavbarBuilding.vue index 3552cd8..3152b1b 100644 --- a/src/components/navbar/NavbarBuilding.vue +++ b/src/components/navbar/NavbarBuilding.vue @@ -3,9 +3,6 @@ import { getBuildings } from "@/apis/building"; import { onMounted, ref } from "vue"; import useBuildingStore from "@/stores/useBuildingStore"; -// const buildings = ref(null); -// const selectedBuilding = ref(null); - const store = useBuildingStore(); const getBui = async () => { @@ -15,6 +12,10 @@ const getBui = async () => { store.selectedBuilding = res?.data[0]; }; +const selectBuilding = (bui) => { + store.selectedBuilding = bui; +}; + onMounted(() => { getBui(); }); @@ -25,10 +26,10 @@ onMounted(() => {
{{ store.selectedBuilding?.full_name }} - +