Commit 2b6039b12da2df1c245c9e50cea465803d068591
Merge branch 'perf/linkedage' into 'main_dev'
perf: 修改场景联动事件触发key与调整清除告警样式 See merge request yunteng/thingskit-front!1055
Showing
2 changed files
with
7 additions
and
5 deletions
... | ... | @@ -137,9 +137,10 @@ export const getFormSchemas = (hasAlarmNotify: Ref<boolean>): FormSchema[] => { |
137 | 137 | }, |
138 | 138 | { |
139 | 139 | field: FormFieldsEnum.ENABLE_CLEAR_RULE, |
140 | - label: '', | |
140 | + label: ' ', | |
141 | 141 | component: 'Checkbox', |
142 | 142 | ifShow: ({ model }) => model[FormFieldsEnum.OUT_TARGET] === ExecutionActionEnum.MSG_NOTIFY, |
143 | + labelWidth: 24, | |
143 | 144 | renderComponentContent: () => ({ |
144 | 145 | default: () => [ |
145 | 146 | h('span', FormFieldsNameEnum.ENABLE_CLEAR_RULE), | ... | ... |
... | ... | @@ -14,7 +14,7 @@ import { ConditionItemType } from '../ConditionFilter/type'; |
14 | 14 | export function useFlipFlopData( |
15 | 15 | flipFlopListRef: Ref<FlipFlopItemType[]> |
16 | 16 | ): DefineComponentsBasicExpose<FlipFlopConditionType[]> { |
17 | - const getEventTriggerCOndition = ( | |
17 | + const getEventTriggerCondition = ( | |
18 | 18 | basicRecord: FlipFlopFormRecordType, |
19 | 19 | _flipFlopItem: FlipFlopItemType |
20 | 20 | ): ConditionItemType[] => { |
... | ... | @@ -23,7 +23,7 @@ export function useFlipFlopData( |
23 | 23 | { |
24 | 24 | key: { |
25 | 25 | type: DeviceTriggerTypeEum.DEVICE_EVENT, |
26 | - key: deviceEventTriggerKey, | |
26 | + key: 'eventIdentifier', | |
27 | 27 | }, |
28 | 28 | valueType: TriggerValueTypeEnum.STRING, |
29 | 29 | predicate: { |
... | ... | @@ -41,7 +41,7 @@ export function useFlipFlopData( |
41 | 41 | const { conditionType } = basicRecord; |
42 | 42 | return conditionType === DeviceTriggerTypeEum.TIME_SERIES |
43 | 43 | ? flipFlopItem.conditionRef?.getFieldsValue() || [] |
44 | - : getEventTriggerCOndition(basicRecord, flipFlopItem); | |
44 | + : getEventTriggerCondition(basicRecord, flipFlopItem); | |
45 | 45 | }; |
46 | 46 | |
47 | 47 | const crateFlipFlopCondition = (flipFlopItem: FlipFlopItemType): FlipFlopConditionType => { |
... | ... | @@ -106,6 +106,7 @@ export function useFlipFlopData( |
106 | 106 | const { key, valueType } = firstItem; |
107 | 107 | const { type, unit, predicate } = condition.spec; |
108 | 108 | const { defaultValue } = predicate || {}; |
109 | + const { value } = firstItem.predicate; | |
109 | 110 | |
110 | 111 | const record = { |
111 | 112 | ...data, |
... | ... | @@ -122,7 +123,7 @@ export function useFlipFlopData( |
122 | 123 | |
123 | 124 | if (key.type === DeviceTriggerTypeEum.DEVICE_EVENT) { |
124 | 125 | Object.assign(record, { |
125 | - [FormFieldEnum.DEVICE_EVENT_TRIGGER_KEY]: key.key, | |
126 | + [FormFieldEnum.DEVICE_EVENT_TRIGGER_KEY]: value.defaultValue, | |
126 | 127 | [FormFieldEnum.CONDITION_KEY]: null, |
127 | 128 | }); |
128 | 129 | } | ... | ... |