Commit f93a0d599e1619b46eb0bfcb7ceff74e10e4a3a1
Committed by
GitHub
Merge branch '648540858:wvp-28181-2.0' into wvp-28181-2.0
Showing
5 changed files
with
73 additions
and
49 deletions
src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java
| ... | ... | @@ -47,7 +47,7 @@ public interface PlatformCatalogMapper { |
| 47 | 47 | PlatformCatalog selectDefaultByPlatFormId(String platformId); |
| 48 | 48 | |
| 49 | 49 | |
| 50 | - @Select("SELECT pc.* FROM platform_catalog pc WHERE pc.id = #{id}") | |
| 50 | + @Select("SELECT pc.* FROM platform_catalog pc WHERE pc.id = #{id}") | |
| 51 | 51 | PlatformCatalog selectParentCatalog(String id); |
| 52 | 52 | |
| 53 | 53 | @Select("SELECT pc.id as channelId, pc.name, pc.civilCode, pc.businessGroupId,'1' as parental, pc.parentId " + | ... | ... |
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
| ... | ... | @@ -708,7 +708,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { |
| 708 | 708 | platformCatalog.setParentId(platform.getDeviceGBId()); |
| 709 | 709 | }else { |
| 710 | 710 | // 获取顶层的 |
| 711 | - PlatformCatalog topCatalog = getTopCatalog(platformCatalog.getParentId(), platformCatalog.getPlatformId()); | |
| 711 | + PlatformCatalog topCatalog = getTopCatalog(platformCatalog.getParentId(), platform.getDeviceGBId()); | |
| 712 | 712 | platformCatalog.setBusinessGroupId(topCatalog.getId()); |
| 713 | 713 | } |
| 714 | 714 | } | ... | ... |
web_src/src/components/common/jessibuca.vue
| ... | ... | @@ -5,8 +5,8 @@ |
| 5 | 5 | <i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick"></i> |
| 6 | 6 | <i v-if="playing" class="iconfont icon-pause jessibuca-btn" @click="pause"></i> |
| 7 | 7 | <i class="iconfont icon-stop jessibuca-btn" @click="destroy"></i> |
| 8 | - <i v-if="isNotMute" class="iconfont icon-audio-high jessibuca-btn" @click="jessibuca.mute()"></i> | |
| 9 | - <i v-if="!isNotMute" class="iconfont icon-audio-mute jessibuca-btn" @click="jessibuca.cancelMute()"></i> | |
| 8 | + <i v-if="isNotMute" class="iconfont icon-audio-high jessibuca-btn" @click="mute()"></i> | |
| 9 | + <i v-if="!isNotMute" class="iconfont icon-audio-mute jessibuca-btn" @click="cancelMute()"></i> | |
| 10 | 10 | </div> |
| 11 | 11 | <div class="buttons-box-right"> |
| 12 | 12 | <span class="jessibuca-btn">{{ kBps }} kb/s</span> |
| ... | ... | @@ -243,6 +243,16 @@ export default { |
| 243 | 243 | this.err = ""; |
| 244 | 244 | this.performance = ""; |
| 245 | 245 | }, |
| 246 | + mute: function () { | |
| 247 | + if (jessibucaPlayer[this._uid]) { | |
| 248 | + jessibucaPlayer[this._uid].mute(); | |
| 249 | + } | |
| 250 | + }, | |
| 251 | + cancelMute: function () { | |
| 252 | + if (jessibucaPlayer[this._uid]) { | |
| 253 | + jessibucaPlayer[this._uid].cancelMute(); | |
| 254 | + } | |
| 255 | + }, | |
| 246 | 256 | destroy: function () { |
| 247 | 257 | if (jessibucaPlayer[this._uid]) { |
| 248 | 258 | jessibucaPlayer[this._uid].destroy(); | ... | ... |
web_src/src/components/control.vue
| ... | ... | @@ -324,7 +324,7 @@ export default { |
| 324 | 324 | */ |
| 325 | 325 | getThreadsLoad: function () { |
| 326 | 326 | let that = this; |
| 327 | - if (that.mediaServerChoose != null) { | |
| 327 | + if (!!that.mediaServerChoose) { | |
| 328 | 328 | this.$axios({ |
| 329 | 329 | method: 'get', |
| 330 | 330 | url: '/zlm/' + that.mediaServerChoose + '/index/api/getThreadsLoad' |
| ... | ... | @@ -375,7 +375,7 @@ export default { |
| 375 | 375 | }, |
| 376 | 376 | getLoadCount: function () { |
| 377 | 377 | let that = this; |
| 378 | - if (that.mediaServerChoose != null) { | |
| 378 | + if (!!that.mediaServerChoose) { | |
| 379 | 379 | that.mediaServer.getMediaServer(that.mediaServerChoose, (data) => { |
| 380 | 380 | if (data.code == 0) { |
| 381 | 381 | that.loadCount = data.data.count |
| ... | ... | @@ -473,42 +473,46 @@ export default { |
| 473 | 473 | }, |
| 474 | 474 | |
| 475 | 475 | getAllSession: function () { |
| 476 | - let that = this; | |
| 477 | - that.allSessionData = []; | |
| 478 | - this.$axios({ | |
| 479 | - method: 'get', | |
| 480 | - url: '/zlm/' + that.mediaServerChoose + '/index/api/getAllSession' | |
| 481 | - }).then(function (res) { | |
| 482 | - res.data.data.forEach(item => { | |
| 483 | - let data = { | |
| 484 | - peer_ip: item.peer_ip, | |
| 485 | - local_ip: item.local_ip, | |
| 486 | - typeid: item.typeid, | |
| 487 | - id: item.id | |
| 488 | - }; | |
| 489 | - that.allSessionData.push(data); | |
| 476 | + this.allSessionData = []; | |
| 477 | + if (!!this.mediaServerChoose) { | |
| 478 | + this.$axios({ | |
| 479 | + method: 'get', | |
| 480 | + url: '/zlm/' + this.mediaServerChoose + '/index/api/getAllSession' | |
| 481 | + }).then((res)=> { | |
| 482 | + res.data.data.forEach(item => { | |
| 483 | + let data = { | |
| 484 | + peer_ip: item.peer_ip, | |
| 485 | + local_ip: item.local_ip, | |
| 486 | + typeid: item.typeid, | |
| 487 | + id: item.id | |
| 488 | + }; | |
| 489 | + this.allSessionData.push(data); | |
| 490 | + }); | |
| 490 | 491 | }); |
| 491 | - }); | |
| 492 | + } | |
| 493 | + | |
| 492 | 494 | }, |
| 493 | 495 | getServerConfig: function () { |
| 494 | - let that = this; | |
| 495 | - this.$axios({ | |
| 496 | - method: 'get', | |
| 497 | - url: '/zlm/' + that.mediaServerChoose + '/index/api/getServerConfig' | |
| 498 | - }).then(function (res) { | |
| 499 | - let info = res.data.data[0]; | |
| 500 | - let serverInfo = {} | |
| 501 | - for (let i = 0; i < Object.keys(info).length; i++) { | |
| 502 | - let key = Object.keys(info)[i]; | |
| 503 | - let group = key.substring(0, key.indexOf(".")) | |
| 504 | - let itemKey = key.substring(key.indexOf(".") + 1) | |
| 505 | - if (!serverInfo[group]) serverInfo[group] = {} | |
| 506 | - serverInfo[group][itemKey] = info[key] | |
| 507 | - } | |
| 496 | + if (!!this.mediaServerChoose) { | |
| 497 | + this.$axios({ | |
| 498 | + method: 'get', | |
| 499 | + url: '/zlm/' + that.mediaServerChoose + '/index/api/getServerConfig' | |
| 500 | + }).then((res)=> { | |
| 501 | + let info = res.data.data[0]; | |
| 502 | + let serverInfo = {} | |
| 503 | + for (let i = 0; i < Object.keys(info).length; i++) { | |
| 504 | + let key = Object.keys(info)[i]; | |
| 505 | + let group = key.substring(0, key.indexOf(".")) | |
| 506 | + let itemKey = key.substring(key.indexOf(".") + 1) | |
| 507 | + if (!serverInfo[group]) serverInfo[group] = {} | |
| 508 | + serverInfo[group][itemKey] = info[key] | |
| 509 | + } | |
| 510 | + | |
| 511 | + this.serverConfig = serverInfo; | |
| 512 | + this.visible = true; | |
| 513 | + }); | |
| 514 | + } | |
| 508 | 515 | |
| 509 | - that.serverConfig = serverInfo; | |
| 510 | - that.visible = true; | |
| 511 | - }); | |
| 512 | 516 | }, |
| 513 | 517 | getWVPServerConfig: function () { |
| 514 | 518 | let that = this; |
| ... | ... | @@ -531,6 +535,14 @@ export default { |
| 531 | 535 | }, |
| 532 | 536 | reStartServer: function () { |
| 533 | 537 | let that = this; |
| 538 | + if (!!!this.mediaServerChoose) { | |
| 539 | + this.$message({ | |
| 540 | + type: 'info', | |
| 541 | + message: '未选择节点' | |
| 542 | + }); | |
| 543 | + return; | |
| 544 | + } | |
| 545 | + | |
| 534 | 546 | this.$confirm('此操作将重启媒体服务器, 是否继续?', '提示', { |
| 535 | 547 | confirmButtonText: '确定', |
| 536 | 548 | cancelButtonText: '取消', |
| ... | ... | @@ -571,17 +583,19 @@ export default { |
| 571 | 583 | console.log(JSON.stringify(tabledata[index])); |
| 572 | 584 | }, |
| 573 | 585 | deleteSession: function (id) { |
| 574 | - let that = this; | |
| 575 | - this.$axios({ | |
| 576 | - method: 'get', | |
| 577 | - url: '/zlm/' + that.mediaServerChoose + '/index/api/kick_session?id=' + id | |
| 578 | - }).then(function (res) { | |
| 579 | - that.getAllSession(); | |
| 580 | - that.$message({ | |
| 581 | - type: 'success', | |
| 582 | - message: '删除成功!' | |
| 586 | + if (!!this.mediaServerChoose) { | |
| 587 | + this.$axios({ | |
| 588 | + method: 'get', | |
| 589 | + url: '/zlm/' + this.mediaServerChoose + '/index/api/kick_session?id=' + id | |
| 590 | + }).then((res)=>{ | |
| 591 | + this.getAllSession(); | |
| 592 | + this.$message({ | |
| 593 | + type: 'success', | |
| 594 | + message: '删除成功!' | |
| 595 | + }); | |
| 583 | 596 | }); |
| 584 | - }); | |
| 597 | + } | |
| 598 | + | |
| 585 | 599 | }, |
| 586 | 600 | getNameFromKey: function (key) { |
| 587 | 601 | let nameData = { | ... | ... |
web_src/src/components/dialog/devicePlayer.vue
| ... | ... | @@ -374,7 +374,7 @@ export default { |
| 374 | 374 | url: '/zlm/' +this.mediaServerId+ '/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtmp&app='+ this.app +'&stream='+ this.streamId |
| 375 | 375 | }).then(function (res) { |
| 376 | 376 | that.tracksLoading = false; |
| 377 | - if (res.data.code == 0 && res.data.online) { | |
| 377 | + if (res.data.code == 0 && res.data.tracks) { | |
| 378 | 378 | that.tracks = res.data.tracks; |
| 379 | 379 | }else{ |
| 380 | 380 | that.tracksNotLoaded = true; | ... | ... |