guonan
2025-06-10 2280e8be717608bb36c3cf921f129db24349396d
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)
@@ -151,6 +154,12 @@
        }
    }
    const updateSelectedLayers = (keys) => {
        userSelectedLayers.value = keys;
    }
    return {
        // UI 状态
        navigationShow,
@@ -179,6 +188,8 @@
        DangerShowSwitch,
        waterLegendData,
        isShowEarth,
        userSelectedLayers,
        devices,
        // 方案相关方法
        setSchemCard,
@@ -199,5 +210,6 @@
        startMNFZ,
        startMNPG,
        handleNavClick,
        updateSelectedLayers
    }
})