From 5b35c33b112a645d54c80f17ef9de8aa922b4aae Mon Sep 17 00:00:00 2001 From: coco1986509808 <1986509808@qq.com> Date: Wed, 31 May 2023 21:42:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=A3=E7=BD=A9=E9=A1=B9=E7=9B=AE=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/index.js | 2 ++ src/views/modules/monitoring/barrier.vue | 34 +++++++++++-------- src/views/modules/monitoring/surveillance.vue | 31 +++++++++++------ src/views/modules/monitoring/warning.vue | 22 ++++++++---- 4 files changed, 58 insertions(+), 31 deletions(-) diff --git a/src/utils/index.js b/src/utils/index.js index 3f4ba88..9243173 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,3 +1,5 @@ + + import Cookies from 'js-cookie' import store from '@/store' diff --git a/src/views/modules/monitoring/barrier.vue b/src/views/modules/monitoring/barrier.vue index 31da3de..1fcefce 100644 --- a/src/views/modules/monitoring/barrier.vue +++ b/src/views/modules/monitoring/barrier.vue @@ -217,7 +217,8 @@ nowRtspurl:"", //设置摄像头切换休眠标识 flag : false, - textStyle : 70, + //布控阈值,默认为70 + textStyle : 70.00, } }, mounted() { @@ -228,6 +229,8 @@ created() { // 初始化选择默认卡口 this.initGetCameraId() + //初始化获取今日抓拍 + this.initTotal() // 初始化获取4条预警信息 // this.initGetWarningPicture() }, @@ -312,22 +315,22 @@ this.$http.get(`warning/taskInfo/${cameraId}`).then(res => { if (res.data.code === 0) { this.taskName = res.data.data.taskName - this.textStyle = res.data.data.controlThreshold + //获取当前布控的阈值 + this.textStyle = res.data.data.controlThreshold*100; + console.log(this.textStyle) } else { this.$message.warning(res.data.message) } }) }, // 初始化获取 今日抓拍/累计抓拍 - initTotal(cameraId) { - this.$http.get(`/warning/todayBayonet/${this.cameraId}`).then(res => { + initTotal() { + this.$http.get(`/warning/todayBayonet`).then(res => { if (res.data.code === 0) { - // 初始化toDaySnapShot 和 totalSnapShot两个字段与ws推送的这两个字段的json结构不一样(来自潘辉) - res.data.data.result.toDaySnapShot = res.data.data.toDaySnapShot - res.data.data.result.totalSnapShot = res.data.data.totalSnapShot - this.getPicture(res.data.data.result) - } else { - //this.$message.error(res.data.message) + // 初始化toDaySnapShot 和 totalSnapShot + this.toDaySnapShot = res.data.data.toDaySnapShot; + this.totalSnapShot = res.data.data.totalSnapShot; + // this.getPicture(res.data.data.result) } }) }, @@ -421,11 +424,14 @@ * @param {Object} wsObj */ getWarningPicture(warningData) { - this.toDaySnapShot = this.toDaySnapShot + warningData.length - this.totalSnapShot = this.totalSnapShot + warningData.length + //累积今日抓拍的数量 + this.toDaySnapShot = this.toDaySnapShot - 0 + 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]) + if(warningData[i].rtspUrl == this.nowRtspurl) { + this.videoFaceList.unshift(warningData[i]) + } } // this.videoFaceList = warningData; // console.log("this is videofacelist") @@ -516,7 +522,7 @@ this.cameraId = data.id // 三级卡口id用于点击查看全部后绑定区域级联下拉框 this.treeArr = data.camera_region_firstlevel.split(",") - // 获取任务名称 + // 获取任务名称,当前布控阈值 this.getTaskNameByCameraId(this.cameraId) // 切换摄像头时默认查询一条数据展示 //this.initTotal(this.cameraId) diff --git a/src/views/modules/monitoring/surveillance.vue b/src/views/modules/monitoring/surveillance.vue index d0fd43b..7b0bc4d 100644 --- a/src/views/modules/monitoring/surveillance.vue +++ b/src/views/modules/monitoring/surveillance.vue @@ -71,12 +71,12 @@ - {{item.label}} - + 监控类 - 提示类 --> +

严重告警结果,针对需要立即处理的对象

-

普通告警结果,针对需要关注的对象

+

普通监控,针对区域内所有对象

结果通知,可用于演示或测试使用

@@ -168,10 +168,10 @@ - {{item.label}} - + + + 监控类 + @@ -198,6 +198,8 @@ + + @@ -297,7 +299,7 @@ }], cameraList: [{ required: true, - message: '请选择摄像头(如果没有数据可选,请移至资源-摄像头匹配)', + message: '请选择摄像头(如果没有数据可选,请移至摄像头管理)', trigger: 'change' }], monitorThreshold: [{ @@ -530,13 +532,18 @@ taskName: this.addForm2.taskName, disposalType: this.addForm2.disposalType, remarks: this.addForm2.remarks, - idControlTask: this.editorId + idControlTask: this.editorId, + controlThreshold: this.addForm2.controlThreshold / 100 } this.$http.put('/control/updatetask', data) .then(res => { if (res.data.code == 0) { this.addDialogVisible2 = false this.data(this.pages) + this.$message({ + type: "success", + message: "修改成功" + }); } }) @@ -549,6 +556,8 @@ clickStart(id) { this.$http.post(`/control/resumecontrol/${id}`) .then(res => { + console.log("开始") + console.log(res.data) if (res.data.code == 0) { this.data(this.pages) this.$message({ @@ -567,6 +576,8 @@ clickSuspend(id) { this.$http.post(`/control/suspendcontrol/${id}`) .then(res => { + console.log("暂停") + console.log(res.data) if (res.data.code == 0) { this.data(this.pages) this.$message({ diff --git a/src/views/modules/monitoring/warning.vue b/src/views/modules/monitoring/warning.vue index 2b600d4..9460335 100644 --- a/src/views/modules/monitoring/warning.vue +++ b/src/views/modules/monitoring/warning.vue @@ -29,7 +29,7 @@ - +
@@ -41,8 +41,8 @@
目标图片 - - + +
@@ -55,7 +55,8 @@ 相似度:{{(item.xsd*1).toFixed(2)}}%
-
+
+ 监控 提示 监控 抓捕 @@ -68,8 +69,9 @@ - +
@@ -106,7 +108,8 @@ export default { // 任务Id taskId: "", // 预警列表 - warningList: this.$route.params.videoFaceList, + warningList:[], + // this.$route.params.videoFaceList, // 详情 taskVisible: false, val: {} @@ -267,6 +270,11 @@ export default { this.getWarningList() }, // 页码 + // el-pagination + handleSizeChange: function(pageSize) { + this.pageObj.page.pageSize = pageSize + this.handleCurrentChange(this.pageObj.page.pageNo); + }, handleCurrentChange(val) { this.pageObj.page.pageNo = val let dateArr = this.formData.dateValue