Compare commits

...

2 Commits

Author SHA1 Message Date
userName 625be5bde2 Merge branch 'main' of http://123.132.248.154:10000/gitY/LinYeFangHuo 2025-04-08 17:01:49 +08:00
userName d67c536a3c 轨迹完善 2025-04-08 17:01:41 +08:00
2 changed files with 59 additions and 7 deletions

View File

@ -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=()=>{

View File

@ -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({