fix:取消监听tableData 把回到顶部事件放入search 解决删除修改后也回到顶部的问题
This commit is contained in:
@@ -184,7 +184,7 @@
|
||||
<el-dialog :visible.sync="deleteBox.show" :title="$t('alert.list.remark')" :modal-append-to-body='false' :show-close="true" width="450px" @close="closeDialog" class="nz-message">
|
||||
<div class="upload-body">
|
||||
<el-form ref="remarkForm" :model="deleteBox">
|
||||
<el-form-item prop="remark">
|
||||
<el-form-item prop="remark" :rules="[{required:true,message: $t('validate.required'), trigger: 'change'}]">
|
||||
<el-input type="textarea" :placeholder="$t('alert.description')" v-model="deleteBox.remark"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -829,11 +829,11 @@
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tableData(){
|
||||
/*tableData(){
|
||||
if(this.$refs.alertListTable&&this.$refs.alertListTable.bodyWrapper){
|
||||
this.$refs.alertListTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},*/
|
||||
showSubList(n) {
|
||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||
},
|
||||
|
||||
@@ -623,6 +623,9 @@
|
||||
if(orderBy){
|
||||
this.$set(this.searchLabel, 'orderBy', orderBy);
|
||||
}
|
||||
if(this.$refs.alertMessageTable.$refs.alertListTable && this.$refs.alertMessageTable.$refs.alertListTable.bodyWrapper){
|
||||
this.$refs.alertMessageTable.$refs.alertListTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
this.getAlertList();
|
||||
},
|
||||
// 数据排序
|
||||
@@ -670,13 +673,6 @@
|
||||
this.getAlertList();
|
||||
}
|
||||
},
|
||||
tableData(){
|
||||
if(this.$refs.alertMessageTable&&this.$refs.alertMessageTable.bodyWrapper){
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.alertMessageTable.bodyWrapper.scrollTop = 0;
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//是否存在分页缓存
|
||||
|
||||
@@ -223,6 +223,9 @@
|
||||
this.$set(this.searchLabel, item, searchObj[item]);
|
||||
}
|
||||
}
|
||||
if(this.$refs.cabTable&&this.$refs.cabTable.bodyWrapper){
|
||||
this.$refs.cabTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
this.getTableData();
|
||||
},
|
||||
assetStatClassName(param) {
|
||||
@@ -260,11 +263,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
tableData(){
|
||||
if(this.$refs.cabTable&&this.$refs.cabTable.bodyWrapper){
|
||||
this.$refs.cabTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
|
||||
@@ -383,6 +383,9 @@
|
||||
if(orderBy){
|
||||
this.$set(this.endpointSearchLabel, 'orderBy', orderBy);
|
||||
}
|
||||
if(this.$refs.endpointTable&& this.$refs.endpointTable.bodyWrapper){
|
||||
this.$refs.endpointTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
this.getTableData();
|
||||
},
|
||||
dateFormat(time) {
|
||||
@@ -477,11 +480,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
tableData(){
|
||||
if(this.$refs.endpointTable&& this.$refs.endpointTable.bodyWrapper){
|
||||
this.$refs.endpointTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//初始化表头
|
||||
|
||||
@@ -201,11 +201,6 @@
|
||||
'alertLabel':alertLabel,
|
||||
},
|
||||
watch:{
|
||||
tableData(){
|
||||
if(this.$refs.alertListTable&&this.$refs.alertListTable.bodyWrapper){
|
||||
this.$refs.alertListTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
tagType() {
|
||||
@@ -478,6 +473,9 @@
|
||||
if(orderBy){
|
||||
this.$set(this.searchLabel, 'orderBy', orderBy);
|
||||
}
|
||||
if(this.$refs.alertListTable&&this.$refs.alertListTable.bodyWrapper){
|
||||
this.$refs.alertListTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
this.getAlertList();
|
||||
},
|
||||
|
||||
|
||||
@@ -124,11 +124,6 @@
|
||||
'alertLabel':alertLabel,
|
||||
},
|
||||
watch:{
|
||||
tableData(){
|
||||
if(this.$refs.assetTable&& this.$refs.assetTable.bodyWrapper){
|
||||
this.$refs.assetTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
tagType() {
|
||||
@@ -340,6 +335,9 @@
|
||||
if(orderBy){
|
||||
this.$set(this.searchLabel, 'orderBy', orderBy);
|
||||
}
|
||||
if(this.$refs.assetTable&& this.$refs.assetTable.bodyWrapper){
|
||||
this.$refs.assetTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
this.getAssetList();
|
||||
},
|
||||
},
|
||||
|
||||
@@ -115,11 +115,6 @@
|
||||
'alertLabel':alertLabel,
|
||||
},
|
||||
watch:{
|
||||
tableData(){
|
||||
if(this.$refs.endpointTable){
|
||||
this.$refs.endpointTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
tagType() {
|
||||
@@ -330,6 +325,9 @@
|
||||
if(orderBy){
|
||||
this.$set(this.searchLabel, 'orderBy', orderBy);
|
||||
}
|
||||
if(this.$refs.endpointTable){
|
||||
this.$refs.endpointTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
this.getEndpointList();
|
||||
},
|
||||
},
|
||||
|
||||
@@ -246,6 +246,7 @@
|
||||
this.topologyLoading=false;
|
||||
return arr1
|
||||
}
|
||||
let promiseArr=[];
|
||||
arr.forEach((item,index)=>{
|
||||
item.shape='image';
|
||||
item.id=item.moduleId;
|
||||
@@ -255,19 +256,6 @@
|
||||
this.$get('/module/stat',{id:item.id}).then(res=>{
|
||||
item.state=res.data;
|
||||
// if(index===arr.length-1){
|
||||
// setTimeout(()=>{
|
||||
// this.nodesArray=[...this.nodesArrayOther];
|
||||
// this.edgesArray=[...this.edgesArrayOther];
|
||||
// setTimeout(()=>{
|
||||
// this.topologyLoading=false;
|
||||
// this.$refs['topology'].setData();
|
||||
// },500)
|
||||
// })
|
||||
// }
|
||||
});
|
||||
this.dealImg(`/project/topo/icon/${item.iconId}`).then((data)=>{
|
||||
item.image=data;
|
||||
if(index===arr.length-1){
|
||||
setTimeout(()=>{
|
||||
this.nodesArray=[...this.nodesArrayOther];
|
||||
this.edgesArray=[...this.edgesArrayOther];
|
||||
@@ -276,7 +264,19 @@
|
||||
this.$refs['topology'].setData();
|
||||
},500)
|
||||
})
|
||||
}
|
||||
// }
|
||||
});
|
||||
promiseArr.push( this.dealImg(`/project/topo/icon/${item.iconId}`))
|
||||
});
|
||||
Promise.all(promiseArr).then(res2=>{
|
||||
res2.forEach((item,index)=>{
|
||||
arr[index].image=item;
|
||||
});
|
||||
setTimeout(()=>{
|
||||
this.nodesArray=[...this.nodesArrayOther];
|
||||
this.edgesArray=[...this.edgesArrayOther];
|
||||
this.topologyLoading=false;
|
||||
this.$refs['topology'].setData();
|
||||
})
|
||||
});
|
||||
return arr
|
||||
|
||||
@@ -408,6 +408,9 @@
|
||||
if(orderBy){
|
||||
this.$set(this.searchLabel, 'orderBy', orderBy);
|
||||
}
|
||||
if(this.$refs.alertRuleTable && this.$refs.alertRuleTable.bodyWrapper){
|
||||
this.$refs.alertRuleTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
this.getTableData();
|
||||
},
|
||||
// 全屏
|
||||
|
||||
@@ -613,6 +613,7 @@
|
||||
if(orderBy){
|
||||
this.$set(this.searchLabel, 'orderBy', orderBy);
|
||||
}
|
||||
this.$refs.alertMessageTable.$refs.alertListTable.bodyWrapper.scrollTop = 0;
|
||||
this.getAlertList();
|
||||
},
|
||||
viewRule: function (id) {
|
||||
|
||||
@@ -428,11 +428,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
tableData(){
|
||||
if(this.$refs.assetTable&&this.$refs.assetTable.bodyWrapper){
|
||||
this.$refs.assetTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
fullScreen() {
|
||||
@@ -631,6 +626,9 @@
|
||||
if(orderBy){
|
||||
this.$set(this.searchLabel, 'orderBy', orderBy);
|
||||
}
|
||||
if(this.$refs.assetTable&&this.$refs.assetTable.bodyWrapper){
|
||||
this.$refs.assetTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
this.getTableData();
|
||||
},
|
||||
convertToDetail(obj) {
|
||||
|
||||
@@ -325,6 +325,9 @@
|
||||
this.$set(this.searchLabel, item, searchObj[item]);
|
||||
}
|
||||
}
|
||||
if(this.$refs.accountTable){
|
||||
this.$refs.accountTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
this.getTableData();
|
||||
},
|
||||
// 数据排序
|
||||
@@ -358,11 +361,6 @@
|
||||
let vm = this;
|
||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||
},
|
||||
tableData(n){
|
||||
if(this.$refs.accountTable){
|
||||
this.$refs.accountTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//初始化表头
|
||||
|
||||
@@ -441,6 +441,9 @@
|
||||
if(orderBy){
|
||||
this.$set(this.searchLabel, 'orderBy', orderBy);
|
||||
}
|
||||
if(this.$refs.dcTable&&this.$refs.dcTable.bodyWrapper){
|
||||
this.$refs.dcTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
this.getTableData();
|
||||
},
|
||||
showCabinet(dc) {
|
||||
@@ -488,11 +491,6 @@
|
||||
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;
|
||||
|
||||
@@ -292,6 +292,9 @@
|
||||
if(orderBy){
|
||||
this.$set(this.searchLabel, 'orderBy', orderBy);
|
||||
}
|
||||
if(this.$refs.mibTable&&this.$refs.mibTable.bodyWrapper){
|
||||
this.$refs.mibTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
this.getTableData();
|
||||
},
|
||||
downloadMib(mib) {
|
||||
|
||||
@@ -315,6 +315,9 @@
|
||||
if(orderBy) {
|
||||
this.$set(this.searchLabel, 'orderBy', orderBy);
|
||||
}
|
||||
if(this.$refs.modelTable&&this.$refs.modelTable.bodyWrapper){
|
||||
this.$refs.modelTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
this.getTableData();
|
||||
},
|
||||
// 数据排序
|
||||
@@ -368,11 +371,6 @@
|
||||
let vm = this;
|
||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||
},
|
||||
tableData(){
|
||||
if(this.$refs.modelTable&&this.$refs.modelTable.bodyWrapper){
|
||||
this.$refs.modelTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -359,6 +359,9 @@
|
||||
if(orderBy){
|
||||
this.$set(this.searchLabel, 'orderBy', orderBy);
|
||||
}
|
||||
if(this.$refs.promTable&&this.$refs.promTable.bodyWrapper){
|
||||
this.$refs.promTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
this.getTableData();
|
||||
},
|
||||
//获取dc数据
|
||||
@@ -444,11 +447,6 @@
|
||||
let vm = this;
|
||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||
},
|
||||
tableData(){
|
||||
if(this.$refs.promTable&&this.$refs.promTable.bodyWrapper){
|
||||
this.$refs.promTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -285,11 +285,6 @@
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
tableData(){
|
||||
if(this.$refs.terminalLogTablethis.$refs.terminalLogTable.bodyWrapper){
|
||||
this.$refs.terminalLogTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//初始化表头
|
||||
|
||||
@@ -578,6 +578,9 @@
|
||||
if(orderBy){
|
||||
this.$set(this.endpointSearchLabel,'orderBy',orderBy);
|
||||
}
|
||||
if(this.$refs.endpointTable&&this.$refs.endpointTable.bodyWrapper){
|
||||
this.$refs.endpointTable.bodyWrapper.scrollTop = 0;
|
||||
}
|
||||
this.getEndpointTableData();
|
||||
},
|
||||
|
||||
@@ -837,11 +840,6 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
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