Browse Source

Merge branch 'zouap_static' of https://git.openi.org.cn/OpenI/aiforge into zouap_static

tags/v1.22.11.2^2
zouap 2 years ago
parent
commit
dd227fad60
3 changed files with 11 additions and 2 deletions
  1. +1
    -0
      web_src/vuepages/langs/config/en-US.js
  2. +1
    -0
      web_src/vuepages/langs/config/zh-CN.js
  3. +9
    -2
      web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-2.vue

+ 1
- 0
web_src/vuepages/langs/config/en-US.js View File

@@ -221,6 +221,7 @@ const en = {
uploadStatus: 'Upload status',
modelFileUploadDefaultTips: 'Click to add files or drag files here directly',
modelFileUploadErrTips: 'Up to 10 files can be uploaded at a time, and the total file size of the model does not exceed {size}GB',
modelFileNameTips: 'The file name should not exceed 128 characters',
fileIstoBig: 'File is to big',
removeFile: 'Rmove file',
uploadSuccess: 'upload success',


+ 1
- 0
web_src/vuepages/langs/config/zh-CN.js View File

@@ -221,6 +221,7 @@ const zh = {
uploadStatus: '上传状态',
modelFileUploadDefaultTips: '点击添加文件或直接拖拽文件到此处',
modelFileUploadErrTips: '单次最多上传10个文件,模型总文件大小不超过{size}G',
modelFileNameTips: '文件名长度不超过128字符',
fileIstoBig: '文件太大',
removeFile: '移除文件',
uploadSuccess: '上传成功',


+ 9
- 2
web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-2.vue View File

@@ -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;


Loading…
Cancel
Save