<template>
  <div class="vehicleDetail">
    <div class="head">
     <span class="titleBefore"></span><span>{{ model.picLicense }}</span>
      <!-- <span class="titleBefore"></span><span>苏A***95</span> -->
    </div>
    <div class="content">
      <div class="detailItem">
        <span class="left">危险类型：</span
        >{{ model.behavior }}
      </div>
      <div class="detailItem">
        <span class="left">检测时间：</span
        >{{ model.dateTime }}
      </div>
      <div class="detailItem">
        <span class="left">行驶速度：</span
        >{{ model.speed }}km/h
      </div>
      <div class="detailItem">
        <span class="left">航向角：</span
        >{{ model.courseAngle }}
      </div>
    </div>
  </div>
</template>

<script>
import dict from "../../../config/holo/dictionary";

export default {
  name: "vehicleDetail",
  data() {
    return {};
  },
  props: ["model"],
  watch: {
    model: {
      handler(val) {
        // console.log('dataObj deep change', val)
      },
      deep: true, // 深度监听
      immediate: true, // 初次监听即执行
    }
  },
  mounted() {
  },
  methods: {
    color(num) {
      return dict.vehicleColors[num];
    },
    // closeDetail() {
    //   this.$emit("actionFinished", this.dialogId, false);
    // },
    type(num) {
      return dict.vehicleTypes[num];
    },
  },
  computed: {},
  beforeDestroy() {
  },
};
</script>

<style lang="less" scoped>
.vehicleDetail {
  font-size: 12PX;
  position: relative;
  width: 260PX;
  padding: 2PX 16PX 6PX 16PX;
  background-image: url("../../../assets/images/acci/detail-back-red.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;

  .head {
    height: 30PX;
    color: white;
    display: flex;
    align-items: center;

    span {
      display: inline-block;
    }

    .titleBefore {
      width: 25PX;
      height: 30PX;
      margin-right: 5PX;
      line-height: 30PX;
      background-image: url('../../../assets/images/acci/carIcon-red.png');
      background-position: center;
      background-repeat: no-repeat;
    }
  }

  .content {
    height: calc(100% - 25PX);
    display: flex;
    padding-top: 8PX;
    //flex-flow: row wrap;
    flex-direction: column;

    .detailItem {
      height: 30PX;
      line-height: 30PX;
      white-space: nowrap;
      color: white;
      //width: 50%;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;

      span {
        display: inline-block;
      }

      span.left {
        text-align: left;
        padding-left: 20PX;
        //width: 50%;
        background-image: url("../../../assets/images/acci/arrow-red.png");
        background-size: auto;
        background-repeat: no-repeat;
        background-position: left;
        color: rgba(207, 238, 255, 0.9);
      }

      span.right {

        text-align: left;
        color: white;

      }
    }
  }
}
</style>
