| | |
| | | |
| | | // 获取推荐设备列表 |
| | | async function getDeviceList() { |
| | | const all = ['11'].includes(gdStatus.value) |
| | | try { |
| | | const str = [...pointList.value, pointList.value[0]].map(item => `${item.longitude} ${item.latitude}`).join(',') |
| | | let geom = `POLYGON((${str}))` |
| | | const res = await gdManageDeviceListApi({ |
| | | deviceIds: formData.value.recommendDeviceIds, |
| | | deviceIds: all ? '' : formData.value.recommendDeviceIds, |
| | | devicePayload: dialogMode.value === 'add' ? formData.value.deviceLoadDemand : '', |
| | | geom: dialogMode.value === 'add' ? geom : '', |
| | | }) |
| | |
| | | position: position, |
| | | billboard: { |
| | | image: droneIcon, |
| | | width: 40, |
| | | height: 40, |
| | | width: 20, |
| | | height: 20, |
| | | verticalOrigin: Cesium.VerticalOrigin.CENTER, |
| | | }, |
| | | label: { |
| | | text: item.nickname, |
| | | font: '12px/1.5 Microsoft YaHei', |
| | | style: Cesium.LabelStyle.FILL_AND_OUTLINE, |
| | | outlineWidth: 2, |
| | | outlineColor: Cesium.Color.WHITE, |
| | | horizontalOrigin: Cesium.HorizontalOrigin.CENTER, |
| | | verticalOrigin: Cesium.VerticalOrigin.BOTTOM, |
| | | pixelOffset: new Cesium.Cartesian2(0, -10) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | |
| | | hasPatrolTaskList.value && gdPatrolTaskPage() |
| | | dialogMode.value === 'edit' ? editPolygon() : viewPolygon() |
| | | } |
| | | // setMapDevice() |
| | | setMapDevice() |
| | | await nextTick() |
| | | await getDeviceList() |
| | | syncSelection() |
| | | getDeviceList() |
| | | } |
| | | |
| | | // 初始化地图实例 |