fix: 修改查询后 表格不会到顶部的问题
This commit is contained in:
@@ -829,6 +829,11 @@
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tableData(){
|
||||
if(this.$refs.alertListTable&&this.$refs.alertListTable.bodyWrapper){
|
||||
this.$refs.alertListTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
showSubList(n) {
|
||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||
},
|
||||
@@ -888,7 +893,7 @@
|
||||
: this.tableTitle;
|
||||
}
|
||||
*/
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -519,6 +519,8 @@
|
||||
return parseFloat(item).toFixed(2);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
current=[null,null];
|
||||
}
|
||||
this.requestIndex += 1;
|
||||
item.current = current;
|
||||
@@ -643,8 +645,15 @@
|
||||
}
|
||||
this.getAlertList();
|
||||
}
|
||||
},
|
||||
tableData(){
|
||||
if(this.$refs.alertMessageTable&&this.$refs.alertMessageTable.bodyWrapper){
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.alertMessageTable.bodyWrapper.scrollTop = 0;
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//是否存在分页缓存
|
||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||
|
||||
@@ -259,8 +259,13 @@
|
||||
this.getTableData();
|
||||
}
|
||||
}
|
||||
},
|
||||
tableData(){
|
||||
if(this.$refs.cabTable&&this.$refs.cabTable.bodyWrapper){
|
||||
this.$refs.cabTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
//绑定滚动条事件,控制top按钮
|
||||
|
||||
@@ -476,8 +476,13 @@
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
tableData(){
|
||||
if(this.$refs.endpointTable&& this.$refs.endpointTable.bodyWrapper){
|
||||
this.$refs.endpointTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//初始化表头
|
||||
this.tools.customTableTitle = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-/projectBottom")
|
||||
|
||||
@@ -201,6 +201,11 @@
|
||||
'alertLabel':alertLabel,
|
||||
},
|
||||
watch:{
|
||||
tableData(){
|
||||
if(this.$refs.alertListTable&&this.$refs.alertListTable.bodyWrapper){
|
||||
this.$refs.alertListTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
tagType() {
|
||||
|
||||
@@ -124,6 +124,11 @@
|
||||
'alertLabel':alertLabel,
|
||||
},
|
||||
watch:{
|
||||
tableData(){
|
||||
if(this.$refs.assetTable&& this.$refs.assetTable.bodyWrapper){
|
||||
this.$refs.assetTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
tagType() {
|
||||
|
||||
@@ -115,6 +115,11 @@
|
||||
'alertLabel':alertLabel,
|
||||
},
|
||||
watch:{
|
||||
tableData(){
|
||||
if(this.$refs.endpointTable){
|
||||
this.$refs.endpointTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
tagType() {
|
||||
|
||||
@@ -427,8 +427,13 @@
|
||||
this.dispatchEvent('asset-ping-switch-change',pingTitle.show)
|
||||
}
|
||||
}
|
||||
},
|
||||
tableData(){
|
||||
if(this.$refs.assetTable&&this.$refs.assetTable.bodyWrapper){
|
||||
this.$refs.assetTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
fullScreen() {
|
||||
let vm = this;
|
||||
@@ -480,7 +485,7 @@
|
||||
this.tools.loading = false;
|
||||
if (response.code === 200) {
|
||||
this.tableData = response.data.list;
|
||||
this.pageObj.total = response.data.total
|
||||
this.pageObj.total = response.data.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -357,8 +357,13 @@
|
||||
'bottomBox.showSubList': function(n) {
|
||||
let vm = this;
|
||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||
},
|
||||
tableData(n){
|
||||
if(this.$refs.accountTable){
|
||||
this.$refs.accountTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//初始化表头
|
||||
this.tools.customTableTitle = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)
|
||||
|
||||
@@ -487,8 +487,13 @@
|
||||
'bottomBox.showSubList': function(n) {
|
||||
let vm = this;
|
||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||
},
|
||||
tableData(){
|
||||
if(this.$refs.dcTable&&this.$refs.dcTable.bodyWrapper){
|
||||
this.$refs.dcTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
destroyed() {
|
||||
window.onresize = null;
|
||||
},
|
||||
|
||||
@@ -368,6 +368,11 @@
|
||||
let vm = this;
|
||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||
},
|
||||
tableData(){
|
||||
if(this.$refs.modelTable&&this.$refs.modelTable.bodyWrapper){
|
||||
this.$refs.modelTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -259,6 +259,13 @@
|
||||
this.getTableData();
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
tableData(){
|
||||
if(this.$refs.operationLogTable&&this.$refs.operationLogTable.bodyWrapper){
|
||||
this.$refs.operationLogTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
isCurrentUser() {
|
||||
return function(username) {
|
||||
|
||||
@@ -443,7 +443,12 @@
|
||||
'bottomBox.showSubList': function(n) {
|
||||
let vm = this;
|
||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||
},
|
||||
tableData(){
|
||||
if(this.$refs.promTable&&this.$refs.promTable.bodyWrapper){
|
||||
this.$refs.promTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -284,6 +284,13 @@
|
||||
this.getTableData();
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
tableData(){
|
||||
if(this.$refs.terminalLogTablethis.$refs.terminalLogTable.bodyWrapper){
|
||||
this.$refs.terminalLogTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//初始化表头
|
||||
this.tools.customTableTitle = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)
|
||||
|
||||
@@ -837,6 +837,11 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
endpointTableData(){
|
||||
if(this.$refs.endpointTable&&this.$refs.endpointTable.bodyWrapper){
|
||||
this.$refs.endpointTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
destroyed(){
|
||||
window.onresize=null;
|
||||
|
||||
Reference in New Issue
Block a user