diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue index 737a8f15..80d33287 100644 --- a/src/views/Home/Index.vue +++ b/src/views/Home/Index.vue @@ -515,16 +515,16 @@ const deviceRepairLineOptions = ref({ ] }) /** 初始化 **/ -onMounted(async () => { - // 加载 - const data = await HomeApi.getWeatherInfo() - weatherEnable.value = data.isEnable - if (data.isEnable && weatherList) { - weatherList.value = data.casts - todayWeather.value = weatherList.value[0] - weatherCity = data.city - } - production.value = await DashboardApi.getProduction(productionOverviewRange) + onMounted(async () => { + // 加载 + const data = await HomeApi.getWeatherInfo() + weatherEnable.value = data.isEnable + if (data.isEnable && weatherList) { + weatherList.value = data.casts + todayWeather.value = weatherList.value[0] + weatherCity = data.city + } + production.value = await DashboardApi.getProduction(productionOverviewRange.value) plan.value = await DashboardApi.getPlan() deviceStatusCards.value = await DashboardApi.getDevice() moldStatusCards.value = await DashboardApi.getMold()