Merge branch 'main' of http://123.132.248.154:10000/HC_YFZX/CaiYuanYiTiHua
commit
c6cbb36e2c
|
|
@ -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];
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
<template>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import Vue from 'vue'
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
|
|
@ -168,7 +168,7 @@
|
|||
<a-descriptions-item v-if="props.showInfoData.is_illegal == 2" label="实际用途">{{
|
||||
getLabel('qita_use_to', props.showInfoData.qita_use_to)
|
||||
}}</a-descriptions-item>
|
||||
<a-descriptions-item v-if="is_illegal == 2" label="附件">
|
||||
<a-descriptions-item v-if="props.showInfoData.is_illegal == 2" label="附件">
|
||||
<a-image-preview-group :preview="{ getContainer }">
|
||||
<template v-for="(item, itemIndex) in qitafujianList" :key="itemIndex">
|
||||
<a-image
|
||||
|
|
|
|||
Loading…
Reference in New Issue