Commit 8b341887 authored by 张博's avatar 张博

提示

parent ce1afdb0
...@@ -2,7 +2,7 @@ import React, { Component } from 'react'; ...@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { utils,UUID, deepCopy } from 'amos-tool'; import { utils,UUID, deepCopy } from 'amos-tool';
import { PubSub } from 'ray-eventpool'; import { PubSub } from 'ray-eventpool';
import { Connect as UIConnect, Modal,message,AmosAlert } from 'amos-framework'; import { Connect as UIConnect, Modal,message,AmosAlert, Toast } from 'amos-framework';
import { FatLine } from 'amos-3d/lib/advanced'; import { FatLine } from 'amos-3d/lib/advanced';
import A3DDesigner, { Connect, FireObject,DESIGNER_CONSTS,PolygonRegion } from 'amos-3d/lib/designer'; import A3DDesigner, { Connect, FireObject,DESIGNER_CONSTS,PolygonRegion } from 'amos-3d/lib/designer';
import WorkerObjContent from 'amos-3d/lib/worker/WorkerObjContent'; import WorkerObjContent from 'amos-3d/lib/worker/WorkerObjContent';
...@@ -114,7 +114,6 @@ class View3D extends Component { ...@@ -114,7 +114,6 @@ class View3D extends Component {
pointType: '', //筛选框点类型 pointType: '', //筛选框点类型
editFlag: false,//编辑模式 editFlag: false,//编辑模式
showRightPanel: false, //是否显示右侧详情 showRightPanel: false, //是否显示右侧详情
simpleTipVisible: false, //简单提示
dragItem: '', //拖动的节点, dragItem: '', //拖动的节点,
exceptionAreas: [], //异常区域 exceptionAreas: [], //异常区域
startLoadExceptionArea: false, //是否开始加载区域marker startLoadExceptionArea: false, //是否开始加载区域marker
...@@ -945,6 +944,13 @@ class View3D extends Component { ...@@ -945,6 +944,13 @@ class View3D extends Component {
}) })
} }
} }
toastWarningInfo =(content)=>{
Toast.warning({
title:'警告',
content,
placement:'topMiddle',
})
}
//删除区域 //删除区域
deleteAreaBind = () => { deleteAreaBind = () => {
let { selectArea } = this.state; let { selectArea } = this.state;
...@@ -1041,13 +1047,9 @@ class View3D extends Component { ...@@ -1041,13 +1047,9 @@ class View3D extends Component {
event.preventDefault(); event.preventDefault();
this.setState({isPointSave:false}) this.setState({isPointSave:false})
let { dragItem,markers } = this.state; let { dragItem,markers } = this.state;
//alert(JSON.stringify(dragItem));
if (dragItem) { if (dragItem) {
if (dragItem.isBind) { if (dragItem.isBind) {
this.tipMsg = '只能放置未绑定的标记点' this.toastWarningInfo('只能放置未绑定的标记点')
this.setState({
simpleTipVisible: true
});
return false; return false;
} }
...@@ -1061,10 +1063,7 @@ class View3D extends Component { ...@@ -1061,10 +1063,7 @@ class View3D extends Component {
console.log(isInside); console.log(isInside);
if (dragItem) { if (dragItem) {
if (isInside === false) { if (isInside === false) {
this.tipMsg = '只能放置在当前区域'; this.toastWarningInfo('只能放置在当前区域')
this.setState({
simpleTipVisible: true
});
return false; return false;
} }
let uid = UUID.uuidFast(); let uid = UUID.uuidFast();
...@@ -1117,11 +1116,6 @@ class View3D extends Component { ...@@ -1117,11 +1116,6 @@ class View3D extends Component {
} }
} }
simpleTipOk = () => {
this.setState({
simpleTipVisible: false
});
}
changeMarkerType = (item, isCancel) => { changeMarkerType = (item, isCancel) => {
const { markers } = this.state; const { markers } = this.state;
...@@ -1615,14 +1609,6 @@ class View3D extends Component { ...@@ -1615,14 +1609,6 @@ class View3D extends Component {
</div> </div>
</div> </div>
} }
<Modal
className='moduleEditMadel simpleTip'
header="基本模态框"
visible={this.state.simpleTipVisible}
noDefaultHeader
onOk={this.simpleTipOk}
content={<div>{this.tipMsg}</div>}
/>
</div> </div>
); );
} }
......
...@@ -65,6 +65,7 @@ export default function marker3DFactory(WrappedComponent = 'div', options){ ...@@ -65,6 +65,7 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
this.markerEvents = { this.markerEvents = {
click: this.onMarkerClick, click: this.onMarkerClick,
// dblclick: this.onMarkerDblClick, // dblclick: this.onMarkerDblClick,
dragend: this.markerDragend,
mouseover: (marker) => { mouseover: (marker) => {
console.log('111') console.log('111')
if(marker.object2DPipe){ if(marker.object2DPipe){
...@@ -225,9 +226,7 @@ export default function marker3DFactory(WrappedComponent = 'div', options){ ...@@ -225,9 +226,7 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
const { markers, ...rest } = this.props; const { markers, ...rest } = this.props;
const { planStarted } = this.state; const { planStarted } = this.state;
let dialogStyle = { zIndex: 1000 }; let dialogStyle = { zIndex: 1000 };
const events = {
dragend: this.markerDragend,
};
const result = buildMarkerOptions(markers, markerType, markerParams); const result = buildMarkerOptions(markers, markerType, markerParams);
return ( return (
<WrappedComponent> <WrappedComponent>
...@@ -235,8 +234,7 @@ export default function marker3DFactory(WrappedComponent = 'div', options){ ...@@ -235,8 +234,7 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
{...rest} {...rest}
draggable draggable
markers={result} markers={result}
//events={this.markerEvents} events={this.markerEvents}
events={events}
onCreated={this.markerCreated} onCreated={this.markerCreated}
/> />
{ !planStarted && <PointDialog style={dialogStyle} ref={node => this.pdRef = node} />} { !planStarted && <PointDialog style={dialogStyle} ref={node => this.pdRef = node} />}
......
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