diff --git a/jero-web/src/views/system/modules/UserModal.vue b/jero-web/src/views/system/modules/UserModal.vue index 0864d5ce1..ddb2e7430 100644 --- a/jero-web/src/views/system/modules/UserModal.vue +++ b/jero-web/src/views/system/modules/UserModal.vue @@ -21,29 +21,32 @@ - + - - + - + - + - + @@ -53,9 +56,9 @@ - + + > {{ role.roleName }} @@ -72,9 +75,9 @@ - + + > --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -141,20 +144,21 @@ - - - - - - - - - + + + + + + + + + - + - - + + @@ -173,11 +177,11 @@
- - - {{$t('cancel')}} - - + + + {{$t('cancel')}} + + {{$t('submit')}}
@@ -189,7 +193,7 @@ // 引入搜索部门弹出框的组件 import departWindow from './DepartWindow' import { ACCESS_TOKEN } from '@/store/mutation-types' - import { getAction } from '@/api/manage' + import { getAction, postAction } from '@/api/manage' import { addUser, editUser, queryUserRole, queryall } from '@/api/api' import { disabledAuthFilter } from '@/utils/authFilter' import { duplicateCheck } from '@/api/api' @@ -347,6 +351,25 @@ } }) }, + handleSubmitOk() { + this.confirmLoading = true + let selectedRole = JSON.parse(JSON.stringify(this.selectedRole)) + let param = { + ids: this.userId, + selectedroles: selectedRole.join(',') + } + postAction('/sys/user/setRole', param).then((res) => { + if (res.success) { + this.$emit('ok') + this.confirmLoading = false + this.visible = false + this.$message.success(res.message) + } else { + this.confirmLoading = false + this.$message.warning(res.message) + } + }) + }, refresh() { this.selectedDepartKeys = [] this.checkedDepartKeys = [] @@ -383,7 +406,7 @@ that.visible = true that.model = Object.assign({}, record) that.$nextTick(() => { - that.form.setFieldsValue(pick(this.model, 'username', 'sex', 'realname', 'jobTitle','email', 'phone', 'activitiSync', 'workNo', 'telephone', 'post')) + that.form.setFieldsValue(pick(this.model, 'username', 'sex', 'realname', 'jobTitle', 'email', 'phone', 'activitiSync', 'workNo', 'telephone', 'post')) }) //身份为上级显示负责部门,否则不显示 if (this.model.userIdentity == '2') { @@ -728,7 +751,7 @@ .drawer-bootom-button { position: absolute; bottom: -8px; - z-index:100; + z-index: 100; width: 100%; border-top: 1px solid #e8e8e8; padding: 10px 16px; @@ -740,6 +763,6 @@ \ No newline at end of file