给商品选择、单据查看和商品列表增加缩略图

This commit is contained in:
季圣华
2023-07-06 00:01:54 +08:00
parent d67fa0ccf6
commit 9d98db0eda
3 changed files with 81 additions and 14 deletions

View File

@@ -87,9 +87,9 @@
{{record.mBarCode}}
<a-popover placement="right" trigger="click">
<template slot="content">
<img :src='getImgUrl(record.imgName)' width="500px" />
<img :src="getImgUrl(record.imgName, '')" width="500px" />
</template>
<a-icon v-if="record.imgName" style="font-size: 18px" theme="twoTone" type="file-image" />
<img v-if="record.imgName" :src="getImgUrl(record.imgName, 'mini')" style="cursor:pointer; max-width:36px; max-height:27px;" title="查看大图" />
</a-popover>
</template>
<template slot="customName" slot-scope="text, record">
@@ -307,6 +307,13 @@
return ''
}
},
getImgMiniUrl(imgName) {
if(imgName && imgName.split(',')) {
return getFileAccessHttpUrl('systemConfig/static/mini/' + imgName.split(',')[0])
} else {
return ''
}
},
close() {
this.searchReset(0);
this.visible = false;