From 3ad86b1d51afceb758a97741088297246bf34444 Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期五, 24 六月 2022 18:04:19 +0800
Subject: [PATCH] 摄像机删除算法

---
 src/views/hashrate/CameraManage/CameraRules/components/RuleItem.vue |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/views/hashrate/CameraManage/CameraRules/components/RuleItem.vue b/src/views/hashrate/CameraManage/CameraRules/components/RuleItem.vue
index ec5357d..f42c334 100644
--- a/src/views/hashrate/CameraManage/CameraRules/components/RuleItem.vue
+++ b/src/views/hashrate/CameraManage/CameraRules/components/RuleItem.vue
@@ -192,8 +192,8 @@
     delSdk(index) {
       this.rule.rules.splice(index, 1);
 
-      if (this.rule.rules[index]) {
-        this.rule.rules[index].rule_with_pre = "";
+      if (this.rule.rules.length == 1) {
+        this.rule.rules[0].rule_with_pre = "";
       }
 
       this.update();
@@ -219,6 +219,7 @@
           }
         });
       } else {
+        delete this.rule.camera_polygons;
         saveLinkScene(this.rule).then((rsp) => {
           if (rsp && rsp.success) {
             this.$notify({

--
Gitblit v1.8.0