From b924e4fe906c3e1b4e804ed9d073e09db76fc710 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期一, 23 三月 2026 17:14:41 +0800
Subject: [PATCH] 修改
---
src/views/dataAnalysis/components/CarInfoDetail.vue | 52 +++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 49 insertions(+), 3 deletions(-)
diff --git a/src/views/dataAnalysis/components/CarInfoDetail.vue b/src/views/dataAnalysis/components/CarInfoDetail.vue
index ce54739..721e71b 100644
--- a/src/views/dataAnalysis/components/CarInfoDetail.vue
+++ b/src/views/dataAnalysis/components/CarInfoDetail.vue
@@ -14,7 +14,7 @@
<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="getCarModelImgUrl()" 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 +88,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 +199,34 @@
oilPositionChart: null, //鍔犳补浣嶅亸濂絜charts
visible: false,
symIng: img,
+ staticUrl: window._CONFIG['staticDomainURL'],
detailData: {
labelName: '',
},
+ // 杞﹀瀷ID鍒板浘鐗囩殑鏄犲皠
+ carModelImageMap: {
+ '1': '灏忚溅.png',
+ '2': '璐ц溅.png',
+ '3': '娌圭綈杞�.png',
+ '4': '鎽╂墭杞�.png',
+ '5': '涓夎疆杞�.png',
+ '6': '鍏氦杞�.png',
+ '7': '鑷杞�.png',
+ '8': '鎸栨帢鏈�.png',
+ '9': '涓瀷璐ц溅.png',
+ '10': '涓瀷杞胯溅.png',
+ '11': '杞诲瀷璐ц溅.png',
+ '12': '閲嶅瀷璐ц溅.png',
+ },
columns: [
- {
+ // {
+ // title: '杩涚珯鍥剧墖',
+ // align: 'center',
+ // dataIndex: 'imgPath',
+ // width: 100,
+ // scopedSlots: { customRender: 'imgPath' },
+ // },
+ {
title: '杩涚珯鍥剧墖',
align: 'center',
dataIndex: 'imgPath',
@@ -266,7 +289,30 @@
},
props: ['orgCode'],
methods: {
+ getCarModelImgUrl() {
+ if (this.detailData.modelId && this.carModelImageMap[this.detailData.modelId]) {
+ try {
+ return require('@/image/' + this.carModelImageMap[this.detailData.modelId])
+ } catch (e) {
+ return this.symIng
+ }
+ }
+ return this.symIng
+ },
+ 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