修正回到總覽mode|fitToView|樓層剖面
This commit is contained in:
parent
fdac1a2fb3
commit
97c3c394d9
@ -264,7 +264,7 @@ onUnmounted(() => {
|
||||
}
|
||||
|
||||
.homeViewWrapper {
|
||||
transform: scale(0.9) !important;
|
||||
transform: scale(2) !important;
|
||||
}
|
||||
|
||||
.heatbar {
|
||||
|
@ -60,7 +60,7 @@ function useForgeFloor() {
|
||||
}
|
||||
};
|
||||
const showDbIdFn = () => {
|
||||
hideAllObjects();
|
||||
hideDbIdFn();
|
||||
subscribeData.value.forEach((value, index) => {
|
||||
forgeViewer.value.show(value.forge_dbid);
|
||||
});
|
||||
@ -78,6 +78,7 @@ function useForgeFloor() {
|
||||
|
||||
if (!level) {
|
||||
forgeViewer.value.impl.toggleGhosting(true);
|
||||
forgeViewer.value.fitToView([forgeViewer.value.model.getRootId()]);
|
||||
showDbIdFn();
|
||||
} else {
|
||||
hideDbIdFn();
|
||||
@ -87,6 +88,7 @@ function useForgeFloor() {
|
||||
// forgeViewer.value.impl.toggleGroundShadow(false);
|
||||
forgeViewer.value.show(level.dbId);
|
||||
forgeViewer.value.impl.invalidate(true);
|
||||
forgeViewer.value.fitToView([level.dbId]);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -80,7 +80,7 @@ export default function useForgeHeatmap() {
|
||||
);
|
||||
dataVizExtn.value.renderSurfaceShading(
|
||||
heatMapName,
|
||||
route.query.gas.shading,
|
||||
route.query.gas,
|
||||
getSensorValue
|
||||
);
|
||||
};
|
||||
|
@ -44,6 +44,7 @@ const getData = async () => {
|
||||
...d, key: d.full_name, device_list: d.device_list.map((dev, index) => ({
|
||||
...dev,
|
||||
forge_dbid: parseInt(dev.forge_dbid),
|
||||
room_dbid: parseInt(dev.room_dbid),
|
||||
device_coordinate_3d: dev.device_coordinate_3d
|
||||
? JSON.parse(dev.device_coordinate_3d)
|
||||
: null,
|
||||
@ -168,7 +169,7 @@ const getCurrentInfoModalData = (e, position, value) => {
|
||||
const selectedDeviceRealtime = computed(() => realtimeData.value?.find(({ device_number }) => device_number === selectedDevice.value?.value?.device_number)?.data)
|
||||
|
||||
const clearSelectedDeviceInfo = () => {
|
||||
|
||||
|
||||
selectedDevice.value.value = null;
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,9 @@ watch(selectedFloor, (newValue) => {
|
||||
console.log(newValue)
|
||||
})
|
||||
|
||||
const fitToView = (forge_dbid) => {
|
||||
window.NOP_VIEWER.fitToView([forge_dbid])
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -25,7 +28,7 @@ watch(selectedFloor, (newValue) => {
|
||||
<p class="title">{{ d.full_name }}</p>
|
||||
<div class="grid grid-cols-3 gap-5">
|
||||
<div class="col-auto relative" v-for="device in d.device_list" :key="device.device_guid">
|
||||
<div class="item h-36">
|
||||
<div class="item h-36" @click="() => fitToView(device.forge_dbid)">
|
||||
<div class="left w-4/5 h-full flex flex-wrap justify-center">
|
||||
<div class="sec02 w-full">
|
||||
<img v-if="device.device_image_url" :src="device.device_image_url" alt="" class="w-8 h-8">
|
||||
|
@ -39,7 +39,7 @@ const onClick = (item) => {
|
||||
router.push({
|
||||
name: 'sub_system', params: {
|
||||
...route.params, floor_id: item.key
|
||||
}, query: { ...route.query, gas: route.query.gas }
|
||||
}, query: { ...route.query, gas: route.query.gas, mode: route.params.floor_id === "main" ? "3D" : route.query.mode }
|
||||
})
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user