forked from drone/command-center-dashboard

罗广辉
2025-04-12 fdefd1d355361ae20e7facc764d01de85d5edf37
feat: 数据统一刷新
2 files modified
33 ■■■■■ changed files
src/views/Home/Home.vue 27 ●●●●● patch | view | raw | blame | history
src/views/Home/HomeLeft/MachineNestList.vue 6 ●●●● patch | view | raw | blame | history
src/views/Home/Home.vue
@@ -1,15 +1,18 @@
<template>
    <!--        单个机巢页面-->
    <SignMachineNest v-if="singleUavHome?.device_sn" />
    <!--        事件概述详细信息页面-->
    <EventOverviewDetail v-else-if="isEventOverviewDetail" />
    <div :key="selectedAreaCode">
        <!--        单个机巢页面-->
        <SignMachineNest v-if="singleUavHome?.device_sn"/>
        <!--        事件概述详细信息页面-->
        <EventOverviewDetail v-else-if="isEventOverviewDetail" />
    <AINowFly v-else-if="isAINowFly" />
    <!--            首页默认的页面-->
    <template v-else>
        <HomeLeft />
        <HomeRight />
    </template>
        <AINowFly v-else-if="isAINowFly" />
        <!--            首页默认的页面-->
        <template v-else>
            <HomeLeft />
            <HomeRight />
        </template>
    </div>
    <SearchBox />
    <RSide />
@@ -35,6 +38,10 @@
const singleUavHome = computed(() => store.state.home.singleUavHome)
const isEventOverviewDetail = computed(() => store.state.home.isEventOverviewDetail)
const isAINowFly = computed(() => store.state.home.footActiveIndex === 5)
const userAreaCode = computed(() => store.state.user.userInfo.detail.areaCode)
const selectedAreaCode = computed(() => store.state.user.selectedAreaCode)
onUnmounted(() => {
    store.commit('setSingleUavHome', null)
src/views/Home/HomeLeft/MachineNestList.vue
@@ -1,6 +1,6 @@
<!-- 机巢详情列表 -->
<template>
    <common-title text="返回" :style="{ marginLeft: pxToRem(14) }" @details="detailsFun"></common-title>
    <common-title title="机巢概况" text="返回" :style="{ marginLeft: pxToRem(14) }" @details="detailsFun"></common-title>
    <div class="machine-nest-list">
        <MachineNestTotal @searchNickName="handleSearch" />
        <div class="content-wrapper">
@@ -152,7 +152,7 @@
                margin-top: 10px;
                height: 120px;
            }
            img {
                width: 45px;
@@ -243,4 +243,4 @@
        }
    }
}
</style>
</style>