Commit ec57623b authored by 张博's avatar 张博

故障模式显示点

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