石超 2025-08-12 11:28:19 +08:00
commit 97cb3b6367
2 changed files with 11 additions and 5 deletions

View File

@ -31,7 +31,7 @@
<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.6.0/tcplayer.v4.6.0.min.js"></script> <script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.6.0/tcplayer.v4.6.0.min.js"></script>
<script src="/monitor/jquery-1.12.4.min.js"></script> <script src="/monitor/jquery-1.12.4.min.js"></script>
<script src="/monitor/jsencrypt.min.js"></script> <script src="/monitor/jsencrypt.min.js"></script>
<script src="/monitor/jsWebControl-1.0.0.min.js"></script>
<!-- easy plaer --> <!-- easy plaer -->

View File

@ -422,7 +422,11 @@
function splitMultiPolygons(str) { function splitMultiPolygons(str) {
let hadnlerStr = str.replace(",MULTIPOLYGON","-MULTIPOLYGON"); let hadnlerStr = str.replace(",MULTIPOLYGON","-MULTIPOLYGON");
hadnlerStr = str.replace(",POLYGON","-POLYGON");
let result = hadnlerStr.split("-"); let result = hadnlerStr.split("-");
// "MULTIPOLYGON" // "MULTIPOLYGON"
// const cleanedStr = str.replace(/^MULTIPOLYGON\(/, '').replace(/\)+$/, ''); // const cleanedStr = str.replace(/^MULTIPOLYGON\(/, '').replace(/\)+$/, '');
@ -456,9 +460,12 @@
splitTubanBackYuan(calAreaParams).then(res=>{ splitTubanBackYuan(calAreaParams).then(res=>{
if(!res.gengdituban){ if(!res.gengdituban){
message.warning("分割数据为空"); message.warning("分割数据为空");
emit("handlerSplitResultEmpty"); emit("handlerSplitResultEmpty");
return null;
} }
let geojson = { let geojson = {
@ -470,11 +477,10 @@
let wktArray = splitMultiPolygons(res.gengdituban); let wktArray = splitMultiPolygons(res.gengdituban);
if(wktArray.length>0){ if(wktArray.length>0){
wktArray?.forEach((item,index)=>{ wktArray?.forEach((item,index)=>{
console.log("item",item);
let feature = { let feature = {
"type": "Feature", "type": "Feature",
"properties": { "properties": {