轨迹完善
parent
d95b5a7125
commit
d67c536a3c
|
|
@ -86,17 +86,33 @@ const handlerAddEntity = (data) => {
|
|||
}
|
||||
const rotateLine = (data)=>{
|
||||
axios({
|
||||
method: "post",
|
||||
method: "get",
|
||||
url: VITE_GLOB_API_URL + '/api/FirePatrol/GetPatrolPointByTime',
|
||||
data: {
|
||||
page: 1,
|
||||
limit: 9999
|
||||
params: {
|
||||
id: data.CreateId
|
||||
},
|
||||
headers: {
|
||||
'X-Token': localStorage.getItem("X-Token")
|
||||
}
|
||||
}).then(res => {
|
||||
|
||||
let rel = res.data.result
|
||||
let positionsArr = []
|
||||
rel.forEach(item =>{
|
||||
let arr = []
|
||||
arr.push(item.lng,item.lat)
|
||||
positionsArr.push(arr)
|
||||
})
|
||||
const graphic = new mars3d.graphic.PolylineEntity({
|
||||
positions: positionsArr,
|
||||
style: {
|
||||
color: '#25F8EE',
|
||||
depthFail: true,
|
||||
opacity: 1,
|
||||
},
|
||||
attr: { remark: "轨迹" },
|
||||
flyTo: true
|
||||
})
|
||||
window.graphicLayer.addGraphic(graphic)
|
||||
})
|
||||
}
|
||||
const getListData=()=>{
|
||||
|
|
|
|||
|
|
@ -25,11 +25,11 @@
|
|||
<span class="username">{{ item.name }}</span>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="flex locationbox ai-c jc-c">
|
||||
<div class="flex locationbox ai-c jc-c" @click="circleGeom(item)">
|
||||
<img class="img" src="/src/assets/images/chart/xunchaguiji/btnicons04.png" />
|
||||
<span>范围</span>
|
||||
</div>
|
||||
<div class="flex rotatebox ai-c jc-c">
|
||||
<div class="flex rotatebox ai-c jc-c" @click="rotateLine(item)">
|
||||
<img class="img" src="/src/assets/images/chart/xunchaguiji/rotateicon.png" />
|
||||
<span>轨迹</span>
|
||||
</div>
|
||||
|
|
@ -111,6 +111,42 @@ const navsClick = (index) =>{
|
|||
}
|
||||
const dateChange = (e)=>{
|
||||
dateRange.value = e
|
||||
}
|
||||
const rotateLine = (data)=>{
|
||||
axios({
|
||||
method: "get",
|
||||
url: VITE_GLOB_API_URL + '/api/FirePatrol/GetPatrolPointByTime',
|
||||
params: {
|
||||
id: data.createId,
|
||||
beginTime: dateRange.value[0],
|
||||
endTime: dateRange.value[1]
|
||||
},
|
||||
headers: {
|
||||
'X-Token': localStorage.getItem("X-Token")
|
||||
}
|
||||
}).then(res => {
|
||||
let rel = res.data.result
|
||||
let positionsArr = []
|
||||
rel.forEach(item =>{
|
||||
let arr = []
|
||||
arr.push(item.lng,item.lat)
|
||||
positionsArr.push(arr)
|
||||
})
|
||||
const graphic = new mars3d.graphic.PolylineEntity({
|
||||
positions: positionsArr,
|
||||
style: {
|
||||
color: '#25F8EE',
|
||||
depthFail: true,
|
||||
opacity: 1,
|
||||
},
|
||||
attr: { remark: "轨迹" },
|
||||
flyTo: true
|
||||
})
|
||||
window.graphicLayer.addGraphic(graphic)
|
||||
})
|
||||
}
|
||||
const circleGeom = (data) =>{
|
||||
|
||||
}
|
||||
const getRecordListData = ()=>{
|
||||
axios({
|
||||
|
|
|
|||
Loading…
Reference in New Issue