Commit 88afe44f authored by 刘怀志's avatar 刘怀志

init-5

parent 85798ac3
......@@ -54,7 +54,7 @@ export default {
name: '员工信息',
},
{
path: '/user/profile',
path: '/monitoringPlayback/video',
icon: 'el-icon-view',
name: '历史记录',
}
......
......@@ -9,6 +9,7 @@
<script>
import {getCameras} from "@/api/system/video";
import videoParams from './videoParams'
export default {
name: "index",
......@@ -134,13 +135,13 @@ export default {
init() {
let that = this
this.getPubKey(function () {
console.log('LKLLLLLLLLLLLLLLLLLLLLLL', videoParams.APPKEY)
////////////////////////////////// 请自行修改以下变量值 ////////////////////////////////////
var appkey = "23089524"; //综合安防管理平台提供的appkey,必填
var secret = that.setEncrypt("9zHFJeJOz5oPZz7MMZZ7"); //综合安防管理平台提供的secret,必填
var ip = "192.168.10.250"; //综合安防管理平台IP地址,必填
var appkey = videoParams.APPKEY; //综合安防管理平台提供的appkey,必填
var secret = that.setEncrypt(videoParams.SECRETKEY); //综合安防管理平台提供的secret,必填
var ip = videoParams.VIDEOIP; //综合安防管理平台IP地址,必填
var playMode = 0; //初始播放模式:0-预览,1-回放
var port = 443; //综合安防管理平台端口,若启用HTTPS协议,默认443
var port = videoParams.VIDEOPORT; //综合安防管理平台端口,若启用HTTPS协议,默认443
var snapDir = "D:\\SnapDir"; //抓图存储路径
var videoDir = "D:\\VideoDir"; //紧急录像或录像剪辑存储路径
var layout = "2x2"; //playMode指定模式的布局
......@@ -198,6 +199,7 @@ export default {
},
// 推送消息
cbIntegrationCallBack(oData) {
// console.log('cbIntegrationCallBack2222222222222',oData)
// showCBInfo(JSON.stringify(oData.responseMsg));
}
}
......
......@@ -26,6 +26,7 @@
<script>
import {getCameras} from "@/api/system/video";
import videoParams from "@/views/video/videoParams";
export default {
name: "playback",
......@@ -50,12 +51,13 @@ export default {
beforeRouteLeave(to, from, next) {
if (this.oWebControl != null){
this.oWebControl.JS_HideWnd(); // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
this.oWebControl.JS_Disconnect().then(function(){ // 断开与插件服务连接成功
next()
/*this.oWebControl.JS_Disconnect().then(function(){ // 断开与插件服务连接成功
next();
},
function() { // 断开与插件服务连接失败
next()
});
});*/
}else{
next()
}
......@@ -64,17 +66,13 @@ export default {
},
methods: {
getIndex() {
getCameras().then(res => {
// todo 后面将返回的cameraIndexCode放入cameraIndexCode变量中
console.log(res)
this.cameraIndexCode = '12345'
this.cameraIndexCode = '275e201d228c4073b462ad1d9865d3cc'
this.initPlugin();
})
},
startPreview() {
var cameraIndexCode = this.cameraIndexCode; //获取输入的监控点编号值,必填
var startTimeStamp = new Date('2024-07-01'.replace('-', '/').replace('-', '/')).getTime(); //回放开始时间戳,必填
var endTimeStamp = new Date('2024-07-01'.replace('-', '/').replace('-', '/')).getTime(); //回放结束时间戳,必填
var endTimeStamp = new Date('2024-07-02'.replace('-', '/').replace('-', '/')).getTime(); //回放结束时间戳,必填
var recordLocation = 0; //录像存储位置:0-中心存储,1-设备存储
var transMode = 1; //传输协议:0-UDP,1-TCP
var gpuMode = 0; //是否启用GPU硬解,0-不启用,1-启用
......@@ -91,7 +89,9 @@ export default {
gpuMode: gpuMode, //是否启用GPU硬解,0-不启用,1-启用
wndId:wndId //可指定播放窗口
})
})
}).then(function (oData) {
console.log('startPlayback',oData)
});
},
stopPreview() {
......@@ -153,11 +153,11 @@ export default {
this.getPubKey(function () {
////////////////////////////////// 请自行修改以下变量值 ////////////////////////////////////
var appkey = "28730366"; //综合安防管理平台提供的appkey,必填
var secret = that.setEncrypt("HSZkCJpSJ7gSUYrO6wVi"); //综合安防管理平台提供的secret,必填
var ip = "10.19.132.75"; //综合安防管理平台IP地址,必填
var appkey = videoParams.APPKEY; //综合安防管理平台提供的appkey,必填
var secret = that.setEncrypt(videoParams.SECRETKEY); //综合安防管理平台提供的secret,必填
var ip = videoParams.VIDEOIP; //综合安防管理平台IP地址,必填
var playMode = 1; //初始播放模式:0-预览,1-回放
var port = 443; //综合安防管理平台端口,若启用HTTPS协议,默认443
var port = videoParams.VIDEOPORT; //综合安防管理平台端口,若启用HTTPS协议,默认443
var snapDir = "D:\\SnapDir"; //抓图存储路径
var videoDir = "D:\\VideoDir"; //紧急录像或录像剪辑存储路径
var layout = "1x1"; //playMode指定模式的布局
......@@ -214,7 +214,11 @@ export default {
},
// 推送消息
cbIntegrationCallBack(oData) {
// showCBInfo(JSON.stringify(oData.responseMsg));
console.log('cbIntegrationCallBack',oData)
if (oData.responseMsg.type === 2 && oData.responseMsg.msg.result === 769){
this.$message.info('当前时间暂无回放录像')
this.$router.go(-1)
}
}
}
}
......
const APPKEY = '23089524'
const SECRETKEY = '9zHFJeJOz5oPZz7MMZZ7'
const VIDEOIP = '192.168.10.250'
const VIDEOPORT = 443
export default {
APPKEY,
SECRETKEY,
VIDEOIP,
VIDEOPORT
}
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