From 8d9fb2e0f15fcb2fc0035f8b8e12b614e580c499 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 19 Jan 2022 10:37:00 +0800
Subject: [PATCH] 许可证,营业执照图片预览

---
 src/views/securityCompany/companyDetails.vue |   30 +++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/src/views/securityCompany/companyDetails.vue b/src/views/securityCompany/companyDetails.vue
index 69c3390..6f230e6 100644
--- a/src/views/securityCompany/companyDetails.vue
+++ b/src/views/securityCompany/companyDetails.vue
@@ -211,8 +211,11 @@
                         class="avatar-uploader"
                         :show-file-list="false"
                       >
-                        <img v-if="businessObj.trading" :src="businessObj.trading" class="avatar" />
-                        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                        <el-image 
+                          style="width: 150px; height: 150px"
+                          :src="businessObj.trading" 
+                          :preview-src-list="tradingUrlList">
+                        </el-image>
                       </el-upload>
                     </el-form-item>
                   </el-col>
@@ -275,8 +278,11 @@
                         class="avatar-uploader"
                         :show-file-list="false"
                       >
-                        <img v-if="form.businessLicense" :src="form.businessLicense" class="avatar" />
-                        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                        <el-image 
+                          style="width: 150px; height: 150px"
+                          :src="form.businessLicense" 
+                          :preview-src-list="businessLicenseUrlList">
+                        </el-image>
                       </el-upload>
                     </el-form-item>
                   </el-col>
@@ -485,8 +491,11 @@
                         class="avatar-uploader"
                         :show-file-list="false"
                       >
-                        <img v-if="licenceForm.url" :src="licenceForm.url" class="avatar" />
-                        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                        <el-image 
+                          style="width: 150px; height: 150px"
+                          :src="licenceForm.url" 
+                          :preview-src-list="licenceUrlList">
+                        </el-image>
                       </el-upload>
                     </el-form-item>
                   </el-col>
@@ -549,8 +558,13 @@
     var w = 160,
       s = 12;
     return {
+      dialogImageUrl: '',
+      dialogVisible: false,
       businessObj:{},
       licenceForm:{},
+      licenceUrlList:[],
+      tradingUrlList:[],
+      businessLicenseUrlList:[],
       representativeVisiable: true,
       registerCapitalVisiable: true,
       fregionVisiable: false,
@@ -784,6 +798,7 @@
     initData() {
       var data = JSON.parse(this.$route.query.data);
       this.form = data;
+      this.businessLicenseUrlList.push(data.businessLicense);
       //单位列表进入
       var stats = data.stats;
       var deptId = data.departmentid;
@@ -820,10 +835,10 @@
         //查询分公司(及总公司)工商信息
         getBusinessInfo(deptId).then((res) => {
           that.businessObj = res.data.data;
+          that.tradingUrlList.push(res.data.data.trading);
           if (that.businessObj.id == -1) {
             that.businessObj.id = null;
           }
-          // console.log(that.businessObj,1234546);
         });
       }
       if (stats == "1") {
@@ -970,6 +985,7 @@
       var that = this;
       getLicenceDetail(this.deptId).then((res) => {
         that.licenceForm = res.data.data;
+        that.licenceUrlList.push(res.data.data.url);
       });
     },
     getManifestationData() {

--
Gitblit v1.9.3