|
@@ -124,28 +124,25 @@ export default {
|
|
|
let tempIds = this.$refs.tree.getCheckedKeys();
|
|
|
let halfIds = this.$refs.tree.getHalfCheckedKeys();
|
|
|
let allIds = [...tempIds, ...halfIds];
|
|
|
- let tenantId = null;
|
|
|
+ let params = {
|
|
|
+ organId: this.organId,
|
|
|
+ roleDesc: this.result.roleDesc,
|
|
|
+ roleName: this.result.roleName,
|
|
|
+ menuIds: allIds,
|
|
|
+ }
|
|
|
if (this.isplatform) {
|
|
|
- tenantId = -1;
|
|
|
+ params.tenantId = -1;
|
|
|
}
|
|
|
if (this.pageType == "update") {
|
|
|
roleUpdate({
|
|
|
id: this.id,
|
|
|
- organId: this.organId,
|
|
|
- roleDesc: this.result.roleDesc,
|
|
|
- roleName: this.result.roleName,
|
|
|
- menuIds: allIds,
|
|
|
- tenantId,
|
|
|
+ ...params
|
|
|
}).then((res) => {
|
|
|
this.messageTips("修改", res);
|
|
|
});
|
|
|
} else if (this.pageType == "create") {
|
|
|
roleAdd({
|
|
|
- organId: this.organId,
|
|
|
- roleDesc: this.result.roleDesc,
|
|
|
- roleName: this.result.roleName,
|
|
|
- menuIds: allIds,
|
|
|
- tenantId,
|
|
|
+ ...params
|
|
|
}).then((res) => {
|
|
|
this.messageTips("添加", res);
|
|
|
});
|