xiangpei
2024-06-05 05ea3ffeb18b80ddadfb411dd725d05cff1dd2e1
src/views/Manage/ClassManagement/Class.vue
@@ -40,10 +40,10 @@
                  width="180px"
                ></el-table-column>
                <el-table-column
                  label="年级"
                  label="状态"
                  align="center"
                  width="80px"
                  prop="grade"
                  prop="status"
                ></el-table-column>
                <el-table-column
                  width="100px"
@@ -64,13 +64,13 @@
                  prop="teacherPhone"
                ></el-table-column>
                <el-table-column
                  width="90px"
                  width="140px"
                  label="开班时间"
                  align="center"
                  prop="startTime"
                ></el-table-column>
                <el-table-column
                  width="90px"
                  width="140px"
                  label="结束时间"
                  align="center"
                  prop="endTime"
@@ -81,10 +81,11 @@
                  fixed="right"
                >
                  <template slot-scope="scope">
                    <el-button>班级验证</el-button>
                    <el-button>通知</el-button>
                    <el-button @click="routersTo()">成员管理</el-button>
                    <el-button>添加成员</el-button>
                    <el-button size="small" @click="handlerEdit(scope.row)" type="primary">修改</el-button>
                    <el-button size="small" type="warning">班级验证</el-button>
                    <el-button size="small" type="info">通知</el-button>
                    <el-button @click="studentManager(scope.row.id)" size="small" type="success">成员管理</el-button>
                    <el-button v-if="scope.row.status !== '解散'" @click="dissolution(scope.row.id)" type="danger" size="small">解散</el-button>
                  </template>
                </el-table-column>
              </el-table>
@@ -150,7 +151,7 @@
</template>
<script>
import { addClasses, editClasses, getClassess } from "@/api/classes";
import { addClasses, editClasses, getClassess, dissolution } from "@/api/classes";
import Pagination from "@/components/Pagination"
export default {
  components: {Pagination},
@@ -230,6 +231,16 @@
        }
      });
    },
    dissolution(id) {
      dissolution(id).then(res => {
        this.$message.success(res.data.message)
        this.page()
      })
    },
    handlerEdit(row) {
      this.form = row;
      this.open = true
    },
    handleClose() {
      this.open = false
      this.resetForm()
@@ -239,10 +250,8 @@
      this.title = "新增班级"
    },
    // 跳转(查看班级人员情况)
    routersTo() {
      this.$router.push({
        name: "ClassStaff",
      });
    studentManager(classesId) {
      this.$router.push({ path: "class-management/Class-staff", query: { classesId: classesId } });
    },
    // 返回上一个页面
    goBack() {