Refactor to decouple energy, room, and sensor stores
- Remove room and sensor logic from energy store - Update components to use useRoomStore and useSensorStore directly - Fix sensor/room ID mismatches and API response handling in room store - Update AIOptimizationView to use useWebSocketStore for connection status - Update SensorManagementView to use useRoomStore and useSensorStore directly
This commit is contained in:
@@ -72,12 +72,12 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useEnergyStore } from '@/stores/energy'
|
||||
import { useRoomStore } from '@/stores/room'
|
||||
|
||||
const energyStore = useEnergyStore()
|
||||
const roomStore = useRoomStore()
|
||||
|
||||
const roomsList = computed(() => {
|
||||
return Array.from(energyStore.roomsData.values()).sort((a, b) =>
|
||||
return Array.from(roomStore.roomsData.values()).sort((a, b) =>
|
||||
a.room.localeCompare(b.room)
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user