Ver Fonte

bug修复

codeMan há 1 ano atrás
pai
commit
7b2c4e37d5

+ 1 - 1
src/MAR/assetsStore/detail/fileUpload.vue

@@ -186,10 +186,10 @@ const createFileRecord = async (obsfilename)=> {
     "content":obj
   }
   const res = await Api.requested(param)
-  emit('uploadSuccess',res)
   currentIndex.value++
   console.log(currentIndex.value,fileList.value.length);
   if (currentIndex.value >= fileList.value.length) {
+    emit('uploadSuccess',res)
     callback.value && callback.value()
     console.log('上传完成触发');
     emit('uploadOver')

+ 3 - 3
src/MAR/signManage/modules/Edit.vue

@@ -80,7 +80,8 @@
                 <!-- <Upload :multiple="false" ref="upload" :bindData="bindData" accept="image/*,video/*" @fileChange="form.attinfos='1'"></Upload> -->
                 <Upload 
                   :bindData="bindData"
-                  @fileChange="form.attinfos='1'"  
+                  @uploadSuccess="loading=false"
+                  @fileChange="form.attinfos='1';loading=true"  
                   :multiple="true"
                   accept="image/* , video/*"
                   ref="upload"
@@ -145,7 +146,7 @@
     form.value.qrcodecontent = data.record.appleturl
     selectProduct.value.modeVisible = false
   }
-
+  let loading = ref(false)
   let upload = ref()
   let bindData = ref({})
   const showDrawer = async ()=>{
@@ -183,7 +184,6 @@
       }
       utils.message(res,'操作成功',() => {
         open.value = false
-        emit('onSuccess')
         refresh()
         loading.value = false
       })