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"
@@ -84,8 +84,8 @@
                    <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="routersTo()" size="small" type="success">成员管理</el-button>
                    <el-button @click="remove(scope.row.id)" type="danger" size="small">删除</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>
@@ -151,7 +151,7 @@
</template>
<script>
import { addClasses, editClasses, getClassess, deleteClassesById } from "@/api/classes";
import { addClasses, editClasses, getClassess, dissolution } from "@/api/classes";
import Pagination from "@/components/Pagination"
export default {
  components: {Pagination},
@@ -231,9 +231,9 @@
        }
      });
    },
    remove(id) {
      deleteClassesById(id).then(res => {
        this.$message.success("删除成功")
    dissolution(id) {
      dissolution(id).then(res => {
        this.$message.success(res.data.message)
        this.page()
      })
    },
@@ -250,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() {