解决部门管理 频繁点击刷新会出现数据重复的问题

pull/37/head
zhangdaihao 6 years ago
parent 8ed4b349f6
commit 84a5378394

@ -6,7 +6,7 @@
<a-button @click="handleAdd(2)" style="margin-left: 18px" type="primary" icon="plus">添加子部门</a-button> <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 @click="handleAdd(1)" type="default" icon="plus">添加一级部门</a-button>
<a-button title="删除多条数据" @click="batchDel" type="default" icon="delete">批量删除</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> </div>
</a-layout-header> </a-layout-header>
@ -143,6 +143,7 @@
data(){ data(){
return { return {
iExpandedKeys:[], iExpandedKeys:[],
loading:false,
autoExpandParent:true, autoExpandParent:true,
currFlowId:"", currFlowId:"",
currFlowName:"", currFlowName:"",
@ -196,6 +197,7 @@
that.setThisExpandedKeys(temp); that.setThisExpandedKeys(temp);
console.log(temp.id) console.log(temp.id)
} }
this.loading = false;
} }
}); });
}, },
@ -208,6 +210,7 @@
} }
}, },
refresh(){ refresh(){
this.loading = true;
this.loadTree(); this.loadTree();
}, },
onExpand (expandedKeys) { onExpand (expandedKeys) {

Loading…
Cancel
Save