From d5f3ca51818d635d3c5be7f73984b0e592a23ed4 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期五, 20 三月 2026 16:11:04 +0800
Subject: [PATCH] 修改
---
src/views/dataAnalysis/components/CarInfoDetail.vue | 28 +++++++++++++++++++++++++---
1 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/src/views/dataAnalysis/components/CarInfoDetail.vue b/src/views/dataAnalysis/components/CarInfoDetail.vue
index ce54739..bb55720 100644
--- a/src/views/dataAnalysis/components/CarInfoDetail.vue
+++ b/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, //鍔犳补浣嶅亸濂絜charts
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()
--
Gitblit v1.8.0