| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="归属部门" prop="deptId"> |
| | | <treeselect |
| | | v-model="form.deptId" |
| | | v-model="form.depts" |
| | | :options="deptOptions" |
| | | :multiple="true" |
| | | :show-count="true" |
| | | placeholder="请选择归属部门" |
| | | /> |
| | |
| | | initPassword: undefined, |
| | | // 日期范围 |
| | | dateRange: [], |
| | | deptIds: [], |
| | | // 岗位选项 |
| | | postOptions: [], |
| | | // 角色选项 |
| | |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | getUser().then((response) => { |
| | | this.postOptions = response.posts; |
| | | this.roleOptions = response.roles; |
| | | this.open = true; |
| | | this.open = true; |
| | | this.title = "添加用户"; |
| | | this.form.password = this.initPassword; |
| | | }); |
| | | this.form.depts = []; |
| | | // getUser().then((response) => { |
| | | // this.postOptions = response.posts; |
| | | // this.roleOptions = response.roles; |
| | | |
| | | // }); |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | this.deptIds = []; |
| | | const userId = row.userId || this.ids; |
| | | getUser(userId).then((response) => { |
| | | this.form = response.data; |
| | | |
| | | this.postOptions = response.posts; |
| | | this.roleOptions = response.roles; |
| | | this.$set(this.form, "postIds", response.postIds); |