Showing
2 changed files
with
6 additions
and
4 deletions
| ... | ... | @@ -169,6 +169,8 @@ |
| 169 | 169 | organizationId, |
| 170 | 170 | triggers.map((m) => m.entityId).join(',') |
| 171 | 171 | ); |
| 172 | + watchAttrList.value = await getAttribute(organizationId, null); | |
| 173 | + | |
| 172 | 174 | // 生成回显时对应得组件数量 |
| 173 | 175 | triggerData.value = [...new Array(triggers.length).keys()]; |
| 174 | 176 | conditionData.value = [...new Array(doConditions.length).keys()]; |
| ... | ... | @@ -514,7 +516,7 @@ |
| 514 | 516 | // 监听组织变化更新设备列表 |
| 515 | 517 | const deviceList = ref([]); |
| 516 | 518 | const alarmConfigList = ref([]); |
| 517 | - let watchAttrList = []; | |
| 519 | + const watchAttrList = ref([]); | |
| 518 | 520 | const deviceExcludeDoAction = ref([]); |
| 519 | 521 | watch(organizationId, async (newValue: string) => { |
| 520 | 522 | if (!newValue) return; |
| ... | ... | @@ -526,7 +528,7 @@ |
| 526 | 528 | value: item.tbDeviceId, |
| 527 | 529 | })); |
| 528 | 530 | deviceList.value = items.map((item) => ({ label: item.name, value: item.id })); |
| 529 | - watchAttrList = await getAttribute(newValue, null); | |
| 531 | + watchAttrList.value = await getAttribute(newValue, null); | |
| 530 | 532 | setFields(skipUnwrap.triggerItemRefs, true); |
| 531 | 533 | setFields(skipUnwrap.conditionItemRefs, true); |
| 532 | 534 | setFields(skipUnwrap.actionItemRefs, true); |
| ... | ... | @@ -541,10 +543,10 @@ |
| 541 | 543 | isOrganizationChange && item.resetFieldsValueFunc(); |
| 542 | 544 | if (item.isTriggerAndConditionFlag == 'isTriggerAndConditionFlag') { |
| 543 | 545 | item.updateExcludeActionFieldDeviceId(deviceExcludeDoAction); |
| 546 | + item.updateFieldAttr(watchAttrList); | |
| 544 | 547 | } else { |
| 545 | 548 | item.updateFieldDeviceId(deviceList); |
| 546 | 549 | } |
| 547 | - // item.updateFieldAttr(watchAttrList); | |
| 548 | 550 | }); |
| 549 | 551 | } |
| 550 | 552 | function setAlarmConfig(linkAge, isOrganizationChange = false) { | ... | ... |