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 @@
+
+
+
+
+
+
+ menuCheck(item.id)"
+ />
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
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 }}
-
+
{
class="text-white my-1 text-base"
v-for="bui in store.buildings"
:key="bui.building_tag"
+ @click="selectBuilding(bui)"
>
{{ bui.full_name }}
diff --git a/src/util/request.js b/src/util/request.js
index 8ee0279..d907b1c 100644
--- a/src/util/request.js
+++ b/src/util/request.js
@@ -38,6 +38,9 @@ instance.interceptors.response.use(
function (error) {
// Any status codes that falls outside the range of 2xx cause this function to trigger
// Do something with response error
+ if (response && response.status === 401) {
+ window.location.href = "/logout";
+ }
return Promise.reject(error);
}
);
diff --git a/src/views/AssetManagement/components/AssetTableModalLeftInfo.vue b/src/views/AssetManagement/components/AssetTableModalLeftInfo.vue
index b7e9d27..94280dc 100644
--- a/src/views/AssetManagement/components/AssetTableModalLeftInfo.vue
+++ b/src/views/AssetManagement/components/AssetTableModalLeftInfo.vue
@@ -3,6 +3,7 @@ import { ref, inject, onBeforeMount, onMounted, watch } from "vue";
import * as yup from "yup";
import "yup-phone-lite";
import AssetTableModalLeftInfoIoT from "./AssetTableModalLeftInfoIoT.vue";
+import AssetTableModalLeftInfoGraph from "./AssetTableModalLeftInfoGraph.vue";
import { getOperationCompanyList } from "@/apis/operation";
import useSearchParam from "@/hooks/useSearchParam";
import OperationTableModal from "@/views/operation/components/OperationTableModal.vue";
@@ -199,7 +200,8 @@ const openCompanyAddModal = () => {
{{ $t("button.add") }}
-
+
diff --git a/src/views/AssetManagement/components/AssetTableModalLeftInfoGraph.vue b/src/views/AssetManagement/components/AssetTableModalLeftInfoGraph.vue
new file mode 100644
index 0000000..db3d70c
--- /dev/null
+++ b/src/views/AssetManagement/components/AssetTableModalLeftInfoGraph.vue
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/AssetManagement/components/AssetTableModalRightInfo.vue b/src/views/AssetManagement/components/AssetTableModalRightInfo.vue
index c944e97..f29cf51 100644
--- a/src/views/AssetManagement/components/AssetTableModalRightInfo.vue
+++ b/src/views/AssetManagement/components/AssetTableModalRightInfo.vue
@@ -1,7 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+