Browse Source

#I1XVW9 bug修复用户新增和编辑时,岗位没有数据,且点编辑时,显示的是ID值,而不是岗位的名称

master
xuwenbo 4 years ago
parent
commit
27699a0023
  1. 7
      src/views/system/user/index.vue

7
src/views/system/user/index.vue

@ -93,7 +93,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="岗位" prop="job.id"> <el-form-item label="岗位" prop="job.id">
<el-select v-model="form.job.id" style="width: 178px" placeholder="请先选择部门"> <el-select v-model="form.job.id" style="width: 178px" placeholder="请先选择岗位">
<el-option <el-option
v-for="(item, index) in jobs" v-for="(item, index) in jobs"
:key="item.name + index" :key="item.name + index"
@ -122,7 +122,7 @@
v-model="form.roles" v-model="form.roles"
style="width: 437px" style="width: 437px"
multiple multiple
placeholder="请选择" placeholder="请选择角色"
@remove-tag="deleteTag" @remove-tag="deleteTag"
@change="changeRole" @change="changeRole"
> >
@ -317,11 +317,12 @@ export default {
this.getDepts() this.getDepts()
this.getRoles() this.getRoles()
this.getRoleLevel() this.getRoleLevel()
this.getJobs(null)
form.enabled = form.enabled.toString() form.enabled = form.enabled.toString()
}, },
// //
[CRUD.HOOK.beforeToEdit](crud, form) { [CRUD.HOOK.beforeToEdit](crud, form) {
this.getJobs(this.form.dept.id) this.getJobs()
userRoles = [] userRoles = []
const roles = [] const roles = []
form.roles.forEach(function(role, index) { form.roles.forEach(function(role, index) {

Loading…
Cancel
Save