Commit a2d2e77a by caoyanzhi

接口联调

parent 00ddc80f
......@@ -89,9 +89,19 @@ export default {
initData() {
// 获取权限项列表
this.getAuthItemList();
// 获取当前节点下的操作项
getOperationItemList({ menuId: this.menuId }).then(res => {
this.operationList = res.result || [];
this.getOperationItemList(1);
},
// 获取当前节点下的操作项
getOperationItemList(pageNum) {
if (pageNum == 1) {
this.operationList = [];
}
getOperationItemList({ menuId: this.menuId, pageSize: 20, pageNum }).then(res => {
const { totalPage, result } = res.result || {};
this.operationList = this.operationList.concat(result || []);
if (pageNum + 1 <= totalPage) {
this.getOperationItemList(pageNum + 1);
}
})
},
// 获取权限项列表
......@@ -133,6 +143,7 @@ export default {
params.authItemId = authItemId;
editAuthItem(params).then(succ.bind(this, '保存成功!')).finally(() => this.editAuth.loading = false);
} else {
params.menuId = this.menuId;
addAuthItem(params).then(succ.bind(this, '新建成功!')).finally(() => this.editAuth.loading = false);
}
function succ(msg) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment