Commit ce38a085 authored by baoshuang's avatar baoshuang

编辑模式代码

parent 93c80a4f
...@@ -120,6 +120,14 @@ ...@@ -120,6 +120,14 @@
font-size: 15px; font-size: 15px;
} }
} }
.icon {
margin-left: 5px;
vertical-align: middle;
img {
vertical-align: initial;
margin-left: 10px;
}
}
} }
.bottomBtns { .bottomBtns {
padding-top: 15px; padding-top: 15px;
...@@ -153,8 +161,18 @@ ...@@ -153,8 +161,18 @@
background-color: rgba(10, 53, 62, 0.68); background-color: rgba(10, 53, 62, 0.68);
border: 1px solid rgba(46, 217, 239, 0.59); border: 1px solid rgba(46, 217, 239, 0.59);
padding: 12px; padding: 12px;
color: #fff;
.amos-form-item-label {
color: #fff;
}
.topForm { .topForm {
height: calc(100% - 48px); height: calc(100% - 48px);
.amos-input {
width: 100%;
}
.amos-select {
width: 100%;
}
} }
} }
.bottomBtns { .bottomBtns {
...@@ -172,6 +190,12 @@ ...@@ -172,6 +190,12 @@
background: url('/src/assets/moduleEdit/deleteBtn.png') no-repeat 100% 100%; background: url('/src/assets/moduleEdit/deleteBtn.png') no-repeat 100% 100%;
border: none; border: none;
} }
.cancelBtn {
width: 100px;
height: 33px;
background: url('/src/assets/moduleEdit/cancelBtn.png') no-repeat 100% 100%;
border: none;
}
} }
} }
......
This diff is collapsed.
...@@ -28,13 +28,12 @@ class AreaLeftTree extends Component { ...@@ -28,13 +28,12 @@ class AreaLeftTree extends Component {
} }
componentDidMount() { componentDidMount() {
// getAreaTreeAction().then(data => { let {treeData,pointTypeArr} = this.props;
// console.log(data); this.setState({
// this.setState({ treeData,
// treeData:data || [] pointTypeArr,
// }) pointType: pointTypeArr[0]?pointTypeArr[0].code:''
// this.props.getAreaData(data || []) })
// })
} }
componentWillUnmount() { componentWillUnmount() {
...@@ -50,11 +49,11 @@ class AreaLeftTree extends Component { ...@@ -50,11 +49,11 @@ class AreaLeftTree extends Component {
}) })
} }
onSelectChange = (value, item) =>{ // onSelectChange = (value, item) =>{
console.log(value, item); // console.log(value, item);
this.state.pointType = value; // this.state.pointType = value;
this.props.pointTypeChange(value); // this.props.pointTypeChange(value);
} // }
onSearchChange = (e, value) => { onSearchChange = (e, value) => {
console.log(e, value); console.log(e, value);
this.setState({ this.setState({
...@@ -71,35 +70,42 @@ class AreaLeftTree extends Component { ...@@ -71,35 +70,42 @@ class AreaLeftTree extends Component {
autoExpandParent: false autoExpandParent: false
}); });
} }
onCheck = (checkedKeys,e) => { // onCheck = (checkedKeys,e) => {
console.log('onCheck', checkedKeys); // console.log('onCheck', checkedKeys);
// console.log('onCheck', e); // // console.log('onCheck', e);
let currentKey = checkedKeys.checked[0]?checkedKeys.checked[checkedKeys.checked.length-1]:''; // let currentKey = checkedKeys.checked[0]?checkedKeys.checked[checkedKeys.checked.length-1]:'';
if (checkedKeys.checked.length<2) { // if (checkedKeys.checked.length<2) {
currentKey = checkedKeys.checked[0] // currentKey = checkedKeys.checked[0]
} else { // } else {
if (checkedKeys.checked[0] == this.state.checkedKeys[0]) { // if (checkedKeys.checked[0] == this.state.checkedKeys[0]) {
currentKey = checkedKeys.checked[1] // currentKey = checkedKeys.checked[1]
} else { // } else {
currentKey = checkedKeys.checked[0] // currentKey = checkedKeys.checked[0]
} // }
} // }
// checkedKeys[0] = checkedKeys[checkedKeys.length - 1] // // checkedKeys[0] = checkedKeys[checkedKeys.length - 1]
this.setState({ checkedKeys: currentKey?[currentKey]:[] }); // this.setState({ checkedKeys: currentKey?[currentKey]:[] });
this.props.selectItemChange(currentKey); // this.props.selectItemChange(currentKey);
if (currentKey) { // if (currentKey) {
this.props.startDrow(currentKey); // this.props.startDrow(currentKey);
}else { // }else {
this.props.stopDrowing() // this.props.stopDrowing()
} // }
// }
drowArea = (editItem) => {
}
onTreeSelect = (selectedKeys, info) => {
console.log('onSelect', info);
let selectItem = info.node.props.dataRef;
this.setState({ selectedKeys });
this.props.selectItemChange(selectItem);
} }
// onTreeSelect = (selectedKeys, info) => { // onClick={(e)=>{e.nativeEvent.stopImmediatePropagation();e.stopPropagation();console.log(123123);}}
// console.log('onSelect', info);
// this.setState({ selectedKeys });
// }
renderTreeNodes = (data) => { renderTreeNodes = (data) => {
console.log(data); // console.log(data);
if (data.length>0) { if (data.length>0) {
return data.map((item) => { return data.map((item) => {
if (item.children) { if (item.children) {
...@@ -107,21 +113,34 @@ class AreaLeftTree extends Component { ...@@ -107,21 +113,34 @@ class AreaLeftTree extends Component {
<TreeNode <TreeNode
title={ title={
<div> <div>
{item.isRegion?<span>{item.name}</span>: {
<span <span >
draggable={true} {item.name}
onDragStart={() => { <span className='icon'>
this.props.dragItemChange(item) {
}} item.isBind?'':
>{item.name}</span>} <img
src='/src/assets/moduleEdit/editBtn.png'
onClick={(e) => {
e.nativeEvent.stopImmediatePropagation();
e.stopPropagation();
this.props.startDrow(item);
}}
/>
}
{
item.isBind?<img src='/src/assets/moduleEdit/bindedTip.png' />:
item.routePath?<img src='/src/assets/moduleEdit/noSaveTip.png' />:
<img src='/src/assets/moduleEdit/nobindTip.png' />
}
</span>
</span>
}
</div> </div>
} }
key={item.id} key={item.id}
dataRef={item} dataRef={item}
onDragStart={() => { >
console.log(11)
this.props.dragItemChange(item)
}}>
{this.renderTreeNodes(item.children)} {this.renderTreeNodes(item.children)}
</TreeNode> </TreeNode>
); );
...@@ -130,18 +149,33 @@ class AreaLeftTree extends Component { ...@@ -130,18 +149,33 @@ class AreaLeftTree extends Component {
key={item.id} key={item.id}
title={ title={
<div> <div>
{item.isRegion?<span>{item.name}</span>: {
<span <span >
draggable={true} {item.name}
onDragStart={() => { <span className='icon'>
this.props.dragItemChange(item) {
}} item.isBind?'':
>{item.name} <img
</span>} src='/src/assets/moduleEdit/editBtn.png'
onClick={(e) => {
e.nativeEvent.stopImmediatePropagation();
e.stopPropagation();
this.props.startDrow(item);
}}
/>
}
{
item.isBind?<img src='/src/assets/moduleEdit/bindedTip.png' />:
item.routePath?<img src='/src/assets/moduleEdit/noSaveTip.png' />:
<img src='/src/assets/moduleEdit/nobindTip.png' />
}
</span>
</span>
}
</div> </div>
} }
{...item} dataRef={item}
onClick={() => {console.log('aaa')}} {...item}
/>; />;
}); });
} }
...@@ -149,10 +183,6 @@ class AreaLeftTree extends Component { ...@@ -149,10 +183,6 @@ class AreaLeftTree extends Component {
} }
render() { render() {
let { treeData, checkedKeys,pointTypeArr,pointType } = this.state; let { treeData, checkedKeys,pointTypeArr,pointType } = this.state;
let { pageType } = this.props; let { pageType } = this.props;
...@@ -160,28 +190,18 @@ class AreaLeftTree extends Component { ...@@ -160,28 +190,18 @@ class AreaLeftTree extends Component {
<div className="leftTree"> <div className="leftTree">
<div className='leftContainer'> <div className='leftContainer'>
<div className='topForm'> <div className='topForm'>
{ <Search className='leftSearch' icon="search" value={''} onChange={this.onSearchChange} onIconClick={this.onSearchChange} />
pageType=='region'?'':<Select onChange={this.onSelectChange} defaultValue={pointType} className='leftSelect'>
{
pointTypeArr.map(item => {
return (<Option value={item.code}>{item.name}</Option>)
})
}
</Select>
}
<Search className='leftSearch' icon="search" value={''} onChange={this.onSearchChange} onIconClick={this.onSearchChange} />
</div> </div>
<div className='treeBox'> <div className='treeBox'>
<Tree <Tree
checkable // checkable
checkStrictly // checkStrictly
selectable={false} selectable={true}
onExpand={this.onExpand} onExpand={this.onExpand}
expandedKeys={this.state.expandedKeys} expandedKeys={this.state.expandedKeys}
autoExpandParent={this.state.autoExpandParent} autoExpandParent={this.state.autoExpandParent}
onCheck={this.onCheck} // onCheck={this.onCheck}
checkedKeys={checkedKeys} // checkedKeys={checkedKeys}
onSelect={this.onTreeSelect} onSelect={this.onTreeSelect}
selectedKeys={this.state.selectedKeys} selectedKeys={this.state.selectedKeys}
blockNode blockNode
......
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Connect, Modal, Tree,Select,Search,Button } from 'amos-framework';
import * as endConf from 'amos-processor/lib/config/endconf';
import { getAreaTreeAction,saveAreaDataAction } from '../../../services/moduleEditServices'
const eventConnect = Connect.eventConnect;
const TreeNode = Tree.TreeNode;
const Option = Select.Option;
@eventConnect
class PointLeftTree extends Component {
constructor(props) {
super(props);
this.state = {
// showScreenSaver: false //是否打开屏保
expandedKeys: [],
autoExpandParent: true,
checkedKeys: [],
selectedKeys: [],
treeData:[],
pointTypeArr:[],
pointType:''
};
}
componentDidMount() {
let {treeData,pointTypeArr} = this.props;
this.setState({
treeData,
pointTypeArr,
pointType: pointTypeArr[0]?pointTypeArr[0].code:''
})
// console.log(this.props)
}
componentWillUnmount() {
}
componentWillReceiveProps(nextProps) {
console.log(nextProps)
let {treeData,pointTypeArr} = nextProps;
this.setState({
treeData,
pointTypeArr,
pointType: pointTypeArr[0]?pointTypeArr[0].code:''
})
}
onSelectChange = (value, item) =>{
console.log(value, item);
this.state.pointType = value;
this.props.pointTypeChange(value);
}
onSearchChange = (e, value) => {
console.log(e, value);
this.setState({
value
});
}
onExpand = (expandedKeys) => {
console.log('onExpand', arguments);
// if not set autoExpandParent to false, if children expanded, parent can not collapse.
// or, you can remove all expanded children keys.
this.setState({
expandedKeys,
autoExpandParent: false
});
}
onCheck = (checkedKeys,e) => {
console.log('onCheck', checkedKeys,e);
this.setState({ checkedPointsKeys: checkedKeys });
this.props.selectPointChange(checkedKeys);
}
renderTreeNodes = (data) => {
// console.log(data);
if (data.length>0) {
return data.map((item) => {
if (item.children) {
return (
<TreeNode
title={
<div>
{item.isRegion?
<span>
{item.name}
<span className='icon'>
{
item.isRegion?item.isBind?<img src='/src/assets/moduleEdit/bindedTip.png' />:
<img src='/src/assets/moduleEdit/nobindTip.png' />:
item.isBind?<img src='/src/assets/moduleEdit/bindedTip.png' />:
item.position3d?<img src='/src/assets/moduleEdit/noSaveTip.png' />:
<img src='/src/assets/moduleEdit/nobindTip.png' />
}
</span>
</span>:
<span
draggable={true}
onDragStart={() => {
this.props.dragItemChange(item)
}}
>
{item.name}
<span className='icon'>
{
item.isRegion?item.isBind?<img src='/src/assets/moduleEdit/bindedTip.png' />:
<img src='/src/assets/moduleEdit/nobindTip.png' />:
item.isBind?<img src='/src/assets/moduleEdit/bindedTip.png' />:
item.position3d?<img src='/src/assets/moduleEdit/noSaveTip.png' />:
<img src='/src/assets/moduleEdit/nobindTip.png' />
}
</span>
</span>}
</div>
}
key={item.id}
dataRef={item}
onDragStart={() => {
console.log(11)
this.props.dragItemChange(item)
}}>
{this.renderTreeNodes(item.children)}
</TreeNode>
);
}
return <TreeNode
key={item.id}
title={
<div>
{item.isRegion?
<span>
{item.name}
<span className='icon'>
{
item.isRegion?item.isBind?<img src='/src/assets/moduleEdit/bindedTip.png' />:
<img src='/src/assets/moduleEdit/nobindTip.png' />:
item.isBind?<img src='/src/assets/moduleEdit/bindedTip.png' />:
item.position3d?<img src='/src/assets/moduleEdit/noSaveTip.png' />:
<img src='/src/assets/moduleEdit/nobindTip.png' />
}
</span>
</span>:
<span
draggable={true}
onDragStart={() => {
this.props.dragItemChange(item)
}}
>
{item.name}
<span className='icon'>
{
item.isRegion?item.isBind?<img src='/src/assets/moduleEdit/bindedTip.png' />:
<img src='/src/assets/moduleEdit/nobindTip.png' />:
item.isBind?<img src='/src/assets/moduleEdit/bindedTip.png' />:
item.position3d?<img src='/src/assets/moduleEdit/noSaveTip.png' />:
<img src='/src/assets/moduleEdit/nobindTip.png' />
}
</span>
</span>}
</div>
}
dataRef={item}
{...item}
// onClick={() => {console.log('aaa')}}
/>;
});
}
}
onTreeSelect = (selectedKeys, info) => {
// e.nativeEvent.stopImmediatePropagation();
console.log('onSelect', info);
let selectItem = info.node.props.dataRef;
this.setState({ selectedKeys });
this.props.selectPointChange(selectItem)
}
render() {
let { treeData, checkedPointsKeys,pointTypeArr,pointType } = this.state;
let { pageType } = this.props;
console.log(treeData)
console.log(this.props)
return (
<div className="leftTree">
<div className='leftContainer'>
<div className='topForm'>
<Select onChange={this.onSelectChange} defaultValue={pointType} className='leftSelect'>
{
pointTypeArr.map(item => {
return (<Option value={item.code}>{item.name}</Option>)
})
}
</Select>
<Search className='leftSearch' icon="search" value={''} onChange={this.onSearchChange} onIconClick={this.onSearchChange} />
</div>
<div className='treeBox'>
<Tree
// checkable
// checkStrictly
selectable={true}
onExpand={this.onExpand}
expandedKeys={this.state.expandedKeys}
autoExpandParent={this.state.autoExpandParent}
// onCheck={this.onCheck}
// checkedKeys={checkedPointsKeys}
onSelect={this.onTreeSelect}
selectedKeys={this.state.selectedKeys}
blockNode
>
{this.renderTreeNodes(treeData)}
</Tree>
</div>
<div className='bottomBtns'>
<Button
className='sureBtn'
onClick={() => {
this.props.savePointData()
}} ></Button>
<Button
className='deleteBtn'
onClick={() => {
this.props.deletePointBind()
}} ></Button>
</div>
</div>
</div>
);
}
}
PointLeftTree.propTypes = {
subscribe: PropTypes.func,
trigger: PropTypes.func
};
export default PointLeftTree;
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { Connect, Modal, Tree, Select, Search, Button, Input } from 'amos-framework'; import { Connect, Modal, Tree, Select, Search, Button, Input,InputNumber, Form, Radio } from 'amos-framework';
import * as endConf from 'amos-processor/lib/config/endconf'; import * as endConf from 'amos-processor/lib/config/endconf';
import { getAreaTreeAction,saveAreaDataAction } from './../../../services/moduleEditServices' import { getAreaTreeAction,saveAreaDataAction } from '../../../services/moduleEditServices'
const eventConnect = Connect.eventConnect; const eventConnect = Connect.eventConnect;
const TreeNode = Tree.TreeNode; const TreeNode = Tree.TreeNode;
const Option = Select.Option; const Option = Select.Option;
const FormItem = Form.Item;
const RadioGroup = Radio.Group;
@eventConnect @eventConnect
class RightEditPanel extends Component { class RightEditPointPanel extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
form: {
},
rules:{}
}; };
} }
...@@ -40,6 +45,25 @@ class RightEditPanel extends Component { ...@@ -40,6 +45,25 @@ class RightEditPanel extends Component {
// }) // })
} }
onChange = (key, e) => {
const value = e.target.value;
const newForm = Object.assign({}, this.state.form, { [key]: value });
this.setState({
form: newForm
});
}
onRadioChange = (value) => {
const newForm = Object.assign({}, this.state.form, { 'isIndoor': value });
this.setState({
form: newForm
});
}
onHobbyChange = (value, item) => {
const newForm = Object.assign({}, this.state.form, { 'level': value });
this.setState({
form: newForm
});
}
...@@ -47,13 +71,34 @@ class RightEditPanel extends Component { ...@@ -47,13 +71,34 @@ class RightEditPanel extends Component {
handleSubmit = (e) => {
// e.preventDefault();
this.form.validate((valid, dataValues, errors) => {
console.log('返回内容:', dataValues, valid, errors);
if (valid) {
// AmosAlert.success('结果', JSON.stringify(dataValues));
} else {
console.log('error submit!!');
return false;
}
});
}
render() { render() {
let { treeData, checkedKeys,pointTypeArr,pointType } = this.state; let { rules, form,pointTypeArr,pointType } = this.state;
let { pageType } = this.props; let { pageType } = this.props;
const formItemLayout = {
labelCol: {
xs: { span: 28 },
sm: { span: 3 },
className: 'colspanlab'
}
}
return ( return (
<div className="rightEditPanel"> <div className="rightEditPanel">
<Form className="basic-demo" ref={component => this.form = component} model={form} rules={rules}>
<div className='rightContainer'> <div className='rightContainer'>
<div className='topForm'> <div className='topForm'>
<div className='rightTitle'> <div className='rightTitle'>
...@@ -61,53 +106,109 @@ class RightEditPanel extends Component { ...@@ -61,53 +106,109 @@ class RightEditPanel extends Component {
<span className='titleText'>风险点信息</span> <span className='titleText'>风险点信息</span>
</div> </div>
<div className='baseMsg'> <div className='baseMsg'>
<div className='baseTitle'> <div className='moduleTitle'>
<span className='titleIcon'></span> <span className='titleIcon'></span>
<span className='titleText'>基本信息</span> <span className='titleText'>基本信息</span>
</div> </div>
<div className='baseContent'> <div className='moduleContent'>
<div className='msgItem'> <div className='msgItem'>
<div className='itemLabel'>风险名称</div> <div className='itemLabel'>风险名称</div>
<Input /> <FormItem field="name" >
<Input />
</FormItem>
</div> </div>
<div className='msgItem'> <div className='msgItem'>
<div className='itemLabel'>参考编号</div> <div className='itemLabel'>参考编号</div>
<Input /> <FormItem field="code" >
<Input
onChange={(e) => this.onChange('name', e)}
/>
</FormItem>
</div> </div>
<div className='msgItem'> <div className='msgItem'>
<div className='itemLabel'>风险等级</div> <div className='itemLabel'>风险等级</div>
<Input /> <FormItem field="level" >
<Select value={form.level} onChange={this.onHobbyChange}>
<Option value="1">一级</Option>
<Option value="2">二级</Option>
<Option value="3">三级</Option>
<Option value="4">四级</Option>
<Option value="5">五级</Option>
</Select>
</FormItem>
</div> </div>
</div> </div>
</div> </div>
<div className='3dMsg'> <div className='3dMsg'>
<div className='baseTitle'> <div className='moduleTitle'>
<span className='titleIcon'></span> <span className='titleIcon'></span>
<span className='titleText'>三维信息</span> <span className='titleText'>三维信息</span>
</div> </div>
<div className='moduleContent'>
<div className='msgItem'>
<div className='itemLabel'>三维坐标</div>
<div className='position'>
<div className='positionItem'>
<FormItem label="X" field="positionX" {...formItemLayout}>
<InputNumber />
</FormItem>
</div>
<div className='positionItem'>
<FormItem label="Y" field="positionY" {...formItemLayout}>
<InputNumber />
</FormItem>
</div>
<div className='positionItem'>
<FormItem label="Z" field="positionZ" {...formItemLayout}>
<InputNumber />
</FormItem>
</div>
</div>
</div>
<div className='msgItem'>
<div className='itemLabel'>楼层位置</div>
<FormItem field="floorNum" >
<Input />
</FormItem>
</div>
<div className='msgItem'>
<div className='itemLabel'>是否位于室内</div>
<FormItem field="isIndoor" >
<RadioGroup defaultValue="prop2" onChange={value => {this.onRadioChange(value)}}>
<Radio value="prop1"></Radio>
<Radio value="prop2"></Radio>
</RadioGroup>
</FormItem>
</div>
</div>
</div> </div>
</div> </div>
<div className='bottomBtns'> <div className='bottomBtns'>
<Button <Button
className='sureBtn' className='sureBtn'
onClick={() => { onClick={() => {
// this.props.saveAreaData() this.handleSubmit()
}} ></Button> }} ></Button>
<Button <Button
className='deleteBtn' className='cancelBtn'
onClick={() => { onClick={() => {
// this.props.save() // this.props.save()
}} ></Button> }} ></Button>
</div> </div>
</div> </div>
</Form>
</div> </div>
); );
} }
} }
RightEditPanel.propTypes = { RightEditPointPanel.propTypes = {
subscribe: PropTypes.func, subscribe: PropTypes.func,
trigger: PropTypes.func trigger: PropTypes.func
}; };
export default RightEditPanel; export default RightEditPointPanel;
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Connect, Modal, Tree, Select, Search, Button, Input,InputNumber, Form, Radio } from 'amos-framework';
import * as endConf from 'amos-processor/lib/config/endconf';
import { getAreaTreeAction,saveAreaDataAction } from '../../../services/moduleEditServices'
const eventConnect = Connect.eventConnect;
const TreeNode = Tree.TreeNode;
const Option = Select.Option;
const FormItem = Form.Item;
const RadioGroup = Radio.Group;
@eventConnect
class RightEditRegionPanel extends Component {
constructor(props) {
super(props);
this.state = {
form: {
},
rules:{}
};
}
componentDidMount() {
// getAreaTreeAction().then(data => {
// console.log(data);
// this.setState({
// treeData:data || []
// })
// this.props.getAreaData(data || [])
// })
}
componentWillUnmount() {
}
componentWillReceiveProps(nextProps) {
console.log(nextProps)
let {treeData,pointTypeArr} = nextProps;
// this.setState({
// })
}
onChange = (key, e) => {
const value = e.target.value;
const newForm = Object.assign({}, this.state.form, { [key]: value });
this.setState({
form: newForm
});
}
onRadioChange = (value) => {
const newForm = Object.assign({}, this.state.form, { 'isIndoor': value });
this.setState({
form: newForm
});
}
onHobbyChange = (value, item) => {
const newForm = Object.assign({}, this.state.form, { 'level': value });
this.setState({
form: newForm
});
}
handleSubmit = (e) => {
// e.preventDefault();
this.form.validate((valid, dataValues, errors) => {
console.log('返回内容:', dataValues, valid, errors);
if (valid) {
// AmosAlert.success('结果', JSON.stringify(dataValues));
} else {
console.log('error submit!!');
return false;
}
});
}
render() {
let { rules, form,pointTypeArr,pointType } = this.state;
let { pageType } = this.props;
const formItemLayout = {
labelCol: {
xs: { span: 28 },
sm: { span: 3 },
className: 'colspanlab'
}
}
return (
<div className="rightEditPanel">
<Form className="basic-demo" ref={component => this.form = component} model={form} rules={rules}>
<div className='rightContainer'>
<div className='topForm'>
<div className='rightTitle'>
<span className='titleIcon'></span>
<span className='titleText'>风险区域信息</span>
</div>
<div className='baseMsg'>
<div className='moduleTitle'>
<span className='titleIcon'></span>
<span className='titleText'>基本信息</span>
</div>
<div className='moduleContent'>
<div className='msgItem'>
<div className='itemLabel'>风险名称</div>
<FormItem field="name" >
<Input />
</FormItem>
</div>
<div className='msgItem'>
<div className='itemLabel'>参考编号</div>
<FormItem field="code" >
<Input
onChange={(e) => this.onChange('name', e)}
/>
</FormItem>
</div>
<div className='msgItem'>
<div className='itemLabel'>风险等级</div>
<FormItem field="level" >
<Select value={form.level} onChange={this.onHobbyChange}>
<Option value="1">一级</Option>
<Option value="2">二级</Option>
<Option value="3">三级</Option>
<Option value="4">四级</Option>
<Option value="5">五级</Option>
</Select>
</FormItem>
</div>
</div>
</div>
<div className='3dMsg'>
<div className='moduleTitle'>
<span className='titleIcon'></span>
<span className='titleText'>三维信息</span>
</div>
<div className='moduleContent'>
<div className='msgItem'>
<div className='itemLabel'>三维坐标</div>
<div className='position'>
<div className='positionItem'>
<FormItem label="长" field="positionX" {...formItemLayout}>
<InputNumber />
</FormItem>
</div>
<div className='positionItem'>
<FormItem label="宽" field="positionY" {...formItemLayout}>
<InputNumber />
</FormItem>
</div>
<div className='positionItem'>
<FormItem label="高" field="positionZ" {...formItemLayout}>
<InputNumber />
</FormItem>
</div>
</div>
</div>
</div>
</div>
</div>
<div className='bottomBtns'>
<Button
className='sureBtn'
onClick={() => {
this.handleSubmit()
}} ></Button>
<Button
className='cancelBtn'
onClick={() => {
// this.props.save()
}} ></Button>
</div>
</div>
</Form>
</div>
);
}
}
RightEditRegionPanel.propTypes = {
subscribe: PropTypes.func,
trigger: PropTypes.func
};
export default RightEditRegionPanel;
...@@ -179,8 +179,6 @@ class MarkerIcon extends Component { ...@@ -179,8 +179,6 @@ class MarkerIcon extends Component {
const showLabel = disableLabel(markerType); const showLabel = disableLabel(markerType);
let animDur = (twinkle ? 1 / frequency : 0) + 's'; let animDur = (twinkle ? 1 / frequency : 0) + 's';
console.log('-------------')
console.log(this.props)
if (showInfo) { if (showInfo) {
return ( return (
<div className={cls} style={style} onMouseLeave={this.onMouseLeave} onMouseOver={this.onMouseOver}> <div className={cls} style={style} onMouseLeave={this.onMouseLeave} onMouseOver={this.onMouseOver}>
......
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