Ver código fonte

消息图片

gangyj 3 anos atrás
pai
commit
50f9883085
1 arquivos alterados com 45 adições e 13 exclusões
  1. 45 13
      src/views/news/news.vue

+ 45 - 13
src/views/news/news.vue

@@ -21,10 +21,15 @@
         slot="imageUrl"
         slot-scope="scope"
       >
-        <el-button
+        <!-- <el-button
           v-if="scope.row.imageUrl.length>0"
           size="small"
           @click="openPreview(scope.row.imageUrl,scope.$index)"
+        >图片</el-button> -->
+        <el-button
+          v-if="scope.row.imageUrl.length>0"
+          size="small"
+          @click="openPreview(scope.row)"
         >图片</el-button>
       </template>
       <!-- 提交进度 -->
@@ -107,6 +112,26 @@
         >确 定</el-button>
       </span>
     </el-dialog>
+
+    <el-dialog
+      title=""
+      :visible.sync="imgVisible"
+      append-to-body
+      width="80%">
+      <div class="mg-b-20">{{curNew.projectName}}——{{curNew.contractName}}</div>
+      <div class="mg-b-20">问题描述:{{curNew.problemType}}</div>
+      <div class="mg-b-20">
+        <span class="mg-r-20">反馈人员:{{curNew.submitUserName}}</span>
+        <span class="mg-r-20">电话:{{curNew.submitPhone}}</span>
+        <span class="mg-r-20">岗位:</span>
+      </div>
+      <div class="mg-b-20">反馈时间:{{curNew.createTime}}</div>
+      <el-carousel trigger="click" height="500px" :autoplay="false" style="text-align:center;">
+        <el-carousel-item v-for="item in curNew.imageUrl" :key="item">
+          <el-image :src="item" fit="scale-down" style="height:500px;" :preview-src-list="curNew.imageUrl"></el-image>
+        </el-carousel-item>
+      </el-carousel>
+    </el-dialog>
   </basic-container>
 </template>
 
@@ -191,7 +216,10 @@ export default {
             slot: true,
           },
         ]
-      }
+      },
+
+      imgVisible:false,
+      curNew:{},
     };
   },
   computed: {
@@ -219,17 +247,21 @@ export default {
         this.operation.manageTime = '';
       }
     },
-    openPreview (imageUrl, index) {
-      let imageUrls = []
-      imageUrl.forEach(val => {
-        imageUrls.push({ url: val })
-      });
-      this.$ImagePreview(imageUrls, index, {
-        closeOnClickModal: true,
-        // beforeClose:()=>{
-        //   this.$message.success('关闭回调')
-        // }
-      });
+    // openPreview (imageUrl, index) {
+    //   let imageUrls = []
+    //   imageUrl.forEach(val => {
+    //     imageUrls.push({ url: val })
+    //   });
+    //   this.$ImagePreview(imageUrls, index, {
+    //     closeOnClickModal: true,
+    //     // beforeClose:()=>{
+    //     //   this.$message.success('关闭回调')
+    //     // }
+    //   });
+    // },
+    openPreview(row){
+      this.imgVisible = true;
+      this.curNew = row;
     },
     changeProgres (row) {
       this.curRow = { ...row }