Compare commits

...

2 Commits

Author SHA1 Message Date
userName 38f4ec7e79 Merge branch 'main' of http://123.132.248.154:10000/gitY/LinYeFangHuo 2025-04-28 16:50:18 +08:00
userName 8e64860217 巡查轨迹完善 2025-04-28 16:50:10 +08:00
4 changed files with 49 additions and 3 deletions

View File

@ -64,7 +64,6 @@ const dataset = ref({
onMounted(() => {
// eventBus
EventBus.on('clockinlistsenddata', (data) => {
console.log('data123444', data)
dataset.value = data
});
})

View File

@ -76,6 +76,7 @@ import { PropType, toRefs, ref, onMounted } from 'vue'
import { CreateComponentType } from '@/packages/index.d'
import { EventBus } from '@/utils/eventBus'
import axios from 'axios'
import * as mars3d from "mars3d";
import { getAppEnvConfig } from '@/utils/env'
var { VITE_GLOB_API_URL } = getAppEnvConfig();
@ -99,6 +100,7 @@ const areaValue = ref()
const searchValue = ref()
const dataset = ref([])
const optionsData = ref([])
const entityArr = ref([])
const getListData=()=>{
console.log('areaValue',areaValue)
@ -147,8 +149,34 @@ const getAreaListData=(id)=>{
props.chartConfig.option.areaOptions = optionsData.value
})
}
const lisClick=(item)=>{
EventBus.emit('clockinlistsenddata' , item);
const lisClick=(e)=>{
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(() => {
getListData()
@ -234,6 +262,7 @@ onMounted(() => {
background: url("@/assets/images/chart/xunchaguiji/lisbg01.png");
background-size: 100% 100%;
margin-bottom: 10px;
cursor: pointer;
.icons01{
width: 41px;
height: 36px;

View File

@ -50,6 +50,7 @@ const props = defineProps({
const { w, h } = toRefs(props.chartConfig.attr)
const entityArr = ref([])
const polyLineArr = ref([])
const {
textColors,
textSize,
@ -84,6 +85,11 @@ const handlerAddEntity = (data) => {
window.globalMap.flyToGraphic(graphic,{radius:300});
}
const rotateLine = (data)=>{
polyLineArr.value.forEach(item =>{
let graphic = window.graphicLayer.getGraphicById(item);
window.graphicLayer.removeGraphic(graphic);
})
polyLineArr.value = []
axios({
method: "get",
url: VITE_GLOB_API_URL + '/api/FirePatrol/GetPatrolPointByTime',
@ -102,6 +108,7 @@ const rotateLine = (data)=>{
positionsArr.push(arr)
})
const graphic = new mars3d.graphic.PolylineEntity({
id: data.CreateId,
positions: positionsArr,
style: {
color: '#25F8EE',
@ -112,6 +119,7 @@ const rotateLine = (data)=>{
flyTo: true
})
window.graphicLayer.addGraphic(graphic)
polyLineArr.value.push(data.CreateId)
})
}
const getListData=()=>{

View File

@ -11,6 +11,8 @@
v-model:formatted-value="rangeValue"
type="datetimerange"
clearable
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
@update:formatted-value="dateChange"
@ -106,6 +108,7 @@ const navsArr = ref(['巡查轨迹','打卡记录'])
const rangeValue = ref()
const userId = ref()
const dateRange = ref([null,null])
const polyLineArr = ref([])
const navsClick = (index) =>{
navsIndex.value = index
}
@ -113,6 +116,11 @@ const dateChange = (e)=>{
dateRange.value = e
}
const rotateLine = (data)=>{
polyLineArr.value.forEach(item =>{
let graphic = window.graphicLayer.getGraphicById(item);
window.graphicLayer.removeGraphic(graphic);
})
polyLineArr.value = []
axios({
method: "get",
url: VITE_GLOB_API_URL + '/api/FirePatrol/GetPatrolPointByTime',
@ -133,6 +141,7 @@ const rotateLine = (data)=>{
positionsArr.push(arr)
})
const graphic = new mars3d.graphic.PolylineEntity({
id: data.createId,
positions: positionsArr,
style: {
color: '#25F8EE',
@ -143,6 +152,7 @@ const rotateLine = (data)=>{
flyTo: true
})
window.graphicLayer.addGraphic(graphic)
polyLineArr.value.push(data.createId)
})
}
const circleGeom = (data) =>{