Commit 0ba3e52ded458f8f4d2c67c179cbaa3fb372a9fd

Authored by fengtao
1 parent 9a37e8da

pref:优化场景联动部分代码 根据产品获取对应设备

@@ -386,6 +386,7 @@ export const actionSchema: FormSchema[] = [ @@ -386,6 +386,7 @@ export const actionSchema: FormSchema[] = [
386 getPopupContainer: () => document.body, 386 getPopupContainer: () => document.body,
387 onChange: () => { 387 onChange: () => {
388 setFieldsValue({ deviceId: [] }); 388 setFieldsValue({ deviceId: [] });
  389 + setFieldsValue({ thingsModelId: '' });
389 }, 390 },
390 }; 391 };
391 }, 392 },
@@ -509,7 +510,6 @@ export const actionSchema: FormSchema[] = [ @@ -509,7 +510,6 @@ export const actionSchema: FormSchema[] = [
509 valueField: 'id', 510 valueField: 'id',
510 getPopupContainer: () => document.body, 511 getPopupContainer: () => document.body,
511 onChange: (_, options: ModelOfMatterParams) => { 512 onChange: (_, options: ModelOfMatterParams) => {
512 - // console.log(options);  
513 setFieldsValue({ doContext: { ...options.functionJson, callType: options.callType } }); 513 setFieldsValue({ doContext: { ...options.functionJson, callType: options.callType } });
514 }, 514 },
515 }; 515 };
@@ -141,7 +141,7 @@ export const genActionData = (actionData) => { @@ -141,7 +141,7 @@ export const genActionData = (actionData) => {
141 entityType: device ?? 'ALL', 141 entityType: device ?? 'ALL',
142 deviceId: device === 'PART' ? deviceId : null, 142 deviceId: device === 'PART' ? deviceId : null,
143 deviceProfileId, 143 deviceProfileId,
144 - commandType, 144 + commandType: Number(commandType),
145 callType, 145 callType,
146 service, 146 service,
147 thingsModelId, 147 thingsModelId,