缴费凭证图片显示问题

This commit is contained in:
zhaoxiao
2021-12-24 18:01:37 +08:00
parent c729243535
commit a8bb841dd9
2 changed files with 16 additions and 5 deletions
@@ -197,7 +197,6 @@ export default {
this.$refs.previewImg.title = '缴费凭证' this.$refs.previewImg.title = '缴费凭证'
this.$refs.previewImg.imgId = imgId this.$refs.previewImg.imgId = imgId
this.$refs.previewImg.visible = true this.$refs.previewImg.visible = true
console.log()
} }
} }
} }
@@ -36,7 +36,7 @@
<div class="proof-img" v-if="proofType === 'img'"> <div class="proof-img" v-if="proofType === 'img'">
<template v-if="proofInfo.proof && proofInfo.proof !== ''"> <template v-if="proofInfo.proof && proofInfo.proof !== ''">
<div class="proof-img-item" v-for="(item, index) in proofInfo.proof.split(',')" :key="index"> <div class="proof-img-item" v-for="(item, index) in proofInfo.proof.split(',')" :key="index">
<img :src="proofSrc(item)"> <img :src="proofSrc(item)" @click="previewImg(item)">
</div> </div>
</template> </template>
</div> </div>
@@ -80,6 +80,9 @@
</a-form-item> </a-form-item>
</div> </div>
</a-form> </a-form>
<!-- 缴费凭证预览-->
<preview-img-modal ref="previewImg"></preview-img-modal>
</j-modal> </j-modal>
</template> </template>
@@ -90,10 +93,11 @@ import Vue from 'vue'
import { USER_INFO } from '../../../../store/mutation-types' import { USER_INFO } from '../../../../store/mutation-types'
import { getLastProofInfo, getStanderMemberLastProofInfo, getCertificateLastProofInfo } from '../../../../api/incomePaymentsApi' import { getLastProofInfo, getStanderMemberLastProofInfo, getCertificateLastProofInfo } from '../../../../api/incomePaymentsApi'
import PreviewFile from '../../../../components/jero/PreviewFile.vue' import PreviewFile from '../../../../components/jero/PreviewFile.vue'
import PreviewImgModal from '@/components/PreviewImgModal'
export default { export default {
name: 'AuditProofModule', name: 'AuditProofModule',
components: { PreviewFile }, components: { PreviewFile, PreviewImgModal },
data() { data() {
return { return {
title: '来款信息', title: '来款信息',
@@ -266,6 +270,14 @@ export default {
*/ */
proofSrc(imgId) { proofSrc(imgId) {
return `${ window._CONFIG['domianURL'] }/sys/common/download/${ imgId }` return `${ window._CONFIG['domianURL'] }/sys/common/download/${ imgId }`
},
/**
* 预览缴费凭证
*/
previewImg(imgId) {
this.$refs.previewImg.title = '缴费凭证'
this.$refs.previewImg.imgId = imgId
this.$refs.previewImg.visible = true
} }
} }
} }
@@ -312,11 +324,11 @@ h3.title::before {
.proof-img { .proof-img {
&-item { &-item {
width: calc(100% - 6rem);
img { img {
max-width: 100%; max-width: 100%;
max-height: 200px; max-height: 200px;
cursor: pointer;
} }
} }
} }