xiangpei
2024-06-05 9fc8e22919a7126dde99eed72aac1b0a6ef9a460
班级通知
1个文件已修改
1个文件已添加
69 ■■■■■ 已修改文件
src/api/classesNotify.js 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Manage/ClassManagement/Class.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/classesNotify.js
New file
@@ -0,0 +1,61 @@
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
    })
}
src/views/Manage/ClassManagement/Class.vue
@@ -85,7 +85,7 @@
                    <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>
@@ -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,8 +231,8 @@
        }
      });
    },
    remove(id) {
      deleteClassesById(id).then(res => {
    dissolution(id) {
      dissolution(id).then(res => {
        this.$message.success(res.data.message)
        this.page()
      })