| | |
| | | that.targetKeys = [] |
| | | dncApi.getDeviceTreeHasPermissionUserApi(this.currentTreeNodeInfo) |
| | | .then(res => { |
| | | if (res.success) this.targetKeys = res.list.map(item => item.id) |
| | | if (res.success) { |
| | | that.targetKeys = res.list.map(item => item.id) |
| | | if (that.targetKeys.includes(that.dataSource.find(item => item.username === 'admin').id)) that.$emit('setAdminDisabled') |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.spinning = false |
| | |
| | | isAssignSonNode: isAssignSonNode ? 1 : 2, |
| | | userIdArray: moveKeys |
| | | } |
| | | console.log('params--------------------------', params) |
| | | console.log(targetKeys, direction, moveKeys) |
| | | if (direction === 'right') { |
| | | method = dncApi.assignDeviceDeviceTreePermissionToUser |
| | | } else { |
| | |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | this.targetKeys = targetKeys |
| | | that.targetKeys = targetKeys |
| | | if (targetKeys.includes(that.dataSource.find(item => item.username === 'admin').id)) that.$emit('setAdminDisabled') |
| | | } else { |
| | | $notification.error({ |
| | | message: '消息', |