Browse Source

fix-bugs

tags/v1.22.11.2^2
chenshihai 3 years ago
parent
commit
8848039b9d
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      web_src/vuepages/langs/config/zh-CN.js
  2. +3
    -3
      web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-2.vue

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

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


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

@@ -189,10 +189,10 @@ export default {
this.showUploadErr = false; this.showUploadErr = false;
} }
}, },
checkFiles(file) {
checkFiles(file, countStay) {
const fileList = this.dropzoneHandler.getAcceptedFiles(); const fileList = this.dropzoneHandler.getAcceptedFiles();
const filesSize = fileList.reduce((acc, item, index) => acc + item.size, 0) + (file ? file.size : 0); const filesSize = fileList.reduce((acc, item, index) => acc + item.size, 0) + (file ? file.size : 0);
const filesCount = fileList.length + (file ? 1 : 0);
const filesCount = fileList.length + (file && !countStay ? 1 : 0);
const allfilesSize = filesSize + this.state.size; const allfilesSize = filesSize + this.state.size;
if (file && filesCount > maxFileSize) { if (file && filesCount > maxFileSize) {
this.dropzoneHandler.removeFile(file); this.dropzoneHandler.removeFile(file);
@@ -494,7 +494,7 @@ export default {
const fileList = this.dropzoneHandler.getAcceptedFiles(); const fileList = this.dropzoneHandler.getAcceptedFiles();
if (!fileList.length) return; if (!fileList.length) return;
for (let i = 0, iLen = fileList.length; i < iLen; i++) { for (let i = 0, iLen = fileList.length; i < iLen; i++) {
if (!this.checkFiles(fileList[i])) return;
if (!this.checkFiles(fileList[i], true)) return;
} }
this.resetFileStatus(); this.resetFileStatus();
this.uploadFiles = fileList; this.uploadFiles = fileList;


Loading…
Cancel
Save