2
wangjuncheng
2025-06-25 fa541dda36e58de1d491b3ff4073c51b16606515
src/store/simulation.js
@@ -2,11 +2,15 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useSimStore = defineStore('simulation', () => {
    const layerDate = ref("")
    // 帧数
    const frameNum = ref(0)
    // 目录树选中
    const userSelectedLayers = ref([])
    // 隐患点列表
    const DangerPoint = ref([])
    const DeviceShowSwitch = ref(false)
    const DangerShowSwitch = ref(false)
    const DangerPoint = ref([])
    // 监测设备列表
    const devices = ref([])
    const navigationShow = ref(true)
@@ -29,6 +33,8 @@
    const schemCard = ref([])
    const backToHome = ref(false)
    const selectedScheme = ref(null)
    // 当前模拟经纬度
    const currentInfo = ref({})
    // 图例
    const waterLegendData = ref([])
    // 模拟仿真图例
@@ -41,7 +47,6 @@
        selectedScheme.value = scheme
        rainFalls.value = JSON.parse(scheme.data).rainfalls
        intensityUnit.value = JSON.parse(scheme.data).intensityUnit
        console.log(intensityUnit.value, 'shceme')
    }
    const clearSelectedScheme = () => {
        selectedScheme.value = null
@@ -153,7 +158,9 @@
        }
    }
    const updateSelectedLayers = (keys) => {
        userSelectedLayers.value = keys;
    }
@@ -184,8 +191,12 @@
        DeviceShowSwitch,
        DangerShowSwitch,
        waterLegendData,
        currentInfo,
        isShowEarth,
        userSelectedLayers,
        devices,
        frameNum,
        layerDate,
        // 方案相关方法
        setSchemCard,
@@ -206,5 +217,6 @@
        startMNFZ,
        startMNPG,
        handleNavClick,
        updateSelectedLayers
    }
})