zxl
2026-03-20 d5f3ca51818d635d3c5be7f73984b0e592a23ed4
src/views/dataAnalysis/components/CarInfoDetail.vue
@@ -14,7 +14,8 @@
        <a-col :span="6" style="border-right: 1px solid #343a44">
          <div class="flex" style="justify-content: space-between">
            <viewer>
              <img class="car_img" :src="detailData.imgPath" alt="" />
              <!-- <img class="car_img" :src="detailData.imgPath2" alt="" /> -->
              <img class="car_img" :src="getImgUrl(detailData.imgPath2)" alt="" />
            </viewer>
            <div class="flex flex-column" style="justify-content: space-between; height: 90px; align-items: flex-start">
              <div class="blue_text" style="font-size: 16px">{{ detailData.licenseNum }}</div>
@@ -88,7 +89,7 @@
          >
            <span slot="imgPath" slot-scope="imgPath">
              <viewer v-if="imgPath">
                <img :src="imgPath" alt="" style="width:100px;"/>
                <img :src="getImgUrl(imgPath)" alt="" style="width:100px;"/>
              </viewer>
              <span v-else>--</span>
            </span>
@@ -199,11 +200,19 @@
      oilPositionChart: null, //加油位偏好echarts
      visible: false,
      symIng: img,
      staticUrl: window._CONFIG['staticDomainURL'],
      detailData: {
        labelName: '',
      },
      columns: [
        {
        // {
        //   title: '进站图片',
        //   align: 'center',
        //   dataIndex: 'imgPath',
        //   width: 100,
        //   scopedSlots: { customRender: 'imgPath' },
        // },
         {
          title: '进站图片',
          align: 'center',
          dataIndex: 'imgPath',
@@ -266,7 +275,20 @@
  },
  props: ['orgCode'],
  methods: {
    getImgUrl(path) {
      if (!path) return this.symIng
      if (path.startsWith('http://') || path.startsWith('https://')) return path
      if (path.includes(':\\') || path.includes('/')) {
        try {
          return require('@/image/' + path.split(/[\\/]/).pop())
        } catch (e) {
          return this.symIng
        }
      }
      return this.staticUrl + path
    },
    show(data) {
      console.log(data)
      this.detailData = data
      this.visible = true
      this.loadData()