更新历史轨迹
parent
e0c1e4dbc9
commit
4159aa3544
|
@ -244,8 +244,6 @@ export default {
|
|||
marker: null,
|
||||
lineArr: [],
|
||||
vin:null,
|
||||
carMsg:null,
|
||||
carMsgTwo:{},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -255,15 +253,12 @@ export default {
|
|||
this.getList()
|
||||
this.listCarType()
|
||||
this.listFence()
|
||||
this.carMsg = setInterval(this.listRealTime,1000)
|
||||
},
|
||||
methods: {
|
||||
// 在这里执行后台拉取数据的操作
|
||||
listRealTime(){
|
||||
listRealTime(this.vin).then(res=>{
|
||||
console.log(res)
|
||||
this.carMsgTwo = res.data
|
||||
this.lineArr.push(res.longitude.replace(/"/g, "") +","+res.latitude.replace(/"/g, ""))
|
||||
|
||||
})
|
||||
},
|
||||
/*重置表单*/
|
||||
|
@ -279,9 +274,11 @@ export default {
|
|||
this.$refs.myForm.resetFields(); // 重置表单验证状态
|
||||
},
|
||||
isShowAll(){
|
||||
removeRealTime().then(res=>{
|
||||
|
||||
})
|
||||
this.isShow = true
|
||||
this.isList = false
|
||||
// this.map.destroy();//离开页面,销毁掉
|
||||
location.reload()
|
||||
},
|
||||
insertCar(){
|
||||
|
|
|
@ -19,16 +19,28 @@ export default {
|
|||
},
|
||||
arr:[],
|
||||
lineArr:null,
|
||||
carMsg:[],
|
||||
recordCarList: [] , // 存储获取到的对象集合
|
||||
currentIndex: 0, // 当前展示的对象索引
|
||||
currentObject: "" // 当前展示的对象内容
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.doDo();
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
startDisplay() {
|
||||
// 启动定时器,每秒展示一个对象
|
||||
setInterval(() => {
|
||||
if (this.currentIndex < this.recordCarList.length) {
|
||||
// 当前索引小于集合长度时,更新展示的对象内容
|
||||
this.currentObject = JSON.stringify(this.recordCarList[this.currentIndex]);
|
||||
this.currentIndex++;
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
deleteRecord(recordId){
|
||||
this.recordId = recordId
|
||||
deleteRecord(this.recordId).then(res=>{
|
||||
|
@ -46,13 +58,13 @@ export default {
|
|||
this.recordCar.startTime = recordCar.startTime
|
||||
this.recordCar.endTime = recordCar.endTime
|
||||
historyMap(this.recordCar).then(res=>{
|
||||
console.log(res)
|
||||
this.carMsg = res.data
|
||||
res.data.forEach(item=>{
|
||||
this.arr.push(item.longitude.replace(/"/g, "") +","+item.latitude.replace(/"/g, ""))
|
||||
this.lineArr = this.arr.map(item => item.trim().replace(/'/g, '').split(','))
|
||||
console.log(this.lineArr)
|
||||
})
|
||||
this.recordCarList = res; // 将获取到的对象集合存储到data中
|
||||
this.startDisplay(); // 开始展示
|
||||
let coordinates = res.data.map(obj => [
|
||||
parseFloat(obj.longitude.replace(/"/g, "")),
|
||||
parseFloat(obj.latitude.replace(/"/g, ""))
|
||||
]);
|
||||
this.lineArr = [coordinates]
|
||||
})
|
||||
this.initMap()
|
||||
this.startAnimation()
|
||||
|
@ -138,54 +150,7 @@ export default {
|
|||
|
||||
<template>
|
||||
<div>
|
||||
<div v-for="car in carMsg" :key="car.id">
|
||||
<p>主键id:{{car.id}}</p>
|
||||
<p>VIN:{{car.vin}}</p>
|
||||
<p>时间戳:{{car.createTime}}</p>
|
||||
<p>经度:{{car.longitude}}</p>
|
||||
<p>维度:{{car.latitude}}</p>
|
||||
<p>速度:{{car.speed}}</p>
|
||||
<p>里程:{{car.mileage}}</p>
|
||||
<p>总电压:{{car.voltage}}</p>
|
||||
<p>总电流:{{car.current}}</p>
|
||||
<p>绝缘电阻:{{car.resistance}}</p>
|
||||
<p>档位:{{car.gear}}</p>
|
||||
<p>加速踏板行程值:{{car.accelerationPedal}}</p>
|
||||
<p>制动踏板行程值:{{car.brakePedal}}</p>
|
||||
<p>燃料消耗率:{{car.fuelConsumptionRate}}</p>
|
||||
<p>电机控制器温度:{{car.motorControllerTemperature}}</p>
|
||||
<p>电机转速:{{car.motorSpeed}}</p>
|
||||
<p>电机转矩:{{car.motorTorque}}</p>
|
||||
<p>电机温度:{{car.motorTemperature}}</p>
|
||||
<p>电机电压:{{car.motorVoltage}}</p>
|
||||
<p>电机电流:{{car.motorCurrent}}</p>
|
||||
<p>动力电池剩余电量SOC:{{car.remainingBattery}}</p>
|
||||
<p>当前状态允许的最大反馈功率:{{car.maximumFeedbackPower}}</p>
|
||||
<p>当前状态允许最大放电功率:{{car.maximumDischargePower}}</p>
|
||||
<p>BMS自检计数器:{{car.selfCheckCounter}}</p>
|
||||
<p>动力电池充放电电流:{{car.totalBatteryCurrent}}</p>
|
||||
<p>动力电池负载端总电压V3:{{car.totalBatteryVoltage}}</p>
|
||||
<p>单次最大电压:{{car.singleBatteryMaxVoltage}}</p>
|
||||
<p>单体电池最低电压:{{car.singleBatteryMinVoltage}}</p>
|
||||
<p>单体电池最高温度:{{car.singleBatteryMaxTemperature}}</p>
|
||||
<p>单体电池最低温度:{{car.singleBatteryMinTemperature}}</p>
|
||||
<p>动力电池可用容量:{{car.availableBatteryCapacity}}</p>
|
||||
<p>车辆状态:{{car.vehicleStatus}}</p>
|
||||
<p>充电状态:{{car.chargingStatus}}</p>
|
||||
<p>运行状态:{{car.operatingStatus}}</p>
|
||||
<p>SOC:{{car.socStatus}}</p>
|
||||
<p>可充电储能装置工作状态:{{car.chargingEnergyStorageStatus}}</p>
|
||||
<p>驱动电机状态:{{car.driveMotorStatus}}</p>
|
||||
<p>定位是否有效:{{car.positionStatus}}</p>
|
||||
<p>EAS(汽车防盗系统)状态:{{car.easStatus}}</p>
|
||||
<p>PTC(电动加热器)状态:{{car.ptcStatus}}</p>
|
||||
<p>EPS(电动助力系统)状态:{{car.epsStatus}}</p>
|
||||
<p>ABS(防抱死)状态:{{car.absStatus}}</p>
|
||||
<p>MCU(电机/逆变器)状态:{{car.mcuStatus}}</p>
|
||||
<p>动力电池加热状态:{{car.heatingStatus}}</p>
|
||||
<p>动力电池当前状态:{{car.batteryStatus}}</p>
|
||||
<p>动力电池保温状态:{{car.batteryInsulationStatus}}</p>
|
||||
</div>
|
||||
<p>{{currentObject}}</p>
|
||||
<div>
|
||||
|
||||
<el-form>
|
||||
|
|
Loading…
Reference in New Issue