Commit 5b13c4b5 authored by 皮倩雯's avatar 皮倩雯

fix: '修复范围保存地图消失bug'

parent 5758b9a1
Pipeline #61717 passed with stages
......@@ -547,7 +547,6 @@ const Map = props => {
console.log(data);
}
} else {
console.log(setttings.customPointExtent);
setKeepDraw(setttings.customPointExtent);
}
......@@ -666,6 +665,9 @@ const Map = props => {
});
} else {
setButState(false);
let aa = JSON.parse(form.getFieldsValue().customPointExtent);
form.setFieldsValue({ customPointExtent: aa.geometry });
console.log(form.getFieldsValue().customPointExtent.geometry);
}
// else {
// let geom = [];
......@@ -722,21 +724,16 @@ const Map = props => {
}
let data = {};
console.log(obj.customPointExtent);
// let ab = JSON.parse(obj.customPointExtent);
// console.log(ab);
if (obj.customPointExtent) {
if (keepBorderArea && !obj.customPointExtent.type) {
data.type = keepType;
data.geometry = obj.customPointExtent;
console.log(data);
} else if (keepBorderArea && obj.customPointExtent.type) {
data = obj.customPointExtent;
console.log(data);
} else if (!keepBorderArea && !obj.customPointExtent.type) {
data.type = keepType;
data.geometry = obj.customPointExtent;
console.log(data);
} else if (!keepBorderArea && obj.customPointExtent.type) {
} else {
data = obj.customPointExtent;
console.log(data);
}
......@@ -871,7 +868,6 @@ const Map = props => {
setRadio1(e.target.value);
} else {
console.log(keepDraw);
if (keepDraw) {
let area1 = form.getFieldsValue().areaName;
mapRef.current.changeAreaName(area1[0], keepDraw);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment