1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| export const TEST_PLAN_STATUS_OPTIONS = [
| { label: '待下发', value: 1 },
| { label: '测试中', value: 2 },
| { label: '已暂停', value: 3 },
| { label: '已完成', value: 4 },
| { label: '关闭测试', value: 5 },
| ]
|
| export const TEST_PLAN_STATUS_LABEL_MAP: Record<number, string> = {
| 1: '待下发',
| 2: '测试中',
| 3: '已暂停',
| 4: '已完成',
| 5: '关闭测试',
| }
|
| export const TEST_PLAN_STATUS_STYLE_MAP: Record<number, { textColor: string, color: string }> = {
| 1: { textColor: '#764DFF', color: '#F6F0FF' },
| 2: { textColor: '#0068FF', color: '#E6F4FF' },
| 3: { textColor: '#FF9000', color: '#FFF8E6' },
| 4: { textColor: '#0BB52D', color: '#DCF5DD' },
| 5: { textColor: 'rgba(23, 31, 38, 0.8)', color: 'rgba(23, 31, 38, 0.05)' },
| }
|
| export function getTestPlanStatusLabel(status: number) {
| return TEST_PLAN_STATUS_LABEL_MAP[status] || '-'
| }
|
| export function getTestPlanStatusStyle(status: number) {
| return TEST_PLAN_STATUS_STYLE_MAP[status] || { textColor: '#333333', color: '#F5F5F5' }
| }
|
|