Commit 70e61363 authored by 张博's avatar 张博

bug

parent 1f261525
......@@ -21,7 +21,6 @@ class MaskContent extends Component {
this.state = {
planStarted: false,
activeAction: 'panoramic',
multiple: true,
searchPaneVisible: false
};
}
......@@ -55,7 +54,7 @@ class MaskContent extends Component {
return;
}
if (!singleClick){//设置选中状态
this.setState({ activeAction: type ,multiple: false });
this.setState({ activeAction: type });
}
this.props.onActionItemClick && this.props.onActionItemClick(type, label, showLabel);
if (type === 'search'){
......@@ -76,12 +75,13 @@ class MaskContent extends Component {
initViewModel = ()=>{
//选中全景监控、隐藏检索查询框
this.setState({ activeAction: 'panoramic',multiple: true, searchPaneVisible: false });
this.setState({ activeAction: 'panoramic', searchPaneVisible: false });
}
render() {
const { planStarted, activeAction, searchPaneVisible,multiple } = this.state;
const { planStarted, activeAction, searchPaneVisible } = this.state;
const {
multiple,
onItemClick,
layerConfig,
alarmStarted,
......@@ -147,7 +147,7 @@ MaskContent.propTypes = {
layerConfig: PropTypes.object,
onItemClick: PropTypes.func,
// 是否支持多选
//multiple: PropTypes.bool,
multiple: PropTypes.bool,
subscribe: PropTypes.func,
trigger: PropTypes.func,
showExplain: PropTypes.bool,
......@@ -173,8 +173,8 @@ MaskContent.propTypes = {
bizPerActionBars: PropTypes.arrays
};
// MaskContent.defaultProps = {
// multiple: true
// };
MaskContent.defaultProps = {
multiple: false
};
export default MaskContent;
......@@ -21,26 +21,7 @@ class SideControl extends Component {
activeControl: []
};
}
componentWillMount(){
const { activeAction } = this.props;
let activeControl = [];
if (activeAction === 'panoramic'){
let _bizControls = bizControls;
_bizControls.map((item,index)=>{
return activeControl.push(item.key);
});
}
this.setState({ activeControl },()=>this.getAreaPoint());
}
getAreaPoint(){
const { activeControl } = this.state;
const { errorAreaId: riskSourceId } = this.props;
for (let i = 0;i < activeControl.length;i++){
this.props.onItemClick && this.props.onItemClick({ ...bizControls[i] , riskSourceId }, false);
}
}
/**
* control 点击,第二次点击则取消
*/
......
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