|
@@ -453,7 +453,7 @@ const onSuccess = (res) => {
|
|
|
const geom = [{ featureWkt: res.data.geom, ...res.data }];
|
|
|
authenticMap.setAreaGeometry(geom);
|
|
|
authenticMap.fit([res.data.geom]);
|
|
|
- updatePointList("upload");
|
|
|
+ updatePointList("upload",geom[0]);
|
|
|
heightArr.value = res.data.height;
|
|
|
const arr = pointList.value.map((item, index) => {
|
|
|
return [...item, res.data.height[index]];
|
|
@@ -611,14 +611,19 @@ const getDetailsData = (id) => {
|
|
|
};
|
|
|
|
|
|
// 添加经纬度列表
|
|
|
-const updatePointList = (type) => {
|
|
|
- const { geometryArr, area } = authenticMap.getAreaGeometry(type);
|
|
|
- const lastItem = geometryArr[geometryArr.length - 1];
|
|
|
+const updatePointList = (type, geom) => {
|
|
|
+ const { geometryArr, area } = authenticMap.getAreaGeometry(type);
|
|
|
+ let lastItem = null
|
|
|
+ if(type === 'upload'){
|
|
|
+ lastItem = geom
|
|
|
+ }else{
|
|
|
+ lastItem = geometryArr[geometryArr.length - 1];
|
|
|
+ }
|
|
|
formInline.geom = lastItem.featureWkt;
|
|
|
- let result = parseMultiPolygon(lastItem.featureWkt);
|
|
|
+ debugger
|
|
|
+ let result = parseMultiPolygon(lastItem.featureWkt);
|
|
|
result.pop();
|
|
|
pointList.value = result;
|
|
|
-
|
|
|
//判断是否是导入数据
|
|
|
if (store.state.authentic.isEditStatus) {
|
|
|
const arr = pointList.value.map((item, index) => {
|