Commit c96281de authored by jingnan's avatar jingnan 👀

合并产品【11133】权限分配,群组下拉框为空

parent ae2791ab
......@@ -28,50 +28,59 @@
:model="form1"
label-width="120px"
>
<el-form-item label="选择组:">
<OrgLazyLoadSelect
v-model="groupcheckeds"
:is-multi="true"
value-key="id"
:parent-id="tripleTreeNode.level===2 ?tripleTreeNode.organizationId : ''"
style="width: 100%;"
/>
</el-form-item>
<el-form-item label="包含子组织用户:">
<el-checkbox v-model="cascadeSubOrg" />
</el-form-item>
<el-form-item label="选择群组:">
<dee-group
v-model="userGroupcheckeds"
:multiple="true"
value-key="id"
:triple-org-id="tripleTreeNode.level===2 ?tripleTreeNode.organizationId : ''"
style="width: 100%;"
/>
</el-form-item>
<el-form-item label="包含子群组用户:">
<el-checkbox v-model="cascadeSubGroup" />
</el-form-item>
<el-form-item label="选择用户:">
<el-select
v-model="users"
class="auto-width"
multiple
filterable
clearable
remote
value-key="id"
placeholder="输入联想查询用户,可选多个用户"
:remote-method="remoteUserMethod"
>
<el-option
v-for="item in tempUserRemoteOptions"
:key="item.id"
:label="`${item.userName}`+'('+`${item.userAccount}`+')'"
:value="item"
<template v-if="supportTypeItems.includes('组织')">
<el-form-item label="选择组:">
<OrgLazyLoadSelect
v-model="groupcheckeds"
:is-multi="true"
value-key="id"
bind-type="object"
value-type="Array"
:parent-id="tripleTreeNode.level===2 ?tripleTreeNode.organizationId : ''"
style="width: 100%;"
/>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item label="包含子组织用户:">
<el-checkbox v-model="cascadeSubOrg" />
</el-form-item>
</template>
<template v-if="supportTypeItems.includes('群组')">
<el-form-item label="选择群组:">
<dee-group
v-model="userGroupcheckeds"
:multiple="true"
value-key="id"
is-filter-by-org-id
:triple-org-id="tripleTreeNode.level===2 ?tripleTreeNode.organizationId : ''"
style="width: 100%;"
/>
</el-form-item>
<el-form-item label="包含子群组用户:">
<el-checkbox v-model="cascadeSubGroup" />
</el-form-item>
</template>
<template v-if="supportTypeItems.includes('用户')">
<el-form-item label="选择用户:">
<el-select
v-model="users"
class="auto-width"
multiple
filterable
clearable
remote
value-key="id"
placeholder="输入联想查询用户,可选多个用户"
:remote-method="remoteUserMethod"
>
<el-option
v-for="item in tempUserRemoteOptions"
:key="item.id"
:label="`${item.userName}`+'('+`${item.userAccount}`+')'"
:value="item"
/>
</el-select>
</el-form-item>
</template>
</el-form>
<div slot="footer" style="text-align:center">
<el-button
......@@ -495,7 +504,8 @@ export default {
apps: [],
// 授权部门下拉列表
authOrgOptions: [],
permViewIdx: 1
permViewIdx: 1,
supportTypeItems: []
}
},
computed: {
......@@ -513,7 +523,7 @@ export default {
type: 'icon',
name: '指定全部用户',
icon: '/icons/c-add.png',
show: this.tripleTreeNode.level === 1,
show: this.tripleTreeNode.level === 1 && this.supportTypeItems.includes('全部用户'),
handler: {
click: () => {
this.addAllUser()
......@@ -524,7 +534,7 @@ export default {
type: 'icon',
name: '指定本组织用户',
icon: '/icons/c-add.png',
show: this.tripleTreeNode.level === 2,
show: this.tripleTreeNode.level === 2 && this.supportTypeItems.includes('本组织用户'),
handler: {
click: () => {
this.addOwnOrgUser()
......@@ -535,7 +545,7 @@ export default {
type: 'icon',
name: '添加特定用户',
icon: '/icons/c-add.png',
show: true,
show: this.supportTypeItems.some(item => ['组织', '群组', '用户'].includes(item)),
handler: {
click: () => {
this.addSpecificUser()
......@@ -546,7 +556,8 @@ export default {
type: 'icon',
name: '添加团队角色',
icon: '/icons/c-add.png',
show: (this.tripleTreeNode.level === 1 && !this.userInfo.innerFlag) || (!this.userInfo.innerFlag && this.tripleTreeNode.level === 2 && this.currAppData.organizationId && this.currAppData.organizationId === this.tripleTreeNode.organizationId),
// show: (this.tripleTreeNode.level === 1 && !this.userInfo.innerFlag) || (!this.userInfo.innerFlag && this.tripleTreeNode.level === 2 && this.currAppData.organizationId && this.currAppData.organizationId === this.tripleTreeNode.organizationId),
show: this.supportTypeItems.includes('团队'),
handler: {
click: () => {
this.addTeamRole()
......@@ -866,6 +877,7 @@ export default {
},
mounted() {
this.getUser()
this.getSystemConfigByKey()
if (this.currAppData.id + '' === '1') {
const params = {
'searchItems': {
......@@ -1622,6 +1634,16 @@ export default {
this.modelId = data.id
this.permViewIdx = idx
this.getPermByObjIdAndRoleId()
},
async getSystemConfigByKey() {
const res = await get('/SystemConfig/getSystemConfigByKey?configKey=PermGroupUserSupportType')
const val = this.$utils._get(res, 'items[0].configValue')
// 没有配置该首选项则表示有全部权限
if (!res.items || res.items.length === 0 || typeof val !== 'string') {
this.supportTypeItems = ['全部用户据', '本组织用户', '组织', '群组', '团队', '用户']
} else {
this.supportTypeItems = val.split('|').filter(m => !!m)
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment