Commit cca2a651d3d231218deb73224a659f1a463ed5ef
1 parent
20e86003
fix: DEFECT-1031 trigger action deviceType echo incorrect
Showing
5 changed files
with
24 additions
and
24 deletions
@@ -324,6 +324,7 @@ | @@ -324,6 +324,7 @@ | ||
324 | detail: condition?.triggerCondition?.alarmDetails, | 324 | detail: condition?.triggerCondition?.alarmDetails, |
325 | entityId: condition?.entityId, | 325 | entityId: condition?.entityId, |
326 | deviceProfileId: condition?.deviceProfileId, | 326 | deviceProfileId: condition?.deviceProfileId, |
327 | + deviceType: condition?.deviceType, | ||
327 | replaceValue: condition?.triggerCondition?.condition?.spec?.predicate?.defaultValue, | 328 | replaceValue: condition?.triggerCondition?.condition?.spec?.predicate?.defaultValue, |
328 | time: condition?.triggerCondition?.condition?.spec?.predicate?.defaultValue, | 329 | time: condition?.triggerCondition?.condition?.spec?.predicate?.defaultValue, |
329 | timeUnit: condition?.triggerCondition?.condition?.spec?.unit, | 330 | timeUnit: condition?.triggerCondition?.condition?.spec?.unit, |
@@ -348,7 +349,7 @@ | @@ -348,7 +349,7 @@ | ||
348 | unref(skipUnwrap.conditionItemRefs)[index].setConditionScreeningList([ | 349 | unref(skipUnwrap.conditionItemRefs)[index].setConditionScreeningList([ |
349 | ...new Array(condition.triggerCondition.condition.condition.length).keys(), | 350 | ...new Array(condition.triggerCondition.condition.condition.length).keys(), |
350 | ]); | 351 | ]); |
351 | - // 操作符类型 NUMERIC|String|Boolean|DATE_TIME | 352 | + // 操作符类型 NUMERIC|String|Boolean|DATorganizeImportsE_TIME |
352 | const valueType = condition.triggerCondition?.condition.condition[0].valueType; | 353 | const valueType = condition.triggerCondition?.condition.condition[0].valueType; |
353 | 354 | ||
354 | // 循环设置条件筛选值。TODO:此处设置顺序有问题 | 355 | // 循环设置条件筛选值。TODO:此处设置顺序有问题 |
@@ -387,8 +388,8 @@ | @@ -387,8 +388,8 @@ | ||
387 | doActions.forEach((action, index) => { | 388 | doActions.forEach((action, index) => { |
388 | nextTick(() => { | 389 | nextTick(() => { |
389 | const selectProductId = ref(''); | 390 | const selectProductId = ref(''); |
390 | - console.log('doActions', unref(skipUnwrap.actionItemRefs)); | ||
391 | // 设置执行动作外层值 | 391 | // 设置执行动作外层值 |
392 | + console.log(skipUnwrap.actionItemRefs); | ||
392 | unref(skipUnwrap.actionItemRefs)[index].setFieldsFormValueFun({ | 393 | unref(skipUnwrap.actionItemRefs)[index].setFieldsFormValueFun({ |
393 | ...action, | 394 | ...action, |
394 | outTarget: action.outTarget, | 395 | outTarget: action.outTarget, |
@@ -694,6 +695,8 @@ | @@ -694,6 +695,8 @@ | ||
694 | } | 695 | } |
695 | if (mustTriggerCondition) return; | 696 | if (mustTriggerCondition) return; |
696 | if (mustCondition) return; | 697 | if (mustCondition) return; |
698 | + console.log(postAddOrEditData); | ||
699 | + return; | ||
697 | //FT change | 700 | //FT change |
698 | await screenLinkPageAddApi(postAddOrEditData, unref(isUpdate)); | 701 | await screenLinkPageAddApi(postAddOrEditData, unref(isUpdate)); |
699 | createMessage.success(`${unref(isUpdate) ? '编辑' : '新增'}成功`); | 702 | createMessage.success(`${unref(isUpdate) ? '编辑' : '新增'}成功`); |
@@ -446,7 +446,6 @@ export const actionSchema: FormSchema[] = [ | @@ -446,7 +446,6 @@ export const actionSchema: FormSchema[] = [ | ||
446 | componentProps: ({ formActionType, formModel }) => { | 446 | componentProps: ({ formActionType, formModel }) => { |
447 | const { setFieldsValue } = formActionType; | 447 | const { setFieldsValue } = formActionType; |
448 | const deviceType = formModel['deviceType']; | 448 | const deviceType = formModel['deviceType']; |
449 | - console.log(deviceType); | ||
450 | return { | 449 | return { |
451 | api: queryDeviceProfileBy, | 450 | api: queryDeviceProfileBy, |
452 | params: { | 451 | params: { |
@@ -101,9 +101,9 @@ | @@ -101,9 +101,9 @@ | ||
101 | return { ...getFieldsValue(), predicate, schedule: alarmScheduleRef.value.scheduleData }; | 101 | return { ...getFieldsValue(), predicate, schedule: alarmScheduleRef.value.scheduleData }; |
102 | }; | 102 | }; |
103 | 103 | ||
104 | - const updateFieldDeviceId = (deviceList: any[], _, isUpdate) => { | ||
105 | - console.log(deviceList); | ||
106 | - console.log(isUpdate); | 104 | + const updateFieldDeviceId = () => { |
105 | + // console.log(deviceList); | ||
106 | + // console.log(isUpdate); | ||
107 | }; | 107 | }; |
108 | 108 | ||
109 | const resetFieldsValueFunc = () => resetFields(); | 109 | const resetFieldsValueFunc = () => resetFields(); |
@@ -157,7 +157,6 @@ | @@ -157,7 +157,6 @@ | ||
157 | alarmScheduleRef.value.scheduleData = { | 157 | alarmScheduleRef.value.scheduleData = { |
158 | type: value, | 158 | type: value, |
159 | }; | 159 | }; |
160 | - console.log(value); | ||
161 | } | 160 | } |
162 | currentIndex.value = index; | 161 | currentIndex.value = index; |
163 | }; | 162 | }; |
@@ -57,20 +57,20 @@ | @@ -57,20 +57,20 @@ | ||
57 | </div> | 57 | </div> |
58 | </template> | 58 | </template> |
59 | <script lang="ts" setup> | 59 | <script lang="ts" setup> |
60 | - import { ref, provide, nextTick } from 'vue'; | 60 | + import { Card, Input, Select, Tooltip } from 'ant-design-vue'; |
61 | + import { cloneDeep } from 'lodash-es'; | ||
62 | + import { nextTick, provide, ref } from 'vue'; | ||
63 | + import { TOption, trigger_condition_schema } from '../config/config.data'; | ||
64 | + import { options, scheduleOptions, timeUnitOptions } from '../config/formatData'; | ||
65 | + import useCommonFun from '../hooks/useCommonFun'; | ||
66 | + import AlarmSchedule from './AlarmSchedule.vue'; | ||
67 | + import ConditionScreening from './ConditionScreening.vue'; | ||
68 | + import { getAttribute } from '/@/api/ruleengine/ruleengineApi'; | ||
61 | import { CollapseContainer } from '/@/components/Container/index'; | 69 | import { CollapseContainer } from '/@/components/Container/index'; |
62 | import { BasicForm, useForm } from '/@/components/Form/index'; | 70 | import { BasicForm, useForm } from '/@/components/Form/index'; |
63 | import { Icon } from '/@/components/Icon'; | 71 | import { Icon } from '/@/components/Icon'; |
64 | - import { Tooltip, Card, Select, Input } from 'ant-design-vue'; | ||
65 | - import { trigger_condition_schema, TOption } from '../config/config.data'; | ||
66 | - import { getAttribute } from '/@/api/ruleengine/ruleengineApi'; | ||
67 | - import ConditionScreening from './ConditionScreening.vue'; | ||
68 | - import { scheduleOptions, timeUnitOptions, options } from '../config/formatData'; | ||
69 | - import AlarmSchedule from './AlarmSchedule.vue'; | ||
70 | import { useModal } from '/@/components/Modal'; | 72 | import { useModal } from '/@/components/Modal'; |
71 | - import { cloneDeep } from 'lodash-es'; | ||
72 | import { useMessage } from '/@/hooks/web/useMessage'; | 73 | import { useMessage } from '/@/hooks/web/useMessage'; |
73 | - import useCommonFun from '../hooks/useCommonFun'; | ||
74 | 74 | ||
75 | const { useByProductGetAttribute } = useCommonFun(); | 75 | const { useByProductGetAttribute } = useCommonFun(); |
76 | defineProps({ | 76 | defineProps({ |
@@ -203,7 +203,6 @@ | @@ -203,7 +203,6 @@ | ||
203 | alarmScheduleRef.value.scheduleData = { | 203 | alarmScheduleRef.value.scheduleData = { |
204 | type: value, | 204 | type: value, |
205 | }; | 205 | }; |
206 | - console.log(value); | ||
207 | } | 206 | } |
208 | currentIndex.value = index; | 207 | currentIndex.value = index; |
209 | }; | 208 | }; |
@@ -212,14 +211,14 @@ | @@ -212,14 +211,14 @@ | ||
212 | }; | 211 | }; |
213 | const scheduleData = ref(null); | 212 | const scheduleData = ref(null); |
214 | //FT add 2022-10-27 | 213 | //FT add 2022-10-27 |
215 | - const updateFieldAlarmConfig = (alarmConfigList) => { | 214 | + const updateFieldAlarmConfig = () => { |
216 | //什么也不做 | 215 | //什么也不做 |
217 | - console.log(alarmConfigList); | 216 | + // console.log(alarmConfigList); |
218 | }; | 217 | }; |
219 | //FT add 2022-10-27 | 218 | //FT add 2022-10-27 |
220 | - const updateEditFieldAlarmConfig = (alarmConfigList) => { | 219 | + const updateEditFieldAlarmConfig = () => { |
221 | //什么也不做 | 220 | //什么也不做 |
222 | - console.log(alarmConfigList); | 221 | + // console.log(alarmConfigList); |
223 | }; | 222 | }; |
224 | 223 | ||
225 | defineExpose({ | 224 | defineExpose({ |
@@ -19,7 +19,8 @@ | @@ -19,7 +19,8 @@ | ||
19 | @dropdown-visible-change="handleDropdownVisibleChange" | 19 | @dropdown-visible-change="handleDropdownVisibleChange" |
20 | placeholder="请选择执行动作" | 20 | placeholder="请选择执行动作" |
21 | allowClear | 21 | allowClear |
22 | - /></template> | 22 | + /> |
23 | + </template> | ||
23 | <template #alarmConfigSlot="{ model, field }"> | 24 | <template #alarmConfigSlot="{ model, field }"> |
24 | <a-select | 25 | <a-select |
25 | allowClear | 26 | allowClear |
@@ -169,6 +170,7 @@ | @@ -169,6 +170,7 @@ | ||
169 | }, | 170 | }, |
170 | ]; | 171 | ]; |
171 | }); | 172 | }); |
173 | + | ||
172 | const changeOutTarget = () => { | 174 | const changeOutTarget = () => { |
173 | emit('getActionFormArr'); | 175 | emit('getActionFormArr'); |
174 | }; | 176 | }; |
@@ -262,8 +264,6 @@ | @@ -262,8 +264,6 @@ | ||
262 | }; | 264 | }; |
263 | 265 | ||
264 | const setFieldsFormValueFun = (fieldsValue) => { | 266 | const setFieldsFormValueFun = (fieldsValue) => { |
265 | - console.log(getFieldsValue()); | ||
266 | - | ||
267 | setFieldsValue({ | 267 | setFieldsValue({ |
268 | ...fieldsValue, | 268 | ...fieldsValue, |
269 | ...(isNumber(fieldsValue.commandType) | 269 | ...(isNumber(fieldsValue.commandType) |