|
@@ -14,50 +14,12 @@ import React, { Component } from 'react';
|
|
import Tab from 'react-bootstrap/Tab';
|
|
import Tab from 'react-bootstrap/Tab';
|
|
import Tabs from 'react-bootstrap/Tabs';
|
|
import Tabs from 'react-bootstrap/Tabs';
|
|
import Container from 'react-bootstrap/Container';
|
|
import Container from 'react-bootstrap/Container';
|
|
-import Form from 'react-bootstrap/Form';
|
|
|
|
-import Button from 'react-bootstrap/Button';
|
|
|
|
// import Row from 'react-bootstrap/Row';
|
|
// import Row from 'react-bootstrap/Row';
|
|
// import Col from 'react-bootstrap/Col';
|
|
// import Col from 'react-bootstrap/Col';
|
|
import MapManageList from '../common/MapManageList'
|
|
import MapManageList from '../common/MapManageList'
|
|
-import PubSub from 'pubsub-js';
|
|
|
|
|
|
+import CreateMapForm from '../common/CreateMapForm'
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-function CreateMapForm(){
|
|
|
|
- let name = '';
|
|
|
|
-
|
|
|
|
- function createHandle(){
|
|
|
|
- if(name !== ''){
|
|
|
|
- PubSub.publish('editor.map.create', {id:window.editor_user.id, name: name});
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- function changeHandle(e){
|
|
|
|
- name = e.target.value;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return (
|
|
|
|
- <>
|
|
|
|
- <Form>
|
|
|
|
- <Form.Group controlId="mapName">
|
|
|
|
- <Form.Label>地图名称</Form.Label>
|
|
|
|
- <Form.Control
|
|
|
|
- type="text"
|
|
|
|
- placeholder=""
|
|
|
|
- aria-label="mapName"
|
|
|
|
- aria-describedby="mapName"
|
|
|
|
- onChange={e => {changeHandle(e)}}
|
|
|
|
- />
|
|
|
|
- </Form.Group>
|
|
|
|
- <Form.Label style={{color: 'red', fontSize: '12px'}}>请输入地图名称</Form.Label><br/><br/>
|
|
|
|
- <Button variant="primary" type="submit" onClick={createHandle}>
|
|
|
|
- 创建
|
|
|
|
- </Button>
|
|
|
|
- </Form>
|
|
|
|
- </>
|
|
|
|
- )
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
class MapDashboardDialog extends Component {
|
|
class MapDashboardDialog extends Component {
|
|
state = {
|
|
state = {
|
|
list: null,
|
|
list: null,
|