|
@@ -15,7 +15,7 @@
|
|
|
filterable
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in orgList"
|
|
|
+ v-for="item in rootSchoolSelect"
|
|
|
:label="item.name"
|
|
|
:value="item.id"
|
|
|
:key="item.id"
|
|
@@ -96,7 +96,7 @@ export default {
|
|
|
roleId: null,
|
|
|
privilegeGroupId: null
|
|
|
},
|
|
|
- orgList: [],
|
|
|
+ rootOrgList: [],
|
|
|
roleList: [],
|
|
|
privilegeGroupList: [],
|
|
|
treeChanged: false,
|
|
@@ -113,6 +113,17 @@ export default {
|
|
|
...mapState({ user: state => state.user }),
|
|
|
isSuperAdmin() {
|
|
|
return this.user.roleList.some(role => role.roleCode == "SUPER_ADMIN");
|
|
|
+ },
|
|
|
+ rootSchoolSelect() {
|
|
|
+ let rootSchools = [];
|
|
|
+ for (let i = 0; i < this.rootOrgList.length; i++) {
|
|
|
+ let info = {
|
|
|
+ name: this.rootOrgList[i].name + "(" + this.rootOrgList[i].id + ")",
|
|
|
+ id: this.rootOrgList[i].id
|
|
|
+ };
|
|
|
+ rootSchools.push(info);
|
|
|
+ }
|
|
|
+ return rootSchools;
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -128,7 +139,7 @@ export default {
|
|
|
this.$httpWithMsg.post(url2),
|
|
|
this.$httpWithMsg.get(url3)
|
|
|
]).then(([resp1, resp2, resp3]) => {
|
|
|
- this.orgList = resp1.data;
|
|
|
+ this.rootOrgList = resp1.data;
|
|
|
|
|
|
this.form.orgId = this.user.rootOrgId;
|
|
|
this.roleList = resp2.data;
|
|
@@ -168,8 +179,8 @@ export default {
|
|
|
this.$httpWithMsg.get(url1),
|
|
|
this.$httpWithMsg.get(url2)
|
|
|
]).then(([resp1, resp2]) => {
|
|
|
- console.log("initTree(). treeData:", resp1.data.children);
|
|
|
- console.log("initTree(). checkedKeys:", resp2.data);
|
|
|
+ // console.log("initTree(). treeData:", resp1.data.children);
|
|
|
+ // console.log("initTree(). checkedKeys:", resp2.data);
|
|
|
this.treeData = resp1.data.children;
|
|
|
this.checkedKeys = resp2.data;
|
|
|
});
|