From d7c6e0d1ec18f391243f77eb62bcb111378cb40f Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期一, 21 十二月 2020 10:13:46 +0800
Subject: [PATCH] 修复清空关联设备分组默认选中第一个添加执行条件

---
 src/pages/labelMark/components/RightSide.vue |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/pages/labelMark/components/RightSide.vue b/src/pages/labelMark/components/RightSide.vue
index e243da4..44808a9 100644
--- a/src/pages/labelMark/components/RightSide.vue
+++ b/src/pages/labelMark/components/RightSide.vue
@@ -219,7 +219,7 @@
                 show-icon
                 v-if="groupList.length==0"
               ></el-alert>
-              <div class="flex-box">
+              <div class="flex-box" v-if="groupList.length!==0">
                 <div
                   class="group-card"
                   :class="{'checked':group.checked}"
@@ -253,7 +253,7 @@
               </div>
             </div>
             <!-- <div class="part" v-if="groupList.length"> -->
-            <div class="part" v-if="Object.keys(curGroup)">
+            <div class="part" v-if="groupList.length!==0 && Object.keys(curGroup)">
               <div class="title">缁樺埗鍖哄煙(鐢ㄤ簬绠楁硶鍒嗘瀽)</div>
               <div class="relative-partment" v-if="curGroup.cameras&&curGroup.cameras.length">
                 <div class="area-wrap" v-for="i in 2" :key="'sc'+i">
@@ -437,12 +437,12 @@
       },
       deep: true
     },
-    'TreeDataPool.selectedNodes': {
-      handler (n, o) {
+    // 'TreeDataPool.selectedNodes': {
+    //   handler (n, o) {
 
-      },
-      deep: true
-    },
+    //   },
+    //   deep: true
+    // },
     isEdit (n, o) {
       if (n) {
         this.$refs['editBoard'].addEventListener('click', this.bindListen);
@@ -572,9 +572,12 @@
       for(var i = 0; i< groups.length; i++){
         groups[i].cameras = await _this.findPolygonByIds(groups[i].cameras)
       }
-      this.groupList = groups
+
+      this.groupList = groups;
+      debugger
       //閫変腑绗竴涓�
-      this.checkCurrentGroup(_this.groupList[0]);
+      this.groupList.length && this.checkCurrentGroup(_this.groupList[0]);
+
     },
 
     addRelation () {
@@ -674,7 +677,6 @@
         groupName: '',
         cameras: []
       }
-
     },
     changeTab () {
       if (this.actPage == '1') {

--
Gitblit v1.8.0