修改布局,修复BUG
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled

This commit is contained in:
杨志
2025-12-08 11:49:09 +08:00
parent 51a72f1f0c
commit 8e308a75f6
27 changed files with 1487 additions and 362 deletions

View File

@@ -22,10 +22,13 @@ export namespace ClassroomApi {
export interface ClassroomLayoutCell {
col: number;
row: number;
type: 'empty' | 'pillar' | 'aisle' | 'seat' | 'door';
type: 'empty' | 'pillar' | 'aisle' | 'seat' | 'door' | 'projector';
number?: string;
status?: number;
status?: number; // 座位状态1=可用, 0=禁坐
name?: string;
colspan?: number; // 合并列数默认1
rowspan?: number; // 合并行数默认1
merged?: boolean; // 是否为被合并的单元格(用于标记被主单元格合并的单元格)
}
/** 教室座位布局 */
@@ -107,6 +110,20 @@ export namespace ClassroomApi {
export interface CancelBookingAutoParams {
ids: number[];
}
/** 获取教室选座列表参数 */
export interface GetSeatListParams {
id: number;
}
/** 座位信息 */
export interface SeatInfo {
seat_number: string;
is_selected: number; // 1已选0未选
student_name: string;
student_mobile: string;
select_time: string;
}
}
/**
@@ -235,3 +252,15 @@ export async function uploadClassroomImageApi(file: File) {
});
}
/**
* 获取教室选座列表
* GET /api/admin/classroom/getSeatList
*/
export async function getClassroomSeatListApi(params: ClassroomApi.GetSeatListParams) {
// 使用 responseReturn: 'body' 获取完整响应体
return requestClient.get<any>('/api/admin/classroom/getSeatList', {
params,
responseReturn: 'body',
});
}

View File

@@ -1,6 +1,17 @@
import { requestClient } from '#/api/request';
export namespace IndexApi {
/** 统计数据 */
export interface Statistics {
school_count?: number;
classroom_count?: number;
class_count?: number;
student_count?: number;
teacher_count?: number;
booking_count?: number;
selected_seat_count?: number;
}
/** 系统信息 */
export interface SystemInfo {
os?: string;
@@ -14,6 +25,7 @@ export namespace IndexApi {
disk_usage?: string;
runtime_path?: string;
framework_version?: string;
statistics?: Statistics;
[key: string]: any;
}
}

View File

@@ -56,10 +56,12 @@ export async function saveSettingApi(data: SettingApi.SaveParams) {
export async function uploadSettingImageApi(file: File) {
const formData = new FormData();
formData.append('file', file);
return requestClient.post<string>('/api/admin/setting/upload', formData, {
// 使用 responseReturn: 'body' 获取完整响应体
return requestClient.post<any>('/api/admin/setting/upload', formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
responseReturn: 'body',
});
}