| | |
| | | @click="changeCarData(item)" |
| | | > |
| | | <span>{{ item.name }}</span> |
| | | <i |
| | | style="vertical-align: -2.5px;font-size: 20px;margin-right:10px;margin-left:auto" |
| | | class="iconfont iconfaxianzuobiao" |
| | | @click="deviceDetail(item.mac,null,item,0)" |
| | | /> |
| | | <!-- @click="deviceDetail('p5dnd7a0245390',null,item,0)"--> |
| | | </el-menu-item> |
| | | </el-menu> |
| | | </el-aside> |
| | |
| | | </template> |
| | | <script> |
| | | import $ from 'jquery' |
| | | import '@/assets/icon/iconfont.css' |
| | | var GPS = { |
| | | PI: 3.14159265358979324, |
| | | x_pi: 3.14159265358979324 * 3000.0 / 180.0, |
| | |
| | | { sensorName: 'CO', unit: 'mg/m³', tab1: '2', tab2: '4', tab3: '14', tab4: '24', tab5: '36', tab6: '48' }, |
| | | { sensorName: 'O3', unit: 'ug/m³', tab1: '100', tab2: '160', tab3: '215', tab4: '265', tab5: '800', tab6: '800' }, |
| | | { sensorName: 'TVOC', unit: 'mg/m³', tab1: '0.1', tab2: '0.3', tab3: '0.5', tab4: '0.7', tab5: '0.9', tab6: '1' }, |
| | | { sensorName: '尘负荷', unit: 'ug/m³', tab1: '0.05', tab2: '0.1', tab3: '0.3', tab4: '0.5', tab5: '0.9', tab6: '1' } |
| | | { sensorName: '尘负荷', unit: 'ug/m³', tab1: '300', tab2: '500', tab3: '1000', tab4: '10000', tab5: '20000', tab6: '50000' } |
| | | ], |
| | | carWs: null, |
| | | map: null, |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | // 跳转设备详情页 |
| | | deviceDetail(mac, item, items, indexs) { |
| | | // console.log('这是传输过去的值') |
| | | // console.log(mac) |
| | | // console.log(item) |
| | | // console.log(items) |
| | | // console.log(indexs) |
| | | // this.monitorPointInfo = item |
| | | this.$router.push({ |
| | | name: 'deviceDetail', |
| | | // path: '/carDetail', |
| | | params: { |
| | | monitorPointInfo: item, |
| | | device: items, |
| | | macName: mac, |
| | | indexs: indexs, |
| | | items: [items.latitude, items.longitude] |
| | | }, |
| | | query: { |
| | | monitorPointInfo: JSON.stringify(item), |
| | | device: items, |
| | | macName: mac, |
| | | indexs: indexs, |
| | | items: [items.latitude, items.longitude], |
| | | equipment: 'car' |
| | | } |
| | | }) |
| | | }, |
| | | // 6参设定方法 |
| | | customLevel() { |
| | | this.getStart() |
| | |
| | | this.loading = false |
| | | if (this.responseJSON.length > 0) { |
| | | this.noneData = false |
| | | console.log(that.carMac, 'mac') |
| | | $.each(this.responseJSON, (item, value) => { |
| | | if (typeof (value.flylon) === 'undefined') { |
| | | showNoPoints() |
| | |
| | | point.a21005 = parseFloat(value.a21005).toFixed(3) |
| | | point.a05024 = parseInt(value.a05024) |
| | | point.a99054 = parseFloat(value.a99054).toFixed(3) |
| | | point.dustld = value.dustld - 0 |
| | | if (value.dustld - 0 !== 0 && value.dustld - 0 < 100 && that.carMac === 'p5dnd7a0243622') { |
| | | point.dustld = 100 |
| | | } else { |
| | | point.dustld = value.dustld - 0 |
| | | } |
| | | // point.dustld = value.dustld - 0 |
| | | trackPoints.push(point) |
| | | } |
| | | }) |
| | |
| | | } |
| | | } |
| | | // drawPolygon(sensor);//多边形 |
| | | draw(that.sensor, that.viewType) |
| | | drawLine()// 轨迹 |
| | | draw(that.sensor, that.viewType, that.carMac) |
| | | // drawLine()// 轨迹 |
| | | drawStartAndEnd()// 起点和终点标注 |
| | | function draw(sensor, type) { |
| | | var levels = getGrading(sensor, type) |
| | | function draw(sensor, type, carMac) { |
| | | var levels = getGrading(sensor, type, carMac) |
| | | $.each(levels, function(index, value) { |
| | | var color = value.color |
| | | var data = value.data |
| | |
| | | return new BMapGL.Point(lng, lat) |
| | | } |
| | | |
| | | function getGrading(sensor, type) { |
| | | function getGrading(sensor, type, carMac) { |
| | | var levels = [] |
| | | var level0 = {} |
| | | var level1 = {} |
| | |
| | | if (type === '2D') { |
| | | height = 0 |
| | | } else { |
| | | height = value[sensor] * 10 |
| | | if (sensor === 'a99054') { |
| | | height = value[sensor] * 500 |
| | | } |
| | | height = value[sensor] |
| | | // if (sensor === 'a99054') { |
| | | // height = value[sensor] * 500 |
| | | // } |
| | | // console.log(carMac, 'carMac') |
| | | // if (sensor === 'dustld' && (value[sensor] - 0) < 100 && (value[sensor] - 0) !== 0 && carMac === 'p5dnd7a0243622') { |
| | | // height = 100 * 10 |
| | | // } |
| | | } |
| | | switch (level) { |
| | | case 0: |
| | |
| | | draw(that.sensor, that.viewType) |
| | | if (that.viewType === '2D') { |
| | | that.map.setTilt(0) |
| | | drawLine() |
| | | // drawLine() |
| | | drawStartAndEnd() |
| | | $('.sensorLevel').attr('src', '/img/pollutionlevel.png') |
| | | } else if (that.viewType === '3D') { |