diff --git a/src/components/rightBox/settings/RoleBox.vue b/src/components/rightBox/settings/RoleBox.vue index e989141d..b640fb30 100644 --- a/src/components/rightBox/settings/RoleBox.vue +++ b/src/components/rightBox/settings/RoleBox.vue @@ -84,7 +84,7 @@ export default { handler (n) { this.editRole = JSON.parse(JSON.stringify(n)) if (this.editRole.roles && this.editRole.roles.length > 0) { - this.editRole.roleIds = this.editRole.roles.map(t => t.id) + this.editRole.roleIds = this.editRole.roles.map(t => t.id).json(',') } } } diff --git a/src/components/table/settings/UserTable.vue b/src/components/table/settings/UserTable.vue index f77335c1..a2ddebf8 100644 --- a/src/components/table/settings/UserTable.vue +++ b/src/components/table/settings/UserTable.vue @@ -143,14 +143,14 @@ export default { methods: { statusChange (user) { if (user.roles) { - user.roleIds = user.roles.map(t => t.id) + user.roleIds = user.roles.map(t => t.id).join(',') } // if (!user.id){ // return // } put('sys/user', user).then(response => { if (response.code === 200) { - this.rightBox.show = false + // this.rightBox.show = false this.$message({ duration: 1000, type: 'success', message: this.$t('tip.saveSuccess') }) } else { this.$message.error(response.msg) diff --git a/src/views/settings/Roles.vue b/src/views/settings/Roles.vue index 06cf1852..078d29d2 100644 --- a/src/views/settings/Roles.vue +++ b/src/views/settings/Roles.vue @@ -67,7 +67,14 @@ export default { url: api.role, tableId: 'rolesTable', // 需要分页的table的id,用于记录每页数量 blankObject: { // 空白对象 - name: '' + name: '', + buildIn: '', + i18n: '', + id: '', + menuIds: [], + remark: '', + uby: 0, + utime: '' } } }, @@ -75,7 +82,7 @@ export default { edit (u) { get(`${this.url}`, { ids: u.id }).then(response => { if (response.code === 200) { - this.object = response.data + this.object = response.data.list[0] this.rightBox.show = true } })