Commit bc8e17ba authored by 张博's avatar 张博

bug

parent ef93eb7e
...@@ -123,7 +123,7 @@ class MaskContent extends Component { ...@@ -123,7 +123,7 @@ class MaskContent extends Component {
<div className="mask-content"> <div className="mask-content">
<AmosWebSocket ref={node => this.aws = node} url={wsURL} onMessage={this.handleData} reconnect debug /> <AmosWebSocket ref={node => this.aws = node} url={wsURL} onMessage={this.handleData} reconnect debug />
{ !alarmStarted && sideControlShow && <SideControl multiple={multiple} errorAreaId={errorAreaId} onItemClick={onItemClick} layerConfig={layerConfig} animationProps={controlAnimation} />} { !alarmStarted && sideControlShow && <SideControl multiple={multiple} errorAreaId={errorAreaId} onItemClick={onItemClick} layerConfig={layerConfig} animationProps={controlAnimation} />}
{ !alarmStarted && <SearchPane visible={searchPaneVisible} focusPosition={focusPosition} changeSearchPaneVisible={() => this.changeSearchPaneVisible} />} { !alarmStarted && <SearchPane visible={searchPaneVisible} focusPosition={focusPosition} changeSearchPaneVisible={this.changeSearchPaneVisible} />}
<TopMsg alarmStart={alarmStart} /> <TopMsg alarmStart={alarmStart} />
{ !alarmStarted && !isShowActionBar && <ModelHeader animationProps={controlAnimation} headerName={headerName} handleExceptModel={this.handleExceptModel} />} { !alarmStarted && !isShowActionBar && <ModelHeader animationProps={controlAnimation} headerName={headerName} handleExceptModel={this.handleExceptModel} />}
{ !alarmStarted && isShowActionBar && <ActionBar activeAction={activeAction} onActionItemClick={(e) => this.actionBarClick(e)} animationProps={controlAnimation} /> } { !alarmStarted && isShowActionBar && <ActionBar activeAction={activeAction} onActionItemClick={(e) => this.actionBarClick(e)} animationProps={controlAnimation} /> }
......
...@@ -53,6 +53,7 @@ class PointsPool extends Component { ...@@ -53,6 +53,7 @@ class PointsPool extends Component {
} }
onMarkersCreated = (type, { markersCache }) => { onMarkersCreated = (type, { markersCache }) => {
this.markerList[type] = markersCache; this.markerList[type] = markersCache;
(markersCache || []).forEach(mc => { (markersCache || []).forEach(mc => {
const extData = mc.getExtData(); const extData = mc.getExtData();
......
...@@ -14,15 +14,20 @@ class PromptModal extends Component { ...@@ -14,15 +14,20 @@ class PromptModal extends Component {
} }
}; };
saveData = () => { saveData = () => {
const { isback, type } = this.props.promptData; const { isback, type,pointType,pointParams } = this.props.promptData;
if (isback) {
this.props.handleOutExceptModel();
}
this.props.closePromptModal(); this.props.closePromptModal();
if (type === 'region') { if (type === 'region') {
this.props.saveAreaData(); this.props.saveAreaData();
} else { } else {
this.props.savePointData(); if (isback){
this.props.savePointData();
} else {
this.props.savePointAndRefreshMarker(pointType,pointParams);
}
}
if (isback) {
this.props.handleOutExceptModel();
} }
}; };
render() { render() {
...@@ -34,7 +39,7 @@ class PromptModal extends Component { ...@@ -34,7 +39,7 @@ class PromptModal extends Component {
content={ content={
<div className="prompt-content"> <div className="prompt-content">
<div>{promptData.promptContent}</div> <div>{promptData.promptContent}</div>
{promptData.btnType == 'isOk' ? ( {promptData.btnType === 'isOk' ? (
<div className="prompt-buttons"> <div className="prompt-buttons">
<span className={'promptOk'} onClick={this.saveData} /> <span className={'promptOk'} onClick={this.saveData} />
<span className={'promptNo'} onClick={this.cancel} /> <span className={'promptNo'} onClick={this.cancel} />
......
...@@ -991,7 +991,17 @@ class View3D extends Component { ...@@ -991,7 +991,17 @@ class View3D extends Component {
pointType: selectPoints.type, pointType: selectPoints.type,
position3d: `` position3d: ``
}); });
this.savePointAndRefreshMarker(pointType,pointParams); this.setState({ promptData: {
promptvisible: true,
promptContent: '确定将选中删除?',
type: 'point',
btnType: 'isOk',
isback: false,
pointType,
pointParams
}
});
//this.savePointAndRefreshMarker(pointType,pointParams);
} else if (selectPoints && selectPoints.isRegion && selectPoints.children){ } else if (selectPoints && selectPoints.isRegion && selectPoints.children){
let pointParams = []; let pointParams = [];
pointParams = selectPoints.children.filter(e => e.position3d && e.position3d.length > 0).map(item=>{ pointParams = selectPoints.children.filter(e => e.position3d && e.position3d.length > 0).map(item=>{
...@@ -1001,13 +1011,15 @@ class View3D extends Component { ...@@ -1001,13 +1011,15 @@ class View3D extends Component {
position3d: '' position3d: ''
}; };
}); });
this.savePointAndRefreshMarker(pointType,pointParams); //this.savePointAndRefreshMarker(pointType,pointParams);
this.setState({ promptData: { this.setState({ promptData: {
promptvisible: true, promptvisible: true,
promptContent: '是否删除该区域下所有点?', promptContent: '是否删除该区域下所有点?',
type: 'point', type: 'point',
btnType: 'isOk', btnType: 'isOk',
isback: false isback: false,
pointType,
pointParams
} }
}); });
} }
...@@ -1147,12 +1159,13 @@ class View3D extends Component { ...@@ -1147,12 +1159,13 @@ class View3D extends Component {
this.setState({ this.setState({
pointType, pointType,
treeData: [], treeData: [],
treeDataList: [],
selectArea: '', selectArea: '',
selectPoints: '', selectPoints: '',
dragItem: '' dragItem: ''
}); });
getPointTreeAction(pointType).then(data => { getPointTreeAction(pointType).then(data => {
//alert(JSON.stringify(data)) this.generateList(data);
this.getPointList(pointType,data); this.getPointList(pointType,data);
this.setState({ this.setState({
pointType, pointType,
...@@ -1207,6 +1220,7 @@ class View3D extends Component { ...@@ -1207,6 +1220,7 @@ class View3D extends Component {
} }
const isInside = this.polygonRegion[dragItem.parentId].pointInPolygon([position.x,position.y,position.z]); const isInside = this.polygonRegion[dragItem.parentId].pointInPolygon([position.x,position.y,position.z]);
console.log(isInside); console.log(isInside);
if (dragItem) { if (dragItem) {
if (isInside === false) { if (isInside === false) {
message.danger('只能放置在当前区域'); message.danger('只能放置在当前区域');
...@@ -1271,28 +1285,6 @@ class View3D extends Component { ...@@ -1271,28 +1285,6 @@ class View3D extends Component {
}); });
} }
} }
changeMarkerType = (item, isCancel) => {
const { markers } = this.state;
if (item.isLine) {
this.setState({
toggleRoad: !isCancel
});
} else {
if (isCancel) {
markers[item.type] = [];
this.setState({
markers
});
} else {
// if (totalDelta < mousewheelCount) {
this.asyncLoadMarkerData(item.type);
}
}
};
asyncLoadMarkerData = (markerType, riskSourceId) => { asyncLoadMarkerData = (markerType, riskSourceId) => {
const { markers } = this.state; const { markers } = this.state;
this.setState({ showMap: false }); this.setState({ showMap: false });
...@@ -1702,6 +1694,7 @@ class View3D extends Component { ...@@ -1702,6 +1694,7 @@ class View3D extends Component {
<PromptModal promptData={promptData} <PromptModal promptData={promptData}
saveAreaData={this.saveAreaData} saveAreaData={this.saveAreaData}
handleOutExceptModel={this.handleOutExceptModel} handleOutExceptModel={this.handleOutExceptModel}
savePointAndRefreshMarker={(pointType,pointParams)=>this.savePointAndRefreshMarker(pointType,pointParams)}
savePointData={this.savePointData} savePointData={this.savePointData}
closePromptModal={this.closePromptModal} closePromptModal={this.closePromptModal}
/> />
......
...@@ -10,7 +10,7 @@ const getParentKey = (key, tree) => { ...@@ -10,7 +10,7 @@ const getParentKey = (key, tree) => {
let parentKey; let parentKey;
for (let i = 0; i < tree.length; i++) { for (let i = 0; i < tree.length; i++) {
const node = tree[i]; const node = tree[i];
if (node.children && node.children.length >0) { if (node.children && node.children.length > 0) {
if (node.children.some(item => item.id === key)) { if (node.children.some(item => item.id === key)) {
parentKey = node.id; parentKey = node.id;
} else if (getParentKey(key, node.children)) { } else if (getParentKey(key, node.children)) {
...@@ -39,40 +39,9 @@ class AreaLeftTree extends Component { ...@@ -39,40 +39,9 @@ class AreaLeftTree extends Component {
} }
componentDidMount() { onSearchChange =(e,value) => {
let {treeData,pointTypeArr,treeDataList} = this.props;
this.setState({
treeData,
treeDataList,
pointTypeArr,
pointType: pointTypeArr[0]?pointTypeArr[0].code:''
})
}
componentWillUnmount() {
}
componentWillReceiveProps(nextProps) {
console.log(nextProps)
let {treeData,pointTypeArr,pageType,treeDataList} = nextProps;
this.setState({
treeData,
pointTypeArr,
treeDataList,
pointType: pointTypeArr[0]?pointTypeArr[0].code:''
})
}
// onSelectChange = (value, item) =>{ const { treeDataList,treeData } = this.props;
// console.log(value, item);
// this.state.pointType = value;
// this.props.pointTypeChange(value);
// }
onSearchChange = e => {
const {treeDataList,treeData} = this.state
const value = e.target.value;
const expandedKeys = treeDataList const expandedKeys = treeDataList
.map(item => { .map(item => {
if (item.title.indexOf(value) > -1) { if (item.title.indexOf(value) > -1) {
...@@ -98,44 +67,16 @@ class AreaLeftTree extends Component { ...@@ -98,44 +67,16 @@ class AreaLeftTree extends Component {
autoExpandParent: false autoExpandParent: false
}); });
} }
// onCheck = (checkedKeys,e) => {
// console.log('onCheck', checkedKeys);
// // console.log('onCheck', e);
// let currentKey = checkedKeys.checked[0]?checkedKeys.checked[checkedKeys.checked.length-1]:'';
// if (checkedKeys.checked.length<2) {
// currentKey = checkedKeys.checked[0]
// } else {
// if (checkedKeys.checked[0] == this.state.checkedKeys[0]) {
// currentKey = checkedKeys.checked[1]
// } else {
// currentKey = checkedKeys.checked[0]
// }
// }
// // checkedKeys[0] = checkedKeys[checkedKeys.length - 1]
// this.setState({ checkedKeys: currentKey?[currentKey]:[] });
// this.props.selectItemChange(currentKey);
// if (currentKey) {
// this.props.startDrow(currentKey);
// }else {
// this.props.stopDrowing()
// }
// }
drowArea = (editItem) => {
}
onTreeSelect = (selectedKeys, info) => { onTreeSelect = (selectedKeys, info) => {
console.log('onSelect', info); console.log('onSelect', info);
let selectItem = info.node.props.dataRef; let selectItem = info.node.props.dataRef;
this.setState({ selectedKeys }); this.setState({ selectedKeys });
this.props.selectItemChange(selectItem); this.props.selectItemChange(selectItem);
} }
// onClick={(e)=>{e.nativeEvent.stopImmediatePropagation();e.stopPropagation();console.log(123123);}}
renderTreeNodes = (data) => { renderTreeNodes = (data) => {
let {searchValue} =this.state let { searchValue } = this.state;
// console.log(data); if (data.length > 0) {
if (data.length>0) {
return data.map((item) => { return data.map((item) => {
const index = item.name.indexOf(searchValue); const index = item.name.indexOf(searchValue);
const beforeStr = item.name.substr(0, index); const beforeStr = item.name.substr(0, index);
...@@ -152,14 +93,14 @@ class AreaLeftTree extends Component { ...@@ -152,14 +93,14 @@ class AreaLeftTree extends Component {
); );
if (item.children) { if (item.children) {
return ( return (
<TreeNode <TreeNode
title={ title={
<div> <div>
{ {
<span > <span >
{title} {title}
<span className='icon'> <span className='icon'>
{ {
item.isBind ? '' : item.isBind ? '' :
<img <img
src={moduleEditIcon.editBtn} src={moduleEditIcon.editBtn}
...@@ -170,18 +111,18 @@ class AreaLeftTree extends Component { ...@@ -170,18 +111,18 @@ class AreaLeftTree extends Component {
}} }}
/> />
} }
{ {
item.isBind ? <img src={moduleEditIcon.bindedTip} alt='' /> : item.isBind ? <img src={moduleEditIcon.bindedTip} alt='' /> :
item.routePath ? <img src={moduleEditIcon.noSaveTip} alt='' /> : item.routePath ? <img src={moduleEditIcon.noSaveTip} alt='' /> :
<img src={moduleEditIcon.noSaveTip} alt='' /> <img src={moduleEditIcon.noSaveTip} alt='' />
} }
</span>
</span> </span>
</span>
} }
</div> </div>
} }
key={item.id} key={item.id}
dataRef={item} dataRef={item}
> >
{this.renderTreeNodes(item.children)} {this.renderTreeNodes(item.children)}
</TreeNode> </TreeNode>
...@@ -192,44 +133,45 @@ class AreaLeftTree extends Component { ...@@ -192,44 +133,45 @@ class AreaLeftTree extends Component {
} }
render() { render() {
let { treeData, checkedKeys,pointTypeArr,pointType} = this.state; let { treeData } = this.props;
let { pageType } = this.props; return (
return (
<div className="leftTree"> <div className="leftTree">
<div className='leftContainer'> <div className='leftContainer'>
<div className='topForm'> <div className='topForm'>
<Search className='leftSearch' icon="search" onChange={this.onSearchChange} onIconClick={this.onSearchChange} /> <Search className='leftSearch' icon="search" onChange={this.onSearchChange} onIconClick={this.onSearchChange} />
</div> </div>
<div className='treeBox'> <div className='treeBox'>
<Tree <Tree
// checkable // checkable
// checkStrictly // checkStrictly
selectable={true} selectable
onExpand={this.onExpand} onExpand={this.onExpand}
expandedKeys={this.state.expandedKeys} expandedKeys={this.state.expandedKeys}
autoExpandParent={true} autoExpandParent
// onCheck={this.onCheck} // onCheck={this.onCheck}
// checkedKeys={checkedKeys} // checkedKeys={checkedKeys}
onSelect={this.onTreeSelect} onSelect={this.onTreeSelect}
selectedKeys={this.state.selectedKeys} selectedKeys={this.state.selectedKeys}
blockNode blockNode
> >
{this.renderTreeNodes(treeData)} {this.renderTreeNodes(treeData)}
</Tree> </Tree>
</div> </div>
<div className='bottomBtns'> <div className='bottomBtns'>
<Button <Button
className='sureBtn' className='sureBtn'
onClick={() => { onClick={() => {
this.props.saveAreaData() this.props.saveAreaData();
}} ></Button> }}
<Button />
className='deleteBtn' <Button
onClick={() => { className='deleteBtn'
this.props.deleteAreaBind() onClick={() => {
}} ></Button> this.props.deleteAreaBind();
</div> }}
/>
</div> </div>
</div>
</div> </div>
); );
......
...@@ -43,34 +43,14 @@ class PointLeftTree extends Component { ...@@ -43,34 +43,14 @@ class PointLeftTree extends Component {
} }
componentDidMount() {
let { treeData, pointTypeArr, treeDataList } = this.props;
this.setState({
treeData,
treeDataList,
pointTypeArr,
pointType: pointTypeArr[0]?pointTypeArr[0].code:''
});
// console.log(this.props)
}
componentWillReceiveProps(nextProps) {
console.log(nextProps);
let { treeData,treeDataList } = nextProps;
this.setState({
treeData,
treeDataList
});
}
onSelectChange = (value, item) =>{ onSelectChange = (value, item) =>{
console.log(value, item); console.log(value, item);
this.setState({ pointType: value }); this.setState({ pointType: value });
this.props.pointTypeChange(value); this.props.pointTypeChange(value);
} }
onSearchChange = e => { onSearchChange =(e,value) => {
const { treeDataList,treeData } = this.state; const { treeDataList,treeData } = this.props;
const value = e.target.value;
const expandedKeys = treeDataList const expandedKeys = treeDataList
.map(item => { .map(item => {
if (item.title.indexOf(value) > -1) { if (item.title.indexOf(value) > -1) {
...@@ -121,40 +101,40 @@ class PointLeftTree extends Component { ...@@ -121,40 +101,40 @@ class PointLeftTree extends Component {
); );
if (item.children) { if (item.children) {
return ( return (
<TreeNode <TreeNode
title={ title={
<div> <div>
{item.isRegion ? {item.isRegion ?
<span> <span>
{title} {title}
<span className='icon'> <span className='icon'>
{ {
item.isRegion ? item.isBind ? <img src={moduleEditIcon.bindedTip} alt='' /> : item.isRegion ? item.isBind ? <img src={moduleEditIcon.bindedTip} alt='' /> :
<img src={moduleEditIcon.nobindTip} alt='' /> : <img src={moduleEditIcon.nobindTip} alt='' /> :
item.isBind ? <img src={moduleEditIcon.bindedTip} alt='' /> : item.isBind ? <img src={moduleEditIcon.bindedTip} alt='' /> :
item.position3d ? <img src={moduleEditIcon.noSaveTip} alt='' /> : item.position3d ? <img src={moduleEditIcon.noSaveTip} alt='' /> :
<img src={moduleEditIcon.nobindTip} alt='' /> <img src={moduleEditIcon.nobindTip} alt='' />
} }
</span> </span>
</span> : </span> :
<span <span
draggable draggable
onDragStart={() => { onDragStart={() => {
this.props.dragItemChange(item); this.props.dragItemChange(item);
}} }}
> >
{title} {title}
<span className='icon'> <span className='icon'>
{ {
item.isRegion ? item.isBind ? <img src={moduleEditIcon.bindedTip} alt='' /> : item.isRegion ? item.isBind ? <img src={moduleEditIcon.bindedTip} alt='' /> :
<img src={moduleEditIcon.nobindTip} alt='' /> : <img src={moduleEditIcon.nobindTip} alt='' /> :
item.isBind ? <img src={moduleEditIcon.bindedTip} alt='' /> : item.isBind ? <img src={moduleEditIcon.bindedTip} alt='' /> :
item.position3d ? <img src={moduleEditIcon.noSaveTip} alt='' /> : item.position3d ? <img src={moduleEditIcon.noSaveTip} alt='' /> :
<img src={moduleEditIcon.nobindTip} alt='' /> <img src={moduleEditIcon.nobindTip} alt='' />
} }
</span> </span>
</span>} </span>}
</div> </div>
} }
key={item.id} key={item.id}
dataRef={item} dataRef={item}
...@@ -179,7 +159,8 @@ class PointLeftTree extends Component { ...@@ -179,7 +159,8 @@ class PointLeftTree extends Component {
this.props.selectPointChange(selectItem); this.props.selectPointChange(selectItem);
} }
render() { render() {
let { treeData,pointTypeArr,pointType } = this.state; const { treeData,pointTypeArr } = this.props;
const pointType = pointTypeArr[0] ? pointTypeArr[0].code : '';
return ( return (
<div className="leftTree"> <div className="leftTree">
<div className='leftContainer'> <div className='leftContainer'>
......
...@@ -2,13 +2,13 @@ import React, { Component } from 'react'; ...@@ -2,13 +2,13 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { utils } from 'amos-tool'; import { utils } from 'amos-tool';
import { Markers } from 'amos-3d/lib/designer'; import { Markers } from 'amos-3d/lib/designer';
import { BaseObjHelper } from 'base-r3d/lib/factory';
import formatUrl from 'amos-processor/lib/utils/urlFormat'; import formatUrl from 'amos-processor/lib/utils/urlFormat';
import { CONSTS } from './../../consts/storageConsts'; import { CONSTS } from './../../consts/storageConsts';
import PointDialog from './PointDialog'; import PointDialog from './PointDialog';
import { tirggerPlanTopic } from './../dataProcessor'; import { tirggerPlanTopic } from './../dataProcessor';
import { marker3DIoncMapper, markerTitleBgMapper } from './../../consts/imgStatic'; import { marker3DIoncMapper, markerTitleBgMapper } from './../../consts/imgStatic';
import MarkerIcon from './MarkerIcon'; import { eventTopics, isPointEvent , isLevelFilter } from './../consts';
import { parseMarkers, parseLevelFilter } from '../dataProcessor';
const getIcon = (markerType, level) => { const getIcon = (markerType, level) => {
// return marker3DIoncMapper[`${markerType}_${level}`]; // return marker3DIoncMapper[`${markerType}_${level}`];
...@@ -18,17 +18,17 @@ const getIcon = (markerType, level) => { ...@@ -18,17 +18,17 @@ const getIcon = (markerType, level) => {
return marker3DIoncMapper[`${markerType}`]; return marker3DIoncMapper[`${markerType}`];
}; };
const createMarkerLabel = text => { // const createMarkerLabel = text => {
const div = document.createElement('div'); // const div = document.createElement('div');
div.style.position = 'absolute'; // div.style.position = 'absolute';
div.style.marginTop = '-3rem'; // div.style.marginTop = '-3rem';
div.className = 'three-ui-anchor'; // div.className = 'three-ui-anchor';
div.innerText = text; // div.innerText = text;
return div; // return div;
}; // };
const urlMapper = { const urlMapper = {
fireCar: { file: 'fire-car', label: '消防车' }, fireCar: { file: 'fire-car', label: '消防车' },
fireEquipment: { file: 'pool', label: '消防' }, fireEquipment: { file: 'fireEquip', label: '消防设备' },
fireFoamRoom: { file: 'fireFoam', label: '泡沫间' }, fireFoamRoom: { file: 'fireFoam', label: '泡沫间' },
fireChamber: { file: 'fireChamber', label: '消防室' }, fireChamber: { file: 'fireChamber', label: '消防室' },
hydrant: { file: 'hydrant', label: '消防栓' }, hydrant: { file: 'hydrant', label: '消防栓' },
...@@ -47,6 +47,7 @@ export default function marker3DFactory(WrappedComponent = 'div', options) { ...@@ -47,6 +47,7 @@ export default function marker3DFactory(WrappedComponent = 'div', options) {
constructor(props) { constructor(props) {
super(props); super(props);
this.markerList = {};
this.markerEvents = { this.markerEvents = {
click: this.onMarkerClick, click: this.onMarkerClick,
// dblclick: this.onMarkerDblClick, // dblclick: this.onMarkerDblClick,
...@@ -83,12 +84,23 @@ export default function marker3DFactory(WrappedComponent = 'div', options) { ...@@ -83,12 +84,23 @@ export default function marker3DFactory(WrappedComponent = 'div', options) {
componentWillMount = () => { componentWillMount = () => {
this.setState({ planStarted: this.props.planStarted }); 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 => { componentWillReceiveProps = nextProps => {
if (nextProps.isEditMode) { if (nextProps.isEditMode) {
this.markersCache.eachValue(obj => { this.markersCache.eachValue(obj => {
// this.setTopCardConf(obj, obj.extData); // this.setTopCardConf(obj, obj.extData);
if (nextProps.selectPoints.type == obj.extData.type && nextProps.selectPoints.id == obj.extData.id) { if (nextProps.selectPoints.type === obj.extData.type && nextProps.selectPoints.id === obj.extData.id) {
this.setTwinkleConf(obj); this.setTwinkleConf(obj);
} }
}); });
...@@ -150,16 +162,15 @@ export default function marker3DFactory(WrappedComponent = 'div', options) { ...@@ -150,16 +162,15 @@ export default function marker3DFactory(WrappedComponent = 'div', options) {
this.outlineHelper = this.stagePilot ? this.stagePilot.outlineHelper : undefined; this.outlineHelper = this.stagePilot ? this.stagePilot.outlineHelper : undefined;
markersCache.eachValue(obj => { markersCache.eachValue(obj => {
this.setTopCardConf(obj, obj.extData); this.setTopCardConf(obj, obj.extData);
if (obj.extData.type === 'riskSource' && markerType != 'impEquipmentMode' && !isEditMode) { if (obj.extData.type === 'riskSource' && markerType !== 'impEquipmentMode' && !isEditMode) {
this.setTwinkleConf(obj); this.setTwinkleConf(obj);
} }
}); });
}; };
setTwinkleConf = obj => { setTwinkleConf = obj => {
const { twinkle, frequency } = obj.extData; const { twinkle, frequency } = obj.extData;
let pulsePeriod = twinkle && frequency != 0 ? 1 / frequency : null; let pulsePeriod = twinkle && frequency !== 0 ? 1 / frequency : null;
let color = twinkle && frequency != 0 ? '#FF0000' : null; let color = twinkle && frequency !== 0 ? '#FF0000' : null;
if (!obj.baseObjHelper.outlineHelper) { if (!obj.baseObjHelper.outlineHelper) {
obj.baseObjHelper.setOutlineHelper(this.outlineHelper); obj.baseObjHelper.setOutlineHelper(this.outlineHelper);
} }
......
...@@ -261,14 +261,18 @@ class SearchPane extends Component { ...@@ -261,14 +261,18 @@ class SearchPane extends Component {
} }
} }
closeModal(){
this.props.changeSearchPaneVisible();
this.setState({ activeKey: 'search' },()=>this.paramsOnChange([]));
}
render() { render() {
const { dataList,activeKey,retrieveType,totalCount,msgDataList,recordDataList,trajectoryDataList } = this.state; const { dataList,activeKey,retrieveType,totalCount,msgDataList,recordDataList,trajectoryDataList } = this.state;
return ( return (
<div> <div>
{ this.props.visible && <div className="search-pane-bg" /> } { this.props.visible && <div className="search-pane-bg" /> }
{ this.props.visible && <SidePane className="search-pane"> { this.props.visible && <SidePane className="search-pane">
<div className="search-pane-close" onClick={this.props.changeSearchPaneVisible()}> <div className="search-pane-close" onClick={()=>this.closeModal()}>
<Icon icon="close" /> <Icon icon="close" />
</div> </div>
<Tabs <Tabs
......
...@@ -3,8 +3,7 @@ import PropTypes from 'prop-types'; ...@@ -3,8 +3,7 @@ import PropTypes from 'prop-types';
import { SidePane } from 'amos-framework'; import { SidePane } from 'amos-framework';
import { Store } from 'amos-tool'; import { Store } from 'amos-tool';
import BizControlPane from './BizControlPane'; import BizControlPane from './BizControlPane';
import InnateControlPane from './InnateControlPane'; import { bizControls } from './../conf';
import { viewController, bizControls } from './../conf';
const loginUserName = Store.lsTool.read('userName'); const loginUserName = Store.lsTool.read('userName');
const filterUser = ['tianbo', 'opera1', 'opera2']; const filterUser = ['tianbo', 'opera1', 'opera2'];
...@@ -54,7 +53,7 @@ class SideControl extends Component { ...@@ -54,7 +53,7 @@ class SideControl extends Component {
}; };
render() { render() {
const { layerConfig, animationProps } = this.props; const { animationProps } = this.props;
let _bizControls = bizControls; let _bizControls = bizControls;
if (filterUser.includes(loginUserName)) { if (filterUser.includes(loginUserName)) {
let target = _bizControls.find(item => item.key === 'fireResource-point'); let target = _bizControls.find(item => item.key === 'fireResource-point');
......
This diff is collapsed.
This diff is collapsed.
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