修正樓層剖面圖錯誤訊息
This commit is contained in:
parent
6d3b82ec89
commit
521d5eb696
@ -19,6 +19,26 @@
|
||||
"range": [0, 1000],
|
||||
"color": ["#FFFFE0", "#FFD700"],
|
||||
"unit": "ppm"
|
||||
},
|
||||
"CH2O": {
|
||||
"range": [0, 100],
|
||||
"color": ["#90EE90", "#006400"],
|
||||
"unit": "ppb"
|
||||
},
|
||||
"PM1": {
|
||||
"range": [0, 20],
|
||||
"color": ["#E6E6FA", "#800080"],
|
||||
"unit": "µg/m³"
|
||||
},
|
||||
"PM2.5": {
|
||||
"range": [0, 55],
|
||||
"color": ["#FFB6C1", "#FF0000"],
|
||||
"unit": "µg/m³"
|
||||
},
|
||||
"PM10": {
|
||||
"range": [0, 150],
|
||||
"color": ["#FFDDC1", "#FF1493"],
|
||||
"unit": "µg/m³"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ function useForgeFloor() {
|
||||
});
|
||||
|
||||
const hideDbIdFn = () => {
|
||||
const tree = forgeViewer.value.model.getInstanceTree();
|
||||
const tree = forgeViewer.value?.model.getInstanceTree();
|
||||
const allDbIdsStr = Object.keys(tree.nodeAccess.dbIdToIndex);
|
||||
for (var i = 0; i < allDbIdsStr.length; i++) {
|
||||
forgeViewer.value.hide(parseInt(allDbIdsStr[i]));
|
||||
@ -69,26 +69,29 @@ function useForgeFloor() {
|
||||
};
|
||||
|
||||
const showLevels = () => {
|
||||
const currentFloorName = selectedFloor.value.title.replaceAll(/U/gi, "");
|
||||
if (forgeViewer.value) {
|
||||
const currentFloorName =
|
||||
selectedFloor.value?.title?.replaceAll(/U/gi, "") || "";
|
||||
|
||||
const level = levelList.value.find(({ name }) =>
|
||||
name.includes(currentFloorName)
|
||||
);
|
||||
console.log(currentFloorName, level);
|
||||
const level = levelList.value.find(({ name }) =>
|
||||
name.includes(currentFloorName)
|
||||
);
|
||||
console.log(currentFloorName, level);
|
||||
|
||||
if (!level) {
|
||||
forgeViewer.value.impl.toggleGhosting(true);
|
||||
forgeViewer.value.fitToView([forgeViewer.value.model.getRootId()]);
|
||||
showDbIdFn();
|
||||
} else {
|
||||
hideDbIdFn();
|
||||
// forgeViewer.value.clearSelection();
|
||||
// forgeViewer.value.model.setAllVisibility(0);
|
||||
forgeViewer.value.impl.toggleGhosting(false);
|
||||
// forgeViewer.value.impl.toggleGroundShadow(false);
|
||||
forgeViewer.value.show(level.dbId);
|
||||
forgeViewer.value.impl.invalidate(true);
|
||||
forgeViewer.value.fitToView([level.dbId]);
|
||||
if (!level) {
|
||||
forgeViewer.value?.impl.toggleGhosting(true);
|
||||
forgeViewer.value?.fitToView([forgeViewer.value.model.getRootId()]);
|
||||
showDbIdFn();
|
||||
} else {
|
||||
hideDbIdFn();
|
||||
// forgeViewer.value.clearSelection();
|
||||
// forgeViewer.value.model.setAllVisibility(0);
|
||||
forgeViewer.value.impl.toggleGhosting(false);
|
||||
// forgeViewer.value.impl.toggleGroundShadow(false);
|
||||
forgeViewer.value.show(level.dbId);
|
||||
forgeViewer.value.impl.invalidate(true);
|
||||
forgeViewer.value.fitToView([level.dbId]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -131,7 +131,6 @@ export default function useForgeHeatmap() {
|
||||
watch(
|
||||
data,
|
||||
(newValue, oldValue) => {
|
||||
debugger;
|
||||
dataVizExtn.value?.removeSurfaceShading();
|
||||
createHeatMap(route.query.gas);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user