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

bug

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