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

提示

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