26
0

2 Commits 70ebd691d8 ... 73aea94efd

Autor SHA1 Nachricht Datum
  qule 73aea94efd Merge branch 'master' of http://39.106.8.246:3003/BDTP/adm-frontend vor 3 Jahren
  qule 054e5198e0 cad bug修改 vor 3 Jahren
2 geänderte Dateien mit 13 neuen und 13 gelöschten Zeilen
  1. 1 1
      src/components/cadDrawingManage/index.vue
  2. 12 12
      src/components/uploadFile/index.vue

+ 1 - 1
src/components/cadDrawingManage/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: ql
  * @Date: 2022-01-11 14:46:04
- * @LastEditTime: 2022-01-25 12:08:13
+ * @LastEditTime: 2022-01-25 15:28:06
  * @LastEditors: Please set LastEditors
  * @FilePath: \adm-frontend\src\components\cadDrawingManage\index.vue
 -->

+ 12 - 12
src/components/uploadFile/index.vue

@@ -45,6 +45,7 @@
 import { mapState, mapMutations } from 'vuex'
 import { PROGRESS_BG_COLOR } from './constant'
 import FileController from '@/controller/fileController'
+import { logicConfig } from "@/logicConfig";
 export default {
     components: {
 
@@ -58,15 +59,15 @@ export default {
             PROGRESS_BG_COLOR, 
             synced: 0,
             isHasError: false,  //上传是否出现错误
-            uploadSuccessList: [],
+            // uploadSuccessList: [],
         }
     },
     watch: {
         async uploadVisible(nv, ov) {
             const that = this;
             this.synced = 0
+            const successList = [];
             if (nv) {
-
                 this.uploading = true
                 const res = await FileController.uploadFiles({
                     uploadProgressCall(_obj) {
@@ -75,23 +76,22 @@ export default {
                     oneUploadedCall(_obj) {
                         that.synced  += 1
                         that.percentage = (that.synced / that.fileList?.length) * 100;
-                        if(that.percentage === 100) {
-                            that.uploading = false
-                        }
-                        that.uploadSuccessList.push(_obj)
+                        successList.push(_obj)
+                        
                     },
                     files: that.fileList
                 });
-            }
-        },
-        uploading(nv, ov) {
-            if(!nv){
-                this.updata({successList: this.uploadSuccessList})
+                if(res.result === logicConfig.resultObj.success) {
+                    this.updata({successList})
+                }
+                this.uploading = false;
+                
+                
             }
         }
     },
     computed: {
-        ...mapState('uploadFile', ['uploadVisible', 'fileList'])
+        ...mapState('uploadFile', ['uploadVisible', 'fileList', "successList"])
     },
 
     mounted() {