Commit 67162ad42b68b55f6e304a15cf905374ea756db7
Merge branch 'fix/DEFECT-1385' into 'main_dev'
fix: 修复场景联动执行动作服务调用调用方式未保存 See merge request yunteng/thingskit-front!685
Showing
1 changed file
with
5 additions
and
1 deletions
@@ -626,6 +626,7 @@ export const actionSchema: FormSchema[] = [ | @@ -626,6 +626,7 @@ export const actionSchema: FormSchema[] = [ | ||
626 | inputData: selected?.functionJson.inputData, | 626 | inputData: selected?.functionJson.inputData, |
627 | }, | 627 | }, |
628 | }); | 628 | }); |
629 | + selected && setFieldsValue({ callType: selected.callType }); | ||
629 | return record; | 630 | return record; |
630 | } catch (error) { | 631 | } catch (error) { |
631 | console.error(error); | 632 | console.error(error); |
@@ -641,8 +642,9 @@ export const actionSchema: FormSchema[] = [ | @@ -641,8 +642,9 @@ export const actionSchema: FormSchema[] = [ | ||
641 | onChange: (_, options: ModelOfMatterParams) => { | 642 | onChange: (_, options: ModelOfMatterParams) => { |
642 | if (options) { | 643 | if (options) { |
643 | // setFieldsValue({ doContext: { ...options.functionJson, callType: options.callType } }); | 644 | // setFieldsValue({ doContext: { ...options.functionJson, callType: options.callType } }); |
645 | + const record = { callType: options.callType }; | ||
644 | transportType === TransportTypeEnum.TCP | 646 | transportType === TransportTypeEnum.TCP |
645 | - ? setFieldsValue({ | 647 | + ? Object.assign(record, { |
646 | tcpServiceCommand: options.functionJson?.inputData?.[0]?.serviceCommand, | 648 | tcpServiceCommand: options.functionJson?.inputData?.[0]?.serviceCommand, |
647 | }) | 649 | }) |
648 | : updateSchema({ | 650 | : updateSchema({ |
@@ -651,6 +653,8 @@ export const actionSchema: FormSchema[] = [ | @@ -651,6 +653,8 @@ export const actionSchema: FormSchema[] = [ | ||
651 | inputData: options.functionJson.inputData, | 653 | inputData: options.functionJson.inputData, |
652 | }, | 654 | }, |
653 | }); | 655 | }); |
656 | + | ||
657 | + setFieldsValue(record); | ||
654 | } | 658 | } |
655 | }, | 659 | }, |
656 | }; | 660 | }; |