Commit cf97ac14bf80374b02b1ba6fa8020d078de6ae45
Merge branch 'fix/DEFECT-1404' into 'main_dev'
fix: DEFECT-1404修复场景联动新增告警配置时默认启用 See merge request yunteng/thingskit-front!870
Showing
2 changed files
with
15 additions
and
2 deletions
@@ -54,8 +54,14 @@ | @@ -54,8 +54,14 @@ | ||
54 | return attrs.vnodes; | 54 | return attrs.vnodes; |
55 | }, | 55 | }, |
56 | }, | 56 | }, |
57 | + props: { | ||
58 | + defaultEnable: { | ||
59 | + type: Boolean, | ||
60 | + default: false, | ||
61 | + }, | ||
62 | + }, | ||
57 | emits: ['success', 'register'], | 63 | emits: ['success', 'register'], |
58 | - setup(_, { emit }) { | 64 | + setup(props, { emit }) { |
59 | const alarmContactOptions: any = ref([]); | 65 | const alarmContactOptions: any = ref([]); |
60 | const orgId = ref(''); | 66 | const orgId = ref(''); |
61 | const orgFunc = (e) => { | 67 | const orgFunc = (e) => { |
@@ -174,6 +180,9 @@ | @@ -174,6 +180,9 @@ | ||
174 | ...alarmContactIdD, | 180 | ...alarmContactIdD, |
175 | ...messageModeD, | 181 | ...messageModeD, |
176 | }; | 182 | }; |
183 | + | ||
184 | + props.defaultEnable && Object.assign(allData, { status: 1 }); | ||
185 | + | ||
177 | if (!unref(isUpdate)) { | 186 | if (!unref(isUpdate)) { |
178 | delete allData.id; | 187 | delete allData.id; |
179 | } | 188 | } |
@@ -89,7 +89,11 @@ | @@ -89,7 +89,11 @@ | ||
89 | >新增清除告警</a-button | 89 | >新增清除告警</a-button |
90 | > | 90 | > |
91 | </CollapseContainer> | 91 | </CollapseContainer> |
92 | - <AlarmConfigDrawer @register="registerAlarmContactDrawer" @success="handleSuccess" /> | 92 | + <AlarmConfigDrawer |
93 | + :defaultEnable="true" | ||
94 | + @register="registerAlarmContactDrawer" | ||
95 | + @success="handleSuccess" | ||
96 | + /> | ||
93 | </template> | 97 | </template> |
94 | 98 | ||
95 | <script lang="ts"> | 99 | <script lang="ts"> |