|
@@ -24,13 +24,13 @@
|
|
</div>
|
|
</div>
|
|
<div class="user-types">
|
|
<div class="user-types">
|
|
<div
|
|
<div
|
|
- :class="['user-type', { 'is-active': userType === 'org' }]"
|
|
|
|
|
|
+ :class="['user-type', { 'is-active': isOrgTab }]"
|
|
@click="switchUserType('org')"
|
|
@click="switchUserType('org')"
|
|
>
|
|
>
|
|
组织架构
|
|
组织架构
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
- :class="['user-type', { 'is-active': userType === 'role' }]"
|
|
|
|
|
|
+ :class="['user-type', { 'is-active': !isOrgTab }]"
|
|
@click="switchUserType('role')"
|
|
@click="switchUserType('role')"
|
|
>
|
|
>
|
|
角色
|
|
角色
|
|
@@ -43,6 +43,8 @@
|
|
node-key="id"
|
|
node-key="id"
|
|
:default-checked-keys="selectedUserIds"
|
|
:default-checked-keys="selectedUserIds"
|
|
:props="defaultProps"
|
|
:props="defaultProps"
|
|
|
|
+ :default-expand-all="!isOrgTab"
|
|
|
|
+ :default-expanded-keys="isOrgTab ? userOrgKeys : []"
|
|
>
|
|
>
|
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
|
<el-checkbox
|
|
<el-checkbox
|
|
@@ -138,12 +140,18 @@ export default {
|
|
selectedRoleUserIds: [],
|
|
selectedRoleUserIds: [],
|
|
selectedUserIds: [],
|
|
selectedUserIds: [],
|
|
selectValid: true,
|
|
selectValid: true,
|
|
|
|
+ userOrgKeys: [this.$ls.get("orgId")],
|
|
defaultProps: {
|
|
defaultProps: {
|
|
children: "children",
|
|
children: "children",
|
|
label: "label",
|
|
label: "label",
|
|
},
|
|
},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ computed: {
|
|
|
|
+ isOrgTab() {
|
|
|
|
+ return this.userType === "org";
|
|
|
|
+ },
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
async getOrgData() {
|
|
async getOrgData() {
|
|
const data = await organizationList();
|
|
const data = await organizationList();
|