This commit is contained in:
zhangzhiqiang
2022-12-19 20:36:31 +08:00
parent da02fba0ae
commit 1f103ddc39
3 changed files with 33 additions and 8 deletions

View File

@@ -152,9 +152,9 @@
<el-table-column prop="gender" label="性别" :min-width="flexWidth('personName',crud.data,'性别')" />
<el-table-column prop="phone" label="电话" :min-width="flexWidth('phone',crud.data,'电话')" />
<el-table-column prop="email" label="邮箱" :min-width="flexWidth('email',crud.data,'邮箱')" />
<el-table-column show-overflow-tooltip prop="depts" label="部门" >
<el-table-column show-overflow-tooltip prop="depts" label="部门">
<template slot-scope="scope">
<span v-for=" item in scope.row.depts" :key="item.index">{{item.name}} </span>
<span v-for=" item in scope.row.depts" :key="item.index">{{ item.name }} </span>
</template>
</el-table-column>>
<el-table-column label="状态" align="center" prop="enabled">
@@ -799,10 +799,11 @@ export default {
userId: this.depCheckedId
}
if (this.flag) {
user.depts = this.$refs.deptUser.getCheckedKeys()
user.deptIds = this.$refs.deptUser.getCheckedKeys()
} else {
user.roles = this.crud.selections.map(item => (item.roleId))
user.rolesIds = this.crud.selections.map(item => (item.roleId))
}
debugger
crudUser.edit(user).then(res => {
this.cancelForm()
this.crud.notify('保存成功', CRUD.NOTIFICATION_TYPE.SUCCESS)