修改图片显示

dev
夜笙歌 1 year ago
parent fc7dca2601
commit 28cf30d594

@ -68,8 +68,15 @@
<div v-for="i in acquisitionList" class="item"> <div v-for="i in acquisitionList" class="item">
<div class="iconBg"></div> <div class="iconBg"></div>
<div <div
:style="'background-image: url('+i.deviceDataMap[Object.keys(i.deviceDataMap).find(e=> i.deviceDataMap[e].toString().includes('http'))] ? i.deviceDataMap[Object.keys(i.deviceDataMap).find(e=> i.deviceDataMap[e].toString().includes('http'))]:''+')'" class="icon">
class="icon"></div>
<el-image
v-if="i.deviceDataMap[Object.keys(i.deviceDataMap).find(e=> i.deviceDataMap[e].toString().includes('http'))]"
style="width: 100%; height: 100%"
:src="i.deviceDataMap[Object.keys(i.deviceDataMap).find(e=> i.deviceDataMap[e].toString().includes('http'))]"
:preview-src-list="[i.deviceDataMap[Object.keys(i.deviceDataMap).find(e=> i.deviceDataMap[e].toString().includes('http'))]]">
</el-image>
</div>
<div class="rightBg"> <div class="rightBg">
<div class="title">{{ i.deviceName }}</div> <div class="title">{{ i.deviceName }}</div>
<div style="position: absolute;left: 24%;top: 0px;width: 55%;height: 100%;"> <div style="position: absolute;left: 24%;top: 0px;width: 55%;height: 100%;">

@ -57,7 +57,17 @@
<el-table v-if="show" :cell-style="setStyle" <el-table v-if="show" :cell-style="setStyle"
:data="tableData" :header-cell-style="{ textAlign: 'center',backgroundColor:'#0a457d' }" :data="tableData" :header-cell-style="{ textAlign: 'center',backgroundColor:'#0a457d' }"
style="width: 100%;margin-top: 12px;"> style="width: 100%;margin-top: 12px;">
<el-table-column v-for="i in deviceDataColumns" :label="i.columnName" :prop="i.columnKey"> <el-table-column v-for="i in deviceDataColumns" :label="i.columnName" :prop="i.columnKey">\
<template slot-scope="scope">
<el-image
v-if="scope.row[i.columnKey].includes('http')"
style="width: 100px; height: 100px"
:src="scope.row[i.columnKey]"
:preview-src-list="[scope.row[i.columnKey]]">
</el-image>
<span v-else>{{scope.row[i.columnKey]}}</span>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination v-show="!isMap" :currentPage="currentPage" :pageSize="10" :total="total" background <el-pagination v-show="!isMap" :currentPage="currentPage" :pageSize="10" :total="total" background

Loading…
Cancel
Save