|
@@ -595,22 +595,11 @@ const getDetailsData = (id) => {
|
|
};
|
|
};
|
|
|
|
|
|
// 添加经纬度列表
|
|
// 添加经纬度列表
|
|
-const updatePointList = () => {
|
|
|
|
- let geometryArrCopy, areaCopy
|
|
|
|
- if(mapData.isEditArea){
|
|
|
|
- //编辑修改时查所有地块点位
|
|
|
|
- const { geometryArr, area } = authenticMap.getAreaGeometry();
|
|
|
|
- geometryArrCopy = geometryArr
|
|
|
|
- areaCopy = area
|
|
|
|
- }else{
|
|
|
|
- //新建查询当前点位的地块数据
|
|
|
|
- const { geometryArr, area } = authenticMap.getSinglePoint();
|
|
|
|
- geometryArrCopy = geometryArr
|
|
|
|
- areaCopy = area
|
|
|
|
- }
|
|
|
|
- const lastItem = geometryArrCopy[geometryArrCopy.length - 1];
|
|
|
|
|
|
+const updatePointList = (type) => {
|
|
|
|
+ const { geometryArr, area } = authenticMap.getAreaGeometry(type);
|
|
|
|
+ const lastItem = geometryArr[geometryArr.length - 1];
|
|
formInline.geom = lastItem.featureWkt;
|
|
formInline.geom = lastItem.featureWkt;
|
|
- formInline.mu = areaCopy + "亩";
|
|
|
|
|
|
+ formInline.mu = area + "亩";
|
|
let result = parseMultiPolygon(lastItem.featureWkt);
|
|
let result = parseMultiPolygon(lastItem.featureWkt);
|
|
result.pop();
|
|
result.pop();
|
|
pointList.value = result;
|
|
pointList.value = result;
|
|
@@ -619,7 +608,7 @@ const updatePointList = () => {
|
|
watchEffect(() => {
|
|
watchEffect(() => {
|
|
if (mapData.isEditArea) {
|
|
if (mapData.isEditArea) {
|
|
isUpdata.value = false;
|
|
isUpdata.value = false;
|
|
- updatePointList();
|
|
|
|
|
|
+ updatePointList('edit');
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
@@ -633,7 +622,7 @@ watch(
|
|
isUpdata.value = true;
|
|
isUpdata.value = true;
|
|
// isRefresh.value = false;
|
|
// isRefresh.value = false;
|
|
formInline.createDate = dateFormat(new Date(), "YYYY-mm-dd HH:MM:SS");
|
|
formInline.createDate = dateFormat(new Date(), "YYYY-mm-dd HH:MM:SS");
|
|
- updatePointList();
|
|
|
|
|
|
+ updatePointList('add');
|
|
authenticMap.startModify();
|
|
authenticMap.startModify();
|
|
}
|
|
}
|
|
}
|
|
}
|