Commit 54160015 by 张立顺

fix bug

1 parent 2180530e
......@@ -15,7 +15,7 @@
</el-form-item>
<el-form-item label="" class="imgItem">
<img class="img" v-for="(item, index) in infoForm.constructionImgList" @click="
handleEnlargeImg(infoForm.constructionImgList, 'customerPhoto')
handleEnlargeImg(infoForm.constructionImgList, 'customerPhoto', index)
" :key="index" :src="item" alt="">
</el-form-item>
</el-form>
......@@ -74,10 +74,11 @@ export default {
closeImgViewer() {
this.imgVisible = false
},
handleEnlargeImg(url, name) {
handleEnlargeImg(url, name, index) {
this.imgVisible = !this.imgVisible
// this.imgList = url
console.log("url", url)
this.initialIndex = index
this.imgList = url
this.imgUrlName = name
},
......
......@@ -89,7 +89,7 @@
<img class="icon" v-else src="./images/picIcon.png" alt="">
<span class="label">{{ detail.payOrder.zyVoucherUrl.split(',').length == 1 &&
detail.payOrder.zyVoucherUrl.split(',')[0].split('.').pop().toLowerCase() == 'pdf' ? '文件' : '图片.jpg'
}}</span>
}}</span>
<span class="handle" @click="handleEnlargeFile(detail.payOrder.zyVoucherUrl)">点击查看
<span
v-if="detail.payOrder.zyVoucherUrl.split(',').length && detail.payOrder.zyVoucherUrl.split(',')[0].split('.').pop().toLowerCase() != 'pdf'">({{
......@@ -212,7 +212,7 @@
<el-table-column prop="cardCode" align="center" label="质保条形码">
<span slot-scope="scope">{{
scope.row.cardCode ? scope.row.cardCode : "无"
}}</span>
}}</span>
</el-table-column>
<el-table-column prop="nums" align="center" label="数量(件)">
<template slot-scope="scope">
......@@ -265,24 +265,6 @@
</p>
</div>
<!-- <el-dialog :visible="imgVisible"
:before-close="handleEnlargeImg">
<el-carousel :autoplay="false"
arrow="always"
trigger="click"
height="695px"
:initial-index="index"
ref="carousel">
<el-carousel-item v-for="(item, index) in imgList"
:key="index"
class="carousel">
<img :src="item[imgUrlName]"
alt=""
class="carousel-img">
</el-carousel-item>
</el-carousel>
</el-dialog> -->
<el-image-viewer v-if="imgVisible" :on-close="closeImgViewer" :url-list="imgList" :initial-index="initialIndex" />
<!-- 标记退款 -->
......@@ -429,7 +411,8 @@ export default {
this.imgVisible = !this.imgVisible
// this.imgList = url
console.log("url", url)
this.imgList = url.map((item) => item[name])
// this.imgList = url.map((item) => item[name])
this.imgList = url
this.imgUrlName = name
},
handleEnlargeFile(url) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!