Commit 2035bae8 authored by co_dengxiongwen's avatar co_dengxiongwen

Merge branch 'dev' of gitlab.suntrayoa.com:geqilin/zhxf_vue into dev

parents d05988c2 28918dff
......@@ -101,16 +101,44 @@ import { mapState } from 'vuex'
import { isAuth } from '../../../util'
export default {
computed: {
...mapState('d2admin/user', [
'info'
])
...mapState('d2admin/user', ['info'])
},
data () {
data() {
return {
//11=焦距变大,12=焦距变小,13=焦点前调,14=焦点后调,15=光圈扩大,16=光圈扩小
//21=上仰,22=下俯,23=左转,24=右转,25=左上,26=右上,27=左下,28=右下,29=自动扫描
actionList: ['', '', '', '', '', '', '', '', '', '', '', '变倍+', '变倍-', '变焦+', '变焦-', '光圈+', '光圈-', '', '', '', '',
'上仰', '下俯', '左转', '右转', '左上', '右上', '左下', '右下', '自动扫描'],
actionList: [
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'变倍+',
'变倍-',
'变焦+',
'变焦-',
'光圈+',
'光圈-',
'',
'',
'',
'',
'上仰',
'下俯',
'左转',
'右转',
'左上',
'右上',
'左下',
'右下',
'自动扫描'
],
imgUrl: '',
imgRightUrl11: false,
imgRightUrl12: false,
......@@ -151,11 +179,9 @@ export default {
flvPlayer: null
}
},
created () {
},
created() {},
methods: {
init (id, stationId) {
init(id, stationId) {
this.visible = true
this.clickFlag = false
this.dataForm.id = id
......@@ -163,16 +189,19 @@ export default {
this.initResource()
this.dataForm.operatorName = this.info.name
},
initResource () {
initResource() {
this.$http({
url: this.$http.adornUrlEq(`/liResource/getResourceDetails/${this.dataForm.id}`),
url: this.$http.adornUrlEq(
`/liResource/getResourceDetails/${this.dataForm.id}`
),
method: 'get',
params: this.$http.adornParams()
}).then(data => {
}).then((data) => {
if (data && data.code === 0) {
this.dataForm = data.bean
//如果当前设备摄像头为离线状态,则不加载画面
if (data.bean.byx2 == 0 && this.flvPlayer) { //资源点状态(0=离线,1=在线)
if (data.bean.byx2 == 0 && this.flvPlayer) {
//资源点状态(0=离线,1=在线)
this.flvPlayer.pause()
this.flvPlayer.unload()
this.flvPlayer.detachMediaElement()
......@@ -198,7 +227,7 @@ export default {
levelType: 1,
controlType: 3
}
}).then(data => {
}).then((data) => {
if (data && data.code === 0) {
this.videoSrc = data.url
//视频连接
......@@ -214,8 +243,10 @@ export default {
enableStashBuffer: false, //播放flv时,设置是否启用播放缓存,只在直播起作用。
url: this.videoSrc
})
this.$nextTick(function () {
this.flvPlayer.attachMediaElement(this.$refs.video)
this.$nextTick(function() {
this.flvPlayer.attachMediaElement(
this.$refs.video
)
this.flvPlayer.load()
})
}
......@@ -224,11 +255,14 @@ export default {
}
})
},
closeQueryDetailVisible () {
closeQueryDetailVisible() {
this.$emit('closeQ')
},
clickPTZControl (ptz, dwStop, img) {
if (this.dataForm.type !== 'ece0b8b2db27411886254e81134988a3' && (ptz < 11 || ptz > 16)) {
clickPTZControl(ptz, dwStop, img) {
if (
this.dataForm.type !== 'ece0b8b2db27411886254e81134988a3' &&
(ptz < 11 || ptz > 16)
) {
return
}
if (!isAuth('ol:demo:corona')) {
......@@ -269,24 +303,26 @@ export default {
dwPtzCommand: ptz, //云台控制命令
dwStop: dwStop //云台控制0开始和1结束
}
}).then(data => {
}).then((data) => {
// console.log(11)
// console.log(data)
if (data && data.code === 0) {
if (dwStop == 0) { //云台控制0开始和1结束
this.saveLog(1, ptz)// 执行结果 成功 1 失败 2
if (dwStop == 0) {
//云台控制0开始和1结束
this.saveLog(1, ptz) // 执行结果 成功 1 失败 2
this.$message.success(data.msg)
}
} else {
if (dwStop == 0) { //云台控制0开始和1结束
this.saveLog(2, ptz)// 执行结果 成功 1 失败 2
if (dwStop == 0) {
//云台控制0开始和1结束
this.saveLog(2, ptz) // 执行结果 成功 1 失败 2
this.$message.error(data.msg)
}
}
})
},
//调用日志保存记录操作指令
saveLog (result, ptz) {
saveLog(result, ptz) {
this.$http({
url: this.$http.adornUrlEq('/orVideoMonitor/save'),
method: 'post',
......@@ -298,9 +334,7 @@ export default {
type: this.dataForm.type,
result: result
}
}).then(data => {
})
}).then((data) => {})
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment