瀏覽代碼

摄像头 配置的 ws 属性没用了 加了去除的代码

linan 5 年之前
父節點
當前提交
69949ad71d
共有 1 個文件被更改,包括 11 次插入5 次删除
  1. 11 5
      src/views/deviceManagement/CameraManagement.vue

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

@@ -83,9 +83,9 @@
                         <el-col :span="7">
                         <el-col :span="7">
                             <el-input placeholder="请输入内容" v-model="item.rtsp"></el-input>
                             <el-input placeholder="请输入内容" v-model="item.rtsp"></el-input>
                         </el-col>
                         </el-col>
-                        <el-col :span="3" style="text-align:right">ws:</el-col>
+                        <el-col :span="3" style="text-align:right">size:</el-col>
                         <el-col :span="7">
                         <el-col :span="7">
-                            <el-input placeholder="请输入内容" v-model="item.ws"></el-input>
+                            <el-input placeholder="请输入内容" v-model="item.size"></el-input>
                         </el-col>
                         </el-col>
                         <el-col :span="4">
                         <el-col :span="4">
                             <el-button
                             <el-button
@@ -166,7 +166,7 @@ export default {
                 status: "",
                 status: "",
                 description: ""
                 description: ""
             },
             },
-            meta: [{ rtsp: "", ws: "" }],
+            meta: [{ rtsp: "", size: "" }],
             isShowVideo: false,
             isShowVideo: false,
             videoData: {
             videoData: {
                 title: null,
                 title: null,
@@ -265,11 +265,17 @@ export default {
         },
         },
         // 编辑的保存按钮
         // 编辑的保存按钮
         save() {
         save() {
+            // 临时用 之前配置的 ws 属性没用了 需要去除
+            this.meta.forEach(item => {
+                delete item.ws
+            })
+
             this.formData.meta = { channel: JSON.stringify(this.meta) };
             this.formData.meta = { channel: JSON.stringify(this.meta) };
             let categoryId = this.formData.categoryId;
             let categoryId = this.formData.categoryId;
             if (categoryId instanceof Array) {
             if (categoryId instanceof Array) {
                 this.formData.categoryId = categoryId[categoryId.length - 1];
                 this.formData.categoryId = categoryId[categoryId.length - 1];
             }
             }
+            
             let api = this.isAdd
             let api = this.isAdd
                 ? "/device/device/add"
                 ? "/device/device/add"
                 : "/device/device/update";
                 : "/device/device/update";
@@ -332,7 +338,7 @@ export default {
             //     hVer: "",
             //     hVer: "",
             //     description: ""
             //     description: ""
             // };
             // };
-            // this.meta = [{ rtsp: "", ws: "" }]
+            // this.meta = [{ rtsp: "", size: "" }]
             if (this.formData.id) delete this.formData.id;
             if (this.formData.id) delete this.formData.id;
             this.isShowDialog = true;
             this.isShowDialog = true;
         },
         },
@@ -380,7 +386,7 @@ export default {
 
 
         // 配置项增加
         // 配置项增加
         plus() {
         plus() {
-            this.meta.push({ rtsp: "", ws: "" });
+            this.meta.push({ rtsp: "", size: "" });
         },
         },
         // 配置项减少
         // 配置项减少
         minus() {
         minus() {