vue循环发起请求,等一个请求结束后,进行下一次请求
async await new Promise
async filesSubmitted(files, fileList) {
if (files.length === 0) {
return this.$message.error("文件列表存在同名文件,请关闭文件列表后再试。");
}
for (let file of files) {
const path = this.filePath
const name = file.relativePath
const size = file.size
var formData = new FormData();
formData.append('concurrentType', this.fileType)
formData.append('fileName', path + name)
formData.append('partCount', Math.ceil(size / this.chunkSize))
formData.append('fileSize', size)
formData.append('userId',this.createUser)
formData.append('type',1)
if (this.fileSetCode) {
formData.append('datase