diff --git a/public/config.json b/public/config.json new file mode 100644 index 0000000..3d0a81e --- /dev/null +++ b/public/config.json @@ -0,0 +1,24 @@ +{ + "heatmap": { + "temp": { + "range": [0, 50], + "color": ["#0023F5", "#FF1C05"], + "unit": "°C" + }, + "humi": { + "range": [15, 95], + "color": ["#ADD8E6", "#00008B"], + "unit": "%" + }, + "CO2": { + "range": [0, 5000], + "color": ["#FFDAB9", "#FF8C00"], + "unit": "ppm" + }, + "CO": { + "range": [0, 1000], + "color": ["#FFFFE0", "#FFD700"], + "unit": "ppm" + } + } +} diff --git a/src/components/forge/ForgeForSystem.vue b/src/components/forge/ForgeForSystem.vue index b21ee06..9181cd2 100644 --- a/src/components/forge/ForgeForSystem.vue +++ b/src/components/forge/ForgeForSystem.vue @@ -16,6 +16,7 @@ import useSystemStatusByBaja from "@/hooks/baja/useSystemStatusByBaja"; import ForgeInfoModal from "../../views/system/components/SystemInfoModal.vue"; import useAlarmStore from "@/stores/useAlarmStore"; import useForgeSprite from "@/hooks/forge/useForgeSprite"; +import useHeatmapBarStore from "@/stores/useHeatmapBarStore"; const props = defineProps({ initialData: Object, @@ -27,11 +28,7 @@ const props = defineProps({ }, }, }); - -const heat_bar_isShow = ref(false); -const updateHeatBarIsShow = (isShow) => { - heat_bar_isShow.value = isShow; -}; +const store = useHeatmapBarStore(); const { updateDataVisualization, createSprites, showSubSystemObjects, forgeClickListener, clear } = useForgeSprite() @@ -92,9 +89,10 @@ const loadModel = (viewer, filePath) => { }); }; -// const loadModel = (viewer, urn) => { +// const loadModel = (viewer) => { // return new Promise(function (resolve, reject) { // async function onDocumentLoadSuccess(doc) { +// console.log("模型加載完成"); // viewer.setGroundShadow(false); // viewer.impl.renderer().setClearAlpha(0); //clear alpha channel // viewer.impl.glrenderer().setClearColor(0xffffff, 0); //set transparent background, color code does not matter @@ -201,22 +199,18 @@ onUnmounted(() => {