| | |
| | | <el-input v-model="form.userName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="密码:" required> |
| | | <el-input v-model="form.password"></el-input> |
| | | <el-input v-model="form.password" type="password"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="真实姓名:" prop="realName" required> |
| | | <el-input v-model="form.realName"></el-input> |
| | |
| | | <el-input v-model="form.phone"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="部门:" prop="deptIds" required> |
| | | <el-select v-model="form.deptIds" collapse-tags placeholder="部门"> |
| | | <el-select v-model="form.deptIds" multiple collapse-tags placeholder="部门"> |
| | | <el-option v-for="item in depts" :key="item.id" :value="item.id" :label="item.name"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | sex: '', |
| | | birthDay: null, |
| | | phone: null, |
| | | deptIds: '', |
| | | deptIds: [], |
| | | tagIds: [] |
| | | }, |
| | | formLoading: false, |
| | |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | this.formLoading = true |
| | | this.form.deptIds = this.form.deptIds.join(',') |
| | | userApi.createUser(this.form).then(data => { |
| | | if (data.code === 1) { |
| | | _this.$message.success(data.message) |