xiangpei
2024-06-03 7acd42585f16c540888e5b5670fe1ac9fa00ea30
src/views/Manage/ClassManagement/Class.vue
@@ -36,8 +36,8 @@
                <el-table-column
                  align="center"
                  label="班级"
                  prop="class"
                  width="80px"
                  prop="className"
                  width="180px"
                ></el-table-column>
                <el-table-column
                  label="年级"
@@ -55,29 +55,30 @@
                  align="center"
                  width="100px"
                  label="教师"
                  prop="teacher"
                  prop="createUserName"
                ></el-table-column>
                <el-table-column
                  align="center"
                  width="120px"
                  label="联系电话"
                  prop="phone"
                ></el-table-column>
                <el-table-column
                  width="140px"
                  label="电子邮件"
                  align="center"
                  prop="email"
                  prop="teacherPhone"
                ></el-table-column>
                <el-table-column
                  width="90px"
                  label="开班时间"
                  align="center"
                  prop="openingTime"
                  prop="startTime"
                ></el-table-column>
                <el-table-column
                  width="90px"
                  label="结束时间"
                  align="center"
                  prop="endTime"
                ></el-table-column>
                <el-table-column
                  label="操作"
                  align="center"
                  fixed="right"
                >
                  <template slot-scope="scope">
                    <el-button>班级验证</el-button>
@@ -194,6 +195,7 @@
    page() {
      getClassess(this.searchForm).then(res => {
        this.tableData = res.data.data
        this.total = res.data.total
      })
    },
    resetForm() {
@@ -213,13 +215,16 @@
          if (this.form.id) {
            editClasses(this.form).then(res => {
              this.$message.success("修改成功")
              this.resetForm()
              this.open = false
            })
          } else {
            addClasses(this.form).then(res => {
              this.$message.success("添加班级成功")
              this.resetForm()
              this.open = false
            })
          }
          this.resetForm()
        } else {
          return false;
        }
@@ -244,6 +249,9 @@
      this.$router.back();
    },
  },
  created() {
    this.page()
  },
};
</script>