|
|
@@ -198,6 +198,11 @@ export default { |
|
|
|
this.showUploadErrInfo(true, this.getDefaultErrTxt()); |
|
|
|
return false; |
|
|
|
} |
|
|
|
if (file && file.name.length > 128) { |
|
|
|
this.showUploadErrInfo(true, this.$t('modelManage.modelFileNameTips')); |
|
|
|
this.uploadError(file, this.$t('modelManage.modelFileNameTips')); |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.showUploadErrInfo(false); |
|
|
|
return true; |
|
|
|
}, |
|
|
@@ -466,7 +471,7 @@ export default { |
|
|
|
}, |
|
|
|
uploadFinishCheck(file) { |
|
|
|
console.log('uploadFinishCheck', file, this.uploadLength, '/', this.uploadFiles.length); |
|
|
|
if (this.uploadLength === this.uploadFiles.length) { |
|
|
|
if (this.uploadLength === this.uploadFiles.length && this.uploadFiles.length != 0) { |
|
|
|
console.log('All file has finish, success ' + this.uploadSuccessLength); |
|
|
|
this.uploading = false; |
|
|
|
if (this.uploadSuccessLength == this.uploadLength) { |
|
|
@@ -483,7 +488,9 @@ export default { |
|
|
|
submit() { |
|
|
|
const fileList = this.dropzoneHandler.getAcceptedFiles(); |
|
|
|
if (!fileList.length) return; |
|
|
|
if (!this.checkFiles()) return; |
|
|
|
for (let i = 0, iLen = fileList.length; i < iLen; i++) { |
|
|
|
if (!this.checkFiles(fileList[i])) return; |
|
|
|
} |
|
|
|
this.resetFileStatus(); |
|
|
|
this.uploadFiles = fileList; |
|
|
|
this.uploading = true; |
|
|
|