From 63c0ecf98f3705b4c70e4bafee5f325966a5777b Mon Sep 17 00:00:00 2001 From: guoshipeng <3194674006@qq.com> Date: Thu, 06 Jul 2023 09:13:54 +0800 Subject: [PATCH] 提交 --- src/views/car/index.vue | 113 ++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 69 insertions(+), 44 deletions(-) diff --git a/src/views/car/index.vue b/src/views/car/index.vue index d5ffd6b..72e4832 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: 0, 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,32 +1260,32 @@ 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 < 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 + // } } point.dustld = value.dustld - 0 point.times = value.time @@ -1428,19 +1447,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 +1979,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 +2191,7 @@ .insLu div { margin-top: 0.8rem; } +/deep/.inputNum { + width: 5% !important; +} </style> -- Gitblit v1.8.0