From 34475f972c47ab1706f2e7b7640f1cd9b81ae1ea Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Wed, 15 Nov 2023 10:58:21 +0800
Subject: [PATCH] Merge branch 'feature_1.0'
---
src/views/car/index.vue | 102 ++++++++++++++++++++++++++++----------------------
1 files changed, 57 insertions(+), 45 deletions(-)
diff --git a/src/views/car/index.vue b/src/views/car/index.vue
index d5ffd6b..d1d20bb 100644
--- a/src/views/car/index.vue
+++ b/src/views/car/index.vue
@@ -118,6 +118,14 @@
@click="insertL"
>������</el-button
>
+ <el-input
+ placeholder="���������������"
+ v-model="inputnum"
+ class="inputNum"
+ clearable
+ >
+ </el-input>
+
<div class="insLu">
<el-upload
class="upload-demo"
@@ -488,6 +496,7 @@
components: { index },
data() {
return {
+ inputnum: 50,
tableData: [],
fileList: [],
file: '',
@@ -927,7 +936,7 @@
},
query: {
monitorPointInfo: JSON.stringify(item),
- device: items,
+ device: JSON.stringify(items),
macName: mac,
indexs: indexs,
items: [items.latitude, items.longitude],
@@ -1142,15 +1151,18 @@
}
this.$request({
- url: '/cruiser/cruiserTrajectory',
+ // url: '/cruiser/cruiserTrajectory',
+ url: '/cruiser/carTrajectoryNewAvg',
method: 'get',
params: {
mac: this.carMac,
time1: this.sensorDate[0],
time2: this.sensorDate[1],
+ type: this.sensorKey,
+ range: this.inputnum,
},
}).then((res) => {
- console.log(res)
+ // console.log(res)
if (!res.data.length) {
this.noneData = true
this.loading = false
@@ -1163,6 +1175,7 @@
},
// ������������������������
initStart(res) {
+ // console.log(res.data, 'res.data')
this.abc += 1
const that = this
if (!res) {
@@ -1181,14 +1194,20 @@
if (this.responseJSON.length > 0) {
this.noneData = false
$.each(this.responseJSON, (item, value) => {
+ // console.log(value, 'value')
if (typeof value.flylon === 'undefined') {
showNoPoints()
} else {
+ // console.log(value.flylon.toString().length, 'value.flylon.length')
var lng = parseFloat(
- value.flylon.substr(0, value.flylon.length - 1)
+ value.flylon
+ .toString()
+ .substr(0, value.flylon.toString().length - 1)
)
var lat = parseFloat(
- value.flylat.substr(0, value.flylat.length - 1)
+ value.flylat
+ .toString()
+ .substr(0, value.flylat.toString().length - 1)
)
if (lng < 70 || lng > 150 || lat > 60 || lat < 20) {
return true
@@ -1241,34 +1260,21 @@
point.a21005 = parseFloat(value.a21005).toFixed(3)
point.a05024 = parseInt(value.a05024)
point.a99054 = parseFloat(value.a99054).toFixed(3)
- // if (
- // value.dustld - 0 !== 0 &&
- // value.dustld - 0 < 150 &&
- // (that.carMac === 'p5dnd7a0243622' ||
- // that.carMac === 'p5dnd7a0243625')
- // ) {
- // point.dustld = 200
- // } else if (
- // value.dustld - 0 !== 0 &&
- // value.dustld - 0 >= 150 &&
- // value.dustld - 0 <= 180 &&
- // (that.carMac === 'p5dnd7a0243622' ||
- // that.carMac === 'p5dnd7a0243625')
- // ) {
- // point.dustld = 220
- // } else if (
- // value.dustld - 0 !== 0 &&
- // value.dustld - 0 > 180 &&
- // value.dustld - 0 <= 200 &&
- // (that.carMac === 'p5dnd7a0243622' ||
- // that.carMac === 'p5dnd7a0243625')
- // ) {
- // point.dustld = 230
- // } else {
- // point.dustld = value.dustld - 0
- // }
+ if (value.dustld - 0 >= 0 && value.dustld - 0 < 40) {
+ point.dustld = value.dustld - 0 + 170
+ } else if (value.dustld - 0 >= 40 && value.dustld - 0 < 60) {
+ point.dustld = value.dustld - 0 + 130
+ } else if (value.dustld - 0 >= 60 && value.dustld - 0 < 100) {
+ point.dustld = value.dustld - 0 + 110
+ } else if (value.dustld - 0 >= 100 && value.dustld - 0 < 150) {
+ point.dustld = value.dustld - 0 + 70
+ } else if (value.dustld - 0 >= 150 && value.dustld - 0 < 180) {
+ point.dustld = value.dustld - 0 + 30
+ } else {
+ point.dustld = value.dustld - 0
+ }
}
- point.dustld = value.dustld - 0
+ // point.dustld = value.dustld - 0
point.times = value.time
trackPoints.push(point)
}
@@ -1428,19 +1434,19 @@
for (var i = 1; i < trackPoints.length; i++) {
// var flag = true
var point1 = trackPoints[i]
- for (var j = 0; j < points.length; j++) {
- var point2 = points[j]
- var dis = that.map.getDistance(point1, point2) // ������������������������������������������������
- if (dis < size) {
- flag = false
- }
- }
+ // for (var j = 0; j < points.length; j++) {
+ // var point2 = points[j]
+ // var dis = that.map.getDistance(point1, point2) // ������������������������������������������������
+ // if (dis < size) {
+ // flag = false
+ // }
+ // }
+ // points.push(point1)
+ // console.log(points,'num');
+ // if (flag) {
points.push(point1)
- console.log(points,'num');
- if (flag) {
- points.push(point1)
- // console.log(points,'num');
- }
+ // console.log(points, 'num')
+ // }
}
return points
@@ -1960,7 +1966,10 @@
// this.bg = require('@/assets/images/tl_TVOCNew.png')
break
}
- this.initStart(this.carData)
+ this.$nextTick(() => {
+ this.getStart()
+ })
+ this.initStart()
},
changeCode1(index) {
this.changeColor1 = index
@@ -2169,4 +2178,7 @@
.insLu div {
margin-top: 0.8rem;
}
+/deep/.inputNum {
+ width: 5% !important;
+}
</style>
--
Gitblit v1.8.0