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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import { TYPE0, TYPE1, TYPE2 } from '@/constant/device-type';
import { option1, option2 } from '@/constant/radio-options/options';
import { option1 as option1Jingan } from '@/constant/radio-options/options-jingan';
 
// 监测因子单选框选项
function radioOptions(deviceType) {
  if (import.meta.env.VITE_DATA_MODE == 'jingan') {
    if (TYPE0 == deviceType) {
      return option1Jingan;
    } else {
      return [];
    }
  } else {
    if ([TYPE0, TYPE1].includes(deviceType)) {
      return option1;
    } else if (deviceType == TYPE2) {
      return option2;
    } else {
      return [];
    }
  }
}
 
// const option1 = [
//   {
//     label: 'NO2',
//     name: 'NO2',
//     value: '1'
//   },
//   {
//     label: 'CO',
//     name: 'CO',
//     value: '2'
//   },
//   {
//     label: 'H2S',
//     name: 'H2S',
//     value: '3'
//   },
//   {
//     label: 'SO2',
//     name: 'SO2',
//     value: '4'
//   },
//   {
//     label: 'O3',
//     name: 'O3',
//     value: '5'
//   },
//   {
//     label: 'PM2.5',
//     name: 'PM25',
//     value: '6'
//   },
//   {
//     label: 'PM10',
//     name: 'PM10',
//     value: '7'
//   },
//   {
//     label: 'TVOC',
//     name: 'VOC',
//     value: '10'
//   }
// ];
 
// const option2 = [
//   {
//     label: '温度',
//     name: 'TMP',
//     value: '1'
//   },
//   {
//     label: '电导率',
//     name: 'spC',
//     value: '2'
//   },
//   {
//     label: '浊度',
//     name: 'tur',
//     value: '3'
//   },
//   {
//     label: '溶解氧',
//     name: 'DO',
//     value: '4'
//   },
//   {
//     label: 'PH',
//     name: 'PH',
//     value: '5'
//   }
// ];
export { radioOptions };