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 }} - +