| | |
| | | |
| | | const carName = ref(""); |
| | | const timeRange = ref([]); |
| | | timeRange.value = [new Date("2020-01-01 00:00:00"), new Date("2023-01-01 00:00:00")]; |
| | | const nowDate = new Date().format("yyyy-MM-dd hh:mm:ss"); |
| | | timeRange.value = [new Date("2020-01-01 00:00:00"), new Date(nowDate)]; |
| | | const {carList, getCarNames} = carInfoModule(); |
| | | |
| | | const { |
| | |
| | | const loading = ref(false); |
| | | const searchData = async ()=>{ |
| | | loading.value = true; |
| | | const rs = await searchBmsAnalysis(); |
| | | const startTime = new Date(timeRange.value[0]).format("yyyy-MM-dd hh:mm:ss"); |
| | | const endTime = new Date(timeRange.value[1]).format("yyyy-MM-dd hh:mm:ss"); |
| | | const rs = await searchBmsAnalysis(carName.value, startTime, endTime); |
| | | loading.value = false; |
| | | await nextTick(); |
| | | if(rs.code === 1) { |
| | | if(rs.code === 1 && rs.data) { |
| | | const data = rs.data; |
| | | // 图表1 |
| | | title1.value = data.y1Name; |