调整bug
This commit is contained in:
@@ -154,7 +154,7 @@ export default defineComponent({
|
||||
// this.getTaskList()
|
||||
let time = 100
|
||||
if(data){
|
||||
time = 10000
|
||||
time = 1000
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.currentPage = 1
|
||||
@@ -187,7 +187,7 @@ export default defineComponent({
|
||||
getTaskList(){
|
||||
clearTimeout(this.getTaskTime)
|
||||
let arr = this.taskListUnfinished.map((item:any) => item.taskId)
|
||||
if(arr <= 0){
|
||||
if(arr <= 0 && !arr[0].taskId){
|
||||
return
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.getTasksList,arr).then((rv)=>{
|
||||
@@ -227,6 +227,7 @@ export default defineComponent({
|
||||
})
|
||||
},
|
||||
getTaskMoreList(value:any){
|
||||
clearTimeout(this.getTaskTime)
|
||||
let data = {
|
||||
size:this.pageSize,
|
||||
page: this.currentPage,
|
||||
@@ -234,6 +235,7 @@ export default defineComponent({
|
||||
endTime: "",
|
||||
startTime: "",
|
||||
}
|
||||
this.isShowMark = true
|
||||
Https.axiosPost(Https.httpUrls.getTasksHistory,data).then((rv)=>{
|
||||
this.isShowMark = false
|
||||
if(this.currentPage != 1 && rv.content.length == 0){
|
||||
@@ -244,23 +246,23 @@ export default defineComponent({
|
||||
this.taskListMore.push(...rv.content)
|
||||
this.total = rv.total
|
||||
this.taskListUnfinished = []
|
||||
rv.content.forEach((item:any) => {
|
||||
value.forEach((valueItem:any) => {
|
||||
if(valueItem == item.taskId && item.status == 'success'){
|
||||
downloadIamge(item.outputImage,item.imageName)
|
||||
this.store.dispatch('getCredits')
|
||||
}
|
||||
if(value){
|
||||
rv.content.forEach((item:any) => {
|
||||
value.forEach((valueItem:any) => {
|
||||
if(valueItem == item.taskId && item.status == 'success'){
|
||||
downloadIamge(item.outputImage,item.imageName)
|
||||
this.store.dispatch('getCredits')
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
this.taskListMore.forEach((item:any,index:number)=>{
|
||||
if(item.status == 'Waiting' || item.status == 'Executing'){
|
||||
item.index = index
|
||||
this.taskListUnfinished.push(item)
|
||||
this.getTaskList()
|
||||
}
|
||||
})
|
||||
if(!this.getTaskTime){
|
||||
this.getTaskList()
|
||||
}
|
||||
// if(this.taskListMore.indexOf('success'))
|
||||
}
|
||||
}).catch((rv) => {
|
||||
|
||||
Reference in New Issue
Block a user