Commit fb3f65bf authored by 张博's avatar 张博

bug

parents bc8e17ba 876bde88
......@@ -3,6 +3,8 @@ import * as helper from 'base-r3d/lib/utils/helper';
import { FscSerUrl, FasSerUrl } from './../consts/urlConsts';
import { commonGet, commonPost, singleFetch } from './../utils/request';
import { encodeUrl } from 'amos-tool';
//---------------- 加载模型、解析模型json -----------
export const getObjFromNet = (url, callback) => {
return singleFetch(url).then(data => {
......@@ -10,10 +12,15 @@ export const getObjFromNet = (url, callback) => {
// 临时将 asyncModels 也放在主线程
const { basePath, asyncModels = [] } = data;
const _asyncModels = asyncModels.map(m => ({
const _asyncModels = asyncModels.map(m => {
const { objName, mtlName, ...rest } = m;
return {
basePath,
...m
}));
...rest,
objName: encodeUrl(objName),
mtlName: encodeUrl(mtlName)
};
});
// const _objs = objs.concat(_asyncModels);
callback(objs, _asyncModels);
......
export const chunk = (arr,size) => {
let objArr = [];
let index = 0;
let objArrlen = arr.length / size;
for (let i = 0;i < objArrlen;i++){
let arrTemp = [];
for (let j = 0;j < size;j++){
arrTemp[j] = arr[index++];
if (index === arr.length){
break;
}
}
objArr[i] = arrTemp;
}
return objArr;
};
......@@ -4,7 +4,6 @@ import { Connect } from 'amos-framework';
import AmosWebSocket from 'amos-websocket';
import SysWsURL, { completeToken } from './../consts/wsUrlConsts';
import SideControl from './sideControl';
import DataPane from './datapane';
import globalMsg from './pagefactory/msgFactory';
import { eventTopics, rulesDataFactory } from './consts';
import LayerPool from './LayerPool';
......@@ -17,7 +16,6 @@ const eventConnect = Connect.eventConnect;
@eventConnect
class MaskContent extends Component {
constructor(props) {
super(props);
this.state = {
......@@ -72,7 +70,8 @@ class MaskContent extends Component {
}
initViewModel = ()=>{
this.setState({ activeAction: 'panoramic' });
//选中全景监控、隐藏检索查询框
this.setState({ activeAction: 'panoramic', searchPaneVisible: false });
}
render() {
......@@ -101,14 +100,6 @@ class MaskContent extends Component {
transitionAppear: true
}
};
const datapaneAnim = {
animateName: 'zoom-comb-right',
visible: !planStarted && !alarmStarted,
animateProps: {
key: 'animate-datapane', // animate key
transitionAppear: true
}
};
const layerPoolAnimation = {
animateName: 'fade',
visible: alarmStarted,
......@@ -123,7 +114,11 @@ class MaskContent extends Component {
<div className="mask-content">
<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} />}
<<<<<<< HEAD
{ !alarmStarted && <SearchPane visible={searchPaneVisible} focusPosition={focusPosition} changeSearchPaneVisible={this.changeSearchPaneVisible} />}
=======
{ !alarmStarted && isShowActionBar && <SearchPane visible={searchPaneVisible} focusPosition={focusPosition} changeSearchPaneVisible={() => this.changeSearchPaneVisible} />}
>>>>>>> 876bde88e84eb33f87d6e192dd5d0e5e70297f58
<TopMsg alarmStart={alarmStart} />
{ !alarmStarted && !isShowActionBar && <ModelHeader animationProps={controlAnimation} headerName={headerName} handleExceptModel={this.handleExceptModel} />}
{ !alarmStarted && isShowActionBar && <ActionBar activeAction={activeAction} onActionItemClick={(e) => this.actionBarClick(e)} animationProps={controlAnimation} /> }
......@@ -154,7 +149,9 @@ MaskContent.propTypes = {
headerName: PropTypes.string,
setHeaderName: PropTypes.string,
handleExceptModel: PropTypes.func,
errorAreaId: PropTypes.number
errorAreaId: PropTypes.number,
editModelChange: PropTypes.func,
focusPosition: PropTypes.func
};
MaskContent.defaultProps = {
......
......@@ -15,7 +15,15 @@ import { desigerConf, desigerHelperConfig } from './conf';
import PointsPool from './PointsPool';
import PromptModal from './PromptModal';
import { eventTopics, isControllerEvent, isManualOperate } from './consts';
import { executeView3dCMD, parseManual, parseBubbleMarkers, tirggerPlanTopic, tirggerTransTopic } from './dataProcessor';
import {
executeView3dCMD,
parseManual,
parseBubbleMarkers,
tirggerPlanTopic,
tirggerTransTopic,
cacheObjsSave,
flyToSubView
} from './dataProcessor';
import {
dealTroubleMarkers,
assembleTroubleView,
......@@ -40,6 +48,7 @@ import RightEditRegionPanel from './moduleEditComponent/RightEditRegionPanel';
import { EVENTS_CONSTS } from '../consts/EventConsts';
import ExceptionArea from './exceptionArea/ExceptionArea';
import { exceptionRegionListAction,getPointsByRegionIdAction } from '../services/panoramicService';
import { chunk } from '../utils/MathUtils';
const AmosConfig = endConf.AmosConfig;
......@@ -167,6 +176,8 @@ class View3D extends Component {
onMouseMove: this.onMouseMove
};
this._marker = [];
this._cacheObj = {};//3维模型对象缓存
this.processorLevel = {};//3维模型对应关系缓存
}
componentDidMount() {
......@@ -259,9 +270,8 @@ class View3D extends Component {
this.r3d.on('keydown', evt => {
// 返回上级
if (this.lensLevel === LENS_LEVEL.SUB && evt.code === 'Backspace') {
this.lensJumpFactory.jumpRoot(obj => {
this.lensJumpFactory.fadeIn(obj);
});
this.initModelDisplay();
this.outlineFactory.toggleOutline([]);//清除选中
this.lensLevel = LENS_LEVEL.ROOT;
}
});
......@@ -269,7 +279,7 @@ class View3D extends Component {
_bindPubSubEvents = () => {
this.props.subscribe(eventTopics.base3d_view, (topic, data) => {
console.log('subscribe base3d_view');
console.log('subscribe base3d_view' + data);
if (isControllerEvent(topic)) {
executeView3dCMD(this, topic, data);
} else if (isManualOperate(topic)) {
......@@ -493,7 +503,8 @@ class View3D extends Component {
onAllDone = objGroup => {
this.sceneFactory.level.change(objGroup);
this.stagePilot.rendererFactory.setupUModelSahdow();//接受阴影
// 接受阴影
this.stagePilot.rendererFactory.setupUModelSahdow();
this.setState({
startAsyncLoad: true
});
......@@ -509,15 +520,14 @@ class View3D extends Component {
onComplete = obj => {
const me = this;
cacheObjsSave(me,obj,LENS_LEVEL);//缓存对象及对应关系
if (!obj.isForceParent) {
obj.on('click', evt => {
if (this.state.isEditMode === false) {
console.log('obj click:', evt);
// this.focusPosition(evt.pickedPosition);
me.outlineFactory.toggleOutline(evt.object);
me.focusObject(evt.object);
flyToSubView(me,obj,LENS_LEVEL);
}
});
}
// 处理跳跃
......@@ -542,15 +552,8 @@ class View3D extends Component {
// 飞行到具体的 obj 之后,执行进入层级操作
onComplete() {
console.log('fly done!', object);
// 进入子层级
if (object.foreignKey) {
me.lensJumpFactory.jumpInByForeignKey(object.foreignKey, excludeObj => {
// 处理非该层级的物体 (fadeOut)
me.lensJumpFactory.fadeOut(excludeObj);
});
me.lensLevel = LENS_LEVEL.SUB;
}
}
});
} else if (me.state.alarmStarted) {
if (me.state.planStarted && object.name.split('#')[1] === 'building_01') {
......@@ -923,10 +926,8 @@ class View3D extends Component {
//保存点绑定
savePointData = () => {
let { markers, pointType } = this.state;
this.setState({ isPointSave: false });
if (pointType === 'fireEquipment') {
let typeArr = ['fireEquipment','pool','hydrant','fireChamber','fireCar','fireFoamRoom'];
for (let i = 0;i < typeArr.length;i++){
......@@ -956,6 +957,7 @@ class View3D extends Component {
};
});
this.savePointList(pointType,paramsArr);
this.stagePilot.positionCtl.clearDrag();
}
}
......@@ -964,6 +966,7 @@ class View3D extends Component {
data => {
getPointTreeAction(pointType).then(
data => {
this.getPointList(pointType,data);
this.setState({
treeData: data || [],
pageType: 'point',
......@@ -975,9 +978,7 @@ class View3D extends Component {
},error =>{
isfirst && message.error('保存失败');
}
);
});
}
// 删除点绑定
......@@ -1211,7 +1212,6 @@ class View3D extends Component {
message.danger('只能放置未绑定的标记点');
return false;
}
}
const objs = this.a3dRef.pickerCoordinate(event.clientX, event.clientY, null, true);
let position;
......@@ -1243,14 +1243,15 @@ class View3D extends Component {
let selectPoints = {
id: dragItem.id,
type: dragItem.type
type: dragItem.type,
position: position.toArray()
};
markers[`${type}`] = markers[`${type}`] && markers[`${type}`].filter(e => e.id !== dragItem.id );
markers[`${type}`].push(addPointParam);
this.setState({
markers: deepCopy(markers),
selectPoints
// positionxyz: position.toArray()
selectPoints,
showRightPanel: true
});
}
}
......@@ -1559,6 +1560,7 @@ class View3D extends Component {
});
} else if (type === 'out_except_model'){
this.stagePilot.positionCtl.clearDrag();
this.initModelDisplay();
if (isAreaSave){
this.setState({ promptData:
{
......@@ -1588,6 +1590,18 @@ class View3D extends Component {
}
}
/**
*
*初始化模型显示(显示所有3维模型),清除选中
* @memberof View3D
*/
initModelDisplay =()=>{
this.lensJumpFactory.jumpRoot(obj => {
this.lensJumpFactory.fadeIn(obj);
});
this.outlineFactory.toggleOutline([]);
}
setHeaderName =(name)=>{
this.setState({ headerName: name });
}
......@@ -1602,6 +1616,24 @@ class View3D extends Component {
return object;
}
/**
*多线程加载子模型
*
* @memberof View3D
*/
multLoadWorkerObjContent =(asyncModels)=>{
const sliceArry = chunk(asyncModels, 5);//每5个一组
return sliceArry.map(objs=>{
return <WorkerObjContent
onComplete={this.onComplete}
objs={objs}
onWorkerMessage={this.onWorkerLoading}
enableLoading
afterInit={this.onAfterWorkerInit}
/>;
});
}
addMarker=({ extData, position })=>{
const me = this;
const { markers } = me.state;
......@@ -1743,14 +1775,14 @@ class View3D extends Component {
positionCtlProps={positionCtlProps}
onCreated={this.onGraphCreated}
>
{startAsyncLoad && <WorkerObjContent objs={asyncModels} onWorkerMessage={this.onWorkerLoading} enableLoading afterInit={this.onAfterWorkerInit} />}
{startAsyncLoad && this.multLoadWorkerObjContent(asyncModels)}
{isEditMode && pageType === 'region' ? '' :
<PointsPool markers={markers} isEditMode={isEditMode} selectPoints={selectPoints} updateMarker={this.updateMarker} planStarted={alarmStarted} stagePilot={this.stagePilot} positionCtl={this.positionCtl} addMarker={this.addMarker} ref={node => this.pointsPool = node} />}
{fireTruckRoute && <FatLine {...lineData.fatLineConf} linePath={JSON.parse(fireTruckRoute)} visible={showFireTruckRoute} />}
<FlameFire position={firePosition} width={10} height={20} depth={8} sliceSpacing={1} visible={planStarted} />
{isEditMode && this.renderAreas()}
{this.renderPolygonRegion(exceptionAreas)}
{startLoadExceptionArea && <ExceptionArea markers={exceptionMarkers} handleExceptModel={this.handleExceptModel} focusPosition={this.focusPosition} />}
{startLoadExceptionArea && <ExceptionArea markers={exceptionMarkers} handleExceptModel={this.handleExceptModel} focusObject={this.focusObject} />}
</A3DDesigner>
</div>
{ isEditMode &&
......@@ -1778,6 +1810,7 @@ class View3D extends Component {
pageType={pageType}
treeDataList={treeDataList}
// pointType={pointType}
markers={markers}
pointTypeArr={pointTypeArr}
pointTypeChange={this.pointTypeChange}
dragItemChange={this.dragItemChange}
......
......@@ -311,8 +311,8 @@ export const desigerConf = {
fov: 45,
near: 1,
far: 5000,
position: [-12.560443473044181, 234.91788662409795, 325.0800512251056],
target: [2.408441971875859, 1.3271790975878637, 3.918674823963386],
position: [-66.72828735496893, 239.00238807176638, 340.1218562325041],
target: [-52.608562486768115, -6.882567219297089, 1.984922473879572],
// 是否启用拾取器
enablePicker: true,
builtInOrbit: {
......@@ -357,8 +357,8 @@ export const curveConf = {
export const desigerHelperConfig = {
cameraEffect: {
position: [-12.560443473044181, 234.91788662409795, 325.0800512251056],
target: [2.408441971875859, 1.3271790975878637, 3.918674823963386]
position: [-66.72828735496893, 239.00238807176638, 340.1218562325041],
target: [-52.608562486768115, -6.882567219297089, 1.984922473879572]
},
objAnchor: {
position: [0, 5, 0]
......
......@@ -344,4 +344,56 @@ export const objRunning = (markerObj, routePath, delayTime) => {
});
};
/**
* 模型对象缓存
* @param {object} instance
* @param {object} obj
*/
export const cacheObjsSave = (instance,obj,LENS_LEVEL)=>{
const { level, parentKey, key } = obj.userData || {};
if (level && key){
instance._cacheObj[key] = obj;
switch (level) {
case LENS_LEVEL.ROOT:// 父节点
if (!instance.processorLevel[key]){
instance.processorLevel[key] = [];
}
break;
case LENS_LEVEL.SUB:// 子节点
if (!instance.processorLevel[parentKey]){
instance.processorLevel[parentKey] = [];
}
instance.processorLevel[parentKey].push(key);// 在对应关系中,添加其子节点
break;
default:
break;
}
}
};
/**
* 进入选择物体内部
* @param {object} instance
* @param {object} obj
*/
export const flyToSubView = (instance,obj,LENS_LEVEL) =>{
const { level, key: objKey, fitView } = obj.userData || {};
if (level && objKey && level === 'root' && (instance.processorLevel[objKey] || []).length > 0){
Object.keys(instance.processorLevel).forEach(key => {
// 隐藏所有一级
instance._cacheObj[key].visible = false;
// 隐藏非目标二级
if (key !== objKey){
instance.processorLevel[key].forEach(sec => {
instance._cacheObj[sec].visible = false;
});
}
});
// 镜头切换
fitView && instance.cameraFactory.fitView(fitView);//视角调整为最近视角
instance.lensLevel = LENS_LEVEL.SUB;
} else {
instance.focusObject(obj);
}
};
......@@ -44,10 +44,9 @@ class ExceptionArea extends Component {
}
onMarkerClick = (marker) => {
console.log(marker);
const { extData } = marker;
const { extData, node } = marker;
this.props.handleExceptModel && this.props.handleExceptModel('into_except_model',extData.id);
this.props.focusPosition(this.toCameraPosition(extData.position));
this.props.focusObject && this.props.focusObject(node);
}
......@@ -111,7 +110,7 @@ class ExceptionArea extends Component {
ExceptionArea.propTypes = {
markers: PropTypes.array,
handleExceptModel: PropTypes.func,
focusPosition: PropTypes.func
focusObject: PropTypes.func
};
export default ExceptionArea;
/* eslint-disable react/prop-types */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Connect, Tree, Select, Search, Button } from 'amos-framework';
import { Tree, Select, Search, Button } from 'amos-framework';
import imgStatic from '../../consts/imgStatic';
const moduleEditIcon = imgStatic.moduleEditIcon;
const eventConnect = Connect.eventConnect;
const TreeNode = Tree.TreeNode;
const Option = Select.Option;
const getParentKey = (key, tree) => {
......@@ -23,7 +22,7 @@ const getParentKey = (key, tree) => {
return parentKey;
};
@eventConnect
class PointLeftTree extends Component {
constructor(props) {
super(props);
......@@ -43,6 +42,27 @@ class PointLeftTree extends Component {
}
<<<<<<< HEAD
=======
componentWillMount() {
const { treeData, pointTypeArr, treeDataList } = this.props;
this.setState({
treeData,
treeDataList,
pointTypeArr,
pointType: pointTypeArr[0] ? pointTypeArr[0].code : ''
});
}
componentWillReceiveProps(nextProps) {
console.log(nextProps);
let { treeData,treeDataList } = nextProps;
this.setState({
treeData,
treeDataList
});
}
>>>>>>> 876bde88e84eb33f87d6e192dd5d0e5e70297f58
onSelectChange = (value, item) =>{
console.log(value, item);
......@@ -82,8 +102,7 @@ class PointLeftTree extends Component {
}
// eslint-disable-next-line react/sort-comp
renderTreeNodes = (data) => {
let { searchValue } = this.state;
// console.log(data);
const { searchValue, pointType } = this.state;
if (data.length > 0) {
return data.map((item) => {
const index = item.name.indexOf(searchValue);
......@@ -108,6 +127,7 @@ class PointLeftTree extends Component {
<span>
{title}
<span className='icon'>
<<<<<<< HEAD
{
item.isRegion ? item.isBind ? <img src={moduleEditIcon.bindedTip} alt='' /> :
<img src={moduleEditIcon.nobindTip} alt='' /> :
......@@ -115,6 +135,9 @@ class PointLeftTree extends Component {
item.position3d ? <img src={moduleEditIcon.noSaveTip} alt='' /> :
<img src={moduleEditIcon.nobindTip} alt='' />
}
=======
{ item.isBind ? <img src={moduleEditIcon.bindedTip} alt='' /> : <img src={moduleEditIcon.nobindTip} alt='' /> }
>>>>>>> 876bde88e84eb33f87d6e192dd5d0e5e70297f58
</span>
</span> :
<span
......@@ -126,6 +149,7 @@ class PointLeftTree extends Component {
{title}
<span className='icon'>
{
<<<<<<< HEAD
item.isRegion ? item.isBind ? <img src={moduleEditIcon.bindedTip} alt='' /> :
<img src={moduleEditIcon.nobindTip} alt='' /> :
item.isBind ? <img src={moduleEditIcon.bindedTip} alt='' /> :
......@@ -136,6 +160,16 @@ class PointLeftTree extends Component {
</span>}
</div>
}
=======
this.checkPointIsNoSave(pointType,item) ? <img src={moduleEditIcon.noSaveTip} alt='' /> :
item.isBind ? <img src={moduleEditIcon.bindedTip} alt='' /> :
<img src={moduleEditIcon.nobindTip} alt='' />
}
</span>
</span>}
</div>
}
>>>>>>> 876bde88e84eb33f87d6e192dd5d0e5e70297f58
key={item.id}
dataRef={item}
onDragStart={() => {
......@@ -158,6 +192,18 @@ class PointLeftTree extends Component {
this.setState({ selectedKeys });
this.props.selectPointChange(selectItem);
}
checkPointIsNoSave =(pointType,{ id })=>{
const { markers } = this.props;
const selectPoints = markers[pointType];
const point = selectPoints.find(point=>point.id === id);
if (point && point.isEdit) {
return true;
} else {
return false;
}
}
render() {
const { treeData,pointTypeArr } = this.props;
const pointType = pointTypeArr[0] ? pointTypeArr[0].code : '';
......@@ -213,8 +259,7 @@ class PointLeftTree extends Component {
}
PointLeftTree.propTypes = {
subscribe: PropTypes.func,
trigger: PropTypes.func
markers: PropTypes.object
};
export default PointLeftTree;
......@@ -10,11 +10,11 @@ import {
searchAction,
msgAction,
exeRecordAction,
trajectoryAction,
recordAction
} from './../../services/3dService';
const { TabList, Tab, TabPanel } = Tabs;
const MsgType = { protal: '巡检',equiment: '设备', riskAlert: '风险' };
const getColumns = (self,retrieveType) => {
switch (retrieveType) {
......@@ -29,23 +29,23 @@ const getColumns = (self,retrieveType) => {
return [
{ title: '编号',dataIndex: 'code',key: 'code',width: '16.5%' },
{ title: '名称',dataIndex: 'label',key: 'label',width: '16.5%' },
{ title: '路线',dataIndex: 'routeName',key: 'level',width: '16.5%' },
{ title: '状态',dataIndex: 'title',key: 'level',width: '16.5%' },
{ title: '责任人',dataIndex: 'person',key: 'level',width: '16.5%' },
{ title: '路线',dataIndex: 'routeName',key: 'routeName',width: '16.5%' },
{ title: '状态',dataIndex: 'title',key: 'title',width: '16.5%' },
{ title: '责任人',dataIndex: 'person',key: 'person',width: '16.5%' },
{ title: '类别',dataIndex: 'typeName',key: 'typeName',width: '16.5%' }
];
case 'monitorEquipment':
return [
{ title: '编号',dataIndex: 'code',key: 'code',width: '25%' },
{ title: '名称',dataIndex: 'label',key: 'label',width: '25%' },
{ title: '监控对象',dataIndex: 'level',key: 'protectObjName',width: '25%' },
{ title: '监控对象',dataIndex: 'protectObjName',key: 'protectObjName',width: '25%' },
{ title: '类别',dataIndex: 'typeName',key: 'typeName',width: '25%' }
];
case 'video':
return [
{ title: '编号',dataIndex: 'code',key: 'code',width: '25%' },
{ title: '名称',dataIndex: 'label',key: 'label',width: '25%' },
{ title: '监控对象',dataIndex: 'level',key: 'protectObjName',width: '25%' },
{ title: '监控对象',dataIndex: 'protectObjName',key: 'protectObjName',width: '25%' },
{ title: '类别',dataIndex: 'typeName',key: 'typeName',width: '25%' }
];
default:
......@@ -60,7 +60,7 @@ const getColumns = (self,retrieveType) => {
const getMsgColumns = () => {
return [
{ title: '标题',dataIndex: 'title',key: 'title',width: '15%' },
{ title: '类型',dataIndex: 'type',key: 'type',width: '15%' },
{ title: '类型',dataIndex: 'type',key: 'type',width: '15%',render: text => MsgType[text] },
{ title: '时间',dataIndex: 'timeStr',key: 'timeStr',width: '15%' },
{ title: '内容',dataIndex: 'content',key: 'content',width: '55%' }
];
......@@ -113,35 +113,6 @@ class SearchPane extends Component {
this.fetchRetrieveData();
}
paramsOnChange = (filter) => {
const { activeKey } = this.state;
if (activeKey === 'search'){
this.setState({ filter },this.fetchRetrieveData);
} else if (activeKey === 'message'){
this.setState({ filter },this.fetchMsgData);
} else if (activeKey === 'record'){
this.setState({ filter },this.fetchRecordData);
} else if (activeKey === 'trajectory'){
this.setState({ filter },this.fetchTrajectoryData);
}
}
/**
* 获取表格刷新方法
*/
reload = r => {
this.setState(
{
reload: () => {
r();
this.setState({ selectedRows: [], selectedRowKeys: [] });
}
},
r()
);
};
onTabClick = (value) =>{
this.pageConfig.current = 0;
if (value === 'search'){
......@@ -156,9 +127,35 @@ class SearchPane extends Component {
this.setState({ activeKey: value ,filter: [] });
}
onRetrieveRowDoubleClick = (record) => {
// 更新视图数据
let views = new Array();
if (record.position){
record.id = record.id.replace( `${record.type}-` ,'' );
views.push(record);
let args = {
target: views,
operateType: operateTypes.POINT_SEARCH
};
update3DViewData(args);
this.props.focusPosition(this.toCameraPosition(record.position));
} else {
message.danger('坐标未绑定!!!');
}
}
getPanelHeight = () => {
return 700;
};
setPageConfig = ({ pageSize, current }) => {
if (pageSize !== undefined) {
this.pageConfig.pageSize = pageSize;
}
if (current !== undefined) {
this.pageConfig.current = current - 1;
}
};
//轨迹
fetchTrajectoryData = () => {
const { filter } = this.state;
......@@ -225,29 +222,31 @@ class SearchPane extends Component {
});
}
setPageConfig = ({ pageSize, current }) => {
if (pageSize !== undefined) {
this.pageConfig.pageSize = pageSize;
}
if (current !== undefined) {
this.pageConfig.current = current - 1;
/**
* 获取表格刷新方法
*/
reload = r => {
this.setState(
{
reload: () => {
r();
this.setState({ selectedRows: [], selectedRowKeys: [] });
}
},
r()
);
};
onRetrieveRowDoubleClick = (record) => {
// 更新视图数据
let views = new Array();
if (record.position){
record.id = record.id.replace( `${record.type}-` ,'' );
views.push(record);
let args = {
target: views,
operateType: operateTypes.POINT_SEARCH
};
update3DViewData(args);
this.props.focusPosition(this.toCameraPosition(record.position));
} else {
message.danger('坐标未绑定!!!');
paramsOnChange = (filter) => {
const { activeKey } = this.state;
if (activeKey === 'search'){
this.setState({ filter },this.fetchRetrieveData);
} else if (activeKey === 'message'){
this.setState({ filter },this.fetchMsgData);
} else if (activeKey === 'record'){
this.setState({ filter },this.fetchRecordData);
} else if (activeKey === 'trajectory'){
this.setState({ filter },this.fetchTrajectoryData);
}
}
......@@ -351,6 +350,9 @@ class SearchPane extends Component {
}
SearchPane.propTypes = {
focusPosition: PropTypes.func,
visible: PropTypes.bool,
changeSearchPaneVisible: PropTypes.func
};
export default SearchPane;
......@@ -14,12 +14,11 @@ import { bizControlsTypes, riskSourceLevel } from './../conf';
const Option = Select.Option;
const MsgTypeEnum = [{ id: 'protal', name: '巡检' }, { id: 'equiment', name: '设备' }, { id: 'risk', name: '风险' }];
const MsgTypeEnum = [{ id: 'protal', name: '巡检' }, { id: 'equiment', name: '设备' }, { id: 'riskAlert', name: '风险' }];
const groupStyle = { display: 'unset', width: '100%' };
const selectStyle = { width: '25%', minWidth: '20%', marginRight: '14px' };
const inputStyle = { width: '30%', minWidth: '20%', height: '28px', marginRight: '14px' };
const datePickerStyle = { width: '30%', minWidth: '20%', height: '28px', marginRight: '14px' };
const enterkey = 13;
/**
*
* @class paramsHeader
......
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