From 9eab7b92dfd6af14436182833aeec470e474968f Mon Sep 17 00:00:00 2001 From: "peak.jiang" <26269261@qq.com> Date: Sun, 12 Nov 2023 16:14:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=20=E5=A4=9A=E4=BC=A0?= =?UTF-8?q?=E6=84=9F=E8=9E=8D=E5=90=88=20=20=E8=A7=86=E9=A2=91NSM-zone1-?= =?UTF-8?q?=E5=BB=B6=E8=AF=AF=5F0=EF=BC=88=E5=BB=B6=E8=AF=AF=EF=BC=89-?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC-=E5=9B=BA=E5=AE=9A=E9=97=B4=E9=9A=94?= =?UTF-8?q?=E4=B8=8B=20=E5=AD=98=E8=BD=A6=E6=95=B0=E5=92=8C=E6=8E=92?= =?UTF-8?q?=E9=98=9F=E6=95=B0=E4=B8=8D=E5=B1=95=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/sensorFusion/meanValue.vue | 33 ++++++++++++++++++++--- src/views/sensorFusion/index.vue | 8 +++--- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/components/sensorFusion/meanValue.vue b/src/components/sensorFusion/meanValue.vue index 3ab3b4f..c607423 100644 --- a/src/components/sensorFusion/meanValue.vue +++ b/src/components/sensorFusion/meanValue.vue @@ -79,10 +79,35 @@ export default { this.dataList = this.dataList.slice(-10); } for (let i = 0; i < this.dataList.length; i++) { - this.max.push(this.dataList[i].max); - this.min.push(this.dataList[i].min); - this.med.push(this.dataList[i].med); - this.avg.push(this.dataList[i].avg); + if(this.dataList[i].max) { + this.max.push(Math.abs(this.dataList[i].max.toFixed(2))); + }else { + this.max.push(0); + } + + if(this.dataList[i].min) { + this.min.push(Math.abs(this.dataList[i].min.toFixed(2))); + }else { + this.min.push(0); + } + + if(this.dataList[i].med) { + this.med.push(Math.abs(this.dataList[i].med.toFixed(2))); + }else { + this.med.push(0); + } + + if(this.dataList[i].avg) { + this.avg.push(Math.abs(this.dataList[i].avg.toFixed(2))); + }else { + this.avg.push(0); + } + + + // this.max.push(Math.abs(this.dataList[i].max.toFixed(2))); + // this.min.push(Math.abs(this.dataList[i].min.toFixed(2))); + // this.med.push(Math.abs(this.dataList[i].med.toFixed(2))); + // this.avg.push(Math.abs(this.dataList[i].avg.toFixed(2))); } let maxData = ""; let minData = ""; diff --git a/src/views/sensorFusion/index.vue b/src/views/sensorFusion/index.vue index fe4c5c9..810a6ee 100644 --- a/src/views/sensorFusion/index.vue +++ b/src/views/sensorFusion/index.vue @@ -783,8 +783,8 @@ <span v-if="scope.row.type == 'Non_Motor|Person'">非机动车|行人</span> </template> --> </el-table-column> - <el-table-column align="center" prop="n_stay" label="存车数"></el-table-column> - <el-table-column align="center" prop="n_queue" label="排队数"></el-table-column> + <el-table-column align="center" prop="ave_stay" label="存车数"></el-table-column> + <el-table-column align="center" prop="ave_queue" label="排队数"></el-table-column> <el-table-column align="center" prop="occ" label="占用状态"> <template slot-scope="scope"> <span v-if="scope.row.occ == '1'">占用</span> @@ -3355,8 +3355,8 @@ export default { min: msgN[j].min, name: msgN[j].name, type: msgN[j].type, - n_stay: msgN[j].ave_stay, - n_queue: msgN[j].ave_queue, + ave_stay: msgN[j].ave_stay, + ave_queue: msgN[j].ave_queue, occ: msgN[j].occ, speed: newSpeed, originalSpeed: msgN[j].speed