|
@@ -70,7 +70,7 @@ import {
|
|
|
roleGetMenus,
|
|
|
getRoleInfo,
|
|
|
roleUpdate,
|
|
|
- roleAdd,
|
|
|
+ roleAdd
|
|
|
} from "@/api/systemManage";
|
|
|
export default {
|
|
|
name: "adminOperation",
|
|
@@ -84,11 +84,11 @@ export default {
|
|
|
data: [],
|
|
|
defaultProps: {
|
|
|
children: "children",
|
|
|
- label: "label",
|
|
|
+ label: "label"
|
|
|
},
|
|
|
result: {
|
|
|
roleName: null,
|
|
|
- roleDesc: null,
|
|
|
+ roleDesc: null
|
|
|
},
|
|
|
checkAll: false,
|
|
|
splice: [],
|
|
@@ -96,14 +96,15 @@ export default {
|
|
|
allChildIds: [], // 所有子编号
|
|
|
slideCount: 0,
|
|
|
seachRoleValue: "", //权限搜索字段
|
|
|
- filterIds: [4794, 4743, 3266, 3268, 3306, 3307, 3309, 3784, 4627],
|
|
|
- isplatform: null,
|
|
|
+ filterIds: [4794, 4743, 3306, 3307, 3309, 4627],
|
|
|
+ // filterIds: [4794, 4743, 3266, 3268, 3306, 3307, 3309, 3784, 4627]
|
|
|
+ isplatform: null
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
this.onReSet();
|
|
|
this.init();
|
|
|
- console.log(this.$route)
|
|
|
+ console.log(this.$route);
|
|
|
},
|
|
|
activated() {
|
|
|
this.onReSet();
|
|
@@ -128,8 +129,8 @@ export default {
|
|
|
organId: this.organId,
|
|
|
roleDesc: this.result.roleDesc,
|
|
|
roleName: this.result.roleName,
|
|
|
- menuIds: allIds,
|
|
|
- }
|
|
|
+ menuIds: allIds
|
|
|
+ };
|
|
|
if (this.isplatform) {
|
|
|
params.tenantId = -1;
|
|
|
}
|
|
@@ -137,13 +138,13 @@ export default {
|
|
|
roleUpdate({
|
|
|
id: this.id,
|
|
|
...params
|
|
|
- }).then((res) => {
|
|
|
+ }).then(res => {
|
|
|
this.messageTips("修改", res);
|
|
|
});
|
|
|
} else if (this.pageType == "create") {
|
|
|
roleAdd({
|
|
|
...params
|
|
|
- }).then((res) => {
|
|
|
+ }).then(res => {
|
|
|
this.messageTips("添加", res);
|
|
|
});
|
|
|
}
|
|
@@ -155,12 +156,12 @@ export default {
|
|
|
if (this.isplatform) {
|
|
|
this.$router.push({
|
|
|
path: "/platformAdminManger",
|
|
|
- query: { page: this.page },
|
|
|
+ query: { page: this.page }
|
|
|
});
|
|
|
} else {
|
|
|
this.$router.push({
|
|
|
path: "/adminManager",
|
|
|
- query: { page: this.page },
|
|
|
+ query: { page: this.page }
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
@@ -169,7 +170,7 @@ export default {
|
|
|
},
|
|
|
async lookSilder() {
|
|
|
// 修复反写没有loading request返回的不是Promise await无效
|
|
|
- getSilder({ hid: 0 }).then(async (silderList) => {
|
|
|
+ getSilder({ hid: 0 }).then(async silderList => {
|
|
|
let tempData = [];
|
|
|
if (silderList.code == 200) {
|
|
|
this.silderList = silderList.data;
|
|
@@ -240,7 +241,7 @@ export default {
|
|
|
},
|
|
|
setTableData(result) {
|
|
|
let list = [];
|
|
|
- list = result.map((res) => {
|
|
|
+ list = result.map(res => {
|
|
|
if (!this.filterIds.includes(res.id)) {
|
|
|
let tempList = {};
|
|
|
tempList = {
|
|
@@ -251,7 +252,7 @@ export default {
|
|
|
path: res.path,
|
|
|
permission: res.permission,
|
|
|
icon: res.icon,
|
|
|
- parentId: res.parentId,
|
|
|
+ parentId: res.parentId
|
|
|
};
|
|
|
this.slideCount++;
|
|
|
if (res.sysMenus && res.sysMenus.length > 0) {
|
|
@@ -262,7 +263,7 @@ export default {
|
|
|
return null;
|
|
|
});
|
|
|
let tempList = [];
|
|
|
- list.forEach((item) => {
|
|
|
+ list.forEach(item => {
|
|
|
if (item) {
|
|
|
tempList.push(item);
|
|
|
}
|
|
@@ -273,7 +274,7 @@ export default {
|
|
|
this.$refs.tree.setCheckedNodes([]);
|
|
|
this.result = {
|
|
|
roleName: null,
|
|
|
- roleDesc: null,
|
|
|
+ roleDesc: null
|
|
|
};
|
|
|
this.isIndeterminate = false;
|
|
|
this.checkAll = false;
|
|
@@ -289,12 +290,12 @@ export default {
|
|
|
if (this.isplatform) {
|
|
|
this.$router.push({
|
|
|
path: "/platformAdminManger",
|
|
|
- query: { page: this.page },
|
|
|
+ query: { page: this.page }
|
|
|
});
|
|
|
} else {
|
|
|
this.$router.push({
|
|
|
path: "/adminManager",
|
|
|
- query: { page: this.page },
|
|
|
+ query: { page: this.page }
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -309,8 +310,8 @@ export default {
|
|
|
onReSetRole() {
|
|
|
this.seachRoleValue = "";
|
|
|
this.data = this.setTableData(this.silderList);
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|