|
@@ -97,6 +97,7 @@ export default {
|
|
slideCount: 0,
|
|
slideCount: 0,
|
|
seachRoleValue: "", //权限搜索字段
|
|
seachRoleValue: "", //权限搜索字段
|
|
filterIds: [4794, 4743, 3266, 3268, 3306, 3307, 3309, 3784, 4627],
|
|
filterIds: [4794, 4743, 3266, 3268, 3306, 3307, 3309, 3784, 4627],
|
|
|
|
+ isplatform:null
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -112,6 +113,7 @@ export default {
|
|
this.pageType = this.$route.query.type;
|
|
this.pageType = this.$route.query.type;
|
|
this.id = this.$route.query.id;
|
|
this.id = this.$route.query.id;
|
|
this.page = this.$route.query.page;
|
|
this.page = this.$route.query.page;
|
|
|
|
+ this.isplatform = this.$route.query.isplatform
|
|
if (this.pageType == "create") {
|
|
if (this.pageType == "create") {
|
|
this.$refs.tree.setCheckedKeys([4229]);
|
|
this.$refs.tree.setCheckedKeys([4229]);
|
|
}
|
|
}
|
|
@@ -121,6 +123,10 @@ export default {
|
|
let tempIds = this.$refs.tree.getCheckedKeys();
|
|
let tempIds = this.$refs.tree.getCheckedKeys();
|
|
let halfIds = this.$refs.tree.getHalfCheckedKeys();
|
|
let halfIds = this.$refs.tree.getHalfCheckedKeys();
|
|
let allIds = [...tempIds, ...halfIds];
|
|
let allIds = [...tempIds, ...halfIds];
|
|
|
|
+ let tenantId = null
|
|
|
|
+ if(this.isplatform){
|
|
|
|
+ tenantId = -1
|
|
|
|
+ }
|
|
if (this.pageType == "update") {
|
|
if (this.pageType == "update") {
|
|
roleUpdate({
|
|
roleUpdate({
|
|
id: this.id,
|
|
id: this.id,
|
|
@@ -128,6 +134,7 @@ export default {
|
|
roleDesc: this.result.roleDesc,
|
|
roleDesc: this.result.roleDesc,
|
|
roleName: this.result.roleName,
|
|
roleName: this.result.roleName,
|
|
menuIds: allIds,
|
|
menuIds: allIds,
|
|
|
|
+ tenantId
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
this.messageTips("修改", res);
|
|
this.messageTips("修改", res);
|
|
});
|
|
});
|
|
@@ -137,6 +144,7 @@ export default {
|
|
roleDesc: this.result.roleDesc,
|
|
roleDesc: this.result.roleDesc,
|
|
roleName: this.result.roleName,
|
|
roleName: this.result.roleName,
|
|
menuIds: allIds,
|
|
menuIds: allIds,
|
|
|
|
+ tenantId
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
this.messageTips("添加", res);
|
|
this.messageTips("添加", res);
|
|
});
|
|
});
|
|
@@ -144,12 +152,20 @@ export default {
|
|
},
|
|
},
|
|
messageTips(title, res) {
|
|
messageTips(title, res) {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
- this.$message.success("修改成功");
|
|
|
|
|
|
+ this.$message.success(`${title}成功`);
|
|
this.$store.dispatch("delVisitedViews", this.$route);
|
|
this.$store.dispatch("delVisitedViews", this.$route);
|
|
- this.$router.push({
|
|
|
|
|
|
+ if(this.isplatform){
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "/platformAdminManger",
|
|
|
|
+ query: { page: this.page },
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ this.$router.push({
|
|
path: "/adminManager",
|
|
path: "/adminManager",
|
|
query: { page: this.page },
|
|
query: { page: this.page },
|
|
});
|
|
});
|
|
|
|
+ }
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
this.$message.error(res.msg);
|
|
this.$message.error(res.msg);
|
|
}
|
|
}
|