Commit b1ea1acddaff99c4457c0307640b0e37c236ab22
Merge branch 'fix/command-issues' into 'main_dev'
fix: 修复设备列表下发命令tcp命令存在服务标识符 See merge request yunteng/thingskit-front!712
Showing
2 changed files
with
4 additions
and
6 deletions
| @@ -75,13 +75,11 @@ | @@ -75,13 +75,11 @@ | ||
| 75 | command.params = | 75 | command.params = |
| 76 | transportType === TransportTypeEnum.TCP | 76 | transportType === TransportTypeEnum.TCP |
| 77 | ? field[CommandFieldsEnum.TCP_SERVICE] | 77 | ? field[CommandFieldsEnum.TCP_SERVICE] |
| 78 | - : field[CommandFieldsEnum.MODEL_INPUT]; | 78 | + : { |
| 79 | + [field[CommandFieldsEnum.SERVICE]]: field[CommandFieldsEnum.MODEL_INPUT], | ||
| 80 | + }; | ||
| 79 | command.additionalInfo = { cmdType: 1 }; | 81 | command.additionalInfo = { cmdType: 1 }; |
| 80 | - command.params = { | ||
| 81 | - [field[CommandFieldsEnum.SERVICE]]: command.params, | ||
| 82 | - }; | ||
| 83 | } | 82 | } |
| 84 | - | ||
| 85 | commandIssuanceApi( | 83 | commandIssuanceApi( |
| 86 | field[CommandFieldsEnum.CUSTOM_TYPE] as CommandDeliveryWayEnum, | 84 | field[CommandFieldsEnum.CUSTOM_TYPE] as CommandDeliveryWayEnum, |
| 87 | props.deviceDetail.tbDeviceId, | 85 | props.deviceDetail.tbDeviceId, |
| @@ -277,7 +277,7 @@ | @@ -277,7 +277,7 @@ | ||
| 277 | 277 | ||
| 278 | const isCustomCommand = Number(value.commandType) === CommandTypeEnum.CUSTOM; | 278 | const isCustomCommand = Number(value.commandType) === CommandTypeEnum.CUSTOM; |
| 279 | 279 | ||
| 280 | - const thingsModelKeys = Reflect.get(value, 'thingsModelKeys'); | 280 | + const thingsModelKeys = Reflect.get(value, 'thingsModelKeys') || []; |
| 281 | 281 | ||
| 282 | if (!isCustomCommand) { | 282 | if (!isCustomCommand) { |
| 283 | for (const key of thingsModelKeys) { | 283 | for (const key of thingsModelKeys) { |