From 36cd31d69d451072e00ff1dd1928a61753aa5a97 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期一, 19 十月 2020 14:25:41 +0800 Subject: [PATCH] 修复ui开启音频无法播放的bug 修复可能导致录象查看的bug 修复开启openRTPServer时的bug --- web_src/src/components/channelList.vue | 34 ++++++++++++++++++++++++++++------ 1 files changed, 28 insertions(+), 6 deletions(-) diff --git a/web_src/src/components/channelList.vue b/web_src/src/components/channelList.vue index 7c667ba..8e6638a 100644 --- a/web_src/src/components/channelList.vue +++ b/web_src/src/components/channelList.vue @@ -54,11 +54,15 @@ </el-table-column> <el-table-column prop="ptztypeText" label="浜戝彴绫诲瀷"> </el-table-column> - <el-table-column label="鎿嶄綔" width="240" align="center" fixed="right"> + <el-table-column label="鎿嶄綔" width="280" align="center" fixed="right"> <template slot-scope="scope"> - <el-button size="mini" icon="el-icon-video-play" v-if="scope.row.parental == 0" @click="sendDevicePush(scope.row)">棰勮瑙嗛</el-button> - <el-button size="mini" icon="el-icon-s-open" type="primary" v-if="scope.row.parental == 1" @click="changeSubchannel(scope.row)">鏌ョ湅瀛愮洰褰�</el-button> - <!-- <el-button size="mini" @click="sendDevicePush(scope.row)">褰曞儚鏌ヨ</el-button> --> + <el-button-group> + <el-button size="mini" icon="el-icon-video-play" v-if="scope.row.parental == 0" @click="sendDevicePush(scope.row)">鎾斁</el-button> + <el-button size="mini" icon="el-icon-switch-button" type="danger" v-if="scope.row.play" @click="stopDevicePush(scope.row)">鍋滄</el-button> + <el-button size="mini" icon="el-icon-s-open" type="primary" v-if="scope.row.parental == 1" @click="changeSubchannel(scope.row)">鏌ョ湅</el-button> +<!-- <el-button size="mini" icon="el-icon-video-camera" type="primary" >璁惧褰曡薄</el-button>--> + <!-- <el-button size="mini" @click="sendDevicePush(scope.row)">褰曞儚鏌ヨ</el-button> --> + </el-button-group> </template> </el-table-column> </el-table> @@ -198,7 +202,7 @@ message: '璇锋眰鎴愬姛', type: 'success' }); - });; + }); }, //閫氱煡璁惧涓婁紶濯掍綋娴� sendDevicePush: function(itemData) { @@ -212,12 +216,30 @@ method: 'get', url: '/api/play/' + deviceId + '/' + channelId }).then(function(res) { + console.log(res.data) let ssrc = res.data.ssrc; that.isLoging = false - that.$refs.devicePlayer.play(res.data,deviceId,channelId,itemData.hasAudio); + if (!!ssrc) { + that.$refs.devicePlayer.play(res.data,deviceId,channelId,itemData.hasAudio); + that.initData(); + }else { + that.$message.error(res.data); + } }).catch(function(e) { }); }, + stopDevicePush: function(itemData) { + console.log(itemData) + var that = this; + this.$axios({ + method: 'post', + url: '/api/play/' + itemData.ssrc + '/stop' + }).then(function(res) { + console.log(JSON.stringify(res)); + that.initData(); + }); + }, + showDevice: function(){ this.$router.push(this.beforeUrl).then(()=>{ this.initParam(); -- Gitblit v1.8.0