Commit ccc5d89b authored by 田翔's avatar 田翔

fix: 代码优化

parent 412fc2ea
Pipeline #85090 passed with stages
......@@ -42,7 +42,6 @@ const Map = props => {
useEffect(() => {
if (visible) {
GetWebSiteConfig({ client: 'sandbox' }).then(res => {
console.log(res.data[0].mapsettings, 'res.data[0].mapsettings');
setSchemeList(res.data[0].mapsettings.layers);
res.data[0].mapsettings.layers.forEach(item => {
if (item.schemename === schemename) {
......@@ -58,8 +57,6 @@ const Map = props => {
setttings = item;
}
});
// res.data[0].mapsettings.areasettings = setttings;
// console.log(form);
setTimeout(() => {
form.setFieldsValue({
areaName: [setttings.areaName],
......@@ -149,12 +146,10 @@ const Map = props => {
};
// 选择范围
const onTangleClick = e => {
console.log(mapInfo.current);
Drawtool.activate({
view: mapInfo.current,
action: 'extent',
drawEnd: data => {
console.log(data);
const geom = geomUtils.toGeometry({
type: 'extent',
xmin: data.rings[0][0][0],
......@@ -163,9 +158,8 @@ const Map = props => {
ymax: data.rings[0][1][1],
});
form.setFieldsValue({
extent: `${data.rings[0][0][0]},${data.rings[0][0][1]},${data.rings[0][2][0]},${
data.rings[0][1][1]
}`,
extent: `${data.rings[0][0][0]},${data.rings[0][0][1]},${data.rings[0][2][0]},${data.rings[0][1][1]
}`,
});
mapRef.current.gotoGeometry(geom);
},
......
......@@ -173,9 +173,6 @@ const AddView = props => {
}
</Select>
</Form.Item>
{/* <Form.Item label="手持参数" name="MobileParam">
<Input placeholder="请输入手持参数" />
</Form.Item> */}
<Form.Item
label="手持参数"
style={{
......
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