Commit ec57623b authored by 张博's avatar 张博

故障模式显示点

parent 70e61363
...@@ -575,9 +575,24 @@ class View3D extends Component { ...@@ -575,9 +575,24 @@ class View3D extends Component {
}); });
} }
}; };
getErrorAreaPoint(riskSourceId){
focusObject = object => { const { markers } = this.state;
let arrays = ['riskSource','patrol','impEquipment','monitorEquipment'];
initView3DAction('',riskSourceId,true).then(d => {
d.map((item)=>{
if (arrays.includes(item.type)){
markers[`${item.type}`].push(item);
}
}
);
this.setState({
markers: deepCopy(markers)
});
});
}
focusObject = (object,errorAreaId)=> {
const me = this; const me = this;
me.getErrorAreaPoint(errorAreaId);
if (!me.state.alarmStarted && object) { if (!me.state.alarmStarted && object) {
this.cameraFactory.flyTo({ this.cameraFactory.flyTo({
target: object, target: object,
...@@ -1332,13 +1347,13 @@ class View3D extends Component { ...@@ -1332,13 +1347,13 @@ class View3D extends Component {
markers['fireDetection'] = d.filter(e => e.type === 'fireDetection'); markers['fireDetection'] = d.filter(e => e.type === 'fireDetection');
markers[markerType] = d; markers[markerType] = d;
this.setState({ this.setState({
markers markers: deepCopy(markers)
}); });
return; return;
} }
markers[markerType] = d; markers[markerType] = d;
this.setState({ this.setState({
markers, markers: deepCopy(markers),
markerType markerType
}); });
}); });
...@@ -1389,7 +1404,7 @@ class View3D extends Component { ...@@ -1389,7 +1404,7 @@ class View3D extends Component {
toggleRoad: !isCancel toggleRoad: !isCancel
}); });
} else { } else {
//this.clearMarkers(); this.clearMarkers();
if (!isCancel) { if (!isCancel) {
this.asyncLoadMarkerData(item.type,item.riskSourceId); this.asyncLoadMarkerData(item.type,item.riskSourceId);
} else { } else {
......
...@@ -46,7 +46,7 @@ class ExceptionArea extends Component { ...@@ -46,7 +46,7 @@ class ExceptionArea extends Component {
onMarkerClick = (marker) => { onMarkerClick = (marker) => {
const { extData, node } = marker; const { extData, node } = marker;
this.props.handleExceptModel && this.props.handleExceptModel('into_except_model',extData.id); this.props.handleExceptModel && this.props.handleExceptModel('into_except_model',extData.id);
this.props.focusObject && this.props.focusObject(node); this.props.focusObject && this.props.focusObject(node,extData.id);
} }
......
...@@ -26,6 +26,7 @@ class SideControl extends Component { ...@@ -26,6 +26,7 @@ class SideControl extends Component {
* control 点击,第二次点击则取消 * control 点击,第二次点击则取消
*/ */
onBizItemClick = (item, e) => { onBizItemClick = (item, e) => {
console.log(item.type);
const { errorAreaId: riskSourceId } = this.props; const { errorAreaId: riskSourceId } = this.props;
const alreadyActive = this.isActive(item.key); const alreadyActive = this.isActive(item.key);
const newKeys = this.getActiveControl(item.key, alreadyActive); const newKeys = this.getActiveControl(item.key, alreadyActive);
......
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