fuliqi
2024-10-17 0cefa99d2ae9ba43e60fe3e1beceb000dd186931
src/views/class-management/ClassStaff.vue
@@ -59,9 +59,8 @@
        width="300px"
      >
        <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>
          <el-button @click="handlerEditStudent(scope.row)" type="warning" size="small">编辑</el-button>
          <el-button @click="remove(scope.row.id)" type="danger" size="small">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
@@ -84,8 +83,8 @@
        </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">
@@ -142,7 +141,7 @@
    return {
      studentForm: {
        realName: '',
        sex: '',
        sex: 1,
        phone: '',
        age: null,
        account: '',
@@ -206,7 +205,7 @@
    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