소스 검색

优化批量上传说明书

zhuliu 1 년 전
부모
커밋
700fdf34b7
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      src/utils/model/ImportProgress/index.vue

+ 6 - 2
src/utils/model/ImportProgress/index.vue

@@ -92,7 +92,7 @@ export default {
         // console.log(fileChunks)
         // return
         // fileChunks = [1,2,3,4,5]
-        this.len = fileChunks.length + 3
+        this.len = fileChunks.length + 4
         
           getFileMD5(this.form.file, async (md5) => {
             this.record('文件MD5:' + md5)
@@ -103,8 +103,12 @@ export default {
             await this.uploadChunks(fileChunks, md5, 0)
             this.record('等待服务器合并分片')
             const response = await this.$api.mergeChunks({ md5: md5, fileName: this.form.file.name })
+            if(response.code != 200){
+                return
+            }
+            this.record('分片合并完成,等待更新专利说明书')
             let params = {
-              url: response.data,
+              url: response.data[0],
               type: this.form.type,
               remark: this.form.remark
             }