From 105abcb08f5d1c1114ce0e093d1a4912fbbfd609 Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期五, 09 六月 2023 16:43:47 +0800
Subject: [PATCH] 修改前端页面

---
 src/components/page/ticket/picture-form.vue |   72 ++++++++++++++++++++++++------------
 1 files changed, 48 insertions(+), 24 deletions(-)

diff --git a/src/components/page/ticket/picture-form.vue b/src/components/page/ticket/picture-form.vue
index 876a08d..e842831 100644
--- a/src/components/page/ticket/picture-form.vue
+++ b/src/components/page/ticket/picture-form.vue
@@ -1,22 +1,25 @@
 <template>
     <div>
       <el-dialog
+          class="pic-dia"
         title="鍥惧儚璇佹嵁"
         :close-on-click-modal="false"
         :visible.sync="visible"
-        v-dialogDrag>
-        <div class="previewDialog" v-for="(item,index) in pictureList" :key="index">
-          <img
-            style="width: 100%"
-            :src="item.url"
-            :preview="item.preview"
-            :preview-text="item.title"
-            alt="">
-          <!--<div class="enlargeBox">
-            <img
-              :src="item.larg"
-              alt="">
-          </div>-->
+        v-dialogDrag
+        >
+        <div class="demo-image__preview">
+          <div class="preview-box">
+          <div v-for="item in  pictureList" :key="Math.random()"
+          >
+            <el-image
+                :src="item"
+                style="width: 100px;height: 200px"
+                :preview-src-list="[item]"
+            >
+            </el-image>
+          </div>
+            </div>
+
         </div>
       </el-dialog>
     </div>
@@ -33,33 +36,54 @@
         },
         methods: {
             init(data) {
-
+                this.pictureList=[]
                 this.visible = true
-                this.pictureList = data.map((item,index) => {
-                    return {
-                        url: this.$systemconfig.basePath+'/ffzf/fileInfo/showImg?path='+item,
-                        title: item,
-                        preview:'1',
-                        //larg: require('@/assets/img/enlarge.png')
-                    }
-                })
+                // this.pictureList = data.map((item,index) => {
+                //     return {
+                //         url: this.$systemconfig.basePath+'/ffzf/fileInfo/showImg?path='+item,
+                //         // title: item,
+                //         // preview:'1',
+                //         //larg: require('@/assets/img/enlarge.png')
+                //     }
+                // })
+                for (let i = 0; i < data.length; i++) {
+                  let a= this.$systemconfig.basePath+'/ffzf/fileInfo/showImg?path='+data[i]
+                  this.pictureList.push(a.toString())
+                }
                 this.$previewRefresh();
-                console.log(this.pictureList,'pictureList-----pictureList')
+                console.log(this.pictureList)
             }
         }
     }
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
   .pswp{
     z-index: 9999;
+    display: none;
   }
+  .preview-box{
+    display: flex;
+    flex-wrap: wrap;
+    overflow: auto;
+    div{
+      margin: 5px;
+    }
+  }
+  .pic-dia{
+    ::v-deep.el-dialog{
+      width: 40%;
+      height: 60%;
+    }
+  }
+
 
 </style>
 <style lang="scss" scoped>
   .previewDialog{
     position: relative;
     cursor: pointer;
+    height: 1000px;
     /*.enlargeBox{*/
     /*  position: absolute;*/
     /*  z-index: 99999;*/

--
Gitblit v1.9.1