2026-05-06 18:17:54 +08:00
|
|
|
import { useButtonSelectedIdStore } from '@/stores/useButtonSelectedIdStore';
|
|
|
|
|
import { useLeftLegendStore } from '@/stores/useLeftLegendStore';
|
|
|
|
|
import { useLoadingInformationStore } from '@/stores/useLoadingInformation';
|
|
|
|
|
import { useStatusStore } from '@/stores/useStatusStore';
|
|
|
|
|
|
|
|
|
|
export const useScene = () => {
|
2026-05-07 13:59:27 +08:00
|
|
|
const statusStore = useStatusStore();
|
|
|
|
|
const loadingInformationStore = useLoadingInformationStore();
|
|
|
|
|
const leftLegendStore = useLeftLegendStore();
|
|
|
|
|
const buttonSelectedIdStore = useButtonSelectedIdStore();
|
|
|
|
|
|
2026-05-06 18:17:54 +08:00
|
|
|
// 重置场景
|
|
|
|
|
const resetScene = () => {
|
|
|
|
|
// 重置所有状态
|
2026-05-07 13:59:27 +08:00
|
|
|
statusStore.reset();
|
2026-05-06 18:17:54 +08:00
|
|
|
|
|
|
|
|
// 重置状态
|
2026-05-07 13:59:27 +08:00
|
|
|
loadingInformationStore.resetStatue();
|
2026-05-06 18:17:54 +08:00
|
|
|
|
|
|
|
|
// 重置按钮
|
2026-05-07 13:59:27 +08:00
|
|
|
buttonSelectedIdStore.resetId();
|
2026-05-06 18:17:54 +08:00
|
|
|
|
|
|
|
|
// 重置左侧图例
|
2026-05-07 13:59:27 +08:00
|
|
|
leftLegendStore.resetLegendListInfo();
|
2026-05-06 18:17:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return { resetScene };
|
|
|
|
|
};
|