carDetail.vue 4.42 KB
<template>
<div>
       <el-dialog title="车辆详情" :visible.sync="isShow"  v-loading.body="loading" class="facedetail-box" :before-close="closedialong">
                <div class="detail-aline"></div>
                <el-row class="alarm-info-box">
                    <el-col :span="24" class='row'>
                        <el-col :span="12">
                            <span class="info-label"><span class="info-label-name">库类型:</span></span>
                            <span class="info-text">{{detailInfo.lib}}</span>
                        </el-col>
                        <el-col :span="12">
                            <span class="info-label"><span class="info-label-name">车牌号码:</span></span>
                            <span class="info-text">{{detailInfo.vehicle.plate_text}}</span>
                        </el-col>
                    </el-col>
                     <el-col :span="24" class='row'>
                        <el-col :span="12">
                            <span class="info-label"><span class="info-label-name">车牌类型:</span></span>
                            <span class="info-text">{{getCode('号牌类型',detailInfo.vehicle.plate_type)}}</span>
                        </el-col>
                        <el-col :span="12">
                            <span class="info-label"><span class="info-label-name">车辆类型:</span></span>
                            <span class="info-text">{{getCode('车辆类型',detailInfo.vehicle.vehicle_type)}}</span>
                        </el-col>
                    </el-col>
                     <el-col :span="24" class='row'>
                        <el-col :span="12">
                            <span class="info-label"><span class="info-label-name">车身颜色:</span></span>
                            <span class="info-text">{{getCode('车身颜色',detailInfo.vehicle.body_color)}}</span>
                        </el-col>
                        <el-col :span="12">
                            <span class="info-label"><span class="info-label-name">车主姓名:</span></span>
                            <span class="info-text">{{detailInfo.owner.name}}</span>
                        </el-col>
                    </el-col>
                     <el-col :span="24" class='row'>
                        <el-col :span="12">
                            <span class="info-label"><span class="info-label-name">身份证号:</span></span>
                            <span class="info-text">{{detailInfo.owner.cnsf_id}}</span>
                        </el-col>
                    </el-col>
                    <el-col :span="10">
                        <el-col :span="7" v-for="path in detailInfo.pics" :key="path.unid" class="pic-box">
                            <img :src="path.url_path" alt="">
                        </el-col>
                    </el-col>
                </el-row>
                <span slot="footer" class="dialog-footer">
                    <el-button @click="closedialong">关闭</el-button>
                </span>
            </el-dialog>
            </div>
</template>
<script>
export default {
  data() {
    return {
      isShow: false,
      disabled: true,
      detailInfo: {
        owner:{},
        vehicle:{}
      },
      loading: true,
      cData: "",
      dbData: [],
      cartypeData:[]
    };
  },

  methods: {
    dataInit(data){
      console.log(data)
      let obj = data
      obj.lib = this.$parent.setLib(1,1,data.lib_code)
      this.detailInfo = data
      this.isShow = true
    },
    closedialong() {
      this.isShow = false
    },
    getFaceDetail(data) {
      this.axios.get(FACEWS + "/faces/" + data.unid).then((response)=> {
        this.detailInfo = response.data;
        this.loading = false;
      });
    },
    initDbData() {
      this.axios
        .get(this.IP + "/api/v1/codes/custom/cates/4DD23AF66E/codes")
        .then(response => {
          this.dbData = response.data.list_data;
        });
    },
    initcartypeData() {
      this.axios
        .get(this.IP + "/api/v1/codes/simple/cates/09BB973F92/codes")
        .then(response => {
          this.cartypeData = response.data.list_data;
        });
    }
  },
  created() {
    this.initDbData();
    this.initcartypeData();
  }
};
</script>
<style lang="stylus" scoped>
.alarm-info-box {
    max-height: 500px;
    overflow: auto;
}

.pic-box {
    margin-right: 5%;

    img {
        width: 100%;
        height: 100%;
    }
}
.row
  margin-bottom 15px
</style>