| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="密码" prop="password"> |
| | | <el-input v-model="form.password" placeholder="密码" clearable></el-input> |
| | | <el-form-item label="密码"> |
| | | <el-input v-model="form.test" placeholder="" disabled clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | isSaveing: false, |
| | | //表单数据 |
| | | form: { |
| | | test: "", |
| | | account: "", |
| | | realName: "", |
| | | password: "", |
| | | phone: "", |
| | | email: "", |
| | | employeeId: "", |
| | |
| | | } |
| | | }) |
| | | }, |
| | | //表单注入数据 |
| | | showDetail(data) { |
| | | this.$HTTP.get("/api/blade-user/detail?id="+data.id).then(res=> { |
| | | if(res.code == 200) { |
| | | res.data.employeeIdStr = res.data.employeeId; |
| | | res.data.deptIdStr = res.data.deptId; |
| | | res.data.roleIdStr = res.data.roleId; |
| | | res.data.roleId = res.data.roleId.split(","); |
| | | res.data.deptId = [res.data.deptId]; |
| | | Object.assign(this.form, res.data); |
| | | console.log(this.form); |
| | | } |
| | | }) |
| | | }, |
| | | //表单注入数据 |
| | | setData(data){ |
| | | this.form.id = data.id |
| | | this.form.userName = data.userName |
| | | this.form.avatar = data.avatar |
| | | this.form.name = data.name |
| | | this.form.group = data.group |
| | | this.form.dept = data.dept |
| | | |
| | | //可以和上面一样单个注入,也可以像下面一样直接合并进去 |
| | | //Object.assign(this.form, data) |
| | | this.showDetail(data); |
| | | } |
| | | } |
| | | } |