From 0a180ab16f89c522fd55aa68d84ac83cb8dcd8fa Mon Sep 17 00:00:00 2001
From: Zhufu <1176354795@qq.com>
Date: Tue, 8 Oct 2024 14:43:11 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E8=BF=9D=E6=B3=95=E7=94=A8=E5=9C=B0=20?=
=?UTF-8?q?=E8=AF=A6=E6=83=85=20=E5=85=B6=E4=BB=96=E7=8A=B6=E6=80=81?=
=?UTF-8?q?=E4=B8=AD=E9=99=84=E4=BB=B6=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../tiankongdi/curbspotcity/MapList/ShowInfoModal/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/views/demo/tiankongdi/curbspotcity/MapList/ShowInfoModal/index.vue b/src/views/demo/tiankongdi/curbspotcity/MapList/ShowInfoModal/index.vue
index dddac32a..2c3c8c4c 100644
--- a/src/views/demo/tiankongdi/curbspotcity/MapList/ShowInfoModal/index.vue
+++ b/src/views/demo/tiankongdi/curbspotcity/MapList/ShowInfoModal/index.vue
@@ -168,7 +168,7 @@
{{
getLabel('qita_use_to', props.showInfoData.qita_use_to)
}}
-
+
Date: Tue, 8 Oct 2024 15:44:14 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=20=E5=8D=A1=E7=89=87?=
=?UTF-8?q?=E7=BB=84=E5=86=85file=5Fupload=E7=BB=84=E4=BB=B6=E8=8E=B7?=
=?UTF-8?q?=E5=8F=96=E4=B8=8D=E5=88=B0=E6=9C=80=E6=96=B0=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/FormViewer/cardGourp.vue | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/components/FormViewer/cardGourp.vue b/src/components/FormViewer/cardGourp.vue
index d5b8b3e7..fad5aa83 100644
--- a/src/components/FormViewer/cardGourp.vue
+++ b/src/components/FormViewer/cardGourp.vue
@@ -232,12 +232,13 @@
}, 100);
}
// 提交时,下拉选数据存到pinia中
+ // 提交时,获取最新的file_upload组件的数据
function submitChangeFrom() {
setTimeout(() => {
let data = getFieldsValue();
let result = {};
Object.keys(data).forEach((key) => {
- if (key.indexOf('_select') !== -1) {
+ if (key.indexOf('_select') !== -1 || key.indexOf('_upload') !== -1) {
result[key] = data[key];
}
});
From 01f256af0432079b265d2dfe9bda6f892f269b66 Mon Sep 17 00:00:00 2001
From: helloxujingliang <3225043@qq.com>
Date: Wed, 9 Oct 2024 15:28:31 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E5=A4=8D=E6=9D=82=E5=9B=BE=E6=96=91?=
=?UTF-8?q?=E5=88=86=E5=89=B2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/MapboxMaps/lib/splitpolygon.ts | 47 ++++++++++++++++---
.../Upload/src/components/FilePreview.vue | 12 +++++
2 files changed, 53 insertions(+), 6 deletions(-)
create mode 100644 src/components/Upload/src/components/FilePreview.vue
diff --git a/src/components/MapboxMaps/lib/splitpolygon.ts b/src/components/MapboxMaps/lib/splitpolygon.ts
index 1aabe00a..c82aec57 100644
--- a/src/components/MapboxMaps/lib/splitpolygon.ts
+++ b/src/components/MapboxMaps/lib/splitpolygon.ts
@@ -147,6 +147,8 @@ export async function splitPolygonByFill(drawPolygon, outerPolygon) {
// 多面数据分割裁剪
export async function splitPolygonByMultiFill(drawPolygons,outerPolygon){
+ let tempDrawPolygons = [...drawPolygons]
+ drawPolygons = handlerMultiPolygonToPolygon(tempDrawPolygons);
return new Promise((resolve,reject)=>{
try{
@@ -170,14 +172,24 @@ export async function splitPolygonByMultiFill(drawPolygons,outerPolygon){
console.log("原始数据处理精度后坐标",featuresArray);
// 求交集图斑
drawPolygons.forEach((item,index)=>{
- let turfPolygon = turf.truncate(turf.polygon(item.geometry.coordinates),dealOptions);
+
+
+
+ //
+ console.log("coordinates",index,item.geometry.coordinates)
+ try{
+ let turfPolygon = turf.truncate(turf.polygon(item.geometry.coordinates),dealOptions);
// 取交集
- let intersection = turf.intersect(turf.featureCollection([featuresArray[0],turfPolygon]));
- if(intersection){
- resultArray.push(intersection);
+ let intersection = turf.intersect(turf.featureCollection([featuresArray[0],turfPolygon]));
+ if(intersection){
+ resultArray.push(intersection);
+ }
+ console.log("第3步:交集"+index+":",intersection)
+ splitFeaturesArray.push(turfPolygon);
+ }catch(e){
+ console.log(e);
}
- console.log("第3步:交集"+index+":",intersection)
- splitFeaturesArray.push(turfPolygon);
+
})
// 取差集
@@ -201,6 +213,29 @@ export async function splitPolygonByMultiFill(drawPolygons,outerPolygon){
})
}
+// MultiPolygon转换Polygon
+export function handlerMultiPolygonToPolygon(sourcePolygons){
+ let polygons = [];
+ sourcePolygons.forEach((item,ndex)=>{
+ if(item.geometry.type == "MultiPolygon"){
+ item.geometry.coordinates.forEach((coorItem,idx)=>{
+ let polygonItem = {
+ "type": "Feature",
+ "geometry": {
+ "type": "Polygon",
+ "coordinates": coorItem
+ },
+ "properties": {}
+ }
+ polygons.push(polygonItem);
+ })
+ }else if(item.geometry.type == "Polygon"){
+ polygons.push(item);
+ }
+ })
+ return polygons;
+}
+
export function printLngLat(arr){
arr.forEach((item,index)=>{
console.log(item[1]+","+item[0]+"\n");
diff --git a/src/components/Upload/src/components/FilePreview.vue b/src/components/Upload/src/components/FilePreview.vue
new file mode 100644
index 00000000..5cf4a09f
--- /dev/null
+++ b/src/components/Upload/src/components/FilePreview.vue
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
\ No newline at end of file