|
|
|
@ -5,7 +5,7 @@
|
|
|
|
|
<div class="annotationButtons">
|
|
|
|
|
<div
|
|
|
|
|
:class="mapDrawType == 'drawPoint' ? 'button_choose' : 'button_nochoose'"
|
|
|
|
|
@click="drawPoint"
|
|
|
|
|
@click="fun_chooseWorkSpaceType('drawPoint')"
|
|
|
|
|
>
|
|
|
|
|
<a-popover placement="left">
|
|
|
|
|
<template #content>
|
|
|
|
@ -31,7 +31,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
:class="mapDrawType == 'drawPolyline' ? 'button_choose' : 'button_nochoose'"
|
|
|
|
|
@click="drawPolyline"
|
|
|
|
|
@click="fun_chooseWorkSpaceType('drawPolyline')"
|
|
|
|
|
>
|
|
|
|
|
<a-popover placement="left">
|
|
|
|
|
<template #content>
|
|
|
|
@ -57,7 +57,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
:class="mapDrawType == 'drawPolygon' ? 'button_choose' : 'button_nochoose'"
|
|
|
|
|
@click="drawPolygon"
|
|
|
|
|
@click="fun_chooseWorkSpaceType('drawPolygon')"
|
|
|
|
|
>
|
|
|
|
|
<a-popover placement="left">
|
|
|
|
|
<template #content>
|
|
|
|
@ -83,7 +83,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
:class="mapDrawType == 'drawCricle' ? 'button_choose' : 'button_nochoose'"
|
|
|
|
|
@click="drawCricle"
|
|
|
|
|
@click="fun_chooseWorkSpaceType('drawCricle')"
|
|
|
|
|
>
|
|
|
|
|
<a-popover placement="left">
|
|
|
|
|
<template #content>
|
|
|
|
@ -108,6 +108,36 @@
|
|
|
|
|
</a-popover>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 标签弹窗 -->
|
|
|
|
|
<a-modal
|
|
|
|
|
title="选择项目"
|
|
|
|
|
:open="chooseWorkSpaceOpen"
|
|
|
|
|
:mask="false"
|
|
|
|
|
:maskClosable="false"
|
|
|
|
|
:closable="false"
|
|
|
|
|
@ok="fun_workSpaceOk"
|
|
|
|
|
@cancel="fun_workSpaceCancel"
|
|
|
|
|
>
|
|
|
|
|
<div style="margin: 10px 30px">
|
|
|
|
|
<a-radio-group v-model:value="chooseWorkSpaceId">
|
|
|
|
|
<a-radio
|
|
|
|
|
v-for="workspace in props.allWorkspaceDataList"
|
|
|
|
|
style="
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
height: 30px;
|
|
|
|
|
lineheight: 30px;
|
|
|
|
|
"
|
|
|
|
|
:key="workspace.Id"
|
|
|
|
|
:value="workspace.Id"
|
|
|
|
|
>
|
|
|
|
|
{{ workspace.WorkspaceName }}
|
|
|
|
|
</a-radio>
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<!-- </div> -->
|
|
|
|
|
<!-- </div> -->
|
|
|
|
|
</div>
|
|
|
|
@ -135,10 +165,16 @@
|
|
|
|
|
closeIcon,
|
|
|
|
|
} from './svg';
|
|
|
|
|
import * as turf from '@turf/turf';
|
|
|
|
|
import { GeojsonToWkt } from '@/components/MapboxMaps/src/WktGeojsonTransform';
|
|
|
|
|
import { WktToGeojson, GeojsonToWkt } from '@/components/MapboxMaps/src/WktGeojsonTransform';
|
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
|
import { useMessage } from '@/hooks/web/useMessage';
|
|
|
|
|
const { createMessage } = useMessage();
|
|
|
|
|
|
|
|
|
|
const props = defineProps(['allAnnotationDataList', 'nowShowAnnotationData']);
|
|
|
|
|
const props = defineProps([
|
|
|
|
|
'allAnnotationDataList',
|
|
|
|
|
'allWorkspaceDataList',
|
|
|
|
|
'nowShowAnnotationData',
|
|
|
|
|
]);
|
|
|
|
|
const emits = defineEmits(['setNowShowAnnotationData', 'setAllAnnotationData']);
|
|
|
|
|
|
|
|
|
|
const vChartRef: any = ref<HTMLElement>();
|
|
|
|
@ -478,7 +514,6 @@
|
|
|
|
|
parseFloat(props.nowShowAnnotationData.coordinates[2]),
|
|
|
|
|
];
|
|
|
|
|
graphicLayer.setStyle({
|
|
|
|
|
// 图标(待修改)
|
|
|
|
|
image: dataURL2,
|
|
|
|
|
iconname: props.nowShowAnnotationData.properties.iconname,
|
|
|
|
|
label: {
|
|
|
|
@ -690,6 +725,24 @@
|
|
|
|
|
});
|
|
|
|
|
emits('setNowShowAnnotationData', item);
|
|
|
|
|
});
|
|
|
|
|
// 监听点编辑移动事件
|
|
|
|
|
pointGraphic.on(mars3d.EventType.editMovePoint, (event) => {
|
|
|
|
|
let point = event.target.point;
|
|
|
|
|
let coordinates = [point.lng, point.lat, point.alt];
|
|
|
|
|
let geom = GeojsonToWkt(turf.point(coordinates).geometry);
|
|
|
|
|
let properties = {
|
|
|
|
|
...item.properties,
|
|
|
|
|
centerPoint: coordinates,
|
|
|
|
|
};
|
|
|
|
|
let params = {
|
|
|
|
|
...item,
|
|
|
|
|
properties: JSON.stringify(properties),
|
|
|
|
|
geom: geom,
|
|
|
|
|
};
|
|
|
|
|
UpdateAnnotation(params).then((result) => {
|
|
|
|
|
emits('setAllAnnotationData');
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
// 将点对象 添加到图层中
|
|
|
|
|
graphicLayers.addGraphic(pointGraphic);
|
|
|
|
|
// 数据
|
|
|
|
@ -752,6 +805,66 @@
|
|
|
|
|
});
|
|
|
|
|
emits('setNowShowAnnotationData', item);
|
|
|
|
|
});
|
|
|
|
|
// 监听点编辑移动事件
|
|
|
|
|
lineGraphic.on(mars3d.EventType.editMovePoint, (event) => {
|
|
|
|
|
let positions = event.target._positions_draw;
|
|
|
|
|
let coordinates = positions.map((position) => {
|
|
|
|
|
const cartographic = Cesium.Cartographic.fromCartesian(position);
|
|
|
|
|
const lng = Cesium.Math.toDegrees(cartographic.longitude);
|
|
|
|
|
const lat = Cesium.Math.toDegrees(cartographic.latitude);
|
|
|
|
|
const height = cartographic.height;
|
|
|
|
|
return [lng, lat, height];
|
|
|
|
|
});
|
|
|
|
|
let geom = GeojsonToWkt(turf.lineString(coordinates).geometry);
|
|
|
|
|
let properties = {
|
|
|
|
|
...item.properties,
|
|
|
|
|
centerPoint: coordinates[0],
|
|
|
|
|
};
|
|
|
|
|
let params = {
|
|
|
|
|
...item,
|
|
|
|
|
properties: JSON.stringify(properties),
|
|
|
|
|
geom: geom,
|
|
|
|
|
};
|
|
|
|
|
UpdateAnnotation(params).then((result) => {
|
|
|
|
|
emits('setAllAnnotationData');
|
|
|
|
|
emits('setNowShowAnnotationData', {
|
|
|
|
|
...item,
|
|
|
|
|
properties: properties,
|
|
|
|
|
geom: geom,
|
|
|
|
|
coordinates: coordinates,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
// 监听点删除事件
|
|
|
|
|
lineGraphic.on(mars3d.EventType.editRemovePoint, (event) => {
|
|
|
|
|
let positions = event.target._positions_draw;
|
|
|
|
|
let coordinates = positions.map((position) => {
|
|
|
|
|
const cartographic = Cesium.Cartographic.fromCartesian(position);
|
|
|
|
|
const lng = Cesium.Math.toDegrees(cartographic.longitude);
|
|
|
|
|
const lat = Cesium.Math.toDegrees(cartographic.latitude);
|
|
|
|
|
const height = cartographic.height;
|
|
|
|
|
return [lng, lat, height];
|
|
|
|
|
});
|
|
|
|
|
let geom = GeojsonToWkt(turf.lineString(coordinates).geometry);
|
|
|
|
|
let properties = {
|
|
|
|
|
...item.properties,
|
|
|
|
|
centerPoint: coordinates[0],
|
|
|
|
|
};
|
|
|
|
|
let params = {
|
|
|
|
|
...item,
|
|
|
|
|
properties: JSON.stringify(properties),
|
|
|
|
|
geom: geom,
|
|
|
|
|
};
|
|
|
|
|
UpdateAnnotation(params).then((result) => {
|
|
|
|
|
emits('setAllAnnotationData');
|
|
|
|
|
emits('setNowShowAnnotationData', {
|
|
|
|
|
...item,
|
|
|
|
|
properties: properties,
|
|
|
|
|
geom: geom,
|
|
|
|
|
coordinates: coordinates,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
// 将线对象 添加到图层中
|
|
|
|
|
graphicLayers.addGraphic(lineGraphic);
|
|
|
|
|
// 数据
|
|
|
|
@ -817,6 +930,70 @@
|
|
|
|
|
});
|
|
|
|
|
emits('setNowShowAnnotationData', item);
|
|
|
|
|
});
|
|
|
|
|
// 监听点编辑移动事件
|
|
|
|
|
polygonGraphic.on(mars3d.EventType.editMovePoint, (event) => {
|
|
|
|
|
let positions = event.target._positions_draw;
|
|
|
|
|
let coordinates = positions.map((position) => {
|
|
|
|
|
const cartographic = Cesium.Cartographic.fromCartesian(position);
|
|
|
|
|
const lng = Cesium.Math.toDegrees(cartographic.longitude);
|
|
|
|
|
const lat = Cesium.Math.toDegrees(cartographic.latitude);
|
|
|
|
|
const height = cartographic.height;
|
|
|
|
|
return [lng, lat, height];
|
|
|
|
|
});
|
|
|
|
|
let polygonData: any = [];
|
|
|
|
|
polygonData.push(coordinates);
|
|
|
|
|
let geom = GeojsonToWkt(turf.polygon(polygonData).geometry);
|
|
|
|
|
let properties = {
|
|
|
|
|
...item.properties,
|
|
|
|
|
centerPoint: coordinates[0],
|
|
|
|
|
};
|
|
|
|
|
let params = {
|
|
|
|
|
...item,
|
|
|
|
|
properties: JSON.stringify(properties),
|
|
|
|
|
geom: geom,
|
|
|
|
|
};
|
|
|
|
|
UpdateAnnotation(params).then((result) => {
|
|
|
|
|
emits('setAllAnnotationData');
|
|
|
|
|
emits('setNowShowAnnotationData', {
|
|
|
|
|
...item,
|
|
|
|
|
properties: properties,
|
|
|
|
|
geom: geom,
|
|
|
|
|
coordinates: polygonData,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
// 监听点删除事件
|
|
|
|
|
polygonGraphic.on(mars3d.EventType.editRemovePoint, (event) => {
|
|
|
|
|
let positions = event.target._positions_draw;
|
|
|
|
|
let coordinates = positions.map((position) => {
|
|
|
|
|
const cartographic = Cesium.Cartographic.fromCartesian(position);
|
|
|
|
|
const lng = Cesium.Math.toDegrees(cartographic.longitude);
|
|
|
|
|
const lat = Cesium.Math.toDegrees(cartographic.latitude);
|
|
|
|
|
const height = cartographic.height;
|
|
|
|
|
return [lng, lat, height];
|
|
|
|
|
});
|
|
|
|
|
let polygonData: any = [];
|
|
|
|
|
polygonData.push(coordinates);
|
|
|
|
|
let geom = GeojsonToWkt(turf.polygon(polygonData).geometry);
|
|
|
|
|
let properties = {
|
|
|
|
|
...item.properties,
|
|
|
|
|
centerPoint: coordinates[0],
|
|
|
|
|
};
|
|
|
|
|
let params = {
|
|
|
|
|
...item,
|
|
|
|
|
properties: JSON.stringify(properties),
|
|
|
|
|
geom: geom,
|
|
|
|
|
};
|
|
|
|
|
UpdateAnnotation(params).then((result) => {
|
|
|
|
|
emits('setAllAnnotationData');
|
|
|
|
|
emits('setNowShowAnnotationData', {
|
|
|
|
|
...item,
|
|
|
|
|
properties: properties,
|
|
|
|
|
geom: geom,
|
|
|
|
|
coordinates: polygonData,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
// 将形状对象 添加到图层中
|
|
|
|
|
graphicLayers.addGraphic(polygonGraphic);
|
|
|
|
|
// 数据
|
|
|
|
@ -880,6 +1057,30 @@
|
|
|
|
|
});
|
|
|
|
|
emits('setNowShowAnnotationData', item);
|
|
|
|
|
});
|
|
|
|
|
// 监听点编辑移动事件
|
|
|
|
|
circleGraphic.on(mars3d.EventType.editMovePoint, (event) => {
|
|
|
|
|
let coordinates = event.graphic.options.position;
|
|
|
|
|
let radius = event.graphic.options.style.radius;
|
|
|
|
|
let geom = GeojsonToWkt(turf.point(coordinates).geometry);
|
|
|
|
|
let properties = {
|
|
|
|
|
...item.properties,
|
|
|
|
|
centerPoint: coordinates,
|
|
|
|
|
radius: radius,
|
|
|
|
|
};
|
|
|
|
|
let params = {
|
|
|
|
|
...item,
|
|
|
|
|
properties: JSON.stringify(properties),
|
|
|
|
|
geom: geom,
|
|
|
|
|
};
|
|
|
|
|
UpdateAnnotation(params).then((result) => {
|
|
|
|
|
emits('setAllAnnotationData');
|
|
|
|
|
emits('setNowShowAnnotationData', {
|
|
|
|
|
...item,
|
|
|
|
|
properties: properties,
|
|
|
|
|
geom: geom,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
// 将圆对象 添加到图层中
|
|
|
|
|
graphicLayers.addGraphic(circleGraphic);
|
|
|
|
|
// 数据
|
|
|
|
@ -938,13 +1139,50 @@
|
|
|
|
|
const drawColorPolygon = ref('#2D8CF0');
|
|
|
|
|
const drawColorCricle = ref('#2D8CF0');
|
|
|
|
|
|
|
|
|
|
// 地图标注-绘制-点
|
|
|
|
|
async function drawPoint() {
|
|
|
|
|
if (mapDrawType.value == 'drawPoint') {
|
|
|
|
|
mapDrawType.value = '';
|
|
|
|
|
// 项目弹窗
|
|
|
|
|
const chooseWorkSpaceOpen = ref(false);
|
|
|
|
|
const chooseWorkSpaceId = ref('');
|
|
|
|
|
|
|
|
|
|
// 选择项目
|
|
|
|
|
function fun_chooseWorkSpaceType(type) {
|
|
|
|
|
chooseWorkSpaceOpen.value = true;
|
|
|
|
|
mapDrawType.value = type;
|
|
|
|
|
}
|
|
|
|
|
// 确认-选择绘制类型
|
|
|
|
|
function fun_workSpaceOk() {
|
|
|
|
|
if (chooseWorkSpaceId.value == '') {
|
|
|
|
|
createMessage.warning('先选择要标注的项目!');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
mapDrawType.value = 'drawPoint';
|
|
|
|
|
chooseWorkSpaceOpen.value = false;
|
|
|
|
|
switch (mapDrawType.value) {
|
|
|
|
|
// 地图标注-绘制-点
|
|
|
|
|
case 'drawPoint':
|
|
|
|
|
drawPoint();
|
|
|
|
|
break;
|
|
|
|
|
// 地图标注-绘制-线
|
|
|
|
|
case 'drawPolyline':
|
|
|
|
|
drawPolyline();
|
|
|
|
|
break;
|
|
|
|
|
// 地图标注-绘制-形状
|
|
|
|
|
case 'drawPolygon':
|
|
|
|
|
drawPolygon();
|
|
|
|
|
break;
|
|
|
|
|
// 地图标注-绘制-圆
|
|
|
|
|
case 'drawCricle':
|
|
|
|
|
drawCricle();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 取消
|
|
|
|
|
function fun_workSpaceCancel() {
|
|
|
|
|
chooseWorkSpaceOpen.value = false;
|
|
|
|
|
mapDrawType.value = '';
|
|
|
|
|
chooseWorkSpaceId.value == '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 地图标注-绘制-点
|
|
|
|
|
async function drawPoint() {
|
|
|
|
|
let time = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
|
|
|
|
const image = new Image();
|
|
|
|
|
image.crossOrigin = 'Anonymous';
|
|
|
|
@ -987,11 +1225,6 @@
|
|
|
|
|
}
|
|
|
|
|
// 地图标注-绘制-线
|
|
|
|
|
async function drawPolyline() {
|
|
|
|
|
if (mapDrawType.value == 'drawPolyline') {
|
|
|
|
|
mapDrawType.value = '';
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
mapDrawType.value = 'drawPolyline';
|
|
|
|
|
let time = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
|
|
|
|
const graphic = await graphicLayers.startDraw({
|
|
|
|
|
type: 'polyline',
|
|
|
|
@ -1018,11 +1251,6 @@
|
|
|
|
|
}
|
|
|
|
|
// 地图标注-绘制-形状
|
|
|
|
|
async function drawPolygon() {
|
|
|
|
|
if (mapDrawType.value == 'drawPolygon') {
|
|
|
|
|
mapDrawType.value = '';
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
mapDrawType.value = 'drawPolygon';
|
|
|
|
|
let time = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
|
|
|
|
const graphic = await graphicLayers.startDraw({
|
|
|
|
|
type: 'polygon',
|
|
|
|
@ -1047,11 +1275,6 @@
|
|
|
|
|
}
|
|
|
|
|
// 地图标注-绘制-圆
|
|
|
|
|
async function drawCricle() {
|
|
|
|
|
if (mapDrawType.value == 'drawCricle') {
|
|
|
|
|
mapDrawType.value = '';
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
mapDrawType.value = 'drawCricle';
|
|
|
|
|
let time = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
|
|
|
|
const graphic = await graphicLayers.startDraw({
|
|
|
|
|
type: 'circle',
|
|
|
|
@ -1091,8 +1314,7 @@
|
|
|
|
|
geom = GeojsonToWkt(turf.point(coordinates).geometry);
|
|
|
|
|
properties = {
|
|
|
|
|
iconname: addOrUpdate == 'add' ? 'defaultIcon' : graphicJson.style.iconname,
|
|
|
|
|
font_size: 16,
|
|
|
|
|
iconnum: 0,
|
|
|
|
|
font_size: addOrUpdate == 'add' ? 16 : graphicJson.style.label.font_size,
|
|
|
|
|
clampToGround: false,
|
|
|
|
|
color: addOrUpdate == 'add' ? drawColorPoint.value : graphicJson.style.label.color,
|
|
|
|
|
centerPoint: coordinates,
|
|
|
|
@ -1102,10 +1324,10 @@
|
|
|
|
|
type = 1;
|
|
|
|
|
geom = GeojsonToWkt(turf.lineString(coordinates).geometry);
|
|
|
|
|
properties = {
|
|
|
|
|
font_size: 16,
|
|
|
|
|
font_size: addOrUpdate == 'add' ? 16 : graphicJson.style.label.font_size,
|
|
|
|
|
line_width: 5,
|
|
|
|
|
clampToGround: false,
|
|
|
|
|
color: drawColorPolyline.value,
|
|
|
|
|
color: addOrUpdate == 'add' ? drawColorPolyline.value : graphicJson.style.label.color,
|
|
|
|
|
centerPoint: coordinates[0],
|
|
|
|
|
line_start_cap: 0,
|
|
|
|
|
line_end_cap: 0,
|
|
|
|
@ -1113,27 +1335,27 @@
|
|
|
|
|
break;
|
|
|
|
|
case 'polygon':
|
|
|
|
|
type = 2;
|
|
|
|
|
coordinates.push(coordinates[0]);
|
|
|
|
|
if (addOrUpdate == 'add') {
|
|
|
|
|
coordinates.push(coordinates[0]);
|
|
|
|
|
polygonData.push(coordinates);
|
|
|
|
|
} else {
|
|
|
|
|
polygonData = coordinates;
|
|
|
|
|
polygonData.push(coordinates);
|
|
|
|
|
}
|
|
|
|
|
geom = GeojsonToWkt(turf.polygon(polygonData).geometry);
|
|
|
|
|
properties = {
|
|
|
|
|
font_size: 16,
|
|
|
|
|
font_size: addOrUpdate == 'add' ? 16 : graphicJson.style.label.font_size,
|
|
|
|
|
clampToGround: false,
|
|
|
|
|
color: drawColorPolygon.value,
|
|
|
|
|
color: addOrUpdate == 'add' ? drawColorPolygon.value : graphicJson.style.label.color,
|
|
|
|
|
centerPoint: coordinates[0],
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
case 'circle':
|
|
|
|
|
type = 3;
|
|
|
|
|
geom = GeojsonToWkt(turf.circle(coordinates, graphicJson.style.radius).geometry);
|
|
|
|
|
geom = GeojsonToWkt(turf.point(coordinates).geometry);
|
|
|
|
|
properties = {
|
|
|
|
|
font_size: 16,
|
|
|
|
|
font_size: addOrUpdate == 'add' ? 16 : graphicJson.style.label.font_size,
|
|
|
|
|
clampToGround: true,
|
|
|
|
|
color: drawColorCricle.value,
|
|
|
|
|
color: addOrUpdate == 'add' ? drawColorCricle.value : graphicJson.style.label.color,
|
|
|
|
|
radius: graphicJson.style.radius,
|
|
|
|
|
centerPoint: coordinates,
|
|
|
|
|
};
|
|
|
|
@ -1146,29 +1368,26 @@
|
|
|
|
|
properties: JSON.stringify(properties),
|
|
|
|
|
createTime: time,
|
|
|
|
|
createUser: '',
|
|
|
|
|
createUserName: '',
|
|
|
|
|
geom: geom,
|
|
|
|
|
workSpaceId: '1',
|
|
|
|
|
workSpaceId: chooseWorkSpaceId.value,
|
|
|
|
|
state: 0,
|
|
|
|
|
createUserName: '',
|
|
|
|
|
};
|
|
|
|
|
AddAnnotation(params).then((result) => {
|
|
|
|
|
// 刷新区域信息
|
|
|
|
|
emits('setAllAnnotationData');
|
|
|
|
|
mapDrawType.value = '';
|
|
|
|
|
chooseWorkSpaceId.value = '';
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
params = {
|
|
|
|
|
id: graphicJson.id,
|
|
|
|
|
name: graphicJson.style.label.text,
|
|
|
|
|
type: type,
|
|
|
|
|
...props.nowShowAnnotationData,
|
|
|
|
|
properties: JSON.stringify(properties),
|
|
|
|
|
geom: geom,
|
|
|
|
|
workSpaceId: '1',
|
|
|
|
|
state: props.nowShowAnnotationData.state,
|
|
|
|
|
};
|
|
|
|
|
UpdateAnnotation(params).then((result) => {
|
|
|
|
|
// 刷新区域信息
|
|
|
|
|
// emits('setAllAreaData');
|
|
|
|
|
// emits('setAllAnnotationData');
|
|
|
|
|
// mapAreaDrawFlag.value = false;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|