Commit 67e89649e54984ba8c1dda82a7e3a5aa16a22de0

Authored by xp.Huang
2 parents d599f5e8 6b7b75e6

Merge branch 'fix/linkedge-action-select-service' into 'main_dev'

fix: 修复场景联动执行动作选择服务报错

See merge request yunteng/thingskit-front!716
@@ -674,7 +674,7 @@ export const actionSchema: FormSchema[] = [ @@ -674,7 +674,7 @@ export const actionSchema: FormSchema[] = [
674 thingsModelKeys: isArray(options?.functionJson?.inputData) 674 thingsModelKeys: isArray(options?.functionJson?.inputData)
675 ? options?.functionJson?.inputData 675 ? options?.functionJson?.inputData
676 .filter((item) => item.accessMode === ReadAndWriteEnum.READ_AND_WRITE) 676 .filter((item) => item.accessMode === ReadAndWriteEnum.READ_AND_WRITE)
677 - .filter((item) => item.identifier) 677 + .map((item) => item.identifier)
678 : [], 678 : [],
679 }; 679 };
680 transportType === TransportTypeEnum.TCP 680 transportType === TransportTypeEnum.TCP
@@ -271,7 +271,7 @@ @@ -271,7 +271,7 @@
271 const value = getFieldsValue(); 271 const value = getFieldsValue();
272 const isTCPTransportType = value.transportType === TransportTypeEnum.TCP; 272 const isTCPTransportType = value.transportType === TransportTypeEnum.TCP;
273 const doContext = unref(jsonInstance)?.get() || {}; 273 const doContext = unref(jsonInstance)?.get() || {};
274 - const serviceInputValue = Reflect.get(value, 'serviceInputValue'); 274 + const serviceInputValue = Reflect.get(value, 'serviceInputValue') || {};
275 275
276 const getServiceIdentifier = Reflect.get(value, 'serviceIdentifier'); 276 const getServiceIdentifier = Reflect.get(value, 'serviceIdentifier');
277 277
@@ -281,7 +281,7 @@ @@ -281,7 +281,7 @@
281 281
282 if (!isCustomCommand) { 282 if (!isCustomCommand) {
283 for (const key of thingsModelKeys) { 283 for (const key of thingsModelKeys) {
284 - if (isNullOrUnDef(serviceInputValue[key]) || '') { 284 + if (isNullOrUnDef((serviceInputValue || {})[key]) || '') {
285 message.warning('服务命令为必填项'); 285 message.warning('服务命令为必填项');
286 throw ''; 286 throw '';
287 } 287 }