巡查轨迹完善
parent
19b2109c57
commit
8e64860217
|
|
@ -64,7 +64,6 @@ const dataset = ref({
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取eventBus传过来的值
|
// 获取eventBus传过来的值
|
||||||
EventBus.on('clockinlistsenddata', (data) => {
|
EventBus.on('clockinlistsenddata', (data) => {
|
||||||
console.log('data123444', data)
|
|
||||||
dataset.value = data
|
dataset.value = data
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ import { PropType, toRefs, ref, onMounted } from 'vue'
|
||||||
import { CreateComponentType } from '@/packages/index.d'
|
import { CreateComponentType } from '@/packages/index.d'
|
||||||
import { EventBus } from '@/utils/eventBus'
|
import { EventBus } from '@/utils/eventBus'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
import * as mars3d from "mars3d";
|
||||||
import { getAppEnvConfig } from '@/utils/env'
|
import { getAppEnvConfig } from '@/utils/env'
|
||||||
var { VITE_GLOB_API_URL } = getAppEnvConfig();
|
var { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||||
|
|
||||||
|
|
@ -99,6 +100,7 @@ const areaValue = ref()
|
||||||
const searchValue = ref()
|
const searchValue = ref()
|
||||||
const dataset = ref([])
|
const dataset = ref([])
|
||||||
const optionsData = ref([])
|
const optionsData = ref([])
|
||||||
|
const entityArr = ref([])
|
||||||
|
|
||||||
const getListData=()=>{
|
const getListData=()=>{
|
||||||
console.log('areaValue',areaValue)
|
console.log('areaValue',areaValue)
|
||||||
|
|
@ -147,8 +149,34 @@ const getAreaListData=(id)=>{
|
||||||
props.chartConfig.option.areaOptions = optionsData.value
|
props.chartConfig.option.areaOptions = optionsData.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const lisClick=(item)=>{
|
const lisClick=(e)=>{
|
||||||
EventBus.emit('clockinlistsenddata' , item);
|
EventBus.emit('clockinlistsenddata' , e);
|
||||||
|
entityArr.value.forEach(item =>{
|
||||||
|
let graphic = window.graphicLayer.getGraphicById(item);
|
||||||
|
window.graphicLayer.removeGraphic(graphic);
|
||||||
|
})
|
||||||
|
entityArr.value = []
|
||||||
|
handlerAddEntity(e)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 添加Entity
|
||||||
|
const handlerAddEntity = (data) => {
|
||||||
|
let graphicOptions = {
|
||||||
|
id: data.Id,
|
||||||
|
position: [parseFloat(data.Lng), parseFloat(data.Lat)],
|
||||||
|
style: {
|
||||||
|
image: '/src/assets/images/chart/mapicons/putongbiaojidian.png',
|
||||||
|
clampToGround: true,
|
||||||
|
scale: 1,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
entityArr.value.push(data.Id)
|
||||||
|
let graphic = window.graphicLayer.getGraphicById(data.Id);
|
||||||
|
|
||||||
|
graphic = new mars3d.graphic.BillboardEntity(graphicOptions);
|
||||||
|
window.graphicLayer.addGraphic(graphic);
|
||||||
|
window.globalMap.flyToGraphic(graphic,{radius:300});
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getListData()
|
getListData()
|
||||||
|
|
@ -234,6 +262,7 @@ onMounted(() => {
|
||||||
background: url("/src/assets/images/chart/xunchaguiji/lisbg01.png");
|
background: url("/src/assets/images/chart/xunchaguiji/lisbg01.png");
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
cursor: pointer;
|
||||||
.icons01{
|
.icons01{
|
||||||
width: 41px;
|
width: 41px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ const props = defineProps({
|
||||||
|
|
||||||
const { w, h } = toRefs(props.chartConfig.attr)
|
const { w, h } = toRefs(props.chartConfig.attr)
|
||||||
const entityArr = ref([])
|
const entityArr = ref([])
|
||||||
|
const polyLineArr = ref([])
|
||||||
const {
|
const {
|
||||||
textColors,
|
textColors,
|
||||||
textSize,
|
textSize,
|
||||||
|
|
@ -84,6 +85,11 @@ const handlerAddEntity = (data) => {
|
||||||
window.globalMap.flyToGraphic(graphic,{radius:300});
|
window.globalMap.flyToGraphic(graphic,{radius:300});
|
||||||
}
|
}
|
||||||
const rotateLine = (data)=>{
|
const rotateLine = (data)=>{
|
||||||
|
polyLineArr.value.forEach(item =>{
|
||||||
|
let graphic = window.graphicLayer.getGraphicById(item);
|
||||||
|
window.graphicLayer.removeGraphic(graphic);
|
||||||
|
})
|
||||||
|
polyLineArr.value = []
|
||||||
axios({
|
axios({
|
||||||
method: "get",
|
method: "get",
|
||||||
url: VITE_GLOB_API_URL + '/api/FirePatrol/GetPatrolPointByTime',
|
url: VITE_GLOB_API_URL + '/api/FirePatrol/GetPatrolPointByTime',
|
||||||
|
|
@ -102,6 +108,7 @@ const rotateLine = (data)=>{
|
||||||
positionsArr.push(arr)
|
positionsArr.push(arr)
|
||||||
})
|
})
|
||||||
const graphic = new mars3d.graphic.PolylineEntity({
|
const graphic = new mars3d.graphic.PolylineEntity({
|
||||||
|
id: data.CreateId,
|
||||||
positions: positionsArr,
|
positions: positionsArr,
|
||||||
style: {
|
style: {
|
||||||
color: '#25F8EE',
|
color: '#25F8EE',
|
||||||
|
|
@ -112,6 +119,7 @@ const rotateLine = (data)=>{
|
||||||
flyTo: true
|
flyTo: true
|
||||||
})
|
})
|
||||||
window.graphicLayer.addGraphic(graphic)
|
window.graphicLayer.addGraphic(graphic)
|
||||||
|
polyLineArr.value.push(data.CreateId)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const getListData=()=>{
|
const getListData=()=>{
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@
|
||||||
v-model:formatted-value="rangeValue"
|
v-model:formatted-value="rangeValue"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
clearable
|
clearable
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
format="yyyy-MM-dd HH:mm:ss"
|
format="yyyy-MM-dd HH:mm:ss"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
@update:formatted-value="dateChange"
|
@update:formatted-value="dateChange"
|
||||||
|
|
@ -106,6 +108,7 @@ const navsArr = ref(['巡查轨迹','打卡记录'])
|
||||||
const rangeValue = ref()
|
const rangeValue = ref()
|
||||||
const userId = ref()
|
const userId = ref()
|
||||||
const dateRange = ref([null,null])
|
const dateRange = ref([null,null])
|
||||||
|
const polyLineArr = ref([])
|
||||||
const navsClick = (index) =>{
|
const navsClick = (index) =>{
|
||||||
navsIndex.value = index
|
navsIndex.value = index
|
||||||
}
|
}
|
||||||
|
|
@ -113,6 +116,11 @@ const dateChange = (e)=>{
|
||||||
dateRange.value = e
|
dateRange.value = e
|
||||||
}
|
}
|
||||||
const rotateLine = (data)=>{
|
const rotateLine = (data)=>{
|
||||||
|
polyLineArr.value.forEach(item =>{
|
||||||
|
let graphic = window.graphicLayer.getGraphicById(item);
|
||||||
|
window.graphicLayer.removeGraphic(graphic);
|
||||||
|
})
|
||||||
|
polyLineArr.value = []
|
||||||
axios({
|
axios({
|
||||||
method: "get",
|
method: "get",
|
||||||
url: VITE_GLOB_API_URL + '/api/FirePatrol/GetPatrolPointByTime',
|
url: VITE_GLOB_API_URL + '/api/FirePatrol/GetPatrolPointByTime',
|
||||||
|
|
@ -133,6 +141,7 @@ const rotateLine = (data)=>{
|
||||||
positionsArr.push(arr)
|
positionsArr.push(arr)
|
||||||
})
|
})
|
||||||
const graphic = new mars3d.graphic.PolylineEntity({
|
const graphic = new mars3d.graphic.PolylineEntity({
|
||||||
|
id: data.createId,
|
||||||
positions: positionsArr,
|
positions: positionsArr,
|
||||||
style: {
|
style: {
|
||||||
color: '#25F8EE',
|
color: '#25F8EE',
|
||||||
|
|
@ -143,6 +152,7 @@ const rotateLine = (data)=>{
|
||||||
flyTo: true
|
flyTo: true
|
||||||
})
|
})
|
||||||
window.graphicLayer.addGraphic(graphic)
|
window.graphicLayer.addGraphic(graphic)
|
||||||
|
polyLineArr.value.push(data.createId)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const circleGeom = (data) =>{
|
const circleGeom = (data) =>{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue