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 | 75 | command.params = |
76 | 76 | transportType === TransportTypeEnum.TCP |
77 | 77 | ? field[CommandFieldsEnum.TCP_SERVICE] |
78 | - : field[CommandFieldsEnum.MODEL_INPUT]; | |
78 | + : { | |
79 | + [field[CommandFieldsEnum.SERVICE]]: field[CommandFieldsEnum.MODEL_INPUT], | |
80 | + }; | |
79 | 81 | command.additionalInfo = { cmdType: 1 }; |
80 | - command.params = { | |
81 | - [field[CommandFieldsEnum.SERVICE]]: command.params, | |
82 | - }; | |
83 | 82 | } |
84 | - | |
85 | 83 | commandIssuanceApi( |
86 | 84 | field[CommandFieldsEnum.CUSTOM_TYPE] as CommandDeliveryWayEnum, |
87 | 85 | props.deviceDetail.tbDeviceId, | ... | ... |
... | ... | @@ -277,7 +277,7 @@ |
277 | 277 | |
278 | 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 | 282 | if (!isCustomCommand) { |
283 | 283 | for (const key of thingsModelKeys) { | ... | ... |