<template>
  <div>
    <el-descriptions title="垂直带边框列表" direction="vertical" :column="4" :model="VehicleInfo" border>
      <el-descriptions-item label="vin">{{VehicleInfo.vin}}</el-descriptions-item>
      <el-descriptions-item label="时间">{{VehicleInfo.time}}</el-descriptions-item>
      <el-descriptions-item label="经度">{{VehicleInfo.longitude}}</el-descriptions-item>
      <el-descriptions-item label="纬度">{{VehicleInfo.latitude}}</el-descriptions-item>
      <el-descriptions-item label="车速">{{VehicleInfo.speed}}</el-descriptions-item>
      <el-descriptions-item label="总里程">{{VehicleInfo.totalMileage}}</el-descriptions-item>
      <el-descriptions-item label="总电压">{{VehicleInfo.totalVoltage}}</el-descriptions-item>
      <el-descriptions-item label="总电流">{{VehicleInfo.totalCurrent}}</el-descriptions-item>
<!--      <el-descriptions-item label="绝缘电阻">{{VehicleInfo.insulationResistance}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="档位">{{VehicleInfo.gears}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="加速踏板行程值">{{VehicleInfo.acceleratorPedal}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="制动踏板行程值">{{VehicleInfo.brakePedal}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="燃料消耗率">{{VehicleInfo.fuelConsumptionRate}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="电机控制器温度">{{VehicleInfo.MotorControllerTemperature}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="电机转速">{{VehicleInfo.motorSpeed}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="电机转矩">{{VehicleInfo.motorTorque}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="电机温度">{{VehicleInfo.motorTemperature}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="电机电压">{{VehicleInfo.motorVoltage}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="电机电流">{{VehicleInfo.motorCurrent}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="动力电池剩余电量SOC">{{VehicleInfo.remainingPower}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="当前状态允许的最大反馈功率">{{VehicleInfo.maximumFeedbackPower}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="当前状态允许最大放电功率">{{VehicleInfo.maximumDischargePower}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="BMS自检计数器">{{VehicleInfo.selfTestCounter}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="动力电池充放电电流">{{VehicleInfo.batteryChargeOrDischargeCurrent}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="动力电池负载端总电压V3">{{VehicleInfo.totalVoltageV3}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="单次最大电压">{{VehicleInfo.maximumVoltage}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="单体电池最低电压">{{VehicleInfo.minimumBatteryVoltage}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="单体电池最高温度">{{VehicleInfo.maximumBatteryTemperature}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="单体电池最低温度">{{VehicleInfo.minimumBatteryTemperature}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="动力电池可用容量">{{VehicleInfo.usableBatteryCapacity}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="车辆状态">{{VehicleInfo.vehicleStatus}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="充电状态">{{VehicleInfo.chargeStatus}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="运行状态">{{VehicleInfo.operationalStatus}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="SOC">{{VehicleInfo.soc}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="可充电储能装置工作状态">{{VehicleInfo.energyStorageDeviceWorkingStatus}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="驱动电机状态">{{VehicleInfo.driveMotorStatus}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="定位是否有效">{{VehicleInfo.positioningIsOrNotEffective}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="EAS">{{VehicleInfo.eas}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="PTC">{{VehicleInfo.ptc}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="EPS">{{VehicleInfo.eps}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="ABS">{{VehicleInfo.abs}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="MCU">{{VehicleInfo.mcu}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="动力电池加热状态">{{VehicleInfo.batteryHeatingStatus}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="动力电池当前状态">{{VehicleInfo.batteryCurrentStatus}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="动力电池保温状态">{{VehicleInfo.batteryInsulationStatus}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="DCDC">{{VehicleInfo.dcdc}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="CHG">{{VehicleInfo.chg}}</el-descriptions-item>-->
<!--      <el-descriptions-item label="校验位">{{VehicleInfo.checkDigit}}</el-descriptions-item>-->

    </el-descriptions>
    {{vim}}
  </div>
</template>

<script>
import { read, open, close } from "@/api/goods/car";
// 这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）,
// 例如：import 《组件名称》 from '《组件路径》,
export default {
  // import引入的组件需要注入到对象中才能使用"
  components: {},
  props: {},
  data() {
    // 这里存放数据"
    return {
      VehicleInfo: {
        // vin
        vin: '',
        // 时间
        time: '',
        // 经度
        longitude: '',
        // 纬度
        latitude: '',
        // 车速
        speed: '',
        // 总里程
        totalMileage: '',
        // 总电压
        totalVoltage: '',
        // 总电流
        totalCurrent: '',
        // 绝缘电阻
        insulationResistance: '',
        // 档位
        gears: '',
        // 加速踏板行程值
        acceleratorPedal: '',
        // 制动踏板行程值
        brakePedal: '',
        // 燃料消耗率
        fuelConsumptionRate: '',
        // 电机控制器温度
        MotorControllerTemperature: '',
        // 电机转速
        motorSpeed: '',
        // 电机转矩
        motorTorque: '',
        // 电机温度
        motorTemperature: '',
        // 电机电压
        motorVoltage: '',
        // 电机电流
        motorCurrent: '',
        // 动力电池剩余电量SOC
        remainingPower: '',
        // 当前状态允许的最大反馈功率
        maximumFeedbackPower: '',
        // 当前状态允许最大放电功率
        maximumDischargePower: '',
        // BMS自检计数器
        selfTestCounter: '',
        // 动力电池充放电电流
        batteryChargeOrDischargeCurrent: '',
        // 动力电池负载端总电压V3
        totalVoltageV3: '',
        // 单次最大电压
        maximumVoltage: '',
        // 单体电池最低电压
        minimumBatteryVoltage: '',
        // 单体电池最高温度
        maximumBatteryTemperature: '',
        // 单体电池最低温度
        minimumBatteryTemperature: '',
        // 动力电池可用容量
        usableBatteryCapacity: '',
        // 车辆状态
        vehicleStatus: '',
        // 充电状态
        chargeStatus: '',
        // 运行状态
        operationalStatus: '',
        // SOC
        soc: '',
        // 可充电储能装置工作状态
        energyStorageDeviceWorkingStatus: '',
        // 驱动电机状态
        driveMotorStatus: '',
        // 定位是否有效
        positioningIsOrNotEffective: '',
        // EAS
        eas: '',
        // PTC
        ptc: '',
        // EPS
        eps: '',
        // ABS
        abs: '',
        // MCU
        mcu: '',
        // 动力电池加热状态
        batteryHeatingStatus: '',
        // 动力电池当前状态
        batteryCurrentStatus: '',
        // 动力电池保温状态
        batteryInsulationStatus: '',
        // DCDC
        dcdc: '',
        // CHG
        chg: '',
        // 校验位
        checkDigit: '',
      },
      vim: this.$route.query.vim
    }
  },
  // 计算属性 类似于data概念",
  computed: {},
  // 监控data中的数据变化",
  watch: {},
  // 方法集合",
  methods: {
    open() {
      open().then(res =>{
        console.log(res)
      })
    }
  },
  // 生命周期 - 创建完成（可以访问当前this实例）",
  created() {
    this.open()
    this.timer = setInterval(() => {
      read().then(res => {
        this.VehicleInfo = res.data
      })
    },2000)
  },
  // 生命周期 - 挂载完成（可以访问DOM元素）",
  mounted() {
  },
  beforeCreate() {
  }, // 生命周期 - 创建之前",
  beforeMount() {
  }, // 生命周期 - 挂载之前",
  beforeUpdate() {
  }, // 生命周期 - 更新之前",
  updated() {
  }, // 生命周期 - 更新之后",
  beforeDestroy() {
    if (this.timer) {
      close().then(res => {
        console.log(res)
      })
      clearInterval(this.timer)
    }
  }, // 生命周期 - 销毁之前",
  destroyed() {
  }, // 生命周期 - 销毁完成",
  activated() {
  } // 如果页面有keep-alive缓存功能，这个函数会触发",
}
</script>
<style scoped>

</style>
