|
@@ -293,11 +293,30 @@
|
|
submit() {
|
|
submit() {
|
|
const menuList = this.$refs.treeMenu.getCheckedKeys();
|
|
const menuList = this.$refs.treeMenu.getCheckedKeys();
|
|
const menuClientList = this.$refs.treeClientMenu.getCheckedKeys();
|
|
const menuClientList = this.$refs.treeClientMenu.getCheckedKeys();
|
|
|
|
+ const menuListHanlf = this.$refs.treeMenu.getHalfCheckedKeys();
|
|
|
|
+ const menuClientListHanlf = this.$refs.treeMenu.getHalfCheckedKeys();
|
|
const dataScopeList = this.$refs.treeDataScope.getCheckedKeys();
|
|
const dataScopeList = this.$refs.treeDataScope.getCheckedKeys();
|
|
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
|
|
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
|
|
const tableOwnersList = this.$refs.tableOwners.getCheckedKeys();
|
|
const tableOwnersList = this.$refs.tableOwners.getCheckedKeys();
|
|
|
|
|
|
- grant(this.idsArray, menuList, menuClientList, dataScopeList, apiScopeList, tableOwnersList).then(() => {
|
|
|
|
|
|
+ let menuAll = [];
|
|
|
|
+ let menuClientAll = [];
|
|
|
|
+ menuList.forEach((id)=>{
|
|
|
|
+ menuAll.push(id+'&&all')
|
|
|
|
+ })
|
|
|
|
+ menuListHanlf.forEach((id)=>{
|
|
|
|
+ menuAll.push(id+'&&hanlf')
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ menuClientList.forEach((id)=>{
|
|
|
|
+ menuClientAll.push(id+'&&all')
|
|
|
|
+ })
|
|
|
|
+ menuClientListHanlf.forEach((id)=>{
|
|
|
|
+ menuClientAll.push(id+'&&hanlf')
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ grant(this.idsArray, menuAll, menuClientAll, dataScopeList, apiScopeList, tableOwnersList).then(() => {
|
|
this.box = false;
|
|
this.box = false;
|
|
this.$message({
|
|
this.$message({
|
|
type: "success",
|
|
type: "success",
|
|
@@ -395,8 +414,24 @@
|
|
this.dataScopeGrantList = res.data.data.dataScope;
|
|
this.dataScopeGrantList = res.data.data.dataScope;
|
|
this.apiScopeGrantList = res.data.data.apiScope;
|
|
this.apiScopeGrantList = res.data.data.apiScope;
|
|
getRole(this.ids).then(res => {
|
|
getRole(this.ids).then(res => {
|
|
- this.menuTreeObj = res.data.data.menu;
|
|
|
|
- this.menuClientObj = res.data.data.usermenu;
|
|
|
|
|
|
+ let menuTreeObj = [];
|
|
|
|
+ res.data.data.menu.forEach((item)=>{
|
|
|
|
+ let arr = item.split("&&");
|
|
|
|
+ if(arr[1] == 'all'){
|
|
|
|
+ menuTreeObj.push(arr[0])
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ this.menuTreeObj = menuTreeObj;
|
|
|
|
+
|
|
|
|
+ let menuClientObj = [];
|
|
|
|
+ res.data.data.usermenu.forEach((item)=>{
|
|
|
|
+ let arr = item.split("&&");
|
|
|
|
+ if(arr[1] == 'all'){
|
|
|
|
+ menuClientObj.push(arr[0])
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ this.menuClientObj = menuClientObj;
|
|
|
|
+
|
|
this.tableOwnerObj = res.data.data.tableOwners;
|
|
this.tableOwnerObj = res.data.data.tableOwners;
|
|
this.dataScopeTreeObj = res.data.data.dataScope;
|
|
this.dataScopeTreeObj = res.data.data.dataScope;
|
|
this.apiScopeTreeObj = res.data.data.apiScope;
|
|
this.apiScopeTreeObj = res.data.data.apiScope;
|