人员弹窗去掉到达时间
parent
f2d7065260
commit
a1f76ccef0
|
|
@ -51,8 +51,9 @@
|
|||
<div class="line"></div>
|
||||
<div class="flex fz-10">
|
||||
<div class="li-desc">{{item.type}}</div>
|
||||
<div class="li-desc">位于{{item.jianchazhan}}检查站</div>
|
||||
<div class="li-desc">距离:<span class="color2">{{item.distance}}公里</span></div>
|
||||
<div class="li-desc">预计到达时间:<span class="color2">{{item.duration}}分钟</span></div>
|
||||
<!-- <div class="li-desc">预计到达时间:<span class="color2">{{item.duration}}分钟</span></div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex ai-c jc-e" style="width:75px" v-if="fireData.reportTime && areaName == 'feixian'">
|
||||
|
|
@ -72,6 +73,7 @@
|
|||
|
||||
<script>
|
||||
import { postMethodCommon } from '@/api/common.js';
|
||||
import * as turf from '@turf/turf'
|
||||
import appConfig from '../../../../public/config/app.json'
|
||||
import axios from "axios";
|
||||
export default {
|
||||
|
|
@ -341,25 +343,35 @@
|
|||
|
||||
postMethodCommon("/FireCodePC/GetForestRangers?areaname="+this.areaName,arr).then(res =>{
|
||||
let rel = res.data
|
||||
// let rel = []
|
||||
// res.data.forEach((item,index) =>{
|
||||
// if(index == 1){
|
||||
// rel.push(item)
|
||||
// }
|
||||
// })
|
||||
|
||||
this.handleData(rel).then(dl =>{
|
||||
dl.sort((a,b)=>{
|
||||
return a.distance - b.distance
|
||||
let from = turf.point(this.fireLngLat);
|
||||
rel.forEach((item) =>{
|
||||
let to = turf.point([item.lng,item.lat]);
|
||||
let options = {units: 'kilometers'};
|
||||
let distance = turf.distance(from, to, options);
|
||||
item.distance = distance.toFixed(2)
|
||||
})
|
||||
|
||||
_this.listData = dl
|
||||
_this.allData = dl
|
||||
_this.listData = rel
|
||||
_this.allData = rel
|
||||
_this.listData.sort((a,b)=>{
|
||||
return a.distance - b.distance
|
||||
})
|
||||
setTimeout(()=>{
|
||||
_this.radioChange()
|
||||
},1000)
|
||||
|
||||
})
|
||||
// this.handleData(rel).then(dl =>{
|
||||
// dl.sort((a,b)=>{
|
||||
// return a.distance - b.distance
|
||||
// })
|
||||
|
||||
// _this.listData = dl
|
||||
// _this.allData = dl
|
||||
// setTimeout(()=>{
|
||||
// _this.radioChange()
|
||||
// },1000)
|
||||
|
||||
// })
|
||||
|
||||
})
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue