Merge branch 'main' of http://123.132.248.154:10000/HC_YFZX/CaiYuanYiTiHua
commit
c6cbb36e2c
|
|
@ -232,12 +232,13 @@
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
// 提交时,下拉选数据存到pinia中
|
// 提交时,下拉选数据存到pinia中
|
||||||
|
// 提交时,获取最新的file_upload组件的数据
|
||||||
function submitChangeFrom() {
|
function submitChangeFrom() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let data = getFieldsValue();
|
let data = getFieldsValue();
|
||||||
let result = {};
|
let result = {};
|
||||||
Object.keys(data).forEach((key) => {
|
Object.keys(data).forEach((key) => {
|
||||||
if (key.indexOf('_select') !== -1) {
|
if (key.indexOf('_select') !== -1 || key.indexOf('_upload') !== -1) {
|
||||||
result[key] = data[key];
|
result[key] = data[key];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,8 @@ export async function splitPolygonByFill(drawPolygon, outerPolygon) {
|
||||||
|
|
||||||
// 多面数据分割裁剪
|
// 多面数据分割裁剪
|
||||||
export async function splitPolygonByMultiFill(drawPolygons,outerPolygon){
|
export async function splitPolygonByMultiFill(drawPolygons,outerPolygon){
|
||||||
|
let tempDrawPolygons = [...drawPolygons]
|
||||||
|
drawPolygons = handlerMultiPolygonToPolygon(tempDrawPolygons);
|
||||||
|
|
||||||
return new Promise((resolve,reject)=>{
|
return new Promise((resolve,reject)=>{
|
||||||
try{
|
try{
|
||||||
|
|
@ -170,6 +172,12 @@ export async function splitPolygonByMultiFill(drawPolygons,outerPolygon){
|
||||||
console.log("原始数据处理精度后坐标",featuresArray);
|
console.log("原始数据处理精度后坐标",featuresArray);
|
||||||
// 求交集图斑
|
// 求交集图斑
|
||||||
drawPolygons.forEach((item,index)=>{
|
drawPolygons.forEach((item,index)=>{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
console.log("coordinates",index,item.geometry.coordinates)
|
||||||
|
try{
|
||||||
let turfPolygon = turf.truncate(turf.polygon(item.geometry.coordinates),dealOptions);
|
let turfPolygon = turf.truncate(turf.polygon(item.geometry.coordinates),dealOptions);
|
||||||
// 取交集
|
// 取交集
|
||||||
let intersection = turf.intersect(turf.featureCollection([featuresArray[0],turfPolygon]));
|
let intersection = turf.intersect(turf.featureCollection([featuresArray[0],turfPolygon]));
|
||||||
|
|
@ -178,6 +186,10 @@ export async function splitPolygonByMultiFill(drawPolygons,outerPolygon){
|
||||||
}
|
}
|
||||||
console.log("第3步:交集"+index+":",intersection)
|
console.log("第3步:交集"+index+":",intersection)
|
||||||
splitFeaturesArray.push(turfPolygon);
|
splitFeaturesArray.push(turfPolygon);
|
||||||
|
}catch(e){
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 取差集
|
// 取差集
|
||||||
|
|
@ -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){
|
export function printLngLat(arr){
|
||||||
arr.forEach((item,index)=>{
|
arr.forEach((item,index)=>{
|
||||||
console.log(item[1]+","+item[0]+"\n");
|
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="实际用途">{{
|
<a-descriptions-item v-if="props.showInfoData.is_illegal == 2" label="实际用途">{{
|
||||||
getLabel('qita_use_to', props.showInfoData.qita_use_to)
|
getLabel('qita_use_to', props.showInfoData.qita_use_to)
|
||||||
}}</a-descriptions-item>
|
}}</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 }">
|
<a-image-preview-group :preview="{ getContainer }">
|
||||||
<template v-for="(item, itemIndex) in qitafujianList" :key="itemIndex">
|
<template v-for="(item, itemIndex) in qitafujianList" :key="itemIndex">
|
||||||
<a-image
|
<a-image
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue