|
|
@@ -127,7 +127,7 @@ import { mapGetters } from 'vuex'
|
|
|
import * as echarts from 'echarts'
|
|
|
import {
|
|
|
getStatistic,
|
|
|
- getVideoinfo,
|
|
|
+ getVideoInfo,
|
|
|
getAvailableParam,
|
|
|
setCamera
|
|
|
} from '@/api/camera'
|
|
|
@@ -192,15 +192,11 @@ export default {
|
|
|
},
|
|
|
beforeDestroy () {
|
|
|
if (this.isTraffic) {
|
|
|
+ this.hideSettingsMenu()
|
|
|
window.removeEventListener('resize', this.onResize)
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- onVideoReset () {
|
|
|
- this.videoSettings = null
|
|
|
- this.infoData = null
|
|
|
- this.getAvailableParam()
|
|
|
- },
|
|
|
close () {
|
|
|
this.destroyPlayer()
|
|
|
this.$emit('close')
|
|
|
@@ -232,7 +228,9 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
this.$videoPramsLoading = true
|
|
|
- getAvailableParam().then(({ data }) => {
|
|
|
+ getAvailableParam().finally(() => {
|
|
|
+ this.$videoPramsLoading = false
|
|
|
+ }).then(({ data }) => {
|
|
|
this.videoSettings = {
|
|
|
items: data.itemList.map(item => {
|
|
|
// maxBitRateOptions: 20480
|
|
|
@@ -251,9 +249,7 @@ export default {
|
|
|
bitRates: [],
|
|
|
streamRateType: data.streamRateTypeList
|
|
|
}
|
|
|
- this.getVideoinfo()
|
|
|
- }).finally(() => {
|
|
|
- this.$videoPramsLoading = false
|
|
|
+ this.getVideoInfo()
|
|
|
})
|
|
|
},
|
|
|
onSettings () {
|
|
|
@@ -262,7 +258,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
if (!this.infoData) {
|
|
|
- this.getVideoinfo()
|
|
|
+ this.getVideoInfo()
|
|
|
return
|
|
|
}
|
|
|
this.settingTab = false
|
|
|
@@ -290,7 +286,8 @@ export default {
|
|
|
onCloseSettingTab () {
|
|
|
this.settingTab = false
|
|
|
},
|
|
|
- getVideoinfo () {
|
|
|
+ getVideoInfo () {
|
|
|
+ console.log('getVideoInfo', this.$videoInfoLoading)
|
|
|
if (this.$videoInfoLoading) {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
@@ -299,12 +296,12 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
this.$videoInfoLoading = true
|
|
|
- getVideoinfo(this.camera.identifier).then(({ data }) => {
|
|
|
+ getVideoInfo(this.camera.identifier).finally(() => {
|
|
|
+ this.$videoInfoLoading = false
|
|
|
+ }).then(({ data }) => {
|
|
|
const { width, hight, frameRate, bitRate } = data
|
|
|
this.infoData = { width, hight, frameRate, bitRate }
|
|
|
this.dataInit()
|
|
|
- }).finally(() => {
|
|
|
- this.$videoInfoLoading = false
|
|
|
})
|
|
|
},
|
|
|
dataInit () {
|