Bläddra i källkod

Merge branch 'master' of http://115.238.57.190:3000/linan/huimv.cloud.client

linan 5 år sedan
förälder
incheckning
f631841bc1
3 ändrade filer med 14 tillägg och 10 borttagningar
  1. 1 1
      .eslintrc.js
  2. 2 2
      src/views/Login/Login.vue
  3. 11 7
      src/views/deviceManagement/CameraManagement.vue

+ 1 - 1
.eslintrc.js

@@ -5,7 +5,7 @@ module.exports = {
   },
   extends: ['plugin:vue/essential'],
   rules: {
-    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
+    'no-console': 'off',
     'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
   },
   parserOptions: {

+ 2 - 2
src/views/Login/Login.vue

@@ -45,8 +45,8 @@ export default {
     data() {
         return {
             form: {
-                userName: "yjj",
-                userPwd: "147414"
+                userName: "",
+                userPwd: ""
             },
             isShowDialog: false,
             orgList: null,

+ 11 - 7
src/views/deviceManagement/CameraManagement.vue

@@ -181,7 +181,8 @@ export default {
                 title: null,
                 rtsp: null,
                 ws: null,
-                videoSize:'1366x768'
+                videoSize:'1366x768',
+                channel:0
             },
             player:null,
             configItems: 2, // 配置项的通道配置项数
@@ -213,10 +214,13 @@ export default {
         this.getTreeByCode(cameraCode);
         console.log(this.wanIp,this.lanIp,this.loginIp)
         // 初始化摄像头播放地址
-        if(this.wanIp === this.loginIp)
-            this.videoData.ws = "ws://"+this.lanIp+":8088/"
-        else
-            this.videoData.ws = "ws://"+this.wanIp+":8088/"
+        if(this.wanIp === this.loginIp) {
+            this.videoData.ws = "ws://" + this.lanIp + ":8088/"
+            this.videoData.channel=0
+        }else {
+            this.videoData.ws = "ws://" + this.wanIp + ":8088/"
+            this.videoData.channel=1
+        }
     },
     methods: {
         ...mapActions(["fetch"]),
@@ -385,8 +389,8 @@ export default {
             console.log(row);
             if (row.meta.channel && row.meta.channel.length > 0) {
                 let channals = JSON.parse(row.meta.channel);
-                let rtsp = channals[0].rtsp;
-                let size = channals[0].size;//临时
+                let rtsp = channals[this.videoData.channel].rtsp;
+                let size = channals[this.videoData.channel].size;//临时
                 // console.log(rtsp)
                 this.videoData.title=row.name//标题
                 let url = this.videoData.ws+"?rtsp="+encodeURIComponent(rtsp.trim())+'&videoSize='+size.trim()