Przeglądaj źródła

fix: 商用登录工程审核图片显示调整

Howie 1 rok temu
rodzic
commit
bb9878b035

+ 13 - 6
src/views/commercialEngineering/components/examine.vue

@@ -94,7 +94,7 @@
         <el-col :xs="24" :sm="24" :lg="24" class="item">
           <div class="label" style="height: auto">审核上传</div>
           <div class="value" style="height: auto">
-            <ImageUpload v-if="module !== 'detail'" class="mg-b" :file-list="formData.files"  :multiple="true"/>
+            <ImageUpload  class="mg-b" :file-list="formData.files"  :multiple="true"/>
             <!-- <template v-else>
               <div
                 v-for="item in formData.files"
@@ -208,14 +208,20 @@ export default {
     ...mapGetters(['isTradeExaminer', 'isCustomer'])
   },
   watch: {
-    async 'formData.id'(newValue, oldValue) {
+
+     'formData.id':{
+      immediate: true,
+      handler() {
+        if (this.formData.id) {
       if(this.formData.files.length){
-        this.showImage(this.formData.files)
+        console.log(this.formData.files)
+        this.formData.files = this.showImage(this.formData.files)
       }
-       this.getData()
-
+    this.getData()
+    }      }
     }
   },
+
   methods: {
     handleSuccess(val) {
       const res = val[0]
@@ -238,7 +244,7 @@ export default {
         arr.forEach(k => {
           if (k.fileUrl && k.fileUrl !== '0') {
             newArr.push({
-              hover: true,
+              hover: false,
               name: '',
               url: k.fileUrl
             })
@@ -278,6 +284,7 @@ export default {
       document.body.removeChild(link)
     },
     getData() {
+      console.log(333)
       if (!this.formData.successLoginProject) return
       const params = {
         pageNum: 1,