| | |
| | | <template slot-scope="scope"> |
| | | <el-button @click="handlerEditStudent(scope.row)" type="warning">编辑</el-button> |
| | | <el-button @click="remove(scope.row.id)" type="danger">删除</el-button> |
| | | <el-button type="primary">分配角色</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="性别" prop="sex"> |
| | | <el-select v-model="studentForm.sex"> |
| | | <el-option label="男" value="N"></el-option> |
| | | <el-option label="女" value="V"></el-option> |
| | | <el-option label="男" :value="1"></el-option> |
| | | <el-option label="女" :value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="电话" prop="phone"> |
| | |
| | | return { |
| | | studentForm: { |
| | | realName: '', |
| | | sex: '', |
| | | sex: 1, |
| | | phone: '', |
| | | age: null, |
| | | account: '', |
| | |
| | | submitStudentForm () { |
| | | this.$refs['studentForm'].validate((valid) => { |
| | | if (valid) { |
| | | this.studentForm.classes = this.classes.id |
| | | this.studentForm.classesId = this.classes.id |
| | | if (this.studentForm.id) { |
| | | edit(this.studentForm).then(res => { |
| | | this.addOpen = false |