New file |
| | |
| | | import axios from "./request"; |
| | | |
| | | // 获取班级通知分页 |
| | | export const getClassesNotifys = (params) => { |
| | | return axios({ |
| | | url: "/api/classes-notify/page", |
| | | method: "GET", |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | // 获取班级通知列表 |
| | | export const getClassesNotifyList = () => { |
| | | return axios({ |
| | | url: "/api/classes-notify/list", |
| | | method: "GET" |
| | | }) |
| | | } |
| | | |
| | | // 通过id获取班级通知 |
| | | export const getClassesNotifyById = (params) => { |
| | | return axios({ |
| | | url: "/api/classes-notify/" + params, |
| | | method: "GET" |
| | | }) |
| | | } |
| | | |
| | | // 通过id删除班级通知 |
| | | export const deleteClassesNotifyById = (params) => { |
| | | return axios({ |
| | | url: "/api/classes-notify/" + params, |
| | | method: "DELETE" |
| | | }) |
| | | } |
| | | |
| | | // 批量删除班级通知 |
| | | export const deleteClassesNotifyByIds = (params) => { |
| | | return axios({ |
| | | url: "/api/classes-notify/batch", |
| | | method: "DELETE", |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | // 修改班级通知 |
| | | export const editClassesNotify = (params) => { |
| | | return axios({ |
| | | url: "/api/classes-notify/", |
| | | method: "PUT", |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | // 添加班级通知 |
| | | export const addClassesNotify = (params) => { |
| | | return axios({ |
| | | url: "/api/classes-notify/", |
| | | method: "POST", |
| | | data: params |
| | | }) |
| | | } |
| | |
| | | <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 @click="remove(scope.row.id)" type="danger" size="small">解散</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> |
| | |
| | | </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}, |
| | |
| | | } |
| | | }); |
| | | }, |
| | | remove(id) { |
| | | deleteClassesById(id).then(res => { |
| | | dissolution(id) { |
| | | dissolution(id).then(res => { |
| | | this.$message.success(res.data.message) |
| | | this.page() |
| | | }) |