|
|
|
@ -25,7 +25,11 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 航面航线 -->
|
|
|
|
|
<div v-if="props.airLineForm.airLineType == 'mapping2d'" v-show="props.editMode != 'detail'" class="airpolygon-container">
|
|
|
|
|
<div
|
|
|
|
|
v-if="props.airLineForm.airLineType == 'mapping2d'"
|
|
|
|
|
v-show="props.editMode != 'detail'"
|
|
|
|
|
class="airpolygon-container"
|
|
|
|
|
>
|
|
|
|
|
<airPolygon
|
|
|
|
|
:airInfo="airInfo"
|
|
|
|
|
:editModel="props.editMode"
|
|
|
|
@ -55,21 +59,21 @@
|
|
|
|
|
|
|
|
|
|
<!-- 航线预览信息 -->
|
|
|
|
|
<div class="airline-preview-container" v-if="props.editMode == 'detail'">
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="info-value">46461m²</div>
|
|
|
|
|
<div class="info-label">区域面积</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="info-value">46461m²</div>
|
|
|
|
|
<div class="info-label">航线长度</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="info-value">46461m²</div>
|
|
|
|
|
<div class="info-label">区域面积</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="info-value">46461m²</div>
|
|
|
|
|
<div class="info-label">航线长度</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="info-value">34分钟</div>
|
|
|
|
|
<div class="info-label">预计时间</div>
|
|
|
|
|
<div class="info-value">34分钟</div>
|
|
|
|
|
<div class="info-label">预计时间</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="info-value">78张</div>
|
|
|
|
|
<div class="info-label">照片数量</div>
|
|
|
|
|
<div class="info-value">78张</div>
|
|
|
|
|
<div class="info-label">照片数量</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div>
|
|
|
|
@ -82,7 +86,12 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 面绘制 -->
|
|
|
|
|
<div class="draw-polygon-patrol" title="绘制面区域" v-if="props.drawArea" @click="handlerDrawPolygonPatrol">
|
|
|
|
|
<div
|
|
|
|
|
class="draw-polygon-patrol"
|
|
|
|
|
title="绘制面区域"
|
|
|
|
|
v-if="props.drawArea"
|
|
|
|
|
@click="handlerDrawPolygonPatrol"
|
|
|
|
|
>
|
|
|
|
|
<EditOutlined />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -281,18 +290,17 @@
|
|
|
|
|
|
|
|
|
|
watch(
|
|
|
|
|
() => props.editMode,
|
|
|
|
|
(newVal,oldVal)=>{
|
|
|
|
|
if(newVal == 'edit' || newVal == 'detail'){
|
|
|
|
|
if(props.airLineForm.airLineType == 'waypoint'){
|
|
|
|
|
handlerEditWaypointAirLine();
|
|
|
|
|
}else if(props.airLineForm.airLineType == 'mapping2d'){
|
|
|
|
|
handlerEditPolygonAirLine();
|
|
|
|
|
(newVal, oldVal) => {
|
|
|
|
|
if (newVal == 'edit' || newVal == 'detail') {
|
|
|
|
|
if (props.airLineForm.airLineType == 'waypoint') {
|
|
|
|
|
handlerEditWaypointAirLine();
|
|
|
|
|
} else if (props.airLineForm.airLineType == 'mapping2d') {
|
|
|
|
|
handlerEditPolygonAirLine();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
watch(
|
|
|
|
|
() => props.polygonArea,
|
|
|
|
|
(newVal, oldVal) => {
|
|
|
|
@ -1036,35 +1044,37 @@
|
|
|
|
|
|
|
|
|
|
// 绘制面状测区
|
|
|
|
|
const handlerDrawPolygon = async () => {
|
|
|
|
|
const graphic = await polygonGraphicLayer.startDraw({
|
|
|
|
|
type: 'polygon',
|
|
|
|
|
style: {
|
|
|
|
|
color: '#408eff',
|
|
|
|
|
opacity: 0.3,
|
|
|
|
|
outline: true,
|
|
|
|
|
outlineColor: '#408eff',
|
|
|
|
|
outlineWidth: 3.0,
|
|
|
|
|
clampToGround: true,
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
let coordinates = graphic.toJSON().positions;
|
|
|
|
|
coordinates.push(coordinates[0]);
|
|
|
|
|
polygonGeoJson.value = coordinates;
|
|
|
|
|
let polygon = turf.polygon([coordinates]);
|
|
|
|
|
let polygonWkt = GeojsonToWkt(polygon['geometry']);
|
|
|
|
|
props.airLineForm.flyToFirstPointMode = polygonWkt;
|
|
|
|
|
// 航线间距
|
|
|
|
|
let spceing = parseFloat(polygonCalculateParams.value?.spacing) / 10000;
|
|
|
|
|
// 初始化角度
|
|
|
|
|
let direction = props.templateKmlConfig.Folder.Placemark.direction ? props.templateKmlConfig.Folder.Placemark.direction : 0;
|
|
|
|
|
// 计算航线
|
|
|
|
|
let lines = generateScanLines(polygon, spceing, direction);
|
|
|
|
|
// 计算测区面积、航线长度
|
|
|
|
|
CalculateAreaInfo(polygon, lines);
|
|
|
|
|
// 绘制面航线
|
|
|
|
|
handlerDrawPolygonLine(lines);
|
|
|
|
|
// 计算边长等信息
|
|
|
|
|
handlerGetPolygonBorderInfo(polygonGeoJson.value);
|
|
|
|
|
const graphic = await polygonGraphicLayer.startDraw({
|
|
|
|
|
type: 'polygon',
|
|
|
|
|
style: {
|
|
|
|
|
color: '#408eff',
|
|
|
|
|
opacity: 0.3,
|
|
|
|
|
outline: true,
|
|
|
|
|
outlineColor: '#408eff',
|
|
|
|
|
outlineWidth: 3.0,
|
|
|
|
|
clampToGround: true,
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
let coordinates = graphic.toJSON().positions;
|
|
|
|
|
coordinates.push(coordinates[0]);
|
|
|
|
|
polygonGeoJson.value = coordinates;
|
|
|
|
|
let polygon = turf.polygon([coordinates]);
|
|
|
|
|
let polygonWkt = GeojsonToWkt(polygon['geometry']);
|
|
|
|
|
props.airLineForm.flyToFirstPointMode = polygonWkt;
|
|
|
|
|
// 航线间距
|
|
|
|
|
let spceing = parseFloat(polygonCalculateParams.value?.spacing) / 10000;
|
|
|
|
|
// 初始化角度
|
|
|
|
|
let direction = props.templateKmlConfig.Folder.Placemark.direction
|
|
|
|
|
? props.templateKmlConfig.Folder.Placemark.direction
|
|
|
|
|
: 0;
|
|
|
|
|
// 计算航线
|
|
|
|
|
let lines = generateScanLines(polygon, spceing, direction);
|
|
|
|
|
// 计算测区面积、航线长度
|
|
|
|
|
CalculateAreaInfo(polygon, lines);
|
|
|
|
|
// 绘制面航线
|
|
|
|
|
handlerDrawPolygonLine(lines);
|
|
|
|
|
// 计算边长等信息
|
|
|
|
|
handlerGetPolygonBorderInfo(polygonGeoJson.value);
|
|
|
|
|
};
|
|
|
|
|
// 绘制监测区域
|
|
|
|
|
const handlerDrawPolygonPatrol = async () => {
|
|
|
|
@ -1467,43 +1477,40 @@
|
|
|
|
|
textLabelGraphicLayer.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 绘制文本标注
|
|
|
|
|
const handlerLoadtextLabelGraphicLayer = (info) => {
|
|
|
|
|
if (textLabelGraphicLayer == null) {
|
|
|
|
|
textLabelGraphicLayer = new mars3d.layer.GraphicLayer({
|
|
|
|
|
isAutoEditing: false,
|
|
|
|
|
});
|
|
|
|
|
map.addLayer(textLabelGraphicLayer);
|
|
|
|
|
} else {
|
|
|
|
|
textLabelGraphicLayer.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 绘制文本标注
|
|
|
|
|
const handlerLoadtextLabelGraphicLayer = (info) => {
|
|
|
|
|
|
|
|
|
|
if(textLabelGraphicLayer == null){
|
|
|
|
|
textLabelGraphicLayer = new mars3d.layer.GraphicLayer({
|
|
|
|
|
isAutoEditing:false
|
|
|
|
|
})
|
|
|
|
|
map.addLayer(textLabelGraphicLayer);
|
|
|
|
|
}else{
|
|
|
|
|
textLabelGraphicLayer.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
info?.forEach((item,index)=>{
|
|
|
|
|
const graphic = new mars3d.graphic.LabelEntity({
|
|
|
|
|
position: [item.center[0], item.center[1], 0],
|
|
|
|
|
style: {
|
|
|
|
|
text: item.length+"m",
|
|
|
|
|
font_size: 15,
|
|
|
|
|
scale: 1,
|
|
|
|
|
font_family: "微软雅黑",
|
|
|
|
|
color: "#ffffff",
|
|
|
|
|
outline: true,
|
|
|
|
|
outlineColor: "#000000",
|
|
|
|
|
outlineWidth: 2,
|
|
|
|
|
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
|
|
|
|
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
|
|
|
|
visibleDepth: false,
|
|
|
|
|
clampToGround:true,
|
|
|
|
|
},
|
|
|
|
|
attr: { remark: "示例1" }
|
|
|
|
|
})
|
|
|
|
|
textLabelGraphicLayer.addGraphic(graphic)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
info?.forEach((item, index) => {
|
|
|
|
|
const graphic = new mars3d.graphic.LabelEntity({
|
|
|
|
|
position: [item.center[0], item.center[1], 0],
|
|
|
|
|
style: {
|
|
|
|
|
text: item.length + 'm',
|
|
|
|
|
font_size: 15,
|
|
|
|
|
scale: 1,
|
|
|
|
|
font_family: '微软雅黑',
|
|
|
|
|
color: '#ffffff',
|
|
|
|
|
outline: true,
|
|
|
|
|
outlineColor: '#000000',
|
|
|
|
|
outlineWidth: 2,
|
|
|
|
|
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
|
|
|
|
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
|
|
|
|
visibleDepth: false,
|
|
|
|
|
clampToGround: true,
|
|
|
|
|
},
|
|
|
|
|
attr: { remark: '示例1' },
|
|
|
|
|
});
|
|
|
|
|
textLabelGraphicLayer.addGraphic(graphic);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 编辑回显面状航线
|
|
|
|
|
// 编辑回显航线
|
|
|
|
@ -2841,9 +2848,9 @@
|
|
|
|
|
const rectSensor = graphicLayer.getGraphicById('uav-route-rectSensor');
|
|
|
|
|
rectSensor.heading = type_subtype_gimbalindex.gimbal_yaw; //四周方向角,0至360度角度值
|
|
|
|
|
rectSensor.pitch = type_subtype_gimbalindex.gimbal_pitch; //俯仰角,上下摇摆的角度,0至360度角度值
|
|
|
|
|
rectSensor.roll = type_subtype_gimbalindex.gimbal_roll + 90; //滚转角,左右摆动的角度,0至360度角度值
|
|
|
|
|
rectSensor.angle1 = 10; //夹角1,半场角度,取值范围 0.1-89.9
|
|
|
|
|
rectSensor.angle2 = 10; //夹角2,半场角度,取值范围 0.1-89.9
|
|
|
|
|
rectSensor.roll = type_subtype_gimbalindex.gimbal_roll; //滚转角,左右摆动的角度,0至360度角度值 + 90
|
|
|
|
|
rectSensor.angle1 = type_subtype_gimbalindex.zoom_factor + 10; //夹角1,半场角度,取值范围 0.1-89.9
|
|
|
|
|
rectSensor.angle2 = type_subtype_gimbalindex.zoom_factor + 10; //夹角2,半场角度,取值范围 0.1-89.9
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
@ -2906,7 +2913,7 @@
|
|
|
|
|
style: {
|
|
|
|
|
angle1: 10,
|
|
|
|
|
angle2: 10,
|
|
|
|
|
length: 10,
|
|
|
|
|
length: 100,
|
|
|
|
|
rayEllipsoid: true,
|
|
|
|
|
color: 'rgba(0,255,255,0.3)',
|
|
|
|
|
outline: true,
|
|
|
|
@ -3012,27 +3019,27 @@
|
|
|
|
|
z-index: 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.airline-preview-container{
|
|
|
|
|
width:500px;
|
|
|
|
|
background:rgba(0,0,0,0.6);
|
|
|
|
|
.airline-preview-container {
|
|
|
|
|
width: 500px;
|
|
|
|
|
background: rgba(0, 0, 0, 0.6);
|
|
|
|
|
position: absolute;
|
|
|
|
|
bottom:100px;
|
|
|
|
|
left:50%;
|
|
|
|
|
transform: translate(0%,0);
|
|
|
|
|
z-index:999;
|
|
|
|
|
bottom: 100px;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translate(0%, 0);
|
|
|
|
|
z-index: 999;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
display: flex;
|
|
|
|
|
padding:20px;
|
|
|
|
|
font-size:18px;
|
|
|
|
|
color:#fff;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
.airline-preview-container .info-item{
|
|
|
|
|
flex:1;
|
|
|
|
|
.airline-preview-container .info-item {
|
|
|
|
|
flex: 1;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.airline-preview-container .info-item .info-label{
|
|
|
|
|
font-size:14px;
|
|
|
|
|
margin-top:12px;
|
|
|
|
|
.airline-preview-container .info-item .info-label {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
margin-top: 12px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|