20230426
This commit is contained in:
commit
355d666d55
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
//根据等级获取报警数据
|
//根据等级获取报警数据
|
||||||
export const getHikvision = (data) => {
|
export const getHikvision = (data) => {
|
||||||
return axios.post('/video/cameras/hikvision/',
|
return axios.post('cameras/hikvision/',
|
||||||
data
|
data
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,7 +37,8 @@ class mqttHandle {
|
||||||
const { host, port, endpoint, ...options } = this.connect;
|
const { host, port, endpoint, ...options } = this.connect;
|
||||||
console.log("this.connect.host", this.connect.host)
|
console.log("this.connect.host", this.connect.host)
|
||||||
// const connectUrl = 'ws://138.227.111.141:8083/mqtt';
|
// const connectUrl = 'ws://138.227.111.141:8083/mqtt';
|
||||||
const connectUrl = 'ws://138.227.208.100:1884/mqtt';
|
// const connectUrl = 'ws://138.227.208.100:1884/mqtt';
|
||||||
|
const connectUrl = 'ws://172.16.1.253:1884/mqtt';
|
||||||
// const connectUrl = `ws://${this.connect.host}:${this.connect.port}`;
|
// const connectUrl = `ws://${this.connect.host}:${this.connect.port}`;
|
||||||
// if (!client.connected) {
|
// if (!client.connected) {
|
||||||
// client.on('connect', function () {
|
// client.on('connect', function () {
|
||||||
|
|
|
@ -45,9 +45,7 @@ export default {
|
||||||
videoUrl: {
|
videoUrl: {
|
||||||
deep: true,
|
deep: true,
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
this.$nextTick(()=>{
|
|
||||||
this.clickSurveillance(newVal)
|
this.clickSurveillance(newVal)
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
id: {
|
id: {
|
||||||
|
@ -60,7 +58,6 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
// 点击摄像头
|
// 点击摄像头
|
||||||
clickSurveillance(newVal) {
|
clickSurveillance(newVal) {
|
||||||
this.player = null
|
|
||||||
let that = this
|
let that = this
|
||||||
// 注意这里需要加定时器或者在异步请求中才可以
|
// 注意这里需要加定时器或者在异步请求中才可以
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -83,7 +80,7 @@ export default {
|
||||||
this.player = this;
|
this.player = this;
|
||||||
this.player.play();
|
this.player.play();
|
||||||
});
|
});
|
||||||
}, 500);
|
}, 1000);
|
||||||
},
|
},
|
||||||
// 关闭摄像头
|
// 关闭摄像头
|
||||||
closeVideo() {
|
closeVideo() {
|
||||||
|
|
|
@ -203,12 +203,12 @@
|
||||||
<div class="rightThree">
|
<div class="rightThree">
|
||||||
<div class="title" style="height: 15%">摄像监控</div>
|
<div class="title" style="height: 15%">摄像监控</div>
|
||||||
<div class="camera">
|
<div class="camera">
|
||||||
<div
|
<!-- <div
|
||||||
class="cameraList"
|
class="cameraList"
|
||||||
v-for="(item, index) in cameraList"
|
v-for="(item, index) in cameraList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="changeCamera(item.video)"
|
@click="changeCamera(item.video)"
|
||||||
>
|
> -->
|
||||||
<!-- <img :src="item.icon" style="width: 100%; height: 100%" /> -->
|
<!-- <img :src="item.icon" style="width: 100%; height: 100%" /> -->
|
||||||
<!-- <iframe
|
<!-- <iframe
|
||||||
:src="item.video"
|
:src="item.video"
|
||||||
|
@ -216,12 +216,12 @@
|
||||||
frameborder="0"
|
frameborder="0"
|
||||||
style="width: 100%; height: 100%"
|
style="width: 100%; height: 100%"
|
||||||
></iframe> -->
|
></iframe> -->
|
||||||
<camera
|
<!-- <camera
|
||||||
style="width: 100%; height: 100%"
|
style="width: 100%; height: 100%"
|
||||||
:videoUrl="item.video"
|
:videoUrl="item.video"
|
||||||
:id="index"
|
:id="index"
|
||||||
/>
|
/> -->
|
||||||
</div>
|
<!-- </div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -399,7 +399,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getCamera();
|
// this.getCamera();
|
||||||
//获取建筑id
|
//获取建筑id
|
||||||
this.getBuildingData();
|
this.getBuildingData();
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -531,14 +531,14 @@ export default {
|
||||||
},
|
},
|
||||||
//获取视频流
|
//获取视频流
|
||||||
getCamera() {
|
getCamera() {
|
||||||
this.cameraList[0].video =
|
// this.cameraList[0].video =
|
||||||
"https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8";
|
// "https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8";
|
||||||
this.cameraList[1].video =
|
// this.cameraList[1].video =
|
||||||
"https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8";
|
// "https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8";
|
||||||
this.cameraList[2].video =
|
// this.cameraList[2].video =
|
||||||
"http://playertest.longtailvideo.com/adaptive/bipbop/gear4/prog_index.m3u8";
|
// "http://playertest.longtailvideo.com/adaptive/bipbop/gear4/prog_index.m3u8";
|
||||||
this.cameraList[3].video =
|
// this.cameraList[3].video =
|
||||||
"http://playertest.longtailvideo.com/adaptive/bipbop/gear4/prog_index.m3u8";
|
// "http://playertest.longtailvideo.com/adaptive/bipbop/gear4/prog_index.m3u8";
|
||||||
let pathUrl = "/artemis/api/video/v2/cameras/previewURLs";
|
let pathUrl = "/artemis/api/video/v2/cameras/previewURLs";
|
||||||
let dataList = {
|
let dataList = {
|
||||||
path: pathUrl,
|
path: pathUrl,
|
||||||
|
@ -548,12 +548,15 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
getHikvision(dataList).then((res) => {
|
getHikvision(dataList).then((res) => {
|
||||||
this.cameraList[0].video =
|
// this.cameraList[0].video =
|
||||||
"video/video.html?src=" +
|
// "video/video.html?src=" +
|
||||||
res.data.result.data.url +
|
// res.data.result.data.url +
|
||||||
"&code=" +
|
// "&code=" +
|
||||||
dataList.data.cameraIndexCode;
|
// dataList.data.cameraIndexCode;
|
||||||
|
this.cameraList[0].video =res.data.result.data.url;
|
||||||
|
console.log(this.cameraList[0].video,'视频地址');
|
||||||
});
|
});
|
||||||
|
|
||||||
let dataList1 = {
|
let dataList1 = {
|
||||||
path: pathUrl,
|
path: pathUrl,
|
||||||
data: {
|
data: {
|
||||||
|
@ -562,11 +565,12 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
getHikvision(dataList1).then((res) => {
|
getHikvision(dataList1).then((res) => {
|
||||||
this.cameraList[1].video =
|
// this.cameraList[1].video =
|
||||||
"video/video.html?src=" +
|
// "video/video.html?src=" +
|
||||||
res.data.result.data.url +
|
// res.data.result.data.url +
|
||||||
"&code=" +
|
// "&code=" +
|
||||||
dataList1.data.cameraIndexCode;
|
// dataList1.data.cameraIndexCode;
|
||||||
|
this.cameraList[1].video =res.data.result.data.url;
|
||||||
});
|
});
|
||||||
let dataList2 = {
|
let dataList2 = {
|
||||||
path: pathUrl,
|
path: pathUrl,
|
||||||
|
@ -576,11 +580,12 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
getHikvision(dataList2).then((res) => {
|
getHikvision(dataList2).then((res) => {
|
||||||
this.cameraList[2].video =
|
// this.cameraList[2].video =
|
||||||
"video/video.html?src=" +
|
// "video/video.html?src=" +
|
||||||
res.data.result.data.url +
|
// res.data.result.data.url +
|
||||||
"&code=" +
|
// "&code=" +
|
||||||
dataList2.data.cameraIndexCode;
|
// dataList2.data.cameraIndexCode;
|
||||||
|
this.cameraList[2].video =res.data.result.data.url;
|
||||||
});
|
});
|
||||||
let dataList3 = {
|
let dataList3 = {
|
||||||
path: pathUrl,
|
path: pathUrl,
|
||||||
|
@ -590,11 +595,12 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
getHikvision(dataList3).then((res) => {
|
getHikvision(dataList3).then((res) => {
|
||||||
this.cameraList[3].video =
|
// this.cameraList[3].video =
|
||||||
"video/video.html?src=" +
|
// "video/video.html?src=" +
|
||||||
res.data.result.data.url +
|
// res.data.result.data.url +
|
||||||
"&code=" +
|
// "&code=" +
|
||||||
dataList3.data.cameraIndexCode;
|
// dataList3.data.cameraIndexCode;
|
||||||
|
this.cameraList[3].video =res.data.result.data.url;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取建筑Id
|
//获取建筑Id
|
||||||
|
|
|
@ -64,14 +64,14 @@
|
||||||
<img src="../assets/images/camera.png" style="width:100%;height:100%"/>
|
<img src="../assets/images/camera.png" style="width:100%;height:100%"/>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="warnCameraList">
|
<div class="warnCameraList">
|
||||||
<div
|
<!-- <div
|
||||||
style="width: 45%; height: 30%"
|
style="width: 45%; height: 30%"
|
||||||
v-for="(item, index) in warnCameraList"
|
v-for="(item, index) in warnCameraList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="videoChange(index)"
|
@click="videoChange(index)"
|
||||||
>
|
>
|
||||||
<img :src="item.icon" style="width: 100%; height: 100%" />
|
<img :src="item.icon" style="width: 100%; height: 100%" />
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -410,6 +410,7 @@ export default {
|
||||||
//获取设备离线在线数据
|
//获取设备离线在线数据
|
||||||
|
|
||||||
getAnfang() {
|
getAnfang() {
|
||||||
|
//获取门禁状态
|
||||||
var indexcode = [
|
var indexcode = [
|
||||||
"13222435-8646-4006-982a-76febb4dd8a2",
|
"13222435-8646-4006-982a-76febb4dd8a2",
|
||||||
"fd91efcf-9d11-4b3e-ad69-6e6c1069f4ec",
|
"fd91efcf-9d11-4b3e-ad69-6e6c1069f4ec",
|
||||||
|
@ -448,7 +449,6 @@ export default {
|
||||||
};
|
};
|
||||||
let indexCodeList = [];
|
let indexCodeList = [];
|
||||||
getHikvision(dataList).then((res) => {
|
getHikvision(dataList).then((res) => {
|
||||||
console.log("getHikvision", res.data.result.data.list);
|
|
||||||
res.data.result.data.list.forEach((item, index) => {
|
res.data.result.data.list.forEach((item, index) => {
|
||||||
indexCodeList.push(item.indexCode);
|
indexCodeList.push(item.indexCode);
|
||||||
});
|
});
|
||||||
|
@ -456,6 +456,8 @@ export default {
|
||||||
path: "/artemis/api/acs/v1/door/states",
|
path: "/artemis/api/acs/v1/door/states",
|
||||||
data: {
|
data: {
|
||||||
doorIndexCodes: indexCodeList,
|
doorIndexCodes: indexCodeList,
|
||||||
|
pageNo:1,
|
||||||
|
pageSize:1000
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
let doorTotal = 0;
|
let doorTotal = 0;
|
||||||
|
@ -465,22 +467,65 @@ export default {
|
||||||
let doorOnLineList = [];
|
let doorOnLineList = [];
|
||||||
let offLineList = [];
|
let offLineList = [];
|
||||||
getHikvision(doorStatusList).then((res) => {
|
getHikvision(doorStatusList).then((res) => {
|
||||||
console.log(res.data.authDoorList, "门禁状态数量");
|
console.log(res.data.result.data.authDoorList, "门禁状态数量");
|
||||||
for (let i = 0; i < res.data.authDoorList.length; i++) {
|
for (let i = 0; i < res.data.result.data.authDoorList.length; i++) {
|
||||||
//获取总数的数组
|
//获取总数的数组
|
||||||
doorTotalList.push(res.data.authDoorList);
|
doorTotalList.push(res.data.result.data.authDoorList);
|
||||||
if (res.data.authDoorList[i].doorState == 3) {
|
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;
|
this.securityList[1].security[2].count = this.securityList[1].security[1].count - this.securityList[1].security[3].count;
|
||||||
console.log(doorTotal, offLine, doorOnLine, "门禁数量==========");
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//获取视频状态
|
||||||
|
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;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -591,10 +636,32 @@ export default {
|
||||||
this.getAlarmCount();
|
this.getAlarmCount();
|
||||||
}
|
}
|
||||||
if (warnListMqtt[i].DeviceType == "消防") {
|
if (warnListMqtt[i].DeviceType == "消防") {
|
||||||
|
console.log("warnListMqtt[i]",warnListMqtt[i])
|
||||||
this.fireWarnList.splice(0, 0, warnListMqtt[i]);
|
this.fireWarnList.splice(0, 0, warnListMqtt[i]);
|
||||||
|
this.getWarning(warnListMqtt[i].position)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getWarning(name) {
|
||||||
|
// console.log("name",name)
|
||||||
|
if (name.indexOf("法院一层") != -1) {
|
||||||
|
console.log("消防联动 主楼一层");
|
||||||
|
} else if(name.indexOf("法院四层") != -1) {
|
||||||
|
console.log("消防联动 主楼四层");
|
||||||
|
}else if(name.indexOf("法院二层") != -1) {
|
||||||
|
console.log("消防联动 主楼二层");
|
||||||
|
}else if(name.indexOf("法院三层") != -1) {
|
||||||
|
console.log("消防联动 主楼三层");
|
||||||
|
}else if(name.indexOf("辅楼1层") != -1) {
|
||||||
|
console.log("消防联动 辅楼一层");
|
||||||
|
}else if(name.indexOf("辅楼2层") != -1) {
|
||||||
|
console.log("消防联动 辅楼二层");
|
||||||
|
}else if(name.indexOf("辅楼3层") != -1) {
|
||||||
|
console.log("消防联动 辅楼三层");
|
||||||
|
}else if(name.indexOf("辅楼4层") != -1) {
|
||||||
|
console.log("消防联动 辅楼四层");
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {},
|
components: {},
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,8 +15,8 @@ module.exports = {
|
||||||
// port: 8989, // 开发服务器运行端口号
|
// port: 8989, // 开发服务器运行端口号
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': { //代理的名字
|
'/api': { //代理的名字
|
||||||
target:'http://172.16.1.253:12308/api/',
|
// target:'http://172.16.1.253:12308/api/',
|
||||||
// target:'http://138.227.208.100:12308/api/',
|
target:'http://138.227.208.100:12308/api/',
|
||||||
ws: true,
|
ws: true,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite:{
|
pathRewrite:{
|
||||||
|
@ -31,13 +31,13 @@ module.exports = {
|
||||||
'^/ecs-server':'',
|
'^/ecs-server':'',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'/video': { //代理的名字
|
'/cameras': { //代理的名字
|
||||||
// target:'http://172.16.1.253:12308/api/',
|
// target:'http://172.16.1.253:12308/api/',
|
||||||
target:'http://138.227.208.100:12307/',
|
target:'http://138.227.208.100:12307/',
|
||||||
ws: true,
|
ws: true,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite:{
|
pathRewrite:{
|
||||||
'^/video':'',
|
'^/cameras':'',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue