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