diff --git a/src/api/grade.js b/src/api/grade.js index 5a334b6..8c855c0 100644 --- a/src/api/grade.js +++ b/src/api/grade.js @@ -22,11 +22,11 @@ export function ModifyTeacher(params) { } export function StudentGetClassPageList(a, b, c, d, e, f, g) { - return http.get(`/api/Student/GetStudentPageList?ClassId=${a}&StudentNo=${b}&StudentName=${c}&Sex=${d}&StudentStatus=${e}&PageIndex=${f}&PageSize=${g}`) + return http.get(`/api/Student/GetStudentPageList?ClassId=${a ?? 0}&StudentNo=${b}&StudentName=${c}&Sex=${d}&StudentStatus=${e}&PageIndex=${f}&PageSize=${g}`) } export function StudentGetClassAll(a) { - return http.get(`/api/Student/GetStudentList?ClassId=${a}`) + return http.get(`/api/Student/GetStudentList?ClassId=${a ?? 0}`) } export function AddStudent(params) { @@ -328,7 +328,10 @@ export function getSchoolReservationList(pageIndex, status) { //更新预约状态 export function changeSchoolReservationStatus(id, status) { - return http.post(`/api/School/UpdateSchoolAccountApplicationStatus?id=${id}0&Status=${status ? status : 0}`) + return http.post(`/api/School/UpdateSchoolAccountApplicationStatus?id=${id}&Status=${status ? status : 0}`,{ + status: status ? status : 0, + id: id + }) } diff --git a/src/views/openReservation/index.vue b/src/views/openReservation/index.vue index 20839f5..108518d 100644 --- a/src/views/openReservation/index.vue +++ b/src/views/openReservation/index.vue @@ -3,6 +3,7 @@ import { ref, onMounted } from 'vue' import { Table, Tag, Divider, ConfigProvider, Input, Button, Modal, Select, Pagination, message ,Popconfirm} from 'ant-design-vue'; import zhCN from 'ant-design-vue/es/locale/zh_CN'; import { getSchoolReservationList } from '@/api/grade'; +import { changeSchoolReservationStatus } from '@/api/grade'; // Component logic goes here @@ -71,6 +72,12 @@ const handleChange = (value) => { searchSchoolStatus.value = value; getSchoolList(); } + +const changeStutus = async (id ) =>{ + const res = await changeSchoolReservationStatus(id,2); + message.success('状态变更成功'); + getSchoolList(); +}