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/index.vue        |    8 +++-
 src/main.js                                 |   10 ++---
 src/components/page/ticket/picture-form.vue |   72 ++++++++++++++++++++++++------------
 3 files changed, 58 insertions(+), 32 deletions(-)

diff --git a/src/components/page/ticket/index.vue b/src/components/page/ticket/index.vue
index 997f997..6e54bd2 100644
--- a/src/components/page/ticket/index.vue
+++ b/src/components/page/ticket/index.vue
@@ -120,6 +120,7 @@
             label="澶囨敞">
           </el-table-column>
           <el-table-column
+              width="300px"
                   fixed="right"
                   header-align="center"
                   align="center"
@@ -128,7 +129,7 @@
               <el-button  type="text" size="small" icon="el-icon-document" @click="addOrUpdateHandle(scope.row.id)">澶勫喅涔�</el-button>
               <el-button  type="text" size="small" icon="el-icon-document-checked" @click="addOrUpdateHandle2(scope.row)">閫佽揪鍥炶瘉</el-button>
               <el-button  type="text" size="small" icon="el-icon-view" @click="pictureHandle(scope.row)">鍥惧儚璇佹嵁</el-button>
-              <el-button  type="text" size="small" icon="el-icon-delete" @click="onDelete(scope.row.id)">鎾ら攢</el-button>
+              <el-button  v-if="items==2" type="text" size="small" icon="el-icon-delete" @click="onDelete(scope.row.id)">鎾ら攢</el-button>
 <!--              <el-button  type="text" size="small" icon="el-pay6zhifu" @click="jiaofeiHandle(scope.row.id)">鐜板満缂磋垂</el-button>-->
             </template>
           </el-table-column>
@@ -149,6 +150,7 @@
   import TableForm from './ticket-form'
   import TableForm2 from './ticket-form2'
   import pictureForm from './picture-form'
+  import {mapState} from 'vuex'
   export default {
     data () {
       return {
@@ -187,7 +189,9 @@
       this.tableHeight = window.innerHeight - 255
     },
     computed: {
-
+      ...mapState({
+        items:'roles'
+      }),
     },
     methods: {
       // 鑾峰彇鏁版嵁鍒楄〃
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;*/
diff --git a/src/main.js b/src/main.js
index 1230d2b..ee6e59d 100644
--- a/src/main.js
+++ b/src/main.js
@@ -47,9 +47,7 @@
 
 Vue.use(ViewUI);
 Vue.config.productionTip = false
-Vue.use(ElementUI, {
-    size: 'small'
-});
+Vue.use(ElementUI);
 
 import echarts from 'echarts'
 Vue.prototype.$echarts = echarts;
@@ -84,7 +82,7 @@
 Vue.prototype.$byutil = byUtils
 Vue.prototype.$stringUtil = StringUtil
 Vue.prototype.$tscPrintUtil = TscPrintUtil
-// const rolesList = JSON.parse(localStorage.getItem('userRouters')) 
+// const rolesList = JSON.parse(localStorage.getItem('userRouters'))
 //浣跨敤閽╁瓙鍑芥暟瀵硅矾鐢辫繘琛屾潈闄愯烦杞�
 // router.beforeEach((to, from, next) => {
 //     let user = byUtils.getUser()
@@ -95,9 +93,9 @@
 //    console.log(to,"瑙﹀彂浜�",router.options.routes);
 //    // type 2 : all admin
 //    // type 0 :  娉婅溅 id:2
-//    // type 1 :  鎵ф硶 id:3 
+//    // type 1 :  鎵ф硶 id:3
 
-  
+
 
 //    next();
 //         //

--
Gitblit v1.9.1