Commit ebafc985249904ddcbb925ce4e930633f63f4e59
Merge branch 'fix/linkedge' into 'main_dev'
fix: 修复场景联动启用规则在查看模式下能打开其他规则 See merge request yunteng/thingskit-front!998
Showing
2 changed files
with
4 additions
and
2 deletions
| @@ -151,6 +151,7 @@ | @@ -151,6 +151,7 @@ | ||
| 151 | const index = scheduleOptions.findIndex((item) => item.value === value); | 151 | const index = scheduleOptions.findIndex((item) => item.value === value); |
| 152 | // 报警日程弹窗 | 152 | // 报警日程弹窗 |
| 153 | if (index !== 0) { | 153 | if (index !== 0) { |
| 154 | + if (unref(disabled) && unref(currentIndex) !== index) return; | ||
| 154 | openModal(true, { | 155 | openModal(true, { |
| 155 | isUpdate: isUpdate.value, | 156 | isUpdate: isUpdate.value, |
| 156 | value, | 157 | value, |
| @@ -163,7 +164,7 @@ | @@ -163,7 +164,7 @@ | ||
| 163 | type: value, | 164 | type: value, |
| 164 | }; | 165 | }; |
| 165 | } | 166 | } |
| 166 | - currentIndex.value = index; | 167 | + if (!unref(disabled)) currentIndex.value = index; |
| 167 | }; | 168 | }; |
| 168 | const handleCancel = (index) => { | 169 | const handleCancel = (index) => { |
| 169 | currentIndex.value = index; | 170 | currentIndex.value = index; |
| @@ -203,6 +203,7 @@ | @@ -203,6 +203,7 @@ | ||
| 203 | const index = scheduleOptions.findIndex((item) => item.value === value); | 203 | const index = scheduleOptions.findIndex((item) => item.value === value); |
| 204 | // 报警日程弹窗 | 204 | // 报警日程弹窗 |
| 205 | if (index !== 0) { | 205 | if (index !== 0) { |
| 206 | + if (unref(disabled) && unref(currentIndex) !== index) return; | ||
| 206 | openModal(true, { | 207 | openModal(true, { |
| 207 | isUpdate: isUpdate.value, | 208 | isUpdate: isUpdate.value, |
| 208 | value, | 209 | value, |
| @@ -215,7 +216,7 @@ | @@ -215,7 +216,7 @@ | ||
| 215 | type: value, | 216 | type: value, |
| 216 | }; | 217 | }; |
| 217 | } | 218 | } |
| 218 | - currentIndex.value = index; | 219 | + if (!unref(disabled)) currentIndex.value = index; |
| 219 | }; | 220 | }; |
| 220 | const handleCancel = (index) => { | 221 | const handleCancel = (index) => { |
| 221 | currentIndex.value = index; | 222 | currentIndex.value = index; |