Commit 25bfa3b3 authored by 拾柒's avatar 拾柒

Merge branch 'dev-yingshi'

# Conflicts:
#	src/components/TopNav/index.vue
parents b55b9eb4 5fb160da
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
"core-js": "3.37.1", "core-js": "3.37.1",
"echarts": "5.4.0", "echarts": "5.4.0",
"element-ui": "2.15.14", "element-ui": "2.15.14",
"ezuikit-js": "^8.0.8",
"file-saver": "2.0.5", "file-saver": "2.0.5",
"fuse.js": "6.4.3", "fuse.js": "6.4.3",
"highlight.js": "9.18.5", "highlight.js": "9.18.5",
......
...@@ -38,3 +38,18 @@ export function getStream(deviceSerial,accessToken) { ...@@ -38,3 +38,18 @@ export function getStream(deviceSerial,accessToken) {
} }
}) })
} }
// 根据信息查询历史记录流
export function getHistoryStream(deviceSerial,accessToken,startTime,endTime) {
return request({
url: '/hikvision/getYsHistoryStream',
method: 'get',
params: {
deviceSerial: deviceSerial
, accessToken: accessToken,
startTime: startTime,
endTime: endTime
}
})
}
...@@ -58,6 +58,8 @@ ...@@ -58,6 +58,8 @@
<i style="width: 10px; height: 10px; margin-top: -12px"></i> <i style="width: 10px; height: 10px; margin-top: -12px"></i>
历史记录 历史记录
</el-menu-item> </el-menu-item>
</template>
<template>
<el-menu-item <el-menu-item
class="menuStyle" class="menuStyle"
style=" style="
...@@ -104,7 +106,6 @@ const hideList = ["/index", "/user/profile"]; ...@@ -104,7 +106,6 @@ const hideList = ["/index", "/user/profile"];
export default { export default {
components: { Menu }, components: { Menu },
data() { data() {
return { return {
roles: [], roles: [],
...@@ -213,7 +214,7 @@ export default { ...@@ -213,7 +214,7 @@ export default {
this.roles = this.$store.getters.roles; this.roles = this.$store.getters.roles;
}, },
created() { created() {
this.updateBackTag(this.$route.path); this.getinfo();
}, },
methods: { methods: {
updateBackTag(path) { updateBackTag(path) {
......
...@@ -103,6 +103,20 @@ export const constantRoutes = [ ...@@ -103,6 +103,20 @@ export const constantRoutes = [
}, },
], ],
}, },
{
path: "/detail",
component: Layout,
hidden: false,
redirect: "/detail",
children: [
{
path: "detail",
component: () => import("@/views/video/detail"),
name: "Detail",
meta: { title: "视频详情", icon: "user" },
},
],
},
{ {
path: "/monitoringPlayback", path: "/monitoringPlayback",
component: Layout, component: Layout,
......
...@@ -113,7 +113,7 @@ service.interceptors.response.use(res => { ...@@ -113,7 +113,7 @@ service.interceptors.response.use(res => {
if (message == "Network Error") { if (message == "Network Error") {
message = "后端接口连接异常"; message = "后端接口连接异常";
} else if (message.includes("timeout")) { } else if (message.includes("timeout")) {
message = "系统接口请求超时"; message = "用户登录信息过期,请重新登录";
} else if (message.includes("Request failed with status code")) { } else if (message.includes("Request failed with status code")) {
message = "系统接口" + message.substr(message.length - 3) + "异常"; message = "系统接口" + message.substr(message.length - 3) + "异常";
} }
......
This diff is collapsed.
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<template> <template>
<div style="background-color: #D4D9E5"> <div style="background-color: #D4D9E5">
<div class="hello-ezuikit-js" style="padding:20px 30px;display: flex"> <div class="hello-ezuikit-js" style="padding:20px 30px;display: flex">
<div id="video-container-out" style="width: 910px; height: 435px;background-color: #424246;margin-right: 30px;box-shadow: #2b2f3a 0px 0px 20px" @click="abv"> <div id="video-container-out" :style="{width: 910 + 'px', height: 435 + 'px', backgroundColor: '#424246', marginRight: '30px' ,boxShadow: '#2b2f3a 0px 0px 20px'}" @dblclick="handleDoubleClick(0)">
<div id="video-container" style="width: 910px; height: 400px" @click="abv"> <div id="video-container" style="width: 910px; height: 400px" @click="abv" >
</div> </div>
<div style="display: flex;"> <div style="display: flex;">
<el-button icon="el-icon-full-screen" style="border: transparent;background-color: transparent;font-size: large" plain <el-button icon="el-icon-full-screen" style="border: transparent;background-color: transparent;font-size: large" plain
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
@click="capturePicture"></el-button> @click="capturePicture"></el-button>
</div> </div>
</div> </div>
<div id="video-container-out" style="width: 910px; height: 435px;background-color: #424246"> <div id="video-container-out" style="width: 910px; height: 435px;background-color: #424246" @dblclick="handleDoubleClick(1)">
<div id="video-container1" style="width: 910px; height: 400px"> <div id="video-container1" style="width: 910px; height: 400px">
</div> </div>
<div style="display: flex;"> <div style="display: flex;">
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</div> </div>
<div class="hello-ezuikit-js" style="padding:20px 30px;display: flex"> <div class="hello-ezuikit-js" style="padding:20px 30px;display: flex">
<div id="video-container-out" style="width: 910px; height: 435px;background-color: #424246;margin-right: 30px"> <div id="video-container-out" style="width: 910px; height: 435px;background-color: #424246;margin-right: 30px" @dblclick="handleDoubleClick(2)">
<div id="video-container2" style="width: 910px; height: 400px"> <div id="video-container2" style="width: 910px; height: 400px">
</div> </div>
<div style="display: flex;justify-content: space-between"> <div style="display: flex;justify-content: space-between">
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
@click="capturePicture2"></el-button> @click="capturePicture2"></el-button>
</div> </div>
</div> </div>
<div id="video-container-out" style="width: 910px; height: 435px;background-color: #424246"> <div id="video-container-out" style="width: 910px; height: 435px;background-color: #424246" @dblclick="handleDoubleClick(3)">
<div id="video-container3" style="width: 910px; height: 400px"> <div id="video-container3" style="width: 910px; height: 400px">
</div> </div>
<div style="display: flex;justify-content: space-between"> <div style="display: flex;justify-content: space-between">
...@@ -72,6 +72,9 @@ export default { ...@@ -72,6 +72,9 @@ export default {
name: 'EZUIKitJs', name: 'EZUIKitJs',
data() { data() {
return { return {
containerWidth: 910,
containerHeight: 435,
isZoomed: false,
// 录制按钮 // 录制按钮
recordButton: true, recordButton: true,
recordButton1: true, recordButton1: true,
...@@ -96,6 +99,26 @@ export default { ...@@ -96,6 +99,26 @@ export default {
}, },
methods: { methods: {
handleDoubleClick(index) {
var devideCode = ''
switch (index) {
case 0:
devideCode = this.deviceList[0];break;
case 1:
devideCode = this.deviceList[1];break;
case 2:
devideCode = this.deviceList[2];break;
case 3:
devideCode = this.deviceList[3];break;
}
this.$router.push({
path: "/detail/detail",
query: {
deviceSerial: devideCode,
accessToken: this.accessToken
},
});
},
abv(){ abv(){
// 跳转详情页面 // 跳转详情页面
console.info('4456') console.info('4456')
...@@ -228,8 +251,8 @@ export default { ...@@ -228,8 +251,8 @@ export default {
// simple - 极简版; pcLive-pc直播;pcRec-pc回放; mobileLive-移动端直播;mobileRec-移动端回放;security - 安防版;voice-语音版; // simple - 极简版; pcLive-pc直播;pcRec-pc回放; mobileLive-移动端直播;mobileRec-移动端回放;security - 安防版;voice-语音版;
template: 'simple', //模板 template: 'simple', //模板
plugin: ['talk'], // 加载插件,talk-对讲 plugin: ['talk'], // 加载插件,talk-对讲
width: 910, width: this.containerWidth,
height: 400, height: this.containerHeight - 35,
}) })
}, },
fulScreen() { fulScreen() {
......
<template> <template>
<div class="playback"> <div class="playback">
<div ref="playWndBack" class="video-watch" id="playWndBack"></div> <div class="hello-ezuikit-js" style="padding:20px 30px;display: flex">
<div id="video-container-out" style="width: 1404px; height: 750px;background-color: #424246;margin-right: 30px;box-shadow: #2b2f3a 0px 0px 20px" >
<div id="video-container" style="width: 1404px; height: 700px" >
</div>
<div style="display: flex;">
<!-- <el-button icon="el-icon-full-screen" style="border: transparent;background-color: transparent;font-size: large" plain-->
<!-- @click="fulScreen"></el-button>-->
<el-button v-if="recordButton" icon="el-icon-video-camera" style="border: transparent;background-color: transparent;font-size: large" plain
@click="startSave"></el-button>
<el-button v-if="!recordButton" icon="el-icon-video-camera-solid" style="border: transparent;background-color: transparent;font-size: large;color: #F6F6FA" plain
@click="stopSave">录制中</el-button>
<el-button icon="el-icon-camera" style="border: transparent;background-color: transparent;font-size: large" plain
@click="capturePicture"></el-button>
</div>
</div>
</div>
<div style="margin-right: 30px;margin-top: 60px"> <div style="margin-right: 30px;margin-top: 60px">
<el-form label-position="right" label-width="100px" :model="formLabelAlign"> <el-form label-position="right" label-width="100px" :model="formLabelAlign">
<el-form-item label="监控点名称"> <el-form-item label="监控点名称">
...@@ -28,16 +43,37 @@ ...@@ -28,16 +43,37 @@
</template> </template>
<script> <script>
import EZUIKit from '../../../public/js/ezuikit' //引入第三方插件
import {getCameras} from "@/api/system/video"; import {getCameras} from "@/api/system/video";
import videoParams from "@/views/video/videoParams"; import videoParams from "@/views/video/videoParams";
import {listHistable, getHistable, delHistable, addHistable, updateHistable} from "@/api/system/histable"; import {listHistable, getHistable, delHistable, addHistable, updateHistable} from "@/api/system/histable";
import {getAccessToken,getDeviceList,getStream,getHistoryStream} from '@/api/system/video'
export default { export default {
name: "playback", name: "playback",
data() { data() {
return { return {
carryRowCode:{}, code: '',
// startTime
startTime: '',
// endTime
endTime: '',
// 录制按钮
recordButton: true,
recordButton1: true,
recordButton2: true,
recordButton3: true,
// 设备信息列表
deviceList: [],
// token值
accessToken: '',
showButton: false,
player: null,
player1: null,
player2: null,
player3: null,
carryRowCode: {},
oWebControl: null, oWebControl: null,
initCount: 0, initCount: 0,
pubKey: '', pubKey: '',
...@@ -53,9 +89,18 @@ export default { ...@@ -53,9 +89,18 @@ export default {
}, },
created() { created() {
this.carryRowCode = this.$route.query.carryRowCode; this.carryRowCode = this.$route.query.carryRowCode;
this.code = this.$route.query.carryRowCode.code;
this.startTime = this.$route.query.monitoringStarttime
this.endTime = this.$route.query.monitoringFinallytime
}, },
mounted() { mounted() {
this.getIndex() this.carryRowCode = this.$route.query.carryRowCode;
this.code = this.$route.query.carryRowCode.code;
this.startTime = this.$route.query.carryRowCode.monitoringStarttime
this.endTime = this.$route.query.carryRowCode.monitoringFinallytime
// this.getIndex()
this.getToken()
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
if (this.oWebControl != null){ if (this.oWebControl != null){
...@@ -74,10 +119,87 @@ export default { ...@@ -74,10 +119,87 @@ export default {
beforeDestroy() { beforeDestroy() {
}, },
methods: { methods: {
getIndex() { // 返回
this.cameraIndexCode = '275e201d228c4073b462ad1d9865d3cc' back(){
this.initPlugin(); this.$router.push({
path: "/monitoringhistory/history",
})
},
fulScreen() {
this.player.fullScreen()
},
startSave() {
var startSavePromise = this.player.startSave(`${new Date().getTime()}`);
// 将开始录制按钮隐藏
this.recordButton = false
startSavePromise.then((data) => {
console.log("promise 获取 数据", data);
});
},
// 结束录制
stopSave() {
var stopSavePromise = this.player.stopSave();
// 显示开始录制
this.recordButton = true
stopSavePromise.then((data) => {
console.log("promise 获取 数据", data);
});
},
capturePicture() {
var capturePicturePromise = this.player.capturePicture(
`${new Date().getTime()}`
);
capturePicturePromise.then((data) => {
console.log("promise 获取 数据", data);
});
}, },
getToken() {
getAccessToken().then(response => {
console.log('查看获取的token值',response)
if (response.data.code == 200) {
this.accessToken = response.data.data.accessToken
this.getHistoryStream(response.data.data.accessToken)
// this.getInit(this.accessToken)
}
})
},
// 根据传递的设备编号以及token以及开始时间结束时间获取获取url
getHistoryStream(token){
getHistoryStream(this.code,token,this.startTime,this.endTime).then(res => {
console.info('回放视频流',res)
if(res.data.code == 200){
this.getInit(token,res.data.data.url)
} else {
this.$message.warning('当前视频没有回放')
this.back()
}
// console.info("4564",res)
// if(res.data){
// this.getInit()
// }
})
},
getInit(token,videoUrl){
console.info('视频流是',videoUrl)
this.player = new EZUIKit.EZUIKitPlayer({
id: 'video-container', // 视频容器ID
// accessToken: 'at.9lcurm31d95uy8x214qfw0d84a2ks1mf-7egp0jjnr5-0whlhqz-j7dkim7lh',
accessToken: token,
// url: 'ezopen://open.ys7.com/AW5687499/1.hd.local.rec?begin=20240805100000&end=20240805235959',
url: videoUrl,
// simple - 极简版; pcLive-pc直播;pcRec-pc回放; mobileLive-移动端直播;mobileRec-移动端回放;security - 安防版;voice-语音版;
template: 'simple', //模板
plugin: ['talk'], // 加载插件,talk-对讲
width: 1404,
height: 700,
})
},
// getIndex() {
// this.cameraIndexCode = '275e201d228c4073b462ad1d9865d3cc'
// this.initPlugin();
// },
startPreview() { startPreview() {
var cameraIndexCode = this.cameraIndexCode; //获取输入的监控点编号值,必填 var cameraIndexCode = this.cameraIndexCode; //获取输入的监控点编号值,必填
var startTimeStamp = new Date('2024-07-01'.replace('-', '/').replace('-', '/')).getTime(); //回放开始时间戳,必填 var startTimeStamp = new Date('2024-07-01'.replace('-', '/').replace('-', '/')).getTime(); //回放开始时间戳,必填
...@@ -239,7 +361,7 @@ export default { ...@@ -239,7 +361,7 @@ export default {
margin-top: 20px; margin-top: 20px;
margin-left: 40px; margin-left: 40px;
margin-right: 40px; margin-right: 40px;
height: 1000px; height: 820px;
background: white; background: white;
} }
.video-watch{ .video-watch{
......
This diff is collapsed.
...@@ -35,7 +35,7 @@ module.exports = { ...@@ -35,7 +35,7 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://106.3.99.64:20004`, target: `http://127.0.0.1:8087`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",
......
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