| | |
| | | // stores/ui.js |
| | | import { defineStore } from 'pinia' |
| | | import { ref } from 'vue' |
| | | import { createSimData } from '@/api/trApi' |
| | | |
| | | export const useSimStore = defineStore('simulation', () => { |
| | | // 隐患点列表 |
| | |
| | | const schemCard = ref([]) |
| | | const backToHome = ref(false) |
| | | const selectedScheme = ref(null) |
| | | // 降雨数据列表 |
| | | const rainFalls = ref() |
| | | // 降雨单位 |
| | | const intensityUnit = ref() |
| | | const setSelectedScheme = (scheme) => { |
| | | selectedScheme.value = scheme |
| | |
| | | } |
| | | } |
| | | |
| | | const flyToHomeView = () => { |
| | | const view = { |
| | | destination: { |
| | | x: -2355432.569004413, |
| | | y: 4687573.191838412, |
| | | z: 4098726.315265574, |
| | | }, |
| | | orientation: { |
| | | pitch: -0.9541030830183503, |
| | | roll: 0.00031421159527500464, |
| | | heading: 6.140424766644804, |
| | | }, |
| | | }; |
| | | viewer.scene.camera.flyTo(view); |
| | | } |
| | | |
| | | const startYHGL = () => { |
| | | init() |
| | | flyToHomeView() |
| | | locationShow.value = true |
| | | } |
| | | |