From 5ec1554f347f91bcd1fbc8e7550fde8edec5a3d3 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@iotlink.com>
Date: 星期五, 21 五月 2021 15:00:02 +0800
Subject: [PATCH] 修复运行时提示的错误

---
 src/pages/cameraAccess/components/CameraInfo.vue |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/pages/cameraAccess/components/CameraInfo.vue b/src/pages/cameraAccess/components/CameraInfo.vue
index 58eee53..bba682a 100644
--- a/src/pages/cameraAccess/components/CameraInfo.vue
+++ b/src/pages/cameraAccess/components/CameraInfo.vue
@@ -268,7 +268,7 @@
     getSounds() {
       getSoundList().then(res => {
         if (res.success) {
-          this.soundList = res.data.list
+          this.soundList = res.data;
         }
       }).catch(
         e => console.log(e)
@@ -336,8 +336,9 @@
               this.resolutionList = list
               this.sensors = res.data.sensors
             }
+
             this.$nextTick(() => {
-              this.initFormData()
+              this.initFormData();
               Object.assign(this.form, res.data)
 
               this.soundList.forEach(element => {
@@ -382,10 +383,11 @@
           this.form.sensors = list
           this.form.resolution_width = Number(this.form.resolution.split("*")[0])
           this.form.resolution_height = Number(this.form.resolution.split("*")[1])
-
+          let _this = this;
           // 鏇存柊
           if (this.form.id !== "") {
             this.form.areaid = this.TreeDataPool.getParent(this.form.id, this.isGb28182);
+            console.log(this.TreeDataPool.selectedNode)
             updateCameraInfo(this.form).then(rsp => {
               if (rsp.success) {
                 this.$notify({
@@ -393,6 +395,15 @@
                   message: "鎽勫儚鏈轰俊鎭慨鏀规垚鍔燂紒"
                 });
                 this.TreeDataPool.fetchTreeData();
+                console.log(this.TreeDataPool.selectedNode)
+                //_this.$root.$children[0].$refs['leftTree'].$refs.tree.ztreeObj.checkNode(_this.TreeDataPool.selectedNode, true, false, false);
+                //閫変腑淇敼鍚庣殑鑺傜偣
+                let {evt,treeId} = _this.$root.$children[0].$refs['leftTree'].$refs.tree;
+                console.log(evt,treeId)
+                // this.$nextTick(()=>{
+                   //_this.$root.$children[0].$refs['leftTree'].$refs.tree.handleCreated()
+                // })
+
               } else {
                 this.selectCamera(this.TreeDataPool.selectedNode);
                 this.$notify({

--
Gitblit v1.8.0