修改图片显示

master
suixy 1 week ago
parent d24aec4219
commit 51e72eba79

@ -91,6 +91,20 @@
<div class="index">{{ k + 1 }}</div> <div class="index">{{ k + 1 }}</div>
<div class="title">{{ i.deviceName }}</div> <div class="title">{{ i.deviceName }}</div>
<div style="position: absolute;left: 27%;top: 0px;width: 45%;height: 100%;"> <div style="position: absolute;left: 27%;top: 0px;width: 45%;height: 100%;">
<div style="width: 100%; height: 100%" v-if="Object.keys(i.deviceDataMap).find(e=>(i.deviceDataMap[e].toString().includes('http')))">
<el-image
fit="contain"
style="width: 100%; height: calc(100% - 20px)"
: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 class="infoItem" style="width: 100%;height: 20px">
<div class="span" style="line-height: 20px"> 时间 :</div>
<div class="spanBg" style="line-height: 20px;height: 20px"></div>
<div class="num" style="line-height: 20px">{{ i.updateTime }}</div>
</div>
</div>
<div v-if="!Object.keys(i.deviceDataMap).find(e=>(i.deviceDataMap[e].toString().includes('http')))">
<div <div
v-for="val in Object.keys(i.deviceDataMap).slice(0,4).filter(e=> !(i.deviceDataMap[e].toString().includes('http')))" v-for="val in Object.keys(i.deviceDataMap).slice(0,4).filter(e=> !(i.deviceDataMap[e].toString().includes('http')))"
:style="'width:'+(Object.keys(i.deviceDataMap).length<=2 ? '100%':'50%')" class="infoItem"> :style="'width:'+(Object.keys(i.deviceDataMap).length<=2 ? '100%':'50%')" class="infoItem">
@ -103,6 +117,7 @@
<div class="spanBg"></div> <div class="spanBg"></div>
<div class="num">{{ i.updateTime }}</div> <div class="num">{{ i.updateTime }}</div>
</div> </div>
</div>
</div> </div>
<div class="btn"> <div class="btn">
@ -153,9 +168,18 @@
v-if="historyTh[i]" v-if="historyTh[i]"
:prop="i" :prop="i"
:label="historyTh[i]" :label="historyTh[i]"
width="180"> >
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="historyTh[i] === '时间'">{{ parseTime(scope.row['ts']) }}</div> <div v-if="scope.row[i].includes('http')">
<el-image
fit="contain"
style="width: 100%; height: 100%"
:src="scope.row[i]"
:preview-src-list="[scope.row[i]]">
</el-image>
</div>
<div v-else-if="historyTh[i] === ''">{{ parseTime(scope.row['ts']) }}</div>
<div v-else>{{ scope.row[i] }}</div> <div v-else>{{ scope.row[i] }}</div>
</template> </template>
</el-table-column> </el-table-column>

Loading…
Cancel
Save