From 386ae57249168656cf33a5c108aff69a04bfd1cb Mon Sep 17 00:00:00 2001 From: ltx <1006158920@qq.com> Date: Wed, 16 Jul 2025 10:04:46 +0800 Subject: [PATCH] =?UTF-8?q?update:bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/grade.js | 9 ++++++--- src/views/openReservation/index.vue | 9 ++++++++- src/views/sportsHall/classManage/index.vue | 8 ++++---- 3 files changed, 18 insertions(+), 8 deletions(-) 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(); +}