|
|
@@ -167,6 +167,7 @@ const generateTranslationFile = ()=>{
|
|
|
generateTranslateFile(params).then((response: { code: number })=>{
|
|
|
if(response.code == 200){
|
|
|
task.currentCount += 1
|
|
|
+ progress.value = 100
|
|
|
updateTask()
|
|
|
getFileInfo()
|
|
|
}
|
|
|
@@ -257,7 +258,7 @@ const pollTranslationStatus = async () => {
|
|
|
}
|
|
|
//获取以执行的数
|
|
|
const logs1 = logs.filter((item: string)=>{
|
|
|
- return item.indexOf('错误') == -1
|
|
|
+ return item.indexOf('错误') == -1 && item.indexOf('重试') == -1
|
|
|
})
|
|
|
task.currentCount += logs1.length
|
|
|
task.logs = allLogs.value
|
|
|
@@ -265,7 +266,11 @@ const pollTranslationStatus = async () => {
|
|
|
updateTask()
|
|
|
}
|
|
|
if(task.totalCount>0){
|
|
|
- progress.value = Math.floor((task.currentCount / task.totalCount) * 100)
|
|
|
+ if(task.currentCount>= task.totalCount){
|
|
|
+ progress.value = 97
|
|
|
+ }else{
|
|
|
+ progress.value = Math.floor((task.currentCount / task.totalCount) * 100)
|
|
|
+ }
|
|
|
}
|
|
|
if(download_ready){
|
|
|
clearPollingTimer()
|
|
|
@@ -310,7 +315,11 @@ const getTask = () =>{
|
|
|
task.logs = task1.logs
|
|
|
allLogs.value = task1.logs || []
|
|
|
if(task.totalCount>0){
|
|
|
- progress.value = Math.floor((task.currentCount / task.totalCount) * 100)
|
|
|
+ if(task.currentCount>= task.totalCount){
|
|
|
+ progress.value = 97
|
|
|
+ }else{
|
|
|
+ progress.value = Math.floor((task.currentCount / task.totalCount) * 100)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|