ltao 3 rokov pred
rodič
commit
a56936d382
1 zmenil súbory, kde vykonal 11 pridanie a 10 odobranie
  1. 11 10
      src/views/monitoring/camera/index.vue

+ 11 - 10
src/views/monitoring/camera/index.vue

@@ -514,7 +514,6 @@ export default {
       });
     });
   },
-  beforeMount() {},
   created() {
     this.queryParams.type = 0;
     // debugger
@@ -529,10 +528,12 @@ export default {
     aa() {
       if (this.$route.path == "/monitoring/camera") {
         this.getList(1);
-      } else if (this.$route.path == "/monitoring/1") {
-        this.getList(2);
-      } else if (this.$route.path == "/monitoring/3") {
-        this.getList(3);
+      } else {
+        var index = this.$route.path.lastIndexOf("/");
+        let str = this.$route.path.substring(index + 1, this.$route.path.length);
+        console.log(str)
+        // const a = this.$route.path.substring(this.$route.path.lastIndexOf("/"));
+        this.getList(str);
       }
     },
     // 初始化视频
@@ -620,9 +621,9 @@ export default {
           this.destoryVideo(this.flvPlayerList1[0]);
           this.flvPlayerList1.shift();
         }
-        console.log(this.flvPlayerList1);
+        // console.log(this.flvPlayerList1);
         this.url1 = this.cameraList[index].caddr;
-        console.log(this.url1);
+        // console.log(this.url1);
         this.dan = true;
         this.singleplayvideo("flvPlayer1", this.url1, 0);
       }
@@ -664,7 +665,7 @@ export default {
       listCamera({ belongLocal: a }).then((response) => {
         this.cameraList = response.rows;
         this.url1 = this.cameraList[0].caddr;
-        console.log(this.url1);
+        // console.log(this.url1);
         this.total = response.total;
         this.loading = false;
         // this.queryParams.type==""
@@ -763,13 +764,13 @@ export default {
             updateCamera(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
-              this.getList();
+              this.aa()
             });
           } else {
             addCamera(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
-              this.getList();
+              this.aa()
             });
           }
         }