From f6f564b27abaa5d1fd4dfea57ace41aa755edbc7 Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Tue, 23 Apr 2024 16:26:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4generate=E5=9B=9B=E5=BC=A0?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=87=BA=E7=8E=B0=E5=A4=B1=E8=B4=A5=E7=BB=93?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/HomePage/Generate.vue | 5 +++-- src/component/HomePage/PrintboardUpload.vue | 3 ++- src/component/HomePage/SketchboardUpload.vue | 5 +++-- src/views/HomeView/library.vue | 5 ++--- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/component/HomePage/Generate.vue b/src/component/HomePage/Generate.vue index afa888e5..07929310 100644 --- a/src/component/HomePage/Generate.vue +++ b/src/component/HomePage/Generate.vue @@ -612,7 +612,7 @@ export default defineComponent({ (rv) => { if(this.loadingShow){//防止取消后有正在执行的获取状态 let arr:any = [] - arr = rv.filter((item:any)=>item.status != 'Success') + arr = rv.filter((item:any)=>item.status != 'Success' && item.status != 'Fail') rv.forEach((element:any) => { element.imgUrl = element.url element.id_ = GO.id++ @@ -628,6 +628,7 @@ export default defineComponent({ driverObj__.moveNext() } }) + this.fileList = this.fileList.filter((item:any)=>item.status == 'Success') clearInterval(this.generateTime) clearInterval(this.remGenerateTime) this.loadingShow = false @@ -644,7 +645,7 @@ export default defineComponent({ },1000) }, removeGenerate(){ - let arr = this.fileList.filter((item:any)=>item.status == 'Success') + let arr = this.fileList.filter((item:any)=>item.status != 'Success') //取消操作 this.fileList = this.fileList.filter((item:any)=>item.status == 'Success') this.loadingShow = false diff --git a/src/component/HomePage/PrintboardUpload.vue b/src/component/HomePage/PrintboardUpload.vue index e3ac81ee..080121bc 100644 --- a/src/component/HomePage/PrintboardUpload.vue +++ b/src/component/HomePage/PrintboardUpload.vue @@ -759,7 +759,7 @@ export default defineComponent({ (rv) => { if(this.loadingShow){//防止取消后有正在执行的获取状态 let arr:any = [] - arr = rv.filter((item:any)=>item.status != 'Success') + arr = rv.filter((item:any)=>item.status != 'Success' && item.status != 'Fail') rv.forEach((element:any) => { element.imgUrl = element.url element.id_ = GO.id++ @@ -776,6 +776,7 @@ export default defineComponent({ driverObj__.moveNext() } }) + this.fileList = this.fileList.filter((item:any)=>item.status == 'Success') clearInterval(this.generateTime) clearInterval(this.remGenerateTime) this.loadingShow = false diff --git a/src/component/HomePage/SketchboardUpload.vue b/src/component/HomePage/SketchboardUpload.vue index a3b54f79..5e90e0d5 100644 --- a/src/component/HomePage/SketchboardUpload.vue +++ b/src/component/HomePage/SketchboardUpload.vue @@ -871,7 +871,7 @@ export default defineComponent({ (rv) => { if(this.loadingShow){//防止取消后有正在执行的获取状态 let arr:any = [] - arr = rv.filter((item:any)=>item.status != 'Success') + arr = rv.filter((item:any)=>item.status != 'Success' && item.status != 'Fail') rv.forEach((element:any) => { element.imgUrl = element.url element.id_ = GO.id++ @@ -890,6 +890,7 @@ export default defineComponent({ driverObj__.moveNext() } }) + this.generateList = this.generateList.filter((item:any)=>item.status == 'Success') clearInterval(this.generateTime) clearInterval(this.remGenerateTime) this.loadingShow = false @@ -898,7 +899,7 @@ export default defineComponent({ } } ).catch(res=>{ - this.fileList = this.fileList.filter((item:any)=>item.status == 'Success') + this.generateList = this.generateList.filter((item:any)=>item.status == 'Success') clearInterval(this.generateTime) clearInterval(this.remGenerateTime) this.loadingShow = false diff --git a/src/views/HomeView/library.vue b/src/views/HomeView/library.vue index 78ae2ec7..21d14d74 100644 --- a/src/views/HomeView/library.vue +++ b/src/views/HomeView/library.vue @@ -1167,19 +1167,18 @@ export default defineComponent({ (rv) => { if(this.isShowMark){//防止取消后有正在执行的获取状态 let arr:any = [] - arr = rv.filter((item:any)=>item.status != 'Success') + arr = rv.filter((item:any)=>item.status != 'Success' && item.status != 'Fail') rv.forEach((element:any) => { element.imgUrl = element.url this.generateList.forEach((item:any,index:any) => { - if(item.taskId == element.taskId && element.status == 'Success'){ - this.generateList[index] = element } }); }); if(arr.length == 0){ + this.generateList = this.generateList.filter((item:any)=>item.status == 'Success') clearInterval(this.generateTime) clearInterval(this.remGenerateTime) this.isShowMark = false