Skip to content

Commit

Permalink
解决部门管理 频繁点击刷新会出现数据重复的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangdaiscott committed Mar 14, 2019
1 parent 8ed4b34 commit 84a5378
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ant-design-jeecg-vue/src/views/system/DepartList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<a-button @click="handleAdd(2)" style="margin-left: 18px" type="primary" icon="plus">添加子部门</a-button>
<a-button @click="handleAdd(1)" type="default" icon="plus">添加一级部门</a-button>
<a-button title="删除多条数据" @click="batchDel" type="default" icon="delete">批量删除</a-button>
<a-button @click="refresh" type="default" icon="reload">刷新</a-button>
<a-button @click="refresh" type="default" icon="reload" :loading="loading">刷新</a-button>
</div>
</a-layout-header>

Expand Down Expand Up @@ -143,6 +143,7 @@
data(){
return {
iExpandedKeys:[],
loading:false,
autoExpandParent:true,
currFlowId:"",
currFlowName:"",
Expand Down Expand Up @@ -196,6 +197,7 @@
that.setThisExpandedKeys(temp);
console.log(temp.id)
}
this.loading = false;
}
});
},
Expand All @@ -208,6 +210,7 @@
}
},
refresh(){
this.loading = true;
this.loadTree();
},
onExpand (expandedKeys) {
Expand Down

0 comments on commit 84a5378

Please sign in to comment.