From 70d8a7e28e69b9653e72f32f14eec073fe0852ad Mon Sep 17 00:00:00 2001
From: ffr <492210217@qq.com>
Date: Tue, 9 Apr 2024 18:40:10 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=98=E5=87=A1=E8=8A=AEcommit?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/couplet/VehicleDetection/index.vue | 313 ++++++++++++++++++-
src/views/couplet/monitorinData/index.vue | 20 +-
2 files changed, 315 insertions(+), 18 deletions(-)
diff --git a/src/views/couplet/VehicleDetection/index.vue b/src/views/couplet/VehicleDetection/index.vue
index 2dee44a..36bb565 100644
--- a/src/views/couplet/VehicleDetection/index.vue
+++ b/src/views/couplet/VehicleDetection/index.vue
@@ -59,11 +59,298 @@
- 查看实时数据
+ 查看实时数据 Dialog
停止查看实时数据
+
+
+
+
+
+
+ {{ scope.row.vin }}
+
+
+
+
+
+ {{ scope.row.createTime }}
+
+
+
+
+
+ {{ scope.row.longitude }}
+
+
+
+
+
+ {{ scope.row.latitude }}
+
+
+
+
+
+ {{ scope.row.speed }}
+
+
+
+
+
+ {{ scope.row.mileage }}
+
+
+
+
+
+ {{ scope.row.voltage }}
+
+
+
+
+
+ {{ scope.row.current }}
+
+
+
+
+
+ {{ scope.row.resistance }}
+
+
+
+
+
+ {{ scope.row.gear }}
+
+
+
+
+
+ {{ scope.row.accelerationPedal }}
+
+
+
+
+
+ {{ scope.row.brakePedal }}
+
+
+
+
+
+ {{ scope.row.fuelConsumptionRate }}
+
+
+
+
+
+ {{ scope.row.motorControllerTemperature }}
+
+
+
+
+
+ {{ scope.row.motorSpeed }}
+
+
+
+
+
+ {{ scope.row.motorTorque }}
+
+
+
+
+
+ {{ scope.row.motorTemperature }}
+
+
+
+
+
+ {{ scope.row.motorVoltage }}
+
+
+
+
+
+ {{ scope.row.motorCurrent }}
+
+
+
+
+
+ {{ scope.row.remainingBattery }}
+
+
+
+
+
+ {{ scope.row.maximumFeedbackPower }}
+
+
+
+
+
+ {{ scope.row.maximumDischargePower }}
+
+
+
+
+
+ {{ scope.row.selfCheckCounter }}
+
+
+
+
+
+ {{ scope.row.totalBatteryCurrent }}
+
+
+
+
+
+ {{ scope.row.totalBatteryVoltage }}
+
+
+
+
+
+ {{ scope.row.singleBatteryMaxVoltage }}
+
+
+
+
+
+ {{ scope.row.singleBatteryMinVoltage }}
+
+
+
+
+
+ {{ scope.row.singleBatteryMaxTemperature }}
+
+
+
+
+
+ {{ scope.row.singleBatteryMinTemperature }}
+
+
+
+
+
+ {{ scope.row.availableBatteryCapacity }}
+
+
+
+
+
+ {{ scope.row.vehicleStatus }}
+
+
+
+
+
+ {{ scope.row.chargingStatus }}
+
+
+
+
+
+ {{ scope.row.operatingStatus }}
+
+
+
+
+
+ {{ scope.row.socStatus }}
+
+
+
+
+
+ {{ scope.row.chargingEnergyStorageStatus }}
+
+
+
+
+
+ {{ scope.row.driveMotorStatus }}
+
+
+
+
+
+ {{ scope.row.positionStatus }}
+
+
+
+
+
+ {{ scope.row.easStatus }}
+
+
+
+
+
+ {{ scope.row.ptcStatus }}
+
+
+
+
+
+ {{ scope.row.epsStatus }}
+
+
+
+
+
+ {{ scope.row.absStatus }}
+
+
+
+
+
+ {{ scope.row.mcuStatus }}
+
+
+
+
+
+ {{ scope.row.heatingStatus }}
+
+
+
+
+
+ {{ scope.row.batteryStatus }}
+
+
+
+
+
+ {{ scope.row.batteryInsulationStatus }}
+
+
+
+
+
+ {{ scope.row.dcdcStatus }}
+
+
+
+
+
+ {{ scope.row.chgStatus }}
+
+
+
+
@@ -89,6 +376,9 @@ export default {
//车辆类型
vehicleTypes: [],
+ gridData:{},
+ dialogTableVisible: false,
+ dialogFormVisible: false,
//对话框的参数
formLabelWidth: '120px',
dialogEdit: false,
@@ -129,12 +419,21 @@ export default {
}
)
},
- findByVehicle(vin){
- postFindByVin(vin).then(() => {
- monitorinDataList(vin).then(() => {
- this.$router.push({ path: 'monitorinData', params: { vin } });
+ findByVehicle(vin) {
+ // 异步调用 postFindByVin 方法
+ return postFindByVin(vin)
+ .then(() => {
+ // 成功后,继续异步调用 monitorinDataList 方法
+ return monitorinDataList(vin);
+ })
+ .then((res) => {
+ // 处理 monitorinDataList 返回的结果
+ this.gridData = res.data;
+ })
+ .catch((error) => {
+ // 添加错误处理,当任一异步操作失败时,打印错误信息或进行其他处理
+ console.error('Error fetching vehicle data:', error);
});
- });
},
stopViewingData(vin){
stopViewingData(vin).then(res=>{
@@ -159,7 +458,7 @@ export default {
created() {
//获取车辆列表
this.getVehicleList ()
-
+ this.findByVehicle()
//获取车辆类型
this.getVehicleTypes()
},
diff --git a/src/views/couplet/monitorinData/index.vue b/src/views/couplet/monitorinData/index.vue
index 6a038d8..9bea32c 100644
--- a/src/views/couplet/monitorinData/index.vue
+++ b/src/views/couplet/monitorinData/index.vue
@@ -1,4 +1,4 @@
-
+
@@ -288,9 +288,7 @@
-
-