feat:对接参数记录echart、空调度数获取设置

This commit is contained in:
吉浩茹
2025-10-01 02:42:22 +08:00
parent ad9ae93117
commit deb4d99393
28 changed files with 3666 additions and 203 deletions

View File

@ -112,6 +112,7 @@
<script setup>
import { ref, onMounted, nextTick } from 'vue';
import { dataHistoryApi } from '@/utils/api.js';
// 当前日期
const currentDate = ref('2025年9月1日');
@ -400,9 +401,31 @@ const onScrollToLower = () => {
// 可以在这里添加加载更多数据的逻辑
};
// 获取历史数据
const getHistoryData = async () => {
try {
const params = {
startTime: "2025-09-30 06:51:40",
endTime: "2025-09-30 23:51:40"
}
console.log('📊 请求历史数据:', params)
const response = await dataHistoryApi.getHistory(params)
console.log('✅ 历史数据获取成功:', response)
return response
} catch (error) {
console.error('❌ 历史数据获取失败:', error)
throw error
}
}
// 组件挂载后初始化
onMounted(() => {
loadDataByDate(currentDate.value);
// 调用历史数据接口
getHistoryData();
});
</script>