| | |
| | | |
| | | <a-tab-pane :key="2" tab="分配用户"> |
| | | <UserPermissionTransfer ref="userPermissionTransferRef" :currentTreeNodeInfo="currentTreeNodeInfo" |
| | | :dataSource="allUsersList" :isAssignSonNode="isAssignSonNode"/> |
| | | :dataSource="allUsersList" :isAssignSonNode="isAssignSonNode" |
| | | @setAdminDisabled="setAdminDisabled"/> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-modal> |
| | |
| | | this.allTreeKeys = [] |
| | | queryProductionTreeList() |
| | | .then(res => { |
| | | console.log('res-------------------', res) |
| | | if (res.success) { |
| | | this.allDepartmentsList = res.result |
| | | this.generateList(this.allDepartmentsList) |
| | |
| | | dncApi.getAllUsersListApi() |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.allUsersList = res.result.records.map(item => { |
| | | return { |
| | | ...item, |
| | | disabled: item.username === 'admin' |
| | | } |
| | | }) |
| | | this.allUsersList = res.result.records |
| | | this.$nextTick(() => this.$refs.userPermissionTransferRef.getHasPermissionUserByApi()) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | setAdminDisabled() { |
| | | this.allUsersList = this.allUsersList.map(item => { |
| | | return { |
| | | ...item, |
| | | disabled: item.username === 'admin' |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleModalClose() { |
| | | this.visible = false |
| | | this.hasLoadedDataTabKeyArray = [] |