-
+
@@ -203,18 +203,17 @@
label: 'label'
},
// 图片信息
- faceBgUrltest: "http://192.168.1.133:9000/middleware/103/1028345463.jpg",
faceBgUrl: "",
faces: [],
currentFaces: [],
toDaySnapShot: 0,
totalSnapShot: 0,
// 预警列表
- warningList: [],
+ compareList:[],
videoFaceList:[],
// 预警音乐类型
warningType: "",
- cameraList:[{ rtspUrl: "rtsp://admin:123uestc@192.168.1.32:554/h264"}],
+ cameraList:[{ rtspUrl: "rtsp://192.168.1.138:8557/h264"}],
}
},
mounted() {
@@ -238,7 +237,7 @@
})
},
plays(){
- this.cameraList.push({rtspUrl: "rtsp://admin:123uestc@192.168.1.32:554/h264"});
+ this.cameraList.push({rtspUrl: "rtsp://192.168.1.138:8557/h264"});
},
// 初始化4条预警数据
initGetWarningPicture() {
@@ -249,9 +248,9 @@
},
}).then(res => {
if (res.data.code === 0) {
- this.warningList = res.data.data.records
+ this.compareList = res.data.data.records
// 处理预警数据
- this.getWarningPicture(this.warningList)
+ this.getWarningPicture(this.compareList)
} else {
this.$message.error(res.data.message)
}
@@ -261,22 +260,22 @@
* 初始化获取摄像头id
*/
initGetCameraId() {
- this.$http.get("/warning/bayonet").then((res) => {
- if (res.data.code === 0) {
- this.cameraId = res.data.data.cameraId
- this.barrierName = res.data.data.cameraName
- // 卡口树状结构多级id
- this.treeArr = res.data.data.camera_region_firstlevel.split(",")
- // 初始化根据摄像头id获取任务名称
- this.getTaskNameByCameraId(this.cameraId)
- // 初始化获取 今日抓拍/累计抓拍
- this.initTotal(this.cameraId)
- // 启动webSocket----------启动webSocket----------启动webSocket----------启动webSocket
- this.initWebSocket()
- } else {
- this.$message.error(res.data.message)
- }
- })
+ // this.$http.get("/warning/bayonet").then((res) => {
+ // if (res.data.code === 0) {
+ // this.cameraId = res.data.data.cameraId
+ // this.barrierName = res.data.data.cameraName
+ // // 卡口树状结构多级id
+ // this.treeArr = res.data.data.camera_region_firstlevel.split(",")
+ // // 初始化根据摄像头id获取任务名称
+ // this.getTaskNameByCameraId(this.cameraId)
+ // // 初始化获取 今日抓拍/累计抓拍
+ // this.initTotal(this.cameraId)
+ // // 启动webSocket----------启动webSocket----------启动webSocket----------启动webSocket
+ // this.initWebSocket()
+ // } else {
+ // this.$message.error(res.data.message)
+ // }
+ // })
this.initWebSocket()
},
/**
@@ -301,7 +300,7 @@
res.data.data.result.totalSnapShot = res.data.data.totalSnapShot
this.getPicture(res.data.data.result)
} else {
- this.$message.error(res.data.message)
+ //this.$message.error(res.data.message)
}
})
},
@@ -322,17 +321,17 @@
},
websocketonopen(e) {
console.log("WebSocket Connection successful");
- let obj = {
- "code": 200,
- "message": "成功",
- "cmd": "BAYONET",
- "data": {
- "carmeraId": this.cameraId
- }
- }
- let objString = JSON.stringify(obj)
- // 此处有效参数只有 this.cameraId,但是后台执意这样传递参数(来自潘辉)
- this.websock.send(objString)
+ // let obj = {
+ // "code": 200,
+ // "message": "成功",
+ // "cmd": "BAYONET",
+ // "data": {
+ // "carmeraId": this.cameraId
+ // }
+ // }
+ // let objString = JSON.stringify(obj)
+ // // 此处有效参数只有 this.cameraId,但是后台执意这样传递参数(来自潘辉)
+ // this.websock.send(objString)
},
websocketonerror(e) {
console.log("WebSocket Connection error");
@@ -341,12 +340,12 @@
console.log("WebSocket Connection closed");
},
websocketonmessage(e) {
- console.log("数据传输")
- console.log(e)
+ console.log("数据传输")
+ // console.log(e)
// ws数据字符串转json
let wsObj = JSON.parse(e.data)
- console.log("this wsObj")
- console.log(wsObj)
+ // console.log("this wsObj")
+ // console.log(wsObj)
// ws数据推送成功
// 处理ws推送的预警信息
this.getWarningPicture(wsObj)
@@ -386,16 +385,32 @@
* @param {Object} wsObj
*/
getWarningPicture(warningData) {
- // warningData为数组说明是初始化数据,为对象说明是ws推送的数据
- this.warningList = warningData
- console.log("this warningList")
- console.log(this.warningList)
+ this.toDaySnapShot = this.toDaySnapShot + warningData.length
+ this.totalSnapShot = this.totalSnapShot + warningData.length
+ // warningData大于2说明是人脸比对信息videofacelist,其余则是comparelist
+ for (let i = 0; i < warningData.length; i++) {
+ this.videoFaceList.unshift(warningData[i])
+ }
+ console.log("this is videofacelist")
+ console.log(this.videoFaceList)
+ // else {
+ // // console.log("this videofacelist")
+ // // console.log(this.videoFaceList)
+ // for (let i = 0; i < warningData.length; i++) {
+ // this.videoFaceList.unshift(warningData[i])
+ // }
+ // // console.log("this videofacelist")
+ // // console.log(this.videoFaceList)
+ // }
+
+ //this.warningList = warningData
+ //console.log(this.compareList)
// 声音 和 tips预警
let warningType = this.$refs.notice
warningType.play()
// this.$message.warning("有新的预警信息")
- this.warningList.forEach((item, index, arr) => {
+ this.compareList.forEach((item, index, arr) => {
// "1" 红色#FF343E "2" 橙色#FFA61A "0" 蓝色#2FC8FA
// if (item.taskType == "1" || item.taskType == "2" || item.taskType == "3") {
// if (item.taskType == "1") {
@@ -484,7 +499,8 @@
this.$router.push({
name: "monitoring-warning",
params: {
- taskId: ''
+ taskId: '',
+ videoFaceList:this.videoFaceList,
},
})
},
diff --git a/src/views/modules/monitoring/surveillance.vue b/src/views/modules/monitoring/surveillance.vue
index f518cc7..cff1ac5 100644
--- a/src/views/modules/monitoring/surveillance.vue
+++ b/src/views/modules/monitoring/surveillance.vue
@@ -42,7 +42,7 @@
人像库
- 上传目标照片
+
@@ -50,26 +50,26 @@
-
- 上传头像图片只能是 JPG 、PNG、JPEG格式!
-
-
-
-
人物图像
-
-
- 上传图片
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{item.label}}
@@ -164,9 +164,9 @@
-
-
-
+
+
+
{{item.label}}
-
-
-