guonan
2025-06-18 1188387a47e55590a87c161cb43b2db0729b0146
src/store/simulation.js
@@ -1,12 +1,15 @@
// stores/ui.js
import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useSimStore = defineStore('simulation', () => {
    // 帧数
    const frameNum = ref(0)
    // 隐患点列表
    const DeviceShowSwitch = ref(true)
    const DangerShowSwitch = ref(true)
    const DangerPoint = ref([])
    const DeviceShowSwitch = ref(false)
    const DangerShowSwitch = ref(false)
    // 监测设备列表
    const devices = ref([])
    const navigationShow = ref(true)
    const leftShow = ref(false)
    const rightShow = ref(false)
@@ -27,6 +30,8 @@
    const schemCard = ref([])
    const backToHome = ref(false)
    const selectedScheme = ref(null)
    // 图例
    const waterLegendData = ref([])
    // 模拟仿真图例
    const isShowEarth = ref(false)
    // 降雨数据列表
@@ -106,6 +111,7 @@
    const startZHJC = () => {
        init()
        flyToHomeView()
        functionShow.value = true
        deviceShow.value = true
        isShowEarth.value = true
@@ -114,6 +120,7 @@
    const startMNFZ = () => {
        init()
        flyToHomeView()
        leftShow.value = true
        isShowEarth.value = false
@@ -147,6 +154,10 @@
        }
    }
    return {
        // UI 状态
        navigationShow,
@@ -173,7 +184,10 @@
        DangerPoint,
        DeviceShowSwitch,
        DangerShowSwitch,
        waterLegendData,
        isShowEarth,
        devices,
        frameNum,
        // 方案相关方法
        setSchemCard,