feat: 空状态引导全面应用与考勤批量标记

admin:
- 17 个列表页空态统一为 QueryEmpty 引导:学生/账单/入住/费用/押金/
  教室/房间/班级/考试/排课/机构/考勤机/钱包/租赁/通知/角色等,
  有创建权限的页面附带主操作按钮,无权限时纯展示
- 教师端课堂点名新增「全部已打卡/全部未打卡」批量按钮:
  仅作用于状态不一致的记录,确认后调用批量接口,展示成功/失败数量

server:
- 新增 PUT /attendance-records/batch-status 批量改状态接口
  (ids ≤200,逐条权限校验与会话锁,部分失败返回 failedIds,
  审计日志记录批量结果;路由声明在 :id 之前避免被捕获)

aislop scan: 5 引擎 0 issues
This commit is contained in:
2026-08-07 18:00:29 +08:00
parent c10476d203
commit 1b4ba893fd
23 changed files with 350 additions and 77 deletions

View File

@@ -1,7 +1,7 @@
import React, { useCallback, useEffect, useState } from 'react';
import { validateResponse } from '../../utils/validate';
import { notificationsSchema } from '../../api/schemas';
import { List, Typography, Menu, Layout, Button, Empty, Spin, Space, Grid, Select } from 'antd';
import { List, Typography, Menu, Layout, Button, Spin, Space, Grid, Select } from 'antd';
import {
BellOutlined,
DollarOutlined,
@@ -13,7 +13,7 @@ import { useNavigate } from 'react-router';
import api from '../../api';
import { message } from '../../ui/app-message';
import { formatNotificationText } from '../../utils/notification-display';
import { QueryErrorState } from '../../components/QueryState';
import { QueryErrorState, QueryEmpty } from '../../components/QueryState';
const { Sider, Content } = Layout;
const { useBreakpoint } = Grid;
@@ -174,7 +174,7 @@ const NotificationsPage: React.FC = () => {
) : (
<Spin spinning={loading}>
{filtered.length === 0 ? (
<Empty description="暂无通知" />
<QueryEmpty description="暂无通知,有新消息时会在这里提醒你" />
) : (
<List
dataSource={filtered}