Jelajahi Sumber

2020年7月7日12:44:25

linan 5 tahun lalu
induk
melakukan
498ca9c377
2 mengubah file dengan 6 tambahan dan 1 penghapusan
  1. 0 1
      .vscode/settings.json
  2. 6 0
      src/views/deviceManagement/DeviceInfo.vue

+ 0 - 1
.vscode/settings.json

@@ -1,4 +1,3 @@
 {
-  "prettier.semi": false,
   "prettier.singleQuote": true
 }

+ 6 - 0
src/views/deviceManagement/DeviceInfo.vue

@@ -50,6 +50,7 @@
                 </el-table-column>
             </el-table>
         </el-row>
+
         <el-dialog title="新建网关" :visible.sync="isShowDialog" append-to-body>
             <el-form :model="formData" label-width="100px">
                 <el-form-item label="名称:">
@@ -212,6 +213,7 @@ export default {
             if (hid === 4 || hid === 5 || hid === 6) return true;
             else return false;
         },
+        // 播放
         handlePlay(row) {
             console.log(row);
             this.videoData = {
@@ -221,8 +223,10 @@ export default {
             };
             this.isShowVideo = true;
         },
+        // 编辑
         handleEdit(row) {
             console.log(row);
+            row.meta = JSON.stringify(row.meta)
             if (this.formData.id) {
                 delete this.formData.id;
                 delete this.formData.name;
@@ -240,6 +244,7 @@ export default {
             //row.meta.rtsp
             //row.meta.ws
         },
+        // 编辑的保存按钮
         handleSave() {
             let isNew = this.formData.id ? false : true;
             this.formData.hardTypeId = this.selectArr[
@@ -248,6 +253,7 @@ export default {
             let api = isNew
                 ? "/device/device-communication/add"
                 : "/device/device/device-communication/update";
+            this.formData.meta = JSON.parse(this.formData.meta)
             this.fetch({
                 api,
                 data: this.formData,