[1078] 增加音视频属性查询
This commit is contained in:
@@ -330,14 +330,16 @@ export default {
|
||||
// 文件下载地址
|
||||
const baseUrl = window.baseUrl ? window.baseUrl : ''
|
||||
const fileUrl = ((process.env.NODE_ENV === 'development') ? process.env.VUE_APP_BASE_API : baseUrl) + `/api/jt1078/snap?phoneNumber=${this.device.phoneNumber}&channelId=${row.channelId}`
|
||||
|
||||
let controller = new AbortController()
|
||||
let signal = controller.signal
|
||||
// 设置请求头
|
||||
const headers = new Headers()
|
||||
headers.append('access-token', this.$store.getters.token) // 设置授权头,替换YourAccessToken为实际的访问令牌
|
||||
// 发起 请求
|
||||
fetch(fileUrl, {
|
||||
method: 'GET',
|
||||
headers: headers
|
||||
headers: headers,
|
||||
signal: signal
|
||||
})
|
||||
.then(response => response.blob())
|
||||
.then(blob => {
|
||||
@@ -353,6 +355,11 @@ export default {
|
||||
document.body.removeChild(link)
|
||||
})
|
||||
.catch(error => console.error('下载失败:', error))
|
||||
|
||||
setTimeout(() => {
|
||||
this.$message.error('等待截图超时', { closed: true })
|
||||
controller.abort('timeout')
|
||||
}, 15000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
75
web/src/views/jtDevice/dialog/mediaAttribute.vue
Executable file
75
web/src/views/jtDevice/dialog/mediaAttribute.vue
Executable file
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<div id="configInfo">
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
title="音视频属性"
|
||||
width="=80%"
|
||||
top="2rem"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="showDialog"
|
||||
:destroy-on-close="true"
|
||||
@close="close()"
|
||||
>
|
||||
<div id="shared">
|
||||
<el-descriptions title="音频" :column="2" v-if="attributeData" style="margin-bottom: 1rem;">
|
||||
<el-descriptions-item label="编码">{{ audioEncoderEnum[attributeData.audioEncoder - 1] }}</el-descriptions-item>
|
||||
<el-descriptions-item label="声道数">{{ attributeData.audioChannels }}</el-descriptions-item>
|
||||
<el-descriptions-item label="采样率">{{ audioSamplingRateEnum[attributeData.audioSamplingRate] }}</el-descriptions-item>
|
||||
<el-descriptions-item label="采样位数">{{ audioSamplingBitsEnum[attributeData.audioSamplingBits] }}</el-descriptions-item>
|
||||
<el-descriptions-item label="帧长度">{{ attributeData.audioFrameLength }}</el-descriptions-item>
|
||||
<el-descriptions-item label="音频输出">{{ attributeData.audioOutputEnable === 0 ? '不支持':'支持' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="最大物理通道数量">{{ attributeData.audioChannelMax === 0 ? '不支持':'支持' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="视频" :column="2" style="margin-bottom: 1rem;">
|
||||
<el-descriptions-item label="编码方式">{{ videoEncoderEnum[attributeData.videoEncoder] }}</el-descriptions-item>
|
||||
<el-descriptions-item label="最大物理通道数量">{{ attributeData.videoChannelMax }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import elDragDialog from '@/directive/el-drag-dialog'
|
||||
|
||||
export default {
|
||||
name: 'ConfigInfo',
|
||||
directives: { elDragDialog },
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
showDialog: false,
|
||||
attributeData: null,
|
||||
audioEncoderEnum: [
|
||||
'G.721', 'G.722', 'G.723', 'G.728', 'G.729', 'G.711A', 'G.711U', 'G.726', 'G.729A', 'DVI4_3', 'DVI4_4', 'DVI4_8K'
|
||||
, 'DVI4_16K', 'LPC', 'S16BE_STEREO', 'S16BE_MONO', 'MPEGAUDIO', 'LPCM', 'AAC', 'WMA9STD', 'HEAAC', 'PCM_VOICE'
|
||||
, 'PCM_AUDIO', 'AACLC', 'MP3', 'ADPCMA', 'MP4AUDIO', 'AMR'
|
||||
],
|
||||
audioSamplingRateEnum: [
|
||||
'8kHz', '22.05kHz', '44.1kHz', '48kHz'
|
||||
],
|
||||
audioSamplingBitsEnum: [
|
||||
'8位', '16位', '32位'
|
||||
],
|
||||
videoEncoderEnum: {
|
||||
98: 'H.264',
|
||||
99: 'H.265',
|
||||
100: 'AVS',
|
||||
101: 'SVAC'
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
created() {},
|
||||
methods: {
|
||||
openDialog: function(data) {
|
||||
this.showDialog = true
|
||||
this.attributeData = data
|
||||
},
|
||||
close: function() {
|
||||
this.showDialog = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -107,6 +107,8 @@
|
||||
终端参数</el-dropdown-item>
|
||||
<el-dropdown-item command="attribute" v-bind:disabled="!scope.row.status">
|
||||
终端属性</el-dropdown-item>
|
||||
<el-dropdown-item command="mediaAttribute" v-bind:disabled="!scope.row.status">
|
||||
音视频属性</el-dropdown-item>
|
||||
<el-dropdown-item command="linkDetection" v-bind:disabled="!scope.row.status" >
|
||||
链路检测</el-dropdown-item>
|
||||
<el-dropdown-item command="position" v-bind:disabled="!scope.row.status" >
|
||||
@@ -151,6 +153,7 @@
|
||||
<driverInfo ref="driverInfo" />
|
||||
<connectionServer ref="connectionServer" />
|
||||
<controlDoor ref="controlDoor" />
|
||||
<mediaAttribute ref="mediaAttribute" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -164,11 +167,12 @@ import telephoneCallback from './dialog/telephoneCallback.vue'
|
||||
import driverInfo from './dialog/driverInfo.vue'
|
||||
import connectionServer from './dialog/connectionServer.vue'
|
||||
import controlDoor from './dialog/controlDoor.vue'
|
||||
import mediaAttribute from './dialog/mediaAttribute.vue'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
deviceEdit, configInfo, attribute, position, textMsg, telephoneCallback, driverInfo, connectionServer, controlDoor
|
||||
deviceEdit, configInfo, attribute, position, textMsg, telephoneCallback, driverInfo, connectionServer, controlDoor, mediaAttribute
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -287,6 +291,8 @@ export default {
|
||||
this.controlDoor(itemData)
|
||||
} else if (command === 'connection') {
|
||||
this.connection(itemData)
|
||||
} else if (command === 'mediaAttribute') {
|
||||
this.queryMediaAttribute(itemData)
|
||||
} else {
|
||||
this.$message.info('尚不支持')
|
||||
}
|
||||
@@ -361,6 +367,13 @@ export default {
|
||||
connection: function(itemData) {
|
||||
this.$refs.connectionServer.openDialog(itemData.phoneNumber)
|
||||
},
|
||||
queryMediaAttribute: function(itemData) {
|
||||
this.$store.dispatch('jtDevice/queryMediaAttribute', itemData.phoneNumber)
|
||||
.then((data) => {
|
||||
this.$refs.mediaAttribute.openDialog(data)
|
||||
})
|
||||
|
||||
},
|
||||
controlDoor: function(itemData) {
|
||||
this.$refs.controlDoor.openDialog(itemData.phoneNumber)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user