Commit 7122aeb3 authored by 张博's avatar 张博

bug

parent 144c5ccd
......@@ -11,10 +11,10 @@
objModelURI: '/a3dres',
// 根url
// baseURI: 'http://172.16.11.30:9008/',
baseURI: 'http://172.16.3.122:8083/',
baseURI: 'http://172.16.3.63:8083/',
// convertorURI: 'http://172.16.3.122:8083/',
convertorURI: 'http://172.16.3.122:8083/',
patrolURI: 'http://172.16.3.122:9000/',
convertorURI: 'http://172.16.3.63:8083/',
patrolURI: 'http://172.16.3.63:9000/',
rulesConfigURI: 'http://172.16.10.91:8080/',
// plugin URI
pluginURI: 'http://172.16.11.40:8099/',
......
......@@ -257,12 +257,14 @@ class View3D extends Component {
}
_registerEvents = () => {
this.r3d.on('dbclick', evt => {
if (evt.button !== 0) {
return;
}
const object = evt.object;
if (object) {
alert(1)
this.cameraFactory.flyTo({
position: object.position.toArray(),
duration: 6000
......@@ -287,6 +289,7 @@ class View3D extends Component {
if (isControllerEvent(topic)) {
executeView3dCMD(this, topic, data);
} else if (isManualOperate(topic)) {
parseManual(this, topic, data);
} else if (topic === eventTopics.show_fire_equip) {
this.asyncLoadMarkerData('fireResource');
......@@ -1534,6 +1537,26 @@ class View3D extends Component {
this.getExceptionAreasList();
});
}
selectonRectCreated = (polygonRegion) => {
polygonRegion.visible = true;
}
selectPolygonRegion =(exceptionAreas,id)=> {
const regionConf = {
regionColor: '#76d015', // 区域颜色
lineColor: '#ffffff', // 边框颜色
regionOpacity: 1 // 不透明度 (默认是 0.5 半透明)
};
if (id && exceptionAreas){
return exceptionAreas.map((area,index) =>{
if (area.id === id){
const { routePath: points = [] } = area.routePath;
return points.length > 0 && <PolygonRegion key={area.id} {...regionConf} points={points} onCreated={e=>this.selectonRectCreated(e)} />;
}
});
}
}
renderPolygonRegion = (exceptionAreas)=> {
const regionConf = {
......@@ -1819,6 +1842,7 @@ class View3D extends Component {
<FlameFire position={firePosition} width={10} height={20} depth={8} sliceSpacing={1} visible={planStarted} />
{isEditMode && this.renderAreas()}
{this.renderPolygonRegion(exceptionAreas)}
{errorAreaId && this.selectPolygonRegion(exceptionAreas,errorAreaId)}
{isOutterView && startLoadExceptionArea && <ExceptionArea markers={exceptionMarkers} handleExceptModel={this.handleExceptModel} focusObject={this.focusObject} />}
</A3DDesigner>
</div>
......
......@@ -69,6 +69,16 @@ export const isPoint = (type) => {
export const parseSearchMenuMarkers = (instance, content) => {
if (content) {
const { markers } = instance.state;
instance.setState({
markers: { 'riskSource': [],'patrol': [],'impEquipment': [],'monitorEquipment': [],'video': [],'fireEquipment': [],'person': [],'pool': [],'hydrant': [],'fireChamber': [],'fireCar': [],'fire': [],'fireDetection': [],'fireFoamRoom': [],'risk': [],'data': [],'room': [],'statistics': [],'impEquipmentMode': [] }
});
// if (content.length === 0){
// instance.setState({
// markers: { 'riskSource': [],'patrol': [],'impEquipment': [],'monitorEquipment': [],'video': [],'fireEquipment': [],'person': [],'pool': [],'hydrant': [],'fireChamber': [],'fireCar': [],'fire': [],'fireDetection': [],'fireFoamRoom': [],'risk': [],'data': [],'room': [],'statistics': [],'impEquipmentMode': [] }
// });
// return ;
// }
console.log(JSON.stringify(markers));
content.map( (item) => {
const { type } = item;
const markersArr = markers[type.replace(/(^\s*)|(\s*$)/g, '')] || [];
......@@ -91,8 +101,8 @@ export const parseSearchMenuMarkers = (instance, content) => {
markers
});
} else {
markersArr.push(item);
markers[type.replace(/(^\s*)|(\s*$)/g, '')] = markersArr;
//markersArr.push(item);
markers[type.replace(/(^\s*)|(\s*$)/g, '')] = [...item];
instance.setState({
markers
});
......@@ -135,7 +145,7 @@ export const parseBubbleMarkers = (instance, content) => {
level = bizobj.riskLevel;
}
if('risk' === type.replace(/(^\s*)|(\s*$)/g, '')){
if ('risk' === type.replace(/(^\s*)|(\s*$)/g, '')){
level = bizobj.nodeState;
}
needUpdate = true;
......@@ -144,7 +154,7 @@ export const parseBubbleMarkers = (instance, content) => {
showInfo,
twinkle,
title: titleContent,
level: level
level
};
}
return ma;
......
......@@ -264,6 +264,11 @@ class SearchPane extends Component {
}
closeModal(){
let args = {
target: [],
operateType: operateTypes.POINT_SEARCH
};
update3DViewData(args);
this.props.changeSearchPaneVisible();
this.setState({ activeKey: 'search' },()=>this.paramsOnChange([]));
......
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