1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| import type { MyPaperStatus } from './types';
|
| export const MY_PAPER_STATUS_OPTIONS: {
| id: MyPaperStatus;
| fullName: string;
| color?: string;
| }[] = [
| { id: 'notStarted', fullName: '未开始', color: '#8c8c8c' },
| { id: 'doing', fullName: '考试中', color: '#1890ff' },
| { id: 'submitted', fullName: '已交卷', color: '#52c41a' },
| ];
|
| export function labelOfMyPaperStatus(v?: string) {
| return MY_PAPER_STATUS_OPTIONS.find((x) => x.id === v)?.fullName ?? v ?? '-';
| }
|
| export function colorOfMyPaperStatus(v?: string) {
| return MY_PAPER_STATUS_OPTIONS.find((x) => x.id === v)?.color;
| }
|
|