Commit 383999ee authored by suhuiguang's avatar suhuiguang

Merge branch 'developer' of http://172.16.10.76/station/amos-station-module-view into developer

# Conflicts: # mods/components/3dviewConvertor/view/points/marker3DFactory.js
parents 84fd4beb 5173460a
......@@ -154,6 +154,22 @@
}
}
.point-dialog-modal{
::-webkit-scrollbar {
/* 血槽宽度 */
width: 5px;
height: 5px;
background-color: rgba(10, 53, 62, 1);
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
/* 拖动条 */
border-radius: 5px;
background-color: rgba(255, 255, 255, 0.4);
}
::-webkit-scrollbar-track {
/* 背景槽 */
background-color: rgba(17, 44, 88, 0.2);
}
width: 100%;
height: 100%;
.amos-modal-container{
......
......@@ -4,7 +4,7 @@ import { Connect } from 'amos-framework';
import { Store } from 'amos-tool';
import { connect3D } from 'amos-3d/lib/designer';
import { RiskPoint, PatrolPoint, PersonPoint3D, MonitorPoint, ProbePoint,
FireResourcePoint, EquipmentPoint, FireCar3D, FirePoint, WorkerMen3D, PointStatistics, ImpEquipmentMode } from './points';
FireResourcePoint, EquipmentPoint, FireCar3D, FirePoint, PointStatistics, ImpEquipmentMode } from './points';
import { eventTopics, isPointEvent , isLevelFilter } from './consts';
import { parseMarkers, parseLevelFilter } from './dataProcessor';
......@@ -31,26 +31,26 @@ class PointsPool extends Component {
this.markerList = {};
}
// componentDidMount() {
// this.props.subscribe(eventTopics.base3d_view, (topic, data) => {
// if (isPointEvent(topic)){
// parseMarkers(this, topic, data);
// } else if (isLevelFilter(topic)) {
// parseLevelFilter(this, topic, data);
// }
// });
// this.props.subscribe('base3d.fromws1.showFireTruckRoute', (topic, data) => {
// parseMarkers(this, topic, data);
// });
// // this.props.subscribe(eventTopics.view3d_init, (topic, data) => {
// // const fireTruckMarkerCache = this.markerList['fireCar'];
// // if (fireTruckMarkerCache) {
// // for (let fireTruck of fireTruckMarkerCache.getValues()) {
// // fireTruck.stopMove();
// // }
// // }
// // });
// }
componentDidMount() {
this.props.subscribe(eventTopics.base3d_view, (topic, data) => {
if (isPointEvent(topic)){
parseMarkers(this, topic, data);
} else if (isLevelFilter(topic)) {
parseLevelFilter(this, topic, data);
}
});
this.props.subscribe('base3d.fromws1.showFireTruckRoute', (topic, data) => {
parseMarkers(this, topic, data);
});
// this.props.subscribe(eventTopics.view3d_init, (topic, data) => {
// const fireTruckMarkerCache = this.markerList['fireCar'];
// if (fireTruckMarkerCache) {
// for (let fireTruck of fireTruckMarkerCache.getValues()) {
// fireTruck.stopMove();
// }
// }
// });
}
onMarkersCreated = (type, { markersCache }) => {
......@@ -84,7 +84,7 @@ class PointsPool extends Component {
this.props.updateMarker(data);
}
addMarker=(data)=>{
this.props.addMarker(data)
this.props.addMarker(data);
}
render() {
const { markers, ...rest } = this.props;
......@@ -241,7 +241,12 @@ class PointsPool extends Component {
PointsPool.propTypes = {
subscribe: PropTypes.func,
updateMarker: PropTypes.func,
markers: PropTypes.object
markers: PropTypes.object,
isEditMode: PropTypes.bool,
selectPoints: PropTypes.object,
stagePilot: PropTypes.object,
addMarker: PropTypes.func
};
export default PointsPool;
import React, { Component } from 'react';
import { Modal } from 'amos-framework';
import PropTypes from 'prop-types';
class PromptModal extends Component {
constructor(props) {
......@@ -14,7 +15,7 @@ class PromptModal extends Component {
}
};
saveData = () => {
const { isback, type,pointType,pointParams } = this.props.promptData;
const { isback, type,pointType,pointParams,isSwitch } = this.props.promptData;
this.props.closePromptModal();
if (type === 'region') {
......@@ -22,6 +23,8 @@ class PromptModal extends Component {
} else {
if (isback){
this.props.savePointData();
} else if (isSwitch) {
this.props.savePointData();
} else {
this.props.savePointAndRefreshMarker(pointType,pointParams);
}
......@@ -61,5 +64,13 @@ class PromptModal extends Component {
);
}
}
PromptModal.propTypes = {
promptData: PropTypes.object,
closePromptModal: PropTypes.func,
saveAreaData: PropTypes.func,
savePointAndRefreshMarker: PropTypes.func,
handleOutExceptModel: PropTypes.func,
savePointData: PropTypes.func
};
export default PromptModal;
......@@ -1179,7 +1179,9 @@ class View3D extends Component {
promptContent: `有未保存数据,是否保存?`,
type: 'point',
btnType: 'isOk',
isback: false
isback: false,
isSwitch: true
}
});
......@@ -1557,10 +1559,11 @@ class View3D extends Component {
selectPoints: '',
showRightPanel: false
});
this.clearMarkers();
}
handleExceptModel =(type,areaId)=>{
let { isPointSave,isAreaSave } = this.state;
this.clearMarkers();
if (type === 'into_except_model'){//进入耳朵模式
this.props.editModelChange(true);//隐藏全景统计
this.setState({
......
......@@ -250,9 +250,9 @@ export const parseLevelFilter = (instance, topic, data) => {
const extData = mc.getExtData();
if (extData.levelStr === pointLevel){
if (visible) {
mc.show();
mc.visible = true;
} else {
mc.hide();
mc.visible = false;
}
}
});
......
......@@ -63,7 +63,7 @@ class PointLeftTree extends Component {
onSelectChange = (value, item) =>{
console.log(value, item);
this.setState({ pointType: value });
this.setState({ pointType: value, searchValue: '' });
this.props.pointTypeChange(value);
}
onSearchChange = (e,v) => {
......@@ -180,7 +180,7 @@ class PointLeftTree extends Component {
}
render() {
let { treeData,pointTypeArr,pointType } = this.state;
let { treeData,pointTypeArr,pointType , searchValue } = this.state;
return (
<div className="leftTree">
<div className='leftContainer'>
......@@ -196,7 +196,7 @@ class PointLeftTree extends Component {
</Select>
}
<Search className='leftSearch' icon="search" onChange={this.onSearchChange} onIconClick={this.onSearchChange} />
<Search className='leftSearch' icon="search" value={searchValue} onChange={this.onSearchChange} onIconClick={this.onSearchChange} />
</div>
<div className='treeBox'>
<Tree
......
......@@ -8,8 +8,6 @@ import { CONSTS } from './../../consts/storageConsts';
import PointDialog from './PointDialog';
import { tirggerPlanTopic,tirggerTransTopic } from './../dataProcessor';
import { marker3DIoncMapper, markerTitleBgMapper } from './../../consts/imgStatic';
import { eventTopics, isPointEvent, isLevelFilter } from './../consts';
import { parseMarkers, parseLevelFilter } from '../dataProcessor';
const { EVENT_TYPE_CORE } = EVENT_CONSTS;
const getIcon = (markerType, level) => {
......@@ -40,7 +38,8 @@ export default function marker3DFactory(WrappedComponent = 'div', options) {
addMarker: PropTypes.func,
stagePilot: PropTypes.object,
subscribe: PropTypes.func,
selectPoints: PropTypes.object
selectPoints: PropTypes.object,
onCreated: PropTypes.func
};
constructor(props) {
......@@ -57,19 +56,8 @@ export default function marker3DFactory(WrappedComponent = 'div', options) {
componentWillMount = () => {
this.setState({ planStarted: this.props.planStarted });
};
componentDidMount() {
this.props.subscribe(eventTopics.base3d_view, (topic, data) => {
if (isPointEvent(topic)) {
parseMarkers(this, topic, data);
} else if (isLevelFilter(topic)) {
parseLevelFilter(this, topic, data);
}
});
this.props.subscribe('base3d.fromws1.showFireTruckRoute', (topic, data) => {
parseMarkers(this, topic, data);
});
}
componentWillReceiveProps = nextProps => {
if (nextProps.isEditMode) {
this.markersCache.eachValue(obj => {
......@@ -80,7 +68,8 @@ export default function marker3DFactory(WrappedComponent = 'div', options) {
});
}
this.setState({ planStarted: nextProps.planStarted });
};
}
componentWillUnmount() {
this.objAnchorHelper && this.objAnchorHelper.destroy();
}
......@@ -174,13 +163,16 @@ export default function marker3DFactory(WrappedComponent = 'div', options) {
this.props.addMarker(marker);
}
};
markerCreated = ({ markersCache }) => {
let { isEditMode, stagePilot } = this.props;
markerCreated = (data) => {
let { isEditMode } = this.props;
let { markersCache } = data;
if (markersCache.cacheMap.size > 0) {
this.props.onCreated(data);
}
this.markersCache = markersCache;
this.stagePilot = stagePilot;
this.stagePilot = this.props.stagePilot;
this.outlineHelper = this.stagePilot ? this.stagePilot.outlineHelper : undefined;
markersCache.eachValue(obj => {
markersCache.eachValue(obj=>{
const extData = obj.extData;
if (isEditMode) {
this.setTopCardConf(obj, extData);
......@@ -201,8 +193,7 @@ export default function marker3DFactory(WrappedComponent = 'div', options) {
}
});
});
};
}
buildMarkerOptions = (markers, markerType, defaultParams = {}) => {
const { isEditMode } = this.props;
if (!utils.isEmpty(markers)) {
......@@ -253,6 +244,14 @@ export default function marker3DFactory(WrappedComponent = 'div', options) {
);
}
}
MarkerPoints.propTypes = {
subscribe: PropTypes.func,
updateMarker: PropTypes.func,
markers: PropTypes.object,
isEditMode: PropTypes.bool,
selectPoints: PropTypes.object,
stagePilot: PropTypes.object,
addMarker: PropTypes.func
};
return MarkerPoints;
}
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