From 873e053d9129c89726d61ef59df91267328d7308 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 10 十一月 2023 15:31:49 +0800
Subject: [PATCH] 产品图表-图片点击大图预览

---
 src/views/productManage/product/index.vue |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/views/productManage/product/index.vue b/src/views/productManage/product/index.vue
index cf639f7..c270838 100644
--- a/src/views/productManage/product/index.vue
+++ b/src/views/productManage/product/index.vue
@@ -37,6 +37,9 @@
               v-if="item.attachmentList?.length > 0"
               style="width: 60px; height: 80px"
               :src="item.attachmentList[0].FileUrl"
+              :preview-src-list="item.srcList"
+              :z-index="9999"
+              @click.stop="imgClick"
             ></el-image>
             <div v-else class="img-view">
               <i class="el-icon-picture-outline"></i>
@@ -246,8 +249,20 @@
       }).then((res) => {
         if (res.code === 200) {
           const list = res.data.map((item) => {
+            let srcList = []
+            if (item.attachmentList?.length > 0) {
+              item.attachmentList.forEach((ele) => {
+                if (ele.fileType === "picture") {
+                  srcList.push(ele.FileUrl)
+                }
+              })
+            } else {
+              srcList = []
+            }
+
             return {
-              ...item
+              ...item,
+              srcList
             }
           })
           this.tableList.tableInfomation = list || []
@@ -302,7 +317,8 @@
     delSelectClick() {
       this.categoryId = 0
       this.getData()
-    }
+    },
+    imgClick() {}
   }
 }
 </script>

--
Gitblit v1.8.0