Răsfoiți Sursa

fix:跟进记录增加照片查看

liujt 9 luni în urmă
părinte
comite
2372e0a60f
1 a modificat fișierele cu 36 adăugiri și 1 ștergeri
  1. 36 1
      src/views/saleManage/followList/components/viewDialog.vue

+ 36 - 1
src/views/saleManage/followList/components/viewDialog.vue

@@ -34,6 +34,10 @@
         <fileMain v-model="row.files" type="view"></fileMain>
       </template>
 
+      <template v-slot:imgs="{ row }">
+         <el-button v-if="row.imgs && row.imgs.length > 0" type="primary" @click="viewImgs(row)">查看</el-button>
+      </template>
+
       <template v-slot:toolbar v-if="showAction">
         <el-button
           size="small"
@@ -74,6 +78,23 @@
       <el-button @click="cancel">返回</el-button>
     </div>
 
+    <ele-modal
+      custom-class="ele-dialog-form long-dialog-form"
+      :centered="true"
+      :visible.sync="imgVisible"
+      :title="'照片'"
+      :append-to-body="true"
+      :close-on-click-modal="true"
+      width="70%"
+      :before-close="viewImgs"
+      :maxable="true"
+      :resizable="true"
+    >
+      <div class="ele-border-lighter sys-organization-list">
+        <img style="width: 160px; margin-right: 10px; margin-bottom: 10px;" v-for="(item, index) in rowImgs" :key="index" :src="item" alt="" srcset="">
+      </div>
+    </ele-modal>
+
     <pop-el-modal
       :popVisible.sync="delVisible"
       content="是否确定删除?"
@@ -192,6 +213,14 @@
             slot: 'files',
             showOverflowTooltip: true,
             minWidth: 110
+          },
+          {
+            prop: 'imgs',
+            label: '照片',
+            align: 'center',
+            slot: 'imgs',
+            showOverflowTooltip: true,
+            minWidth: 110
           }
         ];
 
@@ -220,7 +249,9 @@
         showAction: false,
         current: {},
         delVisible: false,
-        selection: []
+        selection: [],
+        imgVisible: false,
+        rowImgs: []
       };
     },
     mounted() {},
@@ -238,6 +269,10 @@
           this.reload(params);
         });
       },
+      viewImgs(row) {
+        this.rowImgs = row.imgs;
+        this.imgVisible = !this.imgVisible
+      },
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
         return getTableList({