From 5db42f4054034f9a9d2ca5d8b6fcca48117e3ad5 Mon Sep 17 00:00:00 2001 From: JouChun Date: Sun, 27 Oct 2024 22:49:49 -0400 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3production=E8=B7=AF=E5=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/useHeatmapBarStore.js | 6 +++++- src/views/system/components/SystemCard.vue | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/stores/useHeatmapBarStore.js b/src/stores/useHeatmapBarStore.js index 39c6ea5..6533620 100644 --- a/src/stores/useHeatmapBarStore.js +++ b/src/stores/useHeatmapBarStore.js @@ -10,7 +10,11 @@ const useHeatmapBarStore = defineStore("heatmap", () => { const heatmapConfig = computed(() => allHeatMaps.value[route.query?.gas]); const getConfig = async () => { - const res = await axios.get("/config.json"); + const api = + import.meta.env.MODE === "production" + ? "/dist/config.json" + : "/config.json"; + const res = await axios.get(api); console.log(res); allHeatMaps.value = res.data.heatmap; }; diff --git a/src/views/system/components/SystemCard.vue b/src/views/system/components/SystemCard.vue index f2fa590..89a18b4 100644 --- a/src/views/system/components/SystemCard.vue +++ b/src/views/system/components/SystemCard.vue @@ -8,6 +8,9 @@ const { showData } = useSystemShowData() const fitToView = (forge_dbid) => { + // console.log(forge_dbid) + // window.NOP_VIEWER.hide(forge_dbid + 3); + // window.NOP_VIEWER.impl.invalidate(true); window.NOP_VIEWER.fitToView([forge_dbid]) } @@ -35,7 +38,7 @@ const fitToView = (forge_dbid) => { {{ device.device_status }}