|
@@ -175,12 +175,12 @@ const getNewElectricityData = async () => {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (res.data.records.length === 0) {
|
|
|
|
|
|
|
+ if (res.data.result.length === 0) {
|
|
|
ElMessage.warning("暂无数据");
|
|
ElMessage.warning("暂无数据");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- newElectricityData.value = res.data.records[0];
|
|
|
|
|
|
|
+ console.log(res.data);
|
|
|
|
|
+ newElectricityData.value = res.data.result[0];
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
ElMessage.error("获取最新电表数据失败");
|
|
ElMessage.error("获取最新电表数据失败");
|
|
|
console.error(error);
|
|
console.error(error);
|
|
@@ -233,10 +233,7 @@ const getElectricityData = async () => {
|
|
|
ElMessage.error(res.msg);
|
|
ElMessage.error(res.msg);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- console.log(res.data);
|
|
|
|
|
-
|
|
|
|
|
- electricityRecords.value = res.data.records;
|
|
|
|
|
|
|
+ electricityRecords.value = res.data.result;
|
|
|
totalRecords.value = res.data.total;
|
|
totalRecords.value = res.data.total;
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
ElMessage.error("获取电表数据列表失败");
|
|
ElMessage.error("获取电表数据列表失败");
|