Compare commits
2 Commits
f6e6ff6648
...
38f4ec7e79
| Author | SHA1 | Date |
|---|---|---|
|
|
38f4ec7e79 | |
|
|
8e64860217 |
|
|
@ -64,7 +64,6 @@ const dataset = ref({
|
|||
onMounted(() => {
|
||||
// 获取eventBus传过来的值
|
||||
EventBus.on('clockinlistsenddata', (data) => {
|
||||
console.log('data123444', data)
|
||||
dataset.value = data
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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=()=>{
|
||||
|
|
|
|||
|
|
@ -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) =>{
|
||||
|
|
|
|||
Loading…
Reference in New Issue