wujingjing
2025-02-10 e50196bff10f0196307b2567ed6c0829eadd8ff6
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import type { ChartTypeEnum } from '../../../types';
import StringInput from '../recordSetTable/components/StringInput.vue';
import List from './components/List.vue';
import TimeRange from './components/TimeRange.vue';
export const enum RecordSetParamsType {
    Step = 'time_step',
 
    TimeRange = 'time_range',
    StringInput = 'string',
}
 
export type BaseParam = {
    title: string;
    id: string;
};
 
export type ListParamListItem = {
    title: string;
    value: string;
};
export type StepParam = {
    type: RecordSetParamsType.Step;
    value: string;
    list: ListParamListItem[];
    origin: any;
} & BaseParam;
 
export type TimeRangeParamValue = {
    startTime: string;
    endTime: string;
};
export type TimeRangeParam = {
    type: RecordSetParamsType.TimeRange;
    value: [string, string];
    origin: any;
} & BaseParam;
 
export type RecordSetParamsItem = StepParam | TimeRangeParam;
export type RecordSet = {
    params?: RecordSetParamsItem[];
    chartType?: ChartTypeEnum;
};
 
export const recordSetMapCom = {
    [RecordSetParamsType.Step]: List,
    [RecordSetParamsType.TimeRange]: TimeRange,
    [RecordSetParamsType.StringInput]: StringInput,
};
 
export const scoreMap = {
    '0': '未评估',
    '1': '坏',
    '2': '中',
    '3': '良',
    '4': '优',
};