优化因为多次调用接口 导致的alertmessageTable卡顿的问题
This commit is contained in:
@@ -172,6 +172,7 @@ export default {
|
|||||||
total: 0
|
total: 0
|
||||||
},
|
},
|
||||||
storedTableData:[],
|
storedTableData:[],
|
||||||
|
requestIndex:0,
|
||||||
storedScreanTableData:[],
|
storedScreanTableData:[],
|
||||||
images: '',
|
images: '',
|
||||||
//toolbox: false,
|
//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;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
searchTime: [new Date().setHours(new Date().getHours() - 1), new Date()],
|
searchTime: [new Date().setHours(new Date().getHours() - 1), new Date()],
|
||||||
currentMsg: {},
|
currentMsg: {},
|
||||||
chartUnit: 5,
|
chartUnit: 5,
|
||||||
|
requestIndex:0,
|
||||||
defaultSearchValue: this.obj.alertNum ? 1 : 0,
|
defaultSearchValue: this.obj.alertNum ? 1 : 0,
|
||||||
showElementSet: false,
|
showElementSet: false,
|
||||||
tableId: 'alertListTable', //需要分页的table的id,用于记录每页数量
|
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;
|
this.pageObj.total = response.data.total;
|
||||||
|
|||||||
@@ -289,6 +289,7 @@
|
|||||||
tablelable: [],
|
tablelable: [],
|
||||||
dropCol: [],
|
dropCol: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
requestIndex:0,
|
||||||
viewRuleData: {
|
viewRuleData: {
|
||||||
id: '',
|
id: '',
|
||||||
alertName: '',
|
alertName: '',
|
||||||
@@ -554,7 +555,12 @@
|
|||||||
}else{
|
}else{
|
||||||
current=[null,null]
|
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='';
|
this.deleteBox.ids='';
|
||||||
|
|||||||
Reference in New Issue
Block a user