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

bug

parent 144c5ccd
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
objModelURI: '/a3dres', objModelURI: '/a3dres',
// 根url // 根url
// baseURI: 'http://172.16.11.30:9008/', // 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/',
convertorURI: 'http://172.16.3.122:8083/', convertorURI: 'http://172.16.3.63:8083/',
patrolURI: 'http://172.16.3.122:9000/', patrolURI: 'http://172.16.3.63:9000/',
rulesConfigURI: 'http://172.16.10.91:8080/', rulesConfigURI: 'http://172.16.10.91:8080/',
// plugin URI // plugin URI
pluginURI: 'http://172.16.11.40:8099/', pluginURI: 'http://172.16.11.40:8099/',
......
...@@ -257,12 +257,14 @@ class View3D extends Component { ...@@ -257,12 +257,14 @@ class View3D extends Component {
} }
_registerEvents = () => { _registerEvents = () => {
this.r3d.on('dbclick', evt => { this.r3d.on('dbclick', evt => {
if (evt.button !== 0) { if (evt.button !== 0) {
return; return;
} }
const object = evt.object; const object = evt.object;
if (object) { if (object) {
alert(1)
this.cameraFactory.flyTo({ this.cameraFactory.flyTo({
position: object.position.toArray(), position: object.position.toArray(),
duration: 6000 duration: 6000
...@@ -287,6 +289,7 @@ class View3D extends Component { ...@@ -287,6 +289,7 @@ class View3D extends Component {
if (isControllerEvent(topic)) { if (isControllerEvent(topic)) {
executeView3dCMD(this, topic, data); executeView3dCMD(this, topic, data);
} else if (isManualOperate(topic)) { } else if (isManualOperate(topic)) {
parseManual(this, topic, data); parseManual(this, topic, data);
} else if (topic === eventTopics.show_fire_equip) { } else if (topic === eventTopics.show_fire_equip) {
this.asyncLoadMarkerData('fireResource'); this.asyncLoadMarkerData('fireResource');
...@@ -1534,6 +1537,26 @@ class View3D extends Component { ...@@ -1534,6 +1537,26 @@ class View3D extends Component {
this.getExceptionAreasList(); 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)=> { renderPolygonRegion = (exceptionAreas)=> {
const regionConf = { const regionConf = {
...@@ -1819,6 +1842,7 @@ class View3D extends Component { ...@@ -1819,6 +1842,7 @@ class View3D extends Component {
<FlameFire position={firePosition} width={10} height={20} depth={8} sliceSpacing={1} visible={planStarted} /> <FlameFire position={firePosition} width={10} height={20} depth={8} sliceSpacing={1} visible={planStarted} />
{isEditMode && this.renderAreas()} {isEditMode && this.renderAreas()}
{this.renderPolygonRegion(exceptionAreas)} {this.renderPolygonRegion(exceptionAreas)}
{errorAreaId && this.selectPolygonRegion(exceptionAreas,errorAreaId)}
{isOutterView && startLoadExceptionArea && <ExceptionArea markers={exceptionMarkers} handleExceptModel={this.handleExceptModel} focusObject={this.focusObject} />} {isOutterView && startLoadExceptionArea && <ExceptionArea markers={exceptionMarkers} handleExceptModel={this.handleExceptModel} focusObject={this.focusObject} />}
</A3DDesigner> </A3DDesigner>
</div> </div>
......
...@@ -69,6 +69,16 @@ export const isPoint = (type) => { ...@@ -69,6 +69,16 @@ export const isPoint = (type) => {
export const parseSearchMenuMarkers = (instance, content) => { export const parseSearchMenuMarkers = (instance, content) => {
if (content) { if (content) {
const { markers } = instance.state; 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) => { content.map( (item) => {
const { type } = item; const { type } = item;
const markersArr = markers[type.replace(/(^\s*)|(\s*$)/g, '')] || []; const markersArr = markers[type.replace(/(^\s*)|(\s*$)/g, '')] || [];
...@@ -91,8 +101,8 @@ export const parseSearchMenuMarkers = (instance, content) => { ...@@ -91,8 +101,8 @@ export const parseSearchMenuMarkers = (instance, content) => {
markers markers
}); });
} else { } else {
markersArr.push(item); //markersArr.push(item);
markers[type.replace(/(^\s*)|(\s*$)/g, '')] = markersArr; markers[type.replace(/(^\s*)|(\s*$)/g, '')] = [...item];
instance.setState({ instance.setState({
markers markers
}); });
...@@ -135,7 +145,7 @@ export const parseBubbleMarkers = (instance, content) => { ...@@ -135,7 +145,7 @@ export const parseBubbleMarkers = (instance, content) => {
level = bizobj.riskLevel; level = bizobj.riskLevel;
} }
if('risk' === type.replace(/(^\s*)|(\s*$)/g, '')){ if ('risk' === type.replace(/(^\s*)|(\s*$)/g, '')){
level = bizobj.nodeState; level = bizobj.nodeState;
} }
needUpdate = true; needUpdate = true;
...@@ -144,7 +154,7 @@ export const parseBubbleMarkers = (instance, content) => { ...@@ -144,7 +154,7 @@ export const parseBubbleMarkers = (instance, content) => {
showInfo, showInfo,
twinkle, twinkle,
title: titleContent, title: titleContent,
level: level level
}; };
} }
return ma; return ma;
......
...@@ -264,6 +264,11 @@ class SearchPane extends Component { ...@@ -264,6 +264,11 @@ class SearchPane extends Component {
} }
closeModal(){ closeModal(){
let args = {
target: [],
operateType: operateTypes.POINT_SEARCH
};
update3DViewData(args);
this.props.changeSearchPaneVisible(); this.props.changeSearchPaneVisible();
this.setState({ activeKey: 'search' },()=>this.paramsOnChange([])); 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