Commit c09465de66d7b24be70fca55f7e86a93a8ab926b

Authored by ww
1 parent 7cbcfb69

fix: 修复场景联动启用规则在查看模式下能打开其他规则

... ... @@ -151,6 +151,7 @@
151 151 const index = scheduleOptions.findIndex((item) => item.value === value);
152 152 // 报警日程弹窗
153 153 if (index !== 0) {
  154 + if (unref(disabled) && unref(currentIndex) !== index) return;
154 155 openModal(true, {
155 156 isUpdate: isUpdate.value,
156 157 value,
... ... @@ -163,7 +164,7 @@
163 164 type: value,
164 165 };
165 166 }
166   - currentIndex.value = index;
  167 + if (!unref(disabled)) currentIndex.value = index;
167 168 };
168 169 const handleCancel = (index) => {
169 170 currentIndex.value = index;
... ...
... ... @@ -203,6 +203,7 @@
203 203 const index = scheduleOptions.findIndex((item) => item.value === value);
204 204 // 报警日程弹窗
205 205 if (index !== 0) {
  206 + if (unref(disabled) && unref(currentIndex) !== index) return;
206 207 openModal(true, {
207 208 isUpdate: isUpdate.value,
208 209 value,
... ... @@ -215,7 +216,7 @@
215 216 type: value,
216 217 };
217 218 }
218   - currentIndex.value = index;
  219 + if (!unref(disabled)) currentIndex.value = index;
219 220 };
220 221 const handleCancel = (index) => {
221 222 currentIndex.value = index;
... ...