From f9ab13a14590d310937de7d78a36ee599dce750b Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 13 十月 2020 17:16:38 +0800
Subject: [PATCH] 添加通道音频设置 添加media配置

---
 web_src/src/components/channelList.vue |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/web_src/src/components/channelList.vue b/web_src/src/components/channelList.vue
index 7a1e0e2..7c667ba 100644
--- a/web_src/src/components/channelList.vue
+++ b/web_src/src/components/channelList.vue
@@ -31,10 +31,19 @@
 				<el-table ref="channelListTable" :data="deviceChannelList" :height="winHeight" border style="width: 100%">
 					<el-table-column prop="channelId" label="閫氶亾缂栧彿" width="210">
 						</el-table-column>
-						<el-table-column prop="name" label="閫氶亾鍚嶇О" width="500">
+						<el-table-column prop="name" label="閫氶亾鍚嶇О">
 						</el-table-column>
 						<el-table-column prop="subCount" label="瀛愯妭鐐规暟">
 						</el-table-column>
+          <el-table-column label="寮�鍚煶棰�" align="center">
+            <template slot-scope="scope">
+              <el-switch
+                @change="updateChannel(scope.row)"
+                v-model="scope.row.hasAudio"
+                active-color="#409EFF">
+              </el-switch>
+            </template>
+          </el-table-column>
           <el-table-column label="鐘舵��" width="180" align="center">
             <template slot-scope="scope">
               <div slot="reference" class="name-wrapper">
@@ -193,6 +202,7 @@
 			},
 			//閫氱煡璁惧涓婁紶濯掍綋娴�
 			sendDevicePush: function(itemData) {
+			  console.log(itemData)
 				let deviceId = this.deviceId;
         this.isLoging = true;
 				let channelId = itemData.channelId;
@@ -204,7 +214,7 @@
 				}).then(function(res) {
 					let ssrc = res.data.ssrc;
           that.isLoging = false
-					that.$refs.devicePlayer.play(res.data,deviceId,channelId);
+					that.$refs.devicePlayer.play(res.data,deviceId,channelId,itemData.hasAudio);
 				}).catch(function(e) {
 				});
 			},
@@ -256,6 +266,16 @@
 				this.currentPage = 1;
 				this.total = 0;
 				this.initData();
+			},
+      updateChannel: function(row) {
+				console.log(row)
+        this.$axios({
+          method: 'post',
+          url: `/api/channel/update/${this.deviceId}`,
+          params: row
+        }).then(function(res) {
+          console.log(JSON.stringify(res));
+        });
 			}
 
 		}

--
Gitblit v1.8.0