修复地图页面视频播放

This commit is contained in:
lin 2026-06-16 10:21:03 +08:00
parent 6ade3060b5
commit 0c7701d36f
3 changed files with 6 additions and 13 deletions

View File

@ -319,7 +319,7 @@ export default {
this.$store.dispatch('commonChanel/playChannel', itemData.gbId) this.$store.dispatch('commonChanel/playChannel', itemData.gbId)
.then((data) => { .then((data) => {
itemData.streamId = data.stream itemData.streamId = data.stream
this.$refs.devicePlayer.openDialog('media', itemData.gbId, itemData.gbId, { this.$refs.devicePlayer.openDialog('media', itemData.gbId, {
streamInfo: data, streamInfo: data,
hasAudio: itemData.hasAudio hasAudio: itemData.hasAudio
}) })

View File

@ -67,7 +67,6 @@ export default {
streamId: '', streamId: '',
app: '', app: '',
mediaServerId: '', mediaServerId: '',
deviceId: '',
channelId: '', channelId: '',
tabActiveName: 'preset', tabActiveName: 'preset',
hasAudio: false, hasAudio: false,
@ -90,10 +89,9 @@ export default {
this.$refs.mediaInfo && this.$refs.mediaInfo.stopTask() this.$refs.mediaInfo && this.$refs.mediaInfo.stopTask()
} }
}, },
openDialog(tab, deviceId, channelId, param) { openDialog(tab, channelId, param) {
if (this.showVideoDialog) return if (this.showVideoDialog) return
this.tabActiveName = tab || 'preset' this.tabActiveName = tab || 'preset'
this.deviceId = deviceId
this.channelId = channelId this.channelId = channelId
this.streamId = '' this.streamId = ''
this.mediaServerId = '' this.mediaServerId = ''
@ -130,7 +128,6 @@ export default {
toggleDragZoom(direction) { toggleDragZoom(direction) {
this.dragZoomDirection = direction this.dragZoomDirection = direction
this.$refs.playerTabs.startDragZoom((params) => { this.$refs.playerTabs.startDragZoom((params) => {
params.deviceId = this.deviceId
params.channelId = this.channelId params.channelId = this.channelId
const action = this.dragZoomDirection === 'in' ? 'commonChanel/dragZoomIn' : 'commonChanel/dragZoomOut' const action = this.dragZoomDirection === 'in' ? 'commonChanel/dragZoomIn' : 'commonChanel/dragZoomOut'
const successMsg = this.dragZoomDirection === 'in' ? '拉框放大成功' : '拉框缩小成功' const successMsg = this.dragZoomDirection === 'in' ? '拉框放大成功' : '拉框缩小成功'

View File

@ -115,7 +115,7 @@
</div> </div>
</transition> </transition>
</div> </div>
<devicePlayer ref="devicePlayer" ></devicePlayer> <player ref="player" ></player>
<queryTrace ref="queryTrace" ></queryTrace> <queryTrace ref="queryTrace" ></queryTrace>
<CommonChannelEditDialog ref="commonChannelEditDialog" ></CommonChannelEditDialog> <CommonChannelEditDialog ref="commonChannelEditDialog" ></CommonChannelEditDialog>
<DrawThinProgress ref="drawThinProgress" ></DrawThinProgress> <DrawThinProgress ref="drawThinProgress" ></DrawThinProgress>
@ -126,14 +126,10 @@
import DeviceTree from '../common/DeviceTree.vue' import DeviceTree from '../common/DeviceTree.vue'
import queryTrace from './queryTrace.vue' import queryTrace from './queryTrace.vue'
import MapComponent from '../common/MapComponent.vue' import MapComponent from '../common/MapComponent.vue'
import devicePlayer from '../channel/player.vue' import player from '../channel/player.vue'
import CommonChannelEditDialog from '../dialog/commonChannelEditDialog.vue' import CommonChannelEditDialog from '../dialog/commonChannelEditDialog.vue'
import DrawThinProgress from './dialog/drawThinProgress.vue' import DrawThinProgress from './dialog/drawThinProgress.vue'
let cameraListForSource = []
let cameraList = []
let cameraListForLevelMap = new Map()
let cameraLayerExtent = []
let channelLayer, channelTileLayer = null let channelLayer, channelTileLayer = null
export default { export default {
name: 'Map', name: 'Map',
@ -141,7 +137,7 @@ export default {
DrawThinProgress, DrawThinProgress,
CommonChannelEditDialog, CommonChannelEditDialog,
DeviceTree, DeviceTree,
devicePlayer, player,
queryTrace, queryTrace,
MapComponent MapComponent
}, },
@ -362,7 +358,7 @@ export default {
}) })
this.$store.dispatch('commonChanel/playChannel', channel.gbId) this.$store.dispatch('commonChanel/playChannel', channel.gbId)
.then((data) => { .then((data) => {
this.$refs.devicePlayer.openDialog('media', channel.gbId, { this.$refs.player.openDialog('media', channel.gbId, {
streamInfo: data, streamInfo: data,
hasAudio: channel.hasAudio hasAudio: channel.hasAudio
}) })