Showing
1 changed file
with
15 additions
and
1 deletions
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | import { BasicForm, FormActionType, ThingsModelForm } from '/@/components/Form'; | 5 | import { BasicForm, FormActionType, ThingsModelForm } from '/@/components/Form'; |
| 6 | import { getFormSchemas, FormFieldsEnum } from './config'; | 6 | import { getFormSchemas, FormFieldsEnum } from './config'; |
| 7 | import { FlipFlop } from '../FlipFlop'; | 7 | import { FlipFlop } from '../FlipFlop'; |
| 8 | - import { ComponentPublicInstance, ref, unref } from 'vue'; | 8 | + import { ComponentPublicInstance, ref, unref, watch } from 'vue'; |
| 9 | import { ExecutionActionListRefItemType } from './type'; | 9 | import { ExecutionActionListRefItemType } from './type'; |
| 10 | import { useExecutionActionData } from './useExecutionActionData'; | 10 | import { useExecutionActionData } from './useExecutionActionData'; |
| 11 | import { createNewExecutionActionItem } from '.'; | 11 | import { createNewExecutionActionItem } from '.'; |
| @@ -63,6 +63,20 @@ | @@ -63,6 +63,20 @@ | ||
| 63 | hasAlarmNotify | 63 | hasAlarmNotify |
| 64 | ); | 64 | ); |
| 65 | 65 | ||
| 66 | + const { organizationId } = useSceneLinkageDrawerContext(); | ||
| 67 | + | ||
| 68 | + /** | ||
| 69 | + * @description on organization change | ||
| 70 | + */ | ||
| 71 | + watch(organizationId, () => { | ||
| 72 | + unref(executionActionListRef).forEach((flipFlopItem) => | ||
| 73 | + flipFlopItem.ref?.setFieldsValue({ | ||
| 74 | + [FormFieldsEnum.ENTITY_ID]: [], | ||
| 75 | + [FormFieldsEnum.ALARM_PROFILED]: null, | ||
| 76 | + }) | ||
| 77 | + ); | ||
| 78 | + }); | ||
| 79 | + | ||
| 66 | defineExpose({ | 80 | defineExpose({ |
| 67 | getFieldsValue, | 81 | getFieldsValue, |
| 68 | setFieldsValue, | 82 | setFieldsValue, |