wangjuncheng
2025-06-18 32947c42c53afdd9a6c49637c4ecc8e5fa4be24c
src/store/simulation.js
@@ -1,12 +1,14 @@
// stores/ui.js
import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useSimStore = defineStore('simulation', () => {
    // 隐患点列表
    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 +29,10 @@
    const schemCard = ref([])
    const backToHome = ref(false)
    const selectedScheme = ref(null)
    // 当前模拟经纬度
    const currentInfo = ref({})
    // 图例
    const waterLegendData = ref([])
    // 模拟仿真图例
    const isShowEarth = ref(false)
    // 降雨数据列表
@@ -106,6 +112,7 @@
    const startZHJC = () => {
        init()
        flyToHomeView()
        functionShow.value = true
        deviceShow.value = true
        isShowEarth.value = true
@@ -114,6 +121,7 @@
    const startMNFZ = () => {
        init()
        flyToHomeView()
        leftShow.value = true
        isShowEarth.value = false
@@ -147,6 +155,10 @@
        }
    }
    return {
        // UI 状态
        navigationShow,
@@ -173,7 +185,10 @@
        DangerPoint,
        DeviceShowSwitch,
        DangerShowSwitch,
        waterLegendData,
        currentInfo,
        isShowEarth,
        devices,
        // 方案相关方法
        setSchemCard,