| | |
| | | <div class="home-left"> |
| | | <!--时间 天气--> |
| | | <common-weather></common-weather> |
| | | <!--机巢概况--> |
| | | <overview-next></overview-next> |
| | | <!--巡检任务情况--> |
| | | <inspection-rask-details></inspection-rask-details> |
| | | <template v-if="machineNestListRef"> |
| | | <!--机巢列表--> |
| | | <MachineNestList></MachineNestList> |
| | | </template> |
| | | <template v-else> |
| | | <!--机巢概况--> |
| | | <overview-next></overview-next> |
| | | <!--巡检任务情况--> |
| | | <inspection-rask-details></inspection-rask-details> |
| | | </template> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import OverviewNext from './OverviewNext.vue'; |
| | | import InspectionRaskDetails from './InspectionRaskDetails.vue'; |
| | | import CommonWeather from '@/components/CommonWeather.vue'; |
| | | import MachineNestList from './MachineNestList.vue'; |
| | | import { useStore } from 'vuex'; |
| | | |
| | | const store = useStore(); |
| | | const machineNestListRef = ref(false); |
| | | |
| | | // 监听机巢详情变化 |
| | | watch( |
| | | () => store.state.home.machineNestDetail, |
| | | (newVal) => { |
| | | machineNestListRef.value = newVal; |
| | | }, |
| | | { immediate: true } // 添加立即执行选项 |
| | | ); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |