Commit 00e1dd8e by 王昆

gsb

parent 6dd0480e
...@@ -76,20 +76,23 @@ class ActionAPI extends APIBase { ...@@ -76,20 +76,23 @@ class ActionAPI extends APIBase {
case "byPid": case "byPid":
opResult = await this.orgSve.apiByPid(action_body); opResult = await this.orgSve.apiByPid(action_body);
break; break;
case "tree": case "orgTree":
opResult = await this.orgSve.apiTree(); opResult = await this.orgSve.apiTree();
break; break;
// 菜单权限 // 菜单权限
case "addAuth": case "addAuth":
opResult = this.authSve.add(action_body); opResult = this.authSve.add(action_body);
break; break;
case "updAuth": case "updAuth":
opResult = this.authSve.upd(action_body); opResult = this.authSve.upd(action_body);
break; break;
case "tree": case "authTree":
opResult = this.authSve.tree(action_body); opResult = this.authSve.tree(action_body);
break; break;
case "authInfo":
opResult = this.authSve.info(action_body);
break;
case "byPid": case "byPid":
opResult = this.authSve.byPid(action_body); opResult = this.authSve.byPid(action_body);
break; break;
......
...@@ -82,7 +82,6 @@ class AuthService extends ServiceBase { ...@@ -82,7 +82,6 @@ class AuthService extends ServiceBase {
} }
list.push(item); list.push(item);
pmap[item.pid] = list; pmap[item.pid] = list;
console.log(item.pid);
} }
for(var item of all) { for(var item of all) {
...@@ -91,6 +90,11 @@ class AuthService extends ServiceBase { ...@@ -91,6 +90,11 @@ class AuthService extends ServiceBase {
return system.getResultSuccess(pmap[0]); return system.getResultSuccess(pmap[0]);
} }
async info(obj) {
var auth = await this.dao.getById(obj.id);
return system.getResultSuccess(auth);
}
async del(obj) { async del(obj) {
await this.delete({id: obj.id}); await this.delete({id: obj.id});
......
...@@ -265,9 +265,6 @@ class OrgService extends ServiceBase { ...@@ -265,9 +265,6 @@ class OrgService extends ServiceBase {
} }
list.push(item); list.push(item);
pmap[item.pid] = list; pmap[item.pid] = list;
if (item.pid === 0) {
tree = item;
}
console.log(item.pid); console.log(item.pid);
} }
......
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