| | |
| | | <div class="right">{{ index + 1 }}</div> |
| | | </div> |
| | | </a-tooltip> |
| | | <div class="graph-right"> |
| | | <div v-for="(event, index) in item.eventList" :key="index" class="s-event-icon"> |
| | | <a-tooltip placement="top"> |
| | | <template #title> |
| | | {{ event.name }} |
| | | </template> |
| | | <img :src="event.icon" alt="icon" /> |
| | | </a-tooltip> |
| | | <contextMenu :menu="[{ title: '删除航点', value: { index, item } }]"> |
| | | <div class="graph-right"> |
| | | <div v-for="(event, index) in item.eventList" :key="index" class="s-event-icon"> |
| | | <a-tooltip placement="top"> |
| | | <template #title> |
| | | {{ event.name }} |
| | | </template> |
| | | <img :src="event.icon" alt="icon" /> |
| | | </a-tooltip> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </contextMenu> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | |
| | | import useMapDraw, { kmlEntities as globalEntities, selectPointIndex as pointIdx } from '/@/utils/cesium/use-map-draw' |
| | | import { getKmlParams } from '/@/utils/cesium/kmz' |
| | | import { getHaeHeight } from '/@/utils/cesium/mapUtils' |
| | | import contextMenu from './components/content-menu.vue' |
| | | const store = useMyStore() |
| | | const { appContext }: any = getCurrentInstance() |
| | | const global = appContext.config.globalProperties |
| | |
| | | }) |
| | | waylineDetails.value = details |
| | | tragetPointArr.value = waylinePointsEvent.value |
| | | watch( |
| | | () => waylinePointsEvent.value, |
| | | (val) => { |
| | | tragetPointArr.value = val |
| | | }, |
| | | { |
| | | deep: true, |
| | | }, |
| | | ) |
| | | |
| | | kmlEntities.value = entities.value |
| | | if (!mouseRightClickEvent) { |
| | | // 添加右键事件 |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // const createPointOrPolyline = () => {} |
| | | |
| | | // 创建广告牌 |
| | | const createBillboard = (title: string | number, color: string) => { |
| | |
| | | kmlEntities.value.forEach((entity: Cesium.Entity | any, i: number) => { |
| | | if (i === index) { |
| | | entity.billboard.image = createBillboard(index + 1, '#f3be4f') |
| | | const dashLineEntity: Cesium.Entity | any = getEntityById(`dashLine${i}`) |
| | | dashLineEntity.polyline.material = new Cesium.PolylineDashMaterialProperty({ |
| | | color: Cesium.Color.fromBytes(235, 192, 99), |
| | | }) |
| | | entity.label.show = true |
| | | } else { |
| | | entity.billboard.image = createBillboard(i + 1, '#61d396') |
| | | const dashLineEntity: Cesium.Entity | any = getEntityById(`dashLine${i}`) |
| | | dashLineEntity.polyline.material = new Cesium.PolylineDashMaterialProperty({ |
| | | color: Cesium.Color.WHITE, |
| | | }) |
| | | entity.label.show = false |
| | | } |
| | | }) |
| | |
| | | // 加入到解析的JSON对象中 |
| | | const setting = { |
| | | Point: { |
| | | coordinates: { '#text': `${longitude.toFixed(6)},${latitude.toFixed(6)}` }, |
| | | coordinates: { '#text': `${longitude},${latitude}` }, |
| | | }, |
| | | index: { '#text': points.length }, |
| | | height: { '#text': height }, |
| | | ellipsoidHeight: { '#text': height - posterHeight }, |
| | | isRisky: { '#text': 0 }, |
| | | height: { '#text': height }, |
| | | useGlobalHeadingParam: { '#text': 1 }, |
| | | useGlobalHeight: { '#text': 1 }, |
| | | useGlobalSpeed: { '#text': 1 }, |
| | |
| | | waypointTurnDampingDist: { '#text': 0.2 }, |
| | | waypointTurnMode: { '#text': 'toPointAndStopWithDiscontinuityCurvature' }, |
| | | }, |
| | | isRisky: { '#text': 0 }, |
| | | } |
| | | removeAllDataSource() |
| | | removeAllPoint() |
| | | if (className === 'finally-point') { |
| | | globalEntities.value.push(entity) |
| | | xmlTemplate.value.Folder.Placemark.push(setting) |
| | |
| | | xmlTemplate.value.Folder.Placemark.forEach((placemark: { index: { [x: string]: number } }, index: number) => { |
| | | placemark.index['#text'] = index |
| | | }) |
| | | |
| | | const xmlStr = kmzUtils.generateXML(xmlTemplate.value) |
| | | mapDraw.drawWayline(globalEntities.value, xmlStr) |
| | | }) |
| | |
| | | } |
| | | |
| | | .graph-right { |
| | | width: calc(100% - 40px); |
| | | width: 100%; |
| | | height: 30px; |
| | | border-bottom: 1px solid #4f4f4f; |
| | | display: flex; |