|
@@ -41,6 +41,7 @@
|
|
|
<Organization
|
|
|
title="上级账号组"
|
|
|
:data="dataObj"
|
|
|
+ :checkedKeys="[GroupId]"
|
|
|
:defaultProps="defaultProps"
|
|
|
nodekey="GroupId"
|
|
|
@getTreeData="getTreeData"
|
|
@@ -54,6 +55,8 @@
|
|
|
@checkChange="checkChange"
|
|
|
@radioChanges="radioChanges"
|
|
|
:dataList="roleList"
|
|
|
+ :roleType="roleType"
|
|
|
+ :GroupIds="GroupIds"
|
|
|
:number="8"
|
|
|
/>
|
|
|
</div>
|
|
@@ -111,7 +114,7 @@ import loginpolicy from "@/components/loginpolicy/index.vue";
|
|
|
import rolelist from "@/components/rolelist/index.vue";
|
|
|
import permissionlist from "@/components/permissionlist/index.vue";
|
|
|
import { QueryRole, RoleAuths } from "@/api/apiAuthority";
|
|
|
-import { AddAccGroup, getUserOne } from "@/api/AccountGroup.js";
|
|
|
+import { SaveGroup, getUserOne } from "@/api/AccountGroup.js";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import treeData from "../minixs/treeData";
|
|
|
export default {
|
|
@@ -120,7 +123,7 @@ export default {
|
|
|
postList: {
|
|
|
type: String,
|
|
|
},
|
|
|
- roleData: {
|
|
|
+ arrs: {
|
|
|
type: Array,
|
|
|
default: () => [],
|
|
|
},
|
|
@@ -135,6 +138,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ roleType:"",
|
|
|
checkedAuthList: [],
|
|
|
GroupId: this.$route.query.GroupId,
|
|
|
butPreser: "保存",
|
|
@@ -167,17 +171,19 @@ export default {
|
|
|
queryId: "",
|
|
|
queryType: "group",
|
|
|
objID: "",
|
|
|
+ GroupIds:[],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["systemSet"]),
|
|
|
},
|
|
|
created() {
|
|
|
- const { GroupUpid, GroupId } = this.$route.query;
|
|
|
+ const { GroupId } = this.$route.query;
|
|
|
this.AppId = GroupId;
|
|
|
- this.UpId = GroupUpid;
|
|
|
- this.queryId = GroupUpid;
|
|
|
+ this.UpId = GroupId;
|
|
|
+ this.queryId = GroupId;
|
|
|
let obj;
|
|
|
+ this.getGroupTree();
|
|
|
if (typeof this.$store.state.app.systemSet == "string") {
|
|
|
obj = JSON.parse(this.$store.state.app.systemSet);
|
|
|
} else {
|
|
@@ -188,7 +194,8 @@ export default {
|
|
|
this.OpenGroup = OpenGroup;
|
|
|
if (OpenRole) {
|
|
|
this.title = "角色";
|
|
|
- // this.RoleBox();
|
|
|
+ this.GroupIds=[GroupId];
|
|
|
+
|
|
|
}
|
|
|
if (this.UpId == -1) {
|
|
|
this.queryId = "";
|
|
@@ -318,12 +325,9 @@ export default {
|
|
|
},
|
|
|
//角色选取
|
|
|
checkChange(arr) {
|
|
|
- const datas = [];
|
|
|
+ let datas = [];
|
|
|
const arrs = [];
|
|
|
- for (let i = 0; i < arr.length; i++) {
|
|
|
- datas.push(this.roleList[arr[i]]);
|
|
|
- }
|
|
|
-
|
|
|
+ datas = arr;
|
|
|
datas.forEach((item) => {
|
|
|
const RoleC = {
|
|
|
IsSelected: 1,
|
|
@@ -346,7 +350,7 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
try {
|
|
|
- const res = await AddAccGroup({
|
|
|
+ const res = await SaveGroup({
|
|
|
GroupName: this.addFrom.name,
|
|
|
GroupDesc: this.addFrom.textarea2,
|
|
|
GroupUpid: this.UpId,
|
|
@@ -366,6 +370,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
+ mounted(){
|
|
|
+ this.roleType = "roleByUpId"
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss">
|