Commit ccc5d89b authored by 田翔's avatar 田翔

fix: 代码优化

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