fix:修复选择header-asset-dc后多次请求后台,及不正确显示的问题
This commit is contained in:
@@ -360,6 +360,7 @@
|
||||
jumpToAsset(dc) {
|
||||
if (dc) {
|
||||
this.activeItemIndex = dc.id;
|
||||
this.$store.commit('setCurrentDc',dc.id)
|
||||
bus.$emit("header-dc-change", dc.id); //发送给leftMenu,顶部dc条件改变了
|
||||
} else {
|
||||
this.activeItemIndex = "";
|
||||
|
||||
@@ -398,7 +398,7 @@
|
||||
});*/
|
||||
bus.$on("header-dc-change", dcId => {
|
||||
this.dcCheckList = [dcId];
|
||||
bus.$emit("asset-filter-change", "idcIds", dcId);
|
||||
// bus.$emit("asset-filter-change", "idcIds", dcId);
|
||||
});
|
||||
bus.$on("clear-asset-filter", dcId => {
|
||||
this.dcCheckList = [];
|
||||
|
||||
@@ -368,6 +368,11 @@
|
||||
tagKeys:[],
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
headerCurrentDc:function(){
|
||||
return this.$store.state.currentDc;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'bottomBox.showSubList': function(n) {
|
||||
let vm = this;
|
||||
@@ -682,11 +687,9 @@
|
||||
|
||||
},
|
||||
filterTags:function(scope){
|
||||
console.log(scope)
|
||||
let tag=scope.column.label.split(' [Tag]')[0]
|
||||
let tagVals=scope.row.tags
|
||||
if(tagVals){
|
||||
console.log('tags',tagVals,tag)
|
||||
let showTag=tagVals.find(item=>{return item.tag == tag})
|
||||
if(showTag){
|
||||
return showTag.value
|
||||
@@ -729,6 +732,9 @@
|
||||
|
||||
//初始化数据
|
||||
this.getUserData();
|
||||
|
||||
this.pageObj.idcId=this.headerCurrentDc;
|
||||
|
||||
this.getTableData();
|
||||
//是否存在分页缓存
|
||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||
|
||||
@@ -6,6 +6,7 @@ const store = new Vuex.Store({
|
||||
state: {
|
||||
/* 监听对象变化,用于顶部菜单与底部内容的同步 */
|
||||
currentProject: {id: "", name: "", remark: ""},
|
||||
currentDc:null,
|
||||
projectListChange: 0,
|
||||
reloadFacade:true,//重新加载project
|
||||
showPanel:{
|
||||
@@ -94,6 +95,9 @@ const store = new Vuex.Store({
|
||||
state.reloadFacade=true;
|
||||
})
|
||||
},
|
||||
setCurrentDc(state,data){
|
||||
state.currentDc = data
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user