图层创建

This commit is contained in:
licuizhu 2024-01-29 23:07:42 +08:00
parent 39ae2cbdbe
commit 6bf37b1614
3 changed files with 12 additions and 7 deletions

View File

@ -73,8 +73,8 @@ export function getAdStatisticsData( params ) {
// 基础地图创建涂层 // 基础地图创建涂层
export function createLayer( params ) { export function createLayer( params ) {
return request('/api/basicMap/createLayer', { return request('/api/basicMap/createLayer', {
method: 'POST', method: 'post',
params: params data: params
}); });
} }

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { Tree, Button, Modal, Form, Input, Radio } from 'antd'; import { Tree, Button, Modal, Form, Input, Radio, message } from 'antd';
import axios from 'axios'; import axios from 'axios';
import { import {
DownOutlined, DownOutlined,
@ -125,9 +125,14 @@ class LayerData extends React.Component {
name: this.state.addLayer.name, name: this.state.addLayer.name,
note: this.state.addLayer.note, note: this.state.addLayer.note,
}).then((e) => { }).then((e) => {
if (e.success) {
message.success('图层创建成功!');
this.setState({ this.setState({
isModalOpen: false isModalOpen: false
}); });
} else {
message.error('图层创建失败!');
}
}) })
} }
}; };

View File

@ -599,7 +599,7 @@ class BaseMap extends React.Component{
this.state.pointDrawer.disable(); this.state.pointDrawer.disable();
let layerId = this.state.pointAdd.layerId; let layerId = this.state.pointAdd.layerId;
if (e.success) { if (e.success) {
message.success('点位创建成功成功!'); message.success('点位创建成功!');
setTimeout(() => { setTimeout(() => {
this.getLayerPoints(layerId, true, 1); this.getLayerPoints(layerId, true, 1);
this.refs.getLayerDataFun.changeUnitAmount(this.state.pointAdd.layerId); this.refs.getLayerDataFun.changeUnitAmount(this.state.pointAdd.layerId);