fix: BUG修改

This commit is contained in:
kun 2024-04-09 21:16:36 +08:00
parent bc78543744
commit 3c55d8bdfc
2 changed files with 50 additions and 16 deletions

View File

@ -4,7 +4,7 @@ NODE_ENV = 'development'
# 本地环境接口地址(/api/index.ts文件中使用) # 本地环境接口地址(/api/index.ts文件中使用)
# 后端本地 # 后端本地
# VITE_API_URL = 'http://192.168.34.221:9111' # VITE_API_URL = 'http://192.168.34.221:9111'
# VITE_API_URL = 'http://192.168.34.221:28888' VITE_API_URL = 'http://192.168.34.221:28888'
# VITE_API_URL = 'http://121.196.214.246/api' # VITE_API_URL = 'http://121.196.214.246/api'
# VITE_API_URL = 'http://jxj.zhgdyun.com:100' # VITE_API_URL = 'http://jxj.zhgdyun.com:100'
# VITE_API_URL = 'http://192.168.34.221:12360' # VITE_API_URL = 'http://192.168.34.221:12360'
@ -21,7 +21,7 @@ NODE_ENV = 'development'
# 七参数标准版(测试平台) # 七参数标准版(测试平台)
# VITE_API_URL = 'http://182.90.224.237:15551' # VITE_API_URL = 'http://182.90.224.237:15551'
# agjt # agjt
VITE_API_URL = 'http://47.93.215.234:9809' # VITE_API_URL = 'http://47.93.215.234:9809'
# 上传 # 上传
VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url=' VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url='

View File

@ -20,23 +20,43 @@
<el-scrollbar class="listBox" ref="refScrollbar"> <el-scrollbar class="listBox" ref="refScrollbar">
<template v-if="vehicleData.length > 0"> <template v-if="vehicleData.length > 0">
<div v-for="(item, index) in vehicleData" class="listStyle" :key="item.id"> <div v-for="(item, index) in vehicleData" class="listStyle" :key="item.id">
<div><span>{{ index + 1 }}</span></div> <div>
<div><span>{{ item.carNumber }}</span></div> <span>{{ index + 1 }}</span>
<div><span>{{ item.passTime }}</span></div> </div>
<div><span>{{ item.type == 1 ? "出" : "进" }}</span></div> <div>
<div><span>{{ item.location }}</span></div> <span>{{ item.carNumber }}</span>
<div><span>{{ item.carColor }}</span></div> </div>
<div><span>{{ item.carType ? carTypeList[item.carType - 1].name : "" }}</span></div> <div>
<span>{{ item.passTime }}</span>
</div>
<div>
<span>{{ item.type == 1 ? "出" : "进" }}</span>
</div>
<div>
<span>{{ item.location }}</span>
</div>
<div>
<span>{{ item.carColor }}</span>
</div>
<div>
<span>{{ item.carType ? carTypeList[item.carType - 1].name : "" }}</span>
</div>
<div class="list-img"> <div class="list-img">
<!-- <el-image <el-image
v-if="item.imageUrl" v-if="item.imageUrl"
fit="contain" fit="contain"
class="el-img" class="el-img"
:src="BASEURL + '/image/' + item.imageUrl" :src="BASEURL + '/image/' + item.imageUrl"
:preview-src-list="[BASEURL + '/image/' + item.imageUrl]" :preview-src-list="[BASEURL + '/image/' + item.imageUrl]"
> >
</el-image> --> <template #error>
<img src="@/assets/images/vehicleManagement/car.png" alt="" /> <div class="image-slot">
<el-image :src="noDataImage" :preview-src-list="[noDataImage]" fit="contain" class="el-img" alt="" />
</div>
</template>
</el-image>
<!-- <img v-else src="@/assets/images/vehicleManagement/car.png" alt="" /> -->
<el-image v-else :src="noDataImage" :preview-src-list="[noDataImage]" fit="contain" class="el-img" alt="" />
</div> </div>
<div class="list-img"> <div class="list-img">
<el-image <el-image
@ -46,8 +66,14 @@
:src="BASEURL + '/image/' + item.panoramaUrl" :src="BASEURL + '/image/' + item.panoramaUrl"
:preview-src-list="[BASEURL + '/image/' + item.panoramaUrl]" :preview-src-list="[BASEURL + '/image/' + item.panoramaUrl]"
> >
<template #error>
<div class="image-slot">
<el-image :src="noDataImage" :preview-src-list="[noDataImage]" fit="contain" class="el-img" alt="" />
</div>
</template>
</el-image> </el-image>
<img v-else src="@/assets/images/vehicleManagement/car.png" alt="" /> <!-- <img v-else src="@/assets/images/vehicleManagement/car.png" alt="" /> -->
<el-image v-else :src="noDataImage" :preview-src-list="[noDataImage]" fit="contain" class="el-img" alt="" />
</div> </div>
</div> </div>
</template> </template>
@ -64,7 +90,7 @@
import { reactive, ref, onMounted } from "vue"; import { reactive, ref, onMounted } from "vue";
import { getEntryAndExitListApi } from "@/api/modules/vehicle"; import { getEntryAndExitListApi } from "@/api/modules/vehicle";
import { GlobalStore } from "@/stores"; import { GlobalStore } from "@/stores";
import noDataImage from "@/assets/images/vehicleManagement/car.png" import noDataImage from "@/assets/images/vehicleManagement/car.png";
const store = GlobalStore(); const store = GlobalStore();
const BASEURL = import.meta.env.VITE_API_URL; const BASEURL = import.meta.env.VITE_API_URL;
const pageNo = ref(1 as any); const pageNo = ref(1 as any);
@ -226,7 +252,15 @@ onMounted(async () => {
width: 50px; width: 50px;
height: 25px; height: 25px;
} }
img{ .image-slot {
width: 50px;
height: 25px;
img {
width: 100%;
height: 100%;
}
}
> img {
width: 62px; width: 62px;
height: 62px; height: 62px;
} }
@ -236,7 +270,7 @@ onMounted(async () => {
width: 11%; width: 11%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center justify-content: center;
} }
} }
.listStyle:hover { .listStyle:hover {