Commit cca2a651d3d231218deb73224a659f1a463ed5ef

Authored by ww
1 parent 20e86003

fix: DEFECT-1031 trigger action deviceType echo incorrect

... ... @@ -324,6 +324,7 @@
324 324 detail: condition?.triggerCondition?.alarmDetails,
325 325 entityId: condition?.entityId,
326 326 deviceProfileId: condition?.deviceProfileId,
  327 + deviceType: condition?.deviceType,
327 328 replaceValue: condition?.triggerCondition?.condition?.spec?.predicate?.defaultValue,
328 329 time: condition?.triggerCondition?.condition?.spec?.predicate?.defaultValue,
329 330 timeUnit: condition?.triggerCondition?.condition?.spec?.unit,
... ... @@ -348,7 +349,7 @@
348 349 unref(skipUnwrap.conditionItemRefs)[index].setConditionScreeningList([
349 350 ...new Array(condition.triggerCondition.condition.condition.length).keys(),
350 351 ]);
351   - // 操作符类型 NUMERIC|String|Boolean|DATE_TIME
  352 + // 操作符类型 NUMERIC|String|Boolean|DATorganizeImportsE_TIME
352 353 const valueType = condition.triggerCondition?.condition.condition[0].valueType;
353 354
354 355 // 循环设置条件筛选值。TODO:此处设置顺序有问题
... ... @@ -387,8 +388,8 @@
387 388 doActions.forEach((action, index) => {
388 389 nextTick(() => {
389 390 const selectProductId = ref('');
390   - console.log('doActions', unref(skipUnwrap.actionItemRefs));
391 391 // 设置执行动作外层值
  392 + console.log(skipUnwrap.actionItemRefs);
392 393 unref(skipUnwrap.actionItemRefs)[index].setFieldsFormValueFun({
393 394 ...action,
394 395 outTarget: action.outTarget,
... ... @@ -694,6 +695,8 @@
694 695 }
695 696 if (mustTriggerCondition) return;
696 697 if (mustCondition) return;
  698 + console.log(postAddOrEditData);
  699 + return;
697 700 //FT change
698 701 await screenLinkPageAddApi(postAddOrEditData, unref(isUpdate));
699 702 createMessage.success(`${unref(isUpdate) ? '编辑' : '新增'}成功`);
... ...
... ... @@ -446,7 +446,6 @@ export const actionSchema: FormSchema[] = [
446 446 componentProps: ({ formActionType, formModel }) => {
447 447 const { setFieldsValue } = formActionType;
448 448 const deviceType = formModel['deviceType'];
449   - console.log(deviceType);
450 449 return {
451 450 api: queryDeviceProfileBy,
452 451 params: {
... ...
... ... @@ -101,9 +101,9 @@
101 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 109 const resetFieldsValueFunc = () => resetFields();
... ... @@ -157,7 +157,6 @@
157 157 alarmScheduleRef.value.scheduleData = {
158 158 type: value,
159 159 };
160   - console.log(value);
161 160 }
162 161 currentIndex.value = index;
163 162 };
... ...
... ... @@ -57,20 +57,20 @@
57 57 </div>
58 58 </template>
59 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 69 import { CollapseContainer } from '/@/components/Container/index';
62 70 import { BasicForm, useForm } from '/@/components/Form/index';
63 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 72 import { useModal } from '/@/components/Modal';
71   - import { cloneDeep } from 'lodash-es';
72 73 import { useMessage } from '/@/hooks/web/useMessage';
73   - import useCommonFun from '../hooks/useCommonFun';
74 74
75 75 const { useByProductGetAttribute } = useCommonFun();
76 76 defineProps({
... ... @@ -203,7 +203,6 @@
203 203 alarmScheduleRef.value.scheduleData = {
204 204 type: value,
205 205 };
206   - console.log(value);
207 206 }
208 207 currentIndex.value = index;
209 208 };
... ... @@ -212,14 +211,14 @@
212 211 };
213 212 const scheduleData = ref(null);
214 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 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 224 defineExpose({
... ...
... ... @@ -19,7 +19,8 @@
19 19 @dropdown-visible-change="handleDropdownVisibleChange"
20 20 placeholder="请选择执行动作"
21 21 allowClear
22   - /></template>
  22 + />
  23 + </template>
23 24 <template #alarmConfigSlot="{ model, field }">
24 25 <a-select
25 26 allowClear
... ... @@ -169,6 +170,7 @@
169 170 },
170 171 ];
171 172 });
  173 +
172 174 const changeOutTarget = () => {
173 175 emit('getActionFormArr');
174 176 };
... ... @@ -262,8 +264,6 @@
262 264 };
263 265
264 266 const setFieldsFormValueFun = (fieldsValue) => {
265   - console.log(getFieldsValue());
266   -
267 267 setFieldsValue({
268 268 ...fieldsValue,
269 269 ...(isNumber(fieldsValue.commandType)
... ...