| | |
| | | // 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) |
| | |
| | | const weatherShow = ref(false) |
| | | const barShow = ref(false) |
| | | const deviceShow = ref(false) |
| | | const showResultAssess = ref(false) |
| | | const showLayerTree = ref(true) |
| | | const showDangerAssess = ref(false) |
| | | const schemCard = ref([]) |
| | | const backToHome = ref(false) |
| | | const selectedScheme = ref(null) |
| | | // 图例 |
| | | const waterLegendData = ref([]) |
| | | // 模拟仿真图例 |
| | | const isShowEarth = ref(false) |
| | | // 降雨数据列表 |
| | | const rainFalls = ref() |
| | | // 降雨单位 |
| | |
| | | rightRiverShow.value = false |
| | | showPreview.value = false |
| | | deviceShow.value = false |
| | | showResultAssess.value = false |
| | | showDangerAssess.value = false |
| | | schemCard.value = [] |
| | | } |
| | | |
| | |
| | | init() |
| | | flyToHomeView() |
| | | locationShow.value = true |
| | | isShowEarth.value = true |
| | | |
| | | } |
| | | |
| | | const startZHJC = () => { |
| | | init() |
| | | flyToHomeView() |
| | | functionShow.value = true |
| | | deviceShow.value = true |
| | | isShowEarth.value = true |
| | | |
| | | } |
| | | |
| | | const startMNFZ = () => { |
| | | init() |
| | | flyToHomeView() |
| | | leftShow.value = true |
| | | // rightRiverShow.value = true |
| | | isShowEarth.value = false |
| | | |
| | | } |
| | | |
| | | const startMNPG = () => { |
| | | init() |
| | | // showResultAssess.value = true |
| | | // showDangerAssess.value = true |
| | | isShowEarth.value = false |
| | | |
| | | } |
| | | |
| | | const setBackToHome = (value) => { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | return { |
| | | // UI 状态 |
| | | navigationShow, |
| | |
| | | weatherShow, |
| | | barShow, |
| | | deviceShow, |
| | | showResultAssess, |
| | | showLayerTree, |
| | | showDangerAssess, |
| | | schemCard, |
| | | backToHome, |
| | | rainFalls, |
| | |
| | | DangerPoint, |
| | | DeviceShowSwitch, |
| | | DangerShowSwitch, |
| | | waterLegendData, |
| | | isShowEarth, |
| | | devices, |
| | | frameNum, |
| | | |
| | | // 方案相关方法 |
| | | setSchemCard, |