fix:首页报错修复

main
黄伟杰 1 week ago
parent 27442f1813
commit 64811f4b25

@ -515,16 +515,16 @@ const deviceRepairLineOptions = ref<EChartsOption>({
] ]
}) })
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
// //
const data = await HomeApi.getWeatherInfo() const data = await HomeApi.getWeatherInfo()
weatherEnable.value = data.isEnable weatherEnable.value = data.isEnable
if (data.isEnable && weatherList) { if (data.isEnable && weatherList) {
weatherList.value = data.casts weatherList.value = data.casts
todayWeather.value = weatherList.value[0] todayWeather.value = weatherList.value[0]
weatherCity = data.city weatherCity = data.city
} }
production.value = await DashboardApi.getProduction(productionOverviewRange) production.value = await DashboardApi.getProduction(productionOverviewRange.value)
plan.value = await DashboardApi.getPlan() plan.value = await DashboardApi.getPlan()
deviceStatusCards.value = await DashboardApi.getDevice() deviceStatusCards.value = await DashboardApi.getDevice()
moldStatusCards.value = await DashboardApi.getMold() moldStatusCards.value = await DashboardApi.getMold()

Loading…
Cancel
Save