Commit 7e2162eefa2ffba34a832c604c9ac4118b2b0bcf
1 parent
4ef7dcf1
fix:DEFECT-778 修改场景联动属性未填,界面提示框弹出后端信息框问题
Showing
1 changed file
with
40 additions
and
18 deletions
... | ... | @@ -15,15 +15,15 @@ |
15 | 15 | <!-- 基础表单 --> |
16 | 16 | <!-- 触发器-begin --> |
17 | 17 | <!-- <Divider orientation="left">触发器</Divider> --> |
18 | - <Divider orientation="left" | |
19 | - ><a-tooltip> | |
18 | + <Divider orientation="left"> | |
19 | + <a-tooltip> | |
20 | 20 | <template #title |
21 | 21 | >场景联动触发的首要条件,"触发器"之间的关系为或,“执行条件”与“触发器”之间的关系为且。</template |
22 | 22 | > |
23 | - 触发器<QuestionCircleOutlined | |
24 | - :style="{ fontSize: '14px', marginLeft: '5px' }" | |
25 | - /> </a-tooltip | |
26 | - ></Divider> | |
23 | + 触发器 | |
24 | + <QuestionCircleOutlined :style="{ fontSize: '14px', marginLeft: '5px' }" /> | |
25 | + </a-tooltip> | |
26 | + </Divider> | |
27 | 27 | <div> |
28 | 28 | <template v-for="(item, index) in triggerData" :key="item"> |
29 | 29 | <TriggerOrCondition |
... | ... | @@ -45,16 +45,16 @@ |
45 | 45 | <!-- 触发器-end --> |
46 | 46 | |
47 | 47 | <!-- 执行条件-begin --> |
48 | - <Divider orientation="left" | |
49 | - ><a-tooltip> | |
48 | + <Divider orientation="left"> | |
49 | + <a-tooltip> | |
50 | 50 | <template #title |
51 | 51 | >场景联动触发的次要条件,"执行条件"之间的关系为或, |
52 | 52 | “执行条件”与“触发器”之间的关系为且。</template |
53 | 53 | > |
54 | - 执行条件<QuestionCircleOutlined | |
55 | - :style="{ fontSize: '14px', marginLeft: '5px' }" | |
56 | - /> </a-tooltip | |
57 | - ></Divider> | |
54 | + 执行条件 | |
55 | + <QuestionCircleOutlined :style="{ fontSize: '14px', marginLeft: '5px' }" /> | |
56 | + </a-tooltip> | |
57 | + </Divider> | |
58 | 58 | <div> |
59 | 59 | <template v-for="(item, index) in conditionData" :key="item"> |
60 | 60 | <TriggerOrCondition |
... | ... | @@ -76,15 +76,15 @@ |
76 | 76 | <!-- 执行条件-end --> |
77 | 77 | |
78 | 78 | <!-- 执行动作-begin --> |
79 | - <Divider orientation="left" | |
80 | - ><a-tooltip> | |
79 | + <Divider orientation="left"> | |
80 | + <a-tooltip> | |
81 | 81 | <template #title |
82 | 82 | >触发器和执行条件都满足时,场景联动会做什么,例如:设备联动、告警通知等。</template |
83 | 83 | > |
84 | - 执行动作<QuestionCircleOutlined | |
85 | - :style="{ fontSize: '14px', marginLeft: '5px' }" | |
86 | - /> </a-tooltip | |
87 | - ></Divider> | |
84 | + 执行动作 | |
85 | + <QuestionCircleOutlined :style="{ fontSize: '14px', marginLeft: '5px' }" /> | |
86 | + </a-tooltip> | |
87 | + </Divider> | |
88 | 88 | <div> |
89 | 89 | <template v-for="(item, index) in actionData" :key="item"> |
90 | 90 | <Action |
... | ... | @@ -637,6 +637,28 @@ |
637 | 637 | id: unref(id), |
638 | 638 | tenantId: unref(tenantId), |
639 | 639 | }; |
640 | + //FT change | |
641 | + let mustCondition = false; | |
642 | + if (postAddOrEditData?.triggers !== null && postAddOrEditData?.triggers.length > 0) { | |
643 | + postAddOrEditData?.triggers.some((s) => { | |
644 | + if (s.triggerCondition?.condition?.condition == undefined) { | |
645 | + mustCondition = true; | |
646 | + } | |
647 | + }); | |
648 | + } else { | |
649 | + mustCondition = false; | |
650 | + } | |
651 | + if (postAddOrEditData?.doConditions !== null && postAddOrEditData?.doConditions.length > 0) { | |
652 | + postAddOrEditData?.doConditions.some((s) => { | |
653 | + if (s.triggerCondition?.condition?.condition == undefined) { | |
654 | + mustCondition = true; | |
655 | + } | |
656 | + }); | |
657 | + } else { | |
658 | + mustCondition = false; | |
659 | + } | |
660 | + if (mustCondition) return; | |
661 | + //FT change | |
640 | 662 | await screenLinkPageAddApi(postAddOrEditData, unref(isUpdate)); |
641 | 663 | createMessage.success(`${unref(isUpdate) ? '编辑' : '新增'}成功`); |
642 | 664 | closeDrawer(); | ... | ... |