Showing
1 changed file
with
4 additions
and
2 deletions
| @@ -81,7 +81,7 @@ | @@ -81,7 +81,7 @@ | ||
| 81 | values: CommandDeliveryFormFieldType, | 81 | values: CommandDeliveryFormFieldType, |
| 82 | serviceCommand: Recordable | 82 | serviceCommand: Recordable |
| 83 | ) => { | 83 | ) => { |
| 84 | - const { commandType } = values; | 84 | + const { commandType, service } = values; |
| 85 | 85 | ||
| 86 | const isTcpDevice = unref(deviceDetail)?.transportType === TransportTypeEnum.TCP; | 86 | const isTcpDevice = unref(deviceDetail)?.transportType === TransportTypeEnum.TCP; |
| 87 | if (commandType === CommandTypeEnum.CUSTOM) { | 87 | if (commandType === CommandTypeEnum.CUSTOM) { |
| @@ -91,7 +91,9 @@ | @@ -91,7 +91,9 @@ | ||
| 91 | return parseStringToJSON(values.commandValue!).json; | 91 | return parseStringToJSON(values.commandValue!).json; |
| 92 | } else { | 92 | } else { |
| 93 | if (isTcpDevice) return Reflect.get(serviceCommand, CommandFieldsEnum.SERVICE_COMMAND); | 93 | if (isTcpDevice) return Reflect.get(serviceCommand, CommandFieldsEnum.SERVICE_COMMAND); |
| 94 | - return serviceCommand; | 94 | + return { |
| 95 | + [service!]: serviceCommand, | ||
| 96 | + }; | ||
| 95 | } | 97 | } |
| 96 | }; | 98 | }; |
| 97 | 99 |