代码提交

This commit is contained in:
lixiaobang 2023-04-25 15:40:40 +08:00
parent 4ed697d5fa
commit 0f5e32ddc6
7 changed files with 32480 additions and 14337 deletions

46673
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -244,7 +244,7 @@ export default {
#app {
// width: 6144px;
// height: 1920px;
background: rgba(1, 1, 7, 1);
background: rgba(1, 1, 7, 0);
// overflow: hidden;
.header {
height: 11%;

View File

@ -1,7 +1,7 @@
import axios from 'axios'
//根据等级获取报警数据
export const getHikvision = (data) => {
return axios.post('/video/cameras/hikvision/',
return axios.post('cameras/hikvision/',
data
)
};

View File

@ -45,9 +45,7 @@ export default {
videoUrl: {
deep: true,
handler(newVal) {
this.$nextTick(()=>{
this.clickSurveillance(newVal)
})
}
},
id: {
@ -60,7 +58,6 @@ export default {
methods: {
//
clickSurveillance(newVal) {
this.player = null
let that = this
//
setTimeout(() => {
@ -83,7 +80,7 @@ export default {
this.player = this;
this.player.play();
});
}, 500);
}, 1000);
},
//
closeVideo() {

View File

@ -531,14 +531,14 @@ export default {
},
//
getCamera() {
this.cameraList[0].video =
"https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8";
this.cameraList[1].video =
"https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8";
this.cameraList[2].video =
"http://playertest.longtailvideo.com/adaptive/bipbop/gear4/prog_index.m3u8";
this.cameraList[3].video =
"http://playertest.longtailvideo.com/adaptive/bipbop/gear4/prog_index.m3u8";
// this.cameraList[0].video =
// "https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8";
// this.cameraList[1].video =
// "https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8";
// this.cameraList[2].video =
// "http://playertest.longtailvideo.com/adaptive/bipbop/gear4/prog_index.m3u8";
// this.cameraList[3].video =
// "http://playertest.longtailvideo.com/adaptive/bipbop/gear4/prog_index.m3u8";
let pathUrl = "/artemis/api/video/v2/cameras/previewURLs";
let dataList = {
path: pathUrl,
@ -548,12 +548,15 @@ export default {
},
};
getHikvision(dataList).then((res) => {
this.cameraList[0].video =
"video/video.html?src=" +
res.data.result.data.url +
"&code=" +
dataList.data.cameraIndexCode;
// this.cameraList[0].video =
// "video/video.html?src=" +
// res.data.result.data.url +
// "&code=" +
// dataList.data.cameraIndexCode;
this.cameraList[0].video =res.data.result.data.url;
console.log(this.cameraList[0].video,'视频地址');
});
let dataList1 = {
path: pathUrl,
data: {
@ -562,11 +565,12 @@ export default {
},
};
getHikvision(dataList1).then((res) => {
this.cameraList[1].video =
"video/video.html?src=" +
res.data.result.data.url +
"&code=" +
dataList1.data.cameraIndexCode;
// this.cameraList[1].video =
// "video/video.html?src=" +
// res.data.result.data.url +
// "&code=" +
// dataList1.data.cameraIndexCode;
this.cameraList[1].video =res.data.result.data.url;
});
let dataList2 = {
path: pathUrl,
@ -576,11 +580,12 @@ export default {
},
};
getHikvision(dataList2).then((res) => {
this.cameraList[2].video =
"video/video.html?src=" +
res.data.result.data.url +
"&code=" +
dataList2.data.cameraIndexCode;
// this.cameraList[2].video =
// "video/video.html?src=" +
// res.data.result.data.url +
// "&code=" +
// dataList2.data.cameraIndexCode;
this.cameraList[2].video =res.data.result.data.url;
});
let dataList3 = {
path: pathUrl,
@ -590,11 +595,12 @@ export default {
},
};
getHikvision(dataList3).then((res) => {
this.cameraList[3].video =
"video/video.html?src=" +
res.data.result.data.url +
"&code=" +
dataList3.data.cameraIndexCode;
// this.cameraList[3].video =
// "video/video.html?src=" +
// res.data.result.data.url +
// "&code=" +
// dataList3.data.cameraIndexCode;
this.cameraList[3].video =res.data.result.data.url;
});
},
//Id

View File

@ -410,6 +410,7 @@ export default {
//线线
getAnfang() {
//
var indexcode = [
"13222435-8646-4006-982a-76febb4dd8a2",
"fd91efcf-9d11-4b3e-ad69-6e6c1069f4ec",
@ -448,7 +449,6 @@ export default {
};
let indexCodeList = [];
getHikvision(dataList).then((res) => {
console.log("getHikvision", res.data.result.data.list);
res.data.result.data.list.forEach((item, index) => {
indexCodeList.push(item.indexCode);
});
@ -456,6 +456,8 @@ export default {
path: "/artemis/api/acs/v1/door/states",
data: {
doorIndexCodes: indexCodeList,
pageNo:1,
pageSize:1000
},
};
let doorTotal = 0;
@ -465,22 +467,65 @@ export default {
let doorOnLineList = [];
let offLineList = [];
getHikvision(doorStatusList).then((res) => {
console.log(res.data.authDoorList, "门禁状态数量");
for (let i = 0; i < res.data.authDoorList.length; i++) {
console.log(res.data.result.data.authDoorList, "门禁状态数量");
for (let i = 0; i < res.data.result.data.authDoorList.length; i++) {
//
doorTotalList.push(res.data.authDoorList);
if (res.data.authDoorList[i].doorState == 3) {
doorTotalList.push(res.data.result.data.authDoorList);
if (res.data.result.data.authDoorList[i].doorState == 3) {
//线
offLineList.push(res.data.authDoorList[i].doorState);
offLineList.push(res.data.result.data.authDoorList[i].doorState);
}
}
//
doorTotal = doorTotalList.length;
this.securityList[1].security[1].count = doorTotalList.length;
//线
offLine = offLineList.length;
this.securityList[1].security[3].count = offLineList.length;
//线
doorOnLine = doorTotal - offLine;
console.log(doorTotal, offLine, doorOnLine, "门禁数量==========");
this.securityList[1].security[2].count = this.securityList[1].security[1].count - this.securityList[1].security[3].count;
});
});
//
let cameraList = {
path: "/artemis/api/resource/v2/camera/search",
data: {
regionIndexCodes: indexcode,
pageNo: 1,
pageSize: 1000,
},
};
let cameraCodeList = []
getHikvision(cameraList).then((res) => {
res.data.result.data.list.forEach((item, index) => {
cameraCodeList.push(item.indexCode);
});
let cameraStatusList = {
path: "/artemis/api/nms/v1/online/camera/get",
data: {
indexCodes: cameraCodeList,
pageNo:1,
pageSize:1000
},
};
let cameraTotalList = [];
let cameraOnLineList = [];
let cameraoffLineList = [];
getHikvision(cameraStatusList).then((res) => {
console.log(res.data.result.data.list, "摄像头状态数量");
for (let i = 0; i < res.data.result.data.list.length; i++) {
//
cameraTotalList.push(res.data.result.data.list);
if (res.data.result.data.list[i].online == 0) {
//线
cameraoffLineList.push(res.data.result.data.list[i].online);
}
}
//
this.securityList[0].security[1].count = cameraTotalList.length;
//线
this.securityList[0].security[3].count = cameraoffLineList.length;
//线
this.securityList[0].security[2].count = this.securityList[0].security[1].count - this.securityList[0].security[3].count;
});
});
},

View File

@ -15,8 +15,8 @@ module.exports = {
// port: 8989, // 开发服务器运行端口号
proxy: {
'/api': { //代理的名字
target:'http://172.16.1.253:12308/api/',
// target:'http://138.227.208.100:12308/api/',
// target:'http://172.16.1.253:12308/api/',
target:'http://138.227.208.100:12308/api/',
ws: true,
changeOrigin: true,
pathRewrite:{
@ -31,13 +31,13 @@ module.exports = {
'^/ecs-server':'',
}
},
'/video': { //代理的名字
'/cameras': { //代理的名字
// target:'http://172.16.1.253:12308/api/',
target:'http://138.227.208.100:12307/',
ws: true,
changeOrigin: true,
pathRewrite:{
'^/video':'',
'^/cameras':'',
}
},
}