Commit 67e89649e54984ba8c1dda82a7e3a5aa16a22de0
Merge branch 'fix/linkedge-action-select-service' into 'main_dev'
fix: 修复场景联动执行动作选择服务报错 See merge request yunteng/thingskit-front!716
Showing
2 changed files
with
3 additions
and
3 deletions
... | ... | @@ -674,7 +674,7 @@ export const actionSchema: FormSchema[] = [ |
674 | 674 | thingsModelKeys: isArray(options?.functionJson?.inputData) |
675 | 675 | ? options?.functionJson?.inputData |
676 | 676 | .filter((item) => item.accessMode === ReadAndWriteEnum.READ_AND_WRITE) |
677 | - .filter((item) => item.identifier) | |
677 | + .map((item) => item.identifier) | |
678 | 678 | : [], |
679 | 679 | }; |
680 | 680 | transportType === TransportTypeEnum.TCP | ... | ... |
... | ... | @@ -271,7 +271,7 @@ |
271 | 271 | const value = getFieldsValue(); |
272 | 272 | const isTCPTransportType = value.transportType === TransportTypeEnum.TCP; |
273 | 273 | const doContext = unref(jsonInstance)?.get() || {}; |
274 | - const serviceInputValue = Reflect.get(value, 'serviceInputValue'); | |
274 | + const serviceInputValue = Reflect.get(value, 'serviceInputValue') || {}; | |
275 | 275 | |
276 | 276 | const getServiceIdentifier = Reflect.get(value, 'serviceIdentifier'); |
277 | 277 | |
... | ... | @@ -281,7 +281,7 @@ |
281 | 281 | |
282 | 282 | if (!isCustomCommand) { |
283 | 283 | for (const key of thingsModelKeys) { |
284 | - if (isNullOrUnDef(serviceInputValue[key]) || '') { | |
284 | + if (isNullOrUnDef((serviceInputValue || {})[key]) || '') { | |
285 | 285 | message.warning('服务命令为必填项'); |
286 | 286 | throw ''; |
287 | 287 | } | ... | ... |