fix
This commit is contained in:
@@ -134,7 +134,7 @@ export default defineComponent({
|
|||||||
function callback(entries:any, observer:any) {
|
function callback(entries:any, observer:any) {
|
||||||
entries.forEach((entry:any) => {
|
entries.forEach((entry:any) => {
|
||||||
if (entry.isIntersecting) {
|
if (entry.isIntersecting) {
|
||||||
this_.getTaskMoreList()
|
this_.getTaskMoreList('')
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -154,12 +154,12 @@ export default defineComponent({
|
|||||||
// this.getTaskList()
|
// this.getTaskList()
|
||||||
let time = 100
|
let time = 100
|
||||||
if(data){
|
if(data){
|
||||||
time = 1000
|
time = 10000
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.currentPage = 1
|
this.currentPage = 1
|
||||||
this.isShowMark = true
|
this.isShowMark = true
|
||||||
this.getTaskMoreList()
|
this.getTaskMoreList(data)
|
||||||
this.getTaskTime = null
|
this.getTaskTime = null
|
||||||
}, time);
|
}, time);
|
||||||
},
|
},
|
||||||
@@ -182,7 +182,7 @@ export default defineComponent({
|
|||||||
this.currentPage = 1
|
this.currentPage = 1
|
||||||
this.total = 0
|
this.total = 0
|
||||||
this.taskListMore = []
|
this.taskListMore = []
|
||||||
this.getTaskMoreList()
|
this.getTaskMoreList('')
|
||||||
},
|
},
|
||||||
getTaskList(){
|
getTaskList(){
|
||||||
clearTimeout(this.getTaskTime)
|
clearTimeout(this.getTaskTime)
|
||||||
@@ -226,7 +226,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getTaskMoreList(){
|
getTaskMoreList(value:any){
|
||||||
let data = {
|
let data = {
|
||||||
size:this.pageSize,
|
size:this.pageSize,
|
||||||
page: this.currentPage,
|
page: this.currentPage,
|
||||||
@@ -238,12 +238,20 @@ export default defineComponent({
|
|||||||
this.isShowMark = false
|
this.isShowMark = false
|
||||||
if(this.currentPage != 1 && rv.content.length == 0){
|
if(this.currentPage != 1 && rv.content.length == 0){
|
||||||
this.currentPage = 1
|
this.currentPage = 1
|
||||||
this.getTaskMoreList()
|
this.getTaskMoreList('')
|
||||||
}else{
|
}else{
|
||||||
this.currentPage += 1
|
this.currentPage += 1
|
||||||
this.taskListMore.push(...rv.content)
|
this.taskListMore.push(...rv.content)
|
||||||
this.total = rv.total
|
this.total = rv.total
|
||||||
this.taskListUnfinished = []
|
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')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
this.taskListMore.forEach((item:any,index:number)=>{
|
this.taskListMore.forEach((item:any,index:number)=>{
|
||||||
if(item.status == 'Waiting' || item.status == 'Executing'){
|
if(item.status == 'Waiting' || item.status == 'Executing'){
|
||||||
item.index = index
|
item.index = index
|
||||||
@@ -260,7 +268,6 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
setDownloadIamge(item:any){
|
setDownloadIamge(item:any){
|
||||||
console.log(item);
|
|
||||||
downloadIamge(item.outputImage,item.imageName)
|
downloadIamge(item.outputImage,item.imageName)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user