Commit afd510116a789f5178fd94c8a301273f9985df8f

Authored by ww
1 parent cca2a651

fix: DEFECT-1031 sometimes tirgger action can not echo data

@@ -389,7 +389,6 @@ @@ -389,7 +389,6 @@
389 nextTick(() => { 389 nextTick(() => {
390 const selectProductId = ref(''); 390 const selectProductId = ref('');
391 // 设置执行动作外层值 391 // 设置执行动作外层值
392 - console.log(skipUnwrap.actionItemRefs);  
393 unref(skipUnwrap.actionItemRefs)[index].setFieldsFormValueFun({ 392 unref(skipUnwrap.actionItemRefs)[index].setFieldsFormValueFun({
394 ...action, 393 ...action,
395 outTarget: action.outTarget, 394 outTarget: action.outTarget,
@@ -567,10 +566,10 @@ @@ -567,10 +566,10 @@
567 //TODO fengtao 566 //TODO fengtao
568 setFields(skipUnwrap.triggerItemRefs, true); 567 setFields(skipUnwrap.triggerItemRefs, true);
569 setFields(skipUnwrap.conditionItemRefs, true); 568 setFields(skipUnwrap.conditionItemRefs, true);
570 - // setFields(skipUnwrap.actionItemRefs, true); 569 + setFields(skipUnwrap.actionItemRefs, true);
571 const data = await getOrganizationAlarmConfig({ organizationId: newValue }); 570 const data = await getOrganizationAlarmConfig({ organizationId: newValue });
572 alarmConfigList.value = data.map((item) => ({ label: item.name, value: item.id })); 571 alarmConfigList.value = data.map((item) => ({ label: item.name, value: item.id }));
573 - setFields(skipUnwrap.actionItemRefs, true); 572 + // setFields(skipUnwrap.actionItemRefs, true);
574 // console.log(unref(organizationIdRef)); 573 // console.log(unref(organizationIdRef));
575 // setAlarmConfig(skipUnwrap.actionItemRefs, true); 574 // setAlarmConfig(skipUnwrap.actionItemRefs, true);
576 }); 575 });
@@ -250,8 +250,7 @@ export const trigger_condition_schema: FormSchema[] = [ @@ -250,8 +250,7 @@ export const trigger_condition_schema: FormSchema[] = [
250 getPopupContainer: () => document.body, 250 getPopupContainer: () => document.body,
251 onChange: async (e) => { 251 onChange: async (e) => {
252 if (e) { 252 if (e) {
253 - setFieldsValue({ type2: '' });  
254 - setFieldsValue({ entityId: [] }); 253 + setFieldsValue({ type2: '', entityId: [] });
255 const res = await getAttribute(e); 254 const res = await getAttribute(e);
256 const options = ref<TOption[]>([]); 255 const options = ref<TOption[]>([]);
257 useByProductGetAttribute(res, updateSchema, options); 256 useByProductGetAttribute(res, updateSchema, options);
@@ -456,8 +455,7 @@ export const actionSchema: FormSchema[] = [ @@ -456,8 +455,7 @@ export const actionSchema: FormSchema[] = [
456 valueField: 'id', 455 valueField: 'id',
457 getPopupContainer: () => document.body, 456 getPopupContainer: () => document.body,
458 onChange: () => { 457 onChange: () => {
459 - setFieldsValue({ deviceId: [] });  
460 - setFieldsValue({ thingsModelId: '' }); 458 + setFieldsValue({ thingsModelId: '', deviceId: [] });
461 }, 459 },
462 }; 460 };
463 }, 461 },