From 6a1abe2e53f671e3d60a0583813c84ecf3834fd6 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 3 Aug 2020 10:47:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=A0=E4=B8=BA=E5=A4=9A?= =?UTF-8?q?=E6=AC=A1=E8=B0=83=E7=94=A8=E6=8E=A5=E5=8F=A3=20=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84alertmessageTable=E5=8D=A1=E9=A1=BF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/charts/chart-alert-list.vue | 8 +++++++- .../components/common/bottomBox/tabs/alertMessageTab.vue | 9 +++++++-- nezha-fronted/src/components/page/alert/list.vue | 8 +++++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/nezha-fronted/src/components/charts/chart-alert-list.vue b/nezha-fronted/src/components/charts/chart-alert-list.vue index 35d8f5202..a4786741b 100644 --- a/nezha-fronted/src/components/charts/chart-alert-list.vue +++ b/nezha-fronted/src/components/charts/chart-alert-list.vue @@ -172,6 +172,7 @@ export default { total: 0 }, storedTableData:[], + requestIndex:0, storedScreanTableData:[], images: '', //toolbox: false, @@ -566,7 +567,12 @@ export default { } }); } - this.$set(item, "current", current); + this.requestIndex+=1; + item.current=current; + if(this.requestIndex===this.tableData.length){ + this.$set(item, "current", current); + this.requestIndex=0; + } }); } }); diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue index eccd77e59..96b3cc099 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue @@ -114,7 +114,7 @@ searchTime: [new Date().setHours(new Date().getHours() - 1), new Date()], currentMsg: {}, chartUnit: 5, - + requestIndex:0, defaultSearchValue: this.obj.alertNum ? 1 : 0, showElementSet: false, tableId: 'alertListTable', //需要分页的table的id,用于记录每页数量 @@ -496,7 +496,12 @@ } }); } - this.$set(item, "current", current); + this.requestIndex+=1; + item.current=current; + if(this.requestIndex===this.tableData.length){ + this.$set(item, "current", current); + this.requestIndex=0; + } }); }); this.pageObj.total = response.data.total; diff --git a/nezha-fronted/src/components/page/alert/list.vue b/nezha-fronted/src/components/page/alert/list.vue index 3d2200e22..48840763b 100644 --- a/nezha-fronted/src/components/page/alert/list.vue +++ b/nezha-fronted/src/components/page/alert/list.vue @@ -289,6 +289,7 @@ tablelable: [], dropCol: [], tableData: [], + requestIndex:0, viewRuleData: { id: '', alertName: '', @@ -554,7 +555,12 @@ }else{ current=[null,null] } - this.$set(item, "current", current); + this.requestIndex+=1; + item.current=current; + if(this.requestIndex===this.tableData.length){ + this.$set(item, "current", current); + this.requestIndex=0; + } }); }); this.deleteBox.ids='';