perf: 文件传输提示优化

This commit is contained in:
wangruidong
2023-12-15 17:08:56 +08:00
committed by Bryan
parent 19adbca7b3
commit e8e8b5bfca
4 changed files with 11 additions and 5 deletions

View File

@@ -1190,7 +1190,8 @@
"uploadFileLthHelpText": "Only files smaller than {limit}MB can be uploaded",
"FileSizeExceedsLimit": "File size exceeds limit",
"runSucceed": "Task executed successfully",
"EnterUploadPath": "Enter the upload path"
"EnterUploadPath": "Enter the upload path",
"FileNameTooLong": "File name too long"
},
"perms": {
"": "",

View File

@@ -1188,7 +1188,8 @@
"uploadFileLthHelpText": "{limit}MB 未満のファイルのみアップロードできます",
"FileSizeExceedsLimit": "ファイルサイズが制限を超えています",
"runSucceed": "タスクが成功しました",
"EnterUploadPath": "アップロードパスを入力してください"
"EnterUploadPath": "アップロードパスを入力してください",
"FileNameTooLong": "ファイル名が長すぎます"
},
"perms": {
"": "",

View File

@@ -1177,7 +1177,8 @@
"uploadFileLthHelpText": "只能上传小于{limit}MB文件",
"FileSizeExceedsLimit": "文件大小超出限制",
"runSucceed": "任务执行成功",
"EnterUploadPath": "输入上传路径"
"EnterUploadPath": "输入上传路径",
"FileNameTooLong": "文件名太长"
},
"perms": {
"": "",

View File

@@ -370,8 +370,12 @@ export default {
if (this.IsFileExceedsLimit(file)) {
return
}
if (file.name.length > 128) {
this.$message.error(file.name + ' ' + this.$tc('ops.FileNameTooLong'))
return
}
}
if (!this.uploadFileList) {
if (this.uploadFileList.length === 0) {
this.$message.error(this.$tc('ops.RequiredUploadFile'))
return
}
@@ -417,7 +421,6 @@ export default {
this.executionInfo.timeCost = 0
this.executionInfo.status = 'running'
this.currentTaskId = res.task_id
this.$router.replace({ query: { taskId: this.currentTaskId }})
this.setCostTimeInterval()
this.writeExecutionOutput()
}).catch(() => {