diff --git a/.env.production b/.env.production index 6da8916..41e8aa1 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,4 @@ VITE_API_BASEURL = "https://ibms-cvilux-api.production.mjmtech.com.tw" VITE_FILE_API_BASEURL = "https://cgems.cvilux-group.com:8088" VITE_MQTT_BASEURL = "wss://mqttwss.mjm-staging.developers-homelab.net" -VITE_FORGE_BASEURL = "https://cgems.cvilux-group.com:8088/dist" \ No newline at end of file +# VITE_FORGE_BASEURL = "https://cgems.cvilux-group.com:8088/dist" \ No newline at end of file diff --git a/src/components/forge/index.vue b/src/components/forge/index.vue index a9f0e80..78cf54e 100644 --- a/src/components/forge/index.vue +++ b/src/components/forge/index.vue @@ -93,8 +93,8 @@ const createSprites = async (dataVizExtn) => { const DataVizCore = Autodesk.DataVisualization.Core; const viewableType = DataVizCore.ViewableType.SPRITE; let spriteColor = new THREE.Color(0xffffff); - const BASEURL = import.meta.env.VITE_FORGE_BASEURL; - const spriteIconUrl = `${BASEURL}/hotspot.svg`; + const BASEURL = import.meta.env.VITE_FILE_API_BASEURL; + const spriteIconUrl = `${BASEURL}/dist/hotspot.svg`; const style = new DataVizCore.ViewableStyle( viewableType, spriteColor, diff --git a/src/hooks/forge/useForgeSprite.js b/src/hooks/forge/useForgeSprite.js index d0abad8..ebee22e 100644 --- a/src/hooks/forge/useForgeSprite.js +++ b/src/hooks/forge/useForgeSprite.js @@ -72,8 +72,8 @@ export default function useForgeSprite() { const DataVizCore = Autodesk.DataVisualization.Core; const viewableType = DataVizCore.ViewableType.SPRITE; let spriteColor = new THREE.Color(0xffffff); - const BASEURL = import.meta.env.VITE_FORGE_BASEURL; - const spriteIconUrl = `${BASEURL}/hotspot.svg`; + const BASEURL = import.meta.env.VITE_FILE_API_BASEURL; + const spriteIconUrl = `${BASEURL}/dist/hotspot.svg`; const style = new DataVizCore.ViewableStyle( viewableType, spriteColor, diff --git a/src/views/dashboard/Dashboard.vue b/src/views/dashboard/Dashboard.vue index ed1b751..55df5ce 100644 --- a/src/views/dashboard/Dashboard.vue +++ b/src/views/dashboard/Dashboard.vue @@ -22,6 +22,8 @@ const formState = ref({ floor_guid: "all", department_id: "all", }); +// 控制顯示2D/3D切換與內容 +const showForgeArea = ref(true); const getEnergyCostData = async (params) => { const res = await getEnergyCost(params); @@ -67,18 +69,20 @@ watch( ); onMounted(() => { - setItems([ - { - title: "2D", - key: "2D", - active: false, - }, - { - title: "3D", - key: "3D", - active: true, - }, - ]); + if (showForgeArea.value) { + setItems([ + { + title: "2D", + key: "2D", + active: false, + }, + { + title: "3D", + key: "3D", + active: true, + }, + ]); + } }); onUnmounted(() => { @@ -90,31 +94,45 @@ onUnmounted(() => {