wangjuncheng
2025-06-19 e4de2993c98bd0f828a90da53c9507b977071e3a
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 userSelectedLayers = ref([])
    // 隐患点列表
    const DeviceShowSwitch = ref(true)
    const DangerShowSwitch = ref(true)
    const DeviceShowSwitch = ref(false)
    const DangerShowSwitch = ref(false)
    const DangerPoint = ref([])
    // 监测设备列表
    const devices = ref([])
    const navigationShow = ref(true)
    const leftShow = ref(false)
    const rightShow = ref(false)
@@ -153,6 +156,12 @@
        }
    }
    const updateSelectedLayers = (keys) => {
        userSelectedLayers.value = keys;
    }
    return {
        // UI 状态
        navigationShow,
@@ -182,6 +191,8 @@
        waterLegendData,
        currentInfo,
        isShowEarth,
        userSelectedLayers,
        devices,
        // 方案相关方法
        setSchemCard,
@@ -202,5 +213,6 @@
        startMNFZ,
        startMNPG,
        handleNavClick,
        updateSelectedLayers
    }
})