Commit 568c914c authored by suhuiguang's avatar suhuiguang

编辑模式-区域绑定,未编辑的区域,错误显示感叹号

区域异常红柱子在故障模式进入内部后,再退出不显示 消防安全执行异常信息列表,鼠标悬浮增加小手
parent 30496ee8
......@@ -55,6 +55,10 @@
.safetyExecuteList{
height: 45%;
margin-left: 37px;
&-open{
cursor: pointer;
}
.up{
height: 90px;
.left{
......@@ -97,13 +101,13 @@
padding-top: 15px;
height: 50px;
.icon{
float: left;
display: inline;
img{
padding-left: 20px;
}
.icon{
display: inline;
cursor: pointer;
img{
padding-left: 20px;
}
}
.arrow{
float: right;
......
......@@ -58,6 +58,7 @@ class PromptModal extends Component {
noDefaultFooter
noDefaultHeader
destroyContent
outterClosable={false}
onCancel={this.cancel}
closable={false}
/>
......@@ -70,7 +71,9 @@ PromptModal.propTypes = {
saveAreaData: PropTypes.func,
savePointAndRefreshMarker: PropTypes.func,
handleOutExceptModel: PropTypes.func,
savePointData: PropTypes.func
savePointData: PropTypes.func,
savePointDataBack: PropTypes.func,
savePointDataSwitch: PropTypes.func
};
export default PromptModal;
......@@ -607,9 +607,9 @@ class View3D extends Component {
}
startDrow = (areaItem) => {
// this.a3dRef.addPen(m);
this.setState({ isAreaSave: true });
console.log('drow--------');
this.setState({
isAreaSave: true,
selectArea: areaItem,
rightHeight: 10,
showRightPanel: true
......@@ -617,9 +617,9 @@ class View3D extends Component {
this.drowItem = areaItem;
this.addPen(areaItem.id);
}
addPen(areaKey) {
let params = { 'displayName': '进攻线路', 'thumb': '/a3dres/images/pathline/line-attack.png', 'descr': '', 'objParam': null, 'type': 'pen' };
// console.log(this.state.selectArea)
let params = { 'displayName': '进攻线路', 'thumb': '/a3dres/images/pathline/line-attack.png', 'descr': '', 'objParam': null, 'type': 'pen' };
const penProps = {
key: this.genPenId(),
color: 0x00ff00,
......@@ -629,44 +629,34 @@ class View3D extends Component {
this.a3dRef.newPen(penProps);
this.hasCreatePen = true;
}
/** 画笔 down 事件响应 */
handlePenDown = (event) => {
if (!this.isCanBeDraw()){
return;
}
const me = this;
const { routePathData } = me.state;
// 鼠标左键(右键),添加一个点
if (event.button === 0 || event.button === 2) {
me.a3dRef.stopPenDrag(event.clientX, event.clientY, me.penTargets, true);
// 鼠标右键 绘制完毕,需要同步处理 reference 数据
// 鼠标右键 绘制完毕
if (event.button === 2){
// 保存 reference 数据
const pen = me.a3dRef.currentPen;
let penPoints = pen.getFmtPoints();
if (pen._drawing){
PubSub.publish(EVENTS_CONSTS.SKETCH_REFERENCE_CHANGE, {
type: 'routePath',
key: pen._uuidKey,
eid: pen.userData.eid,
value: {
...pen.userParams,
points: pen.getFmtPoints()
},
position: pen.position
});
me.a3dRef.changeDrawState(PEN_STATE.FINISHED);
this.state.routePathData.push({
routePathData.push({
riskSourceId: this.drowItem.id,
routePath: JSON.stringify({
routePath: penPoints,
regionHeigth: 10
})
});
this.setState({
me.setState({
drawing: false,
routePathData: this.state.routePathData
routePathData
});
}
}
......@@ -1556,11 +1546,13 @@ class View3D extends Component {
return points.length > 0 && <PolygonRegion key={area.id} {...regionConf} points={points} onCreated={e=>this.onRectCreated(e,area,index)} />;
});
}
handleOutExceptModel=()=>{
this.clearMarkers();
this.executeOperate({ key: 'fitview' });//恢复正常视角
this.props.editModelChange(false);//显示全景统计
this.enableCamera();//恢复相机
this.lensLevel = LENS_LEVEL.ROOT;
this.setState({
treeData: [],
pageType: 'region',//区域
......@@ -1573,13 +1565,15 @@ class View3D extends Component {
dragItem: '',
selectArea: '',
selectPoints: '',
showRightPanel: false
showRightPanel: false,
routePathData: [],
isOutterView: true, //恢复marker显示
drawing: false
});
this.a3dRef.changeDrawState(PEN_STATE.CLEARED);//清除当前路径
}
handleExceptModel =(type,areaId)=>{
let { isPointSave,isAreaSave } = this.state;
const { isPointSave,isAreaSave } = this.state;
if (type === 'into_except_model'){//进入耳朵模式
this.props.editModelChange(true);//隐藏全景统计
this.setState({
......@@ -1591,7 +1585,6 @@ class View3D extends Component {
});
} else if (type === 'out_except_model'){
this.stagePilot.positionCtl.clearDrag();
this.initModelDisplay();
if (isAreaSave){
this.setState({ promptData:
{
......@@ -1618,6 +1611,7 @@ class View3D extends Component {
this.handleOutExceptModel();
}
}
this.initModelDisplay();
}
}
......@@ -1722,7 +1716,8 @@ class View3D extends Component {
treeDataList,
promptData,
pointType,
isOutterView
isOutterView,
routePathData
} = this.state;
const { dimension, hiddenScreenSaver, editModelChange } = this.props;
const graphicProps = {
......@@ -1835,6 +1830,7 @@ class View3D extends Component {
saveAreaData={this.saveAreaData}
selectItemChange={this.selectItemChange}
// stopDrowing={this.stopDrowing}
routePathData={routePathData}
pageType={pageType}
treeDataList={treeDataList}
pointTypeArr={pointTypeArr}
......
......@@ -96,6 +96,12 @@ class AreaLeftTree extends Component {
});
this.props.selectItemChange(selectItem);
}
checkAreaIsNoSave =(riskSourceId)=>{
const { routePathData = [] } = this.props;
return routePathData.some(e=>e.riskSourceId === riskSourceId);
}
renderTreeNodes = (data) => {
let { searchValue } = this.state;
if (data.length > 0) {
......@@ -142,7 +148,7 @@ class AreaLeftTree extends Component {
}}
/>
}
{item.isBind ? <img src={moduleEditIcon.bindedTip} alt="" /> : item.routePath ? <img src={moduleEditIcon.noSaveTip} alt="" /> : <img src={moduleEditIcon.noSaveTip} alt="" />}
{item.isBind ? <img src={moduleEditIcon.bindedTip} alt="" /> : this.checkAreaIsNoSave(item.id) ? <img src={moduleEditIcon.noSaveTip} alt="" /> : <img src={moduleEditIcon.nobindTip} alt="" />}
</span>
</span>
}
......@@ -158,6 +164,10 @@ class AreaLeftTree extends Component {
});
}
};
render() {
const { treeData } = this.state;
return (
......@@ -203,7 +213,8 @@ AreaLeftTree.propTypes = {
deleteAreaBind: PropTypes.func,
pageType: PropTypes.string,
startDrow: PropTypes.func,
selectItemChange: PropTypes.func
selectItemChange: PropTypes.func,
routePathData: PropTypes.array
};
export default AreaLeftTree;
......@@ -37,6 +37,16 @@ export default class SafetyExecuteList extends Component {
});
}
onClickIcon = (e) => {
if (e.type !== 'warn'){
this.setState({
selectKey: e.key
});
this.safetyExecuteList(e.key);
}
}
safetyExecuteList = (type) => {
if (!type){
type = this.state.selectKey;
......@@ -67,14 +77,6 @@ export default class SafetyExecuteList extends Component {
});
}
onClickIcon = (e) => {
if (e.type !== 'warn'){
this.setState({
selectKey: e.key
});
this.safetyExecuteList(e.key);
}
}
renderContent = (datas) => {
return (
......@@ -95,7 +97,7 @@ export default class SafetyExecuteList extends Component {
datas.map((item, index) => {
return (
<div key={item.id} className="icon">
{ selectKey === item.key ? <img src={getIcon(item.icon)} onClick={()=>this.onClickIcon(item)} /> : <img src={getIcon(item.unIcon)} onClick={()=>this.onClickIcon(item)} />}
{ selectKey === item.key ? <img src={getIcon(item.icon)} alt='' onClick={()=>this.onClickIcon(item)} /> : <img src={getIcon(item.unIcon)} alt='' onClick={()=>this.onClickIcon(item)} />}
</div>
);
})
......@@ -112,36 +114,36 @@ export default class SafetyExecuteList extends Component {
}
return (
isVisable ?
(<div className='safetyExecuteList'>
<img src={panoramicIcon.unfold} onClick={() => this.unfoldOnClick(false)}></img>
</div>) :
(<div className="safetyExecuteList">
<div className='up'>
<div className='left'>
<img src={panoramicIcon.safetyexecute}></img>
<div className='safetyExecuteList'>
<img className='safetyExecuteList-open' alt='' src={panoramicIcon.unfold} onClick={() => this.unfoldOnClick(false)} />
</div> :
<div className="safetyExecuteList">
<div className='up'>
<div className='left'>
<img src={panoramicIcon.safetyexecute} alt='' />
</div>
<div className='right'>
<div className='common-title'>
<span>消防安全执行</span>
</div>
<div className='content'>
<span className='date'>{dayNum}</span>
<span className='day'></span>
</div>
</div>
</div>
<div className='right'>
<div className='common-title'>
<span>消防安全执行</span>
<div className='down'>
<div className='title'>
{this.renderIcon(warnTypes)}
<span className='describe'>{selectValue}</span>
<img className='arrow' src={panoramicIcon.arrow_warn} alt='' onClick={() => this.unfoldOnClick(true)} />
<div className='bottom-line' />
</div>
<div className='content'>
<span className='date'>{dayNum}</span>
<span className='day'></span>
{this.renderContent(alarmData)}
</div>
</div>
</div>
<div className='down'>
<div className='title'>
{this.renderIcon(warnTypes)}
<span className='describe'>{selectValue}</span>
<img className='arrow' src={panoramicIcon.arrow_warn} onClick={() => this.unfoldOnClick(true)}></img>
<div className='bottom-line'></div>
</div>
<div className='content'>
{this.renderContent(alarmData)}
</div>
</div>
</div>)
);
}
}
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