|
@@ -52,8 +52,14 @@
|
|
|
<el-scrollbar style="height: 100%;">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col style="margin-bottom: 20px;" v-for="(item,index) in srcUrl" :key="index" :span="8">
|
|
|
- <el-image :src="'data:image/gif;base64,'+item.picData" :preview-src-list="srcList">
|
|
|
- </el-image>
|
|
|
+ <template v-if="isBase64(item.picData)">
|
|
|
+ <el-image style="height:100px;width: 100%;" :src="item.picData" :preview-src-list="srcList">
|
|
|
+ </el-image>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <el-image style="height:100px;width: 100%;" :src="'data:image/gif;base64,'+item.picData" :preview-src-list="srcList">
|
|
|
+ </el-image>
|
|
|
+ </template>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-scrollbar>
|
|
@@ -135,6 +141,13 @@ export default {
|
|
|
this.query = query
|
|
|
},
|
|
|
methods: {
|
|
|
+ isBase64 (base) {
|
|
|
+ if (base.includes('base64')) {
|
|
|
+ return true
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ },
|
|
|
//获取表头数据
|
|
|
async getColumnData (auth_id) {
|
|
|
try {
|
|
@@ -270,7 +283,11 @@ export default {
|
|
|
this.srcUrl = returnData
|
|
|
const datas = [...returnData]
|
|
|
datas.forEach(item => {
|
|
|
- urls.push('data:image/gif;base64,' + item.picData)
|
|
|
+ if (item.picData.includes('base64')) {
|
|
|
+ urls.push(item.picData)
|
|
|
+ } else {
|
|
|
+ urls.push('data:image/gif;base64,' + item.picData)
|
|
|
+ }
|
|
|
})
|
|
|
this.srcList = urls
|
|
|
} else {
|