yangyin
2024-11-12 815e9320bf805423dc8504a109a865c2c7578cad
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
57
58
import List from './components/List.vue';
import Timestamp from './components/Timestamp.vue';
import TimeRange from './components/TimeRange.vue';
import { ChartTypeEnum } from '../../../types';
import StringInput from '../recordSetTable/components/StringInput.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': '优',
};