|
...
|
...
|
@@ -53,6 +53,26 @@ export const createModbusValueInput = (objectModel: Tsl): FormSchema => { |
|
53
|
53
|
const { valueRange } = specs as Specs
|
|
54
|
54
|
const { max, min } = valueRange || {}
|
|
55
|
55
|
|
|
|
56
|
+ if (extensionDesc?.originalDataType === OriginalDataTypeEnum.BOOLEAN) {
|
|
|
57
|
+ const options = [
|
|
|
58
|
+ { label: '闭合', value: parseInt('FF00', 16) },
|
|
|
59
|
+ { label: '断开', value: parseInt('0000', 16) },
|
|
|
60
|
+ ]
|
|
|
61
|
+
|
|
|
62
|
+ return {
|
|
|
63
|
+ field: identifier,
|
|
|
64
|
+ label: functionName,
|
|
|
65
|
+ component: ComponentEnum.SELECT,
|
|
|
66
|
+ componentProps: () => {
|
|
|
67
|
+ return {
|
|
|
68
|
+ options,
|
|
|
69
|
+ placeholder: `请选择${functionName}`,
|
|
|
70
|
+ getPopupContainer: () => document.body,
|
|
|
71
|
+ }
|
|
|
72
|
+ },
|
|
|
73
|
+ }
|
|
|
74
|
+ }
|
|
|
75
|
+
|
|
56
|
76
|
const isStringType = extensionDesc?.originalDataType === OriginalDataTypeEnum.STRING
|
|
57
|
77
|
return {
|
|
58
|
78
|
field: identifier,
|
...
|
...
|
|