/**
* 通过搜索获得地图列表(保安人员)
*/
import React, { Component } from "react";
import { Pagination, message, Icon, Input, Button } from "antd";
import "./person.less";
// import { getComPerLocationByKeyword } from "../../../../services/api";
import ThreeDimenVideo from "../../mapModule/threeDimenVideo";
export default class PersonSearch extends Component {
constructor(props) {
super(props);
this.state = {
layerSatatus: props.layerSatatus,
searchData: {
pageNumber: 1,
pageSize: 7,
keyWord: null,
},
personList: [], //人员列表数据
personClickIndex: props.personClickIndex || null, //选中的是哪个人员
height: null, //最大高度
beijing: false, //北京搜索框的展示状态
beijingVideo: false, //北京视频的展示状态
gaoqi: false, //高崎搜索框的展示状态
treeDimenStatus: false, //三维模型的展示状态
};
}
componentDidMount() {
const height = document.documentElement.clientHeight - 120 - 130 - 40;
this.setState({ height });
}
componentWillReceiveProps(nextProps) {
this.setState({
layerSatatus: nextProps.layerSatatus,
personClickIndex: nextProps.personClickIndex,
});
}
getPersonList(pageNumber) {
if (this.state.searchData.keyWord === "北京展览馆") {
this.setState({
beijing: true,
personList: [],
gaoqi: false,
});
this.props.markesBeiJing();
// this.props.personList([]);
} else if (
this.state.searchData.keyWord === "厦门机场" ||
this.state.searchData.keyWord === "厦门高崎机场"
) {
this.setState({ gaoqi: true, personList: [], beijing: false });
this.props.markesGaoQi();
// this.props.personList([]);
}
}
render() {
return (
{
this.setState({
searchData: {
...this.state.searchData,
keyWord: e.target.value.trim(),
},
});
}}
onPressEnter={() => {
//按下回车的事件
this.getPersonList(1);
}}
/>
{/* 北京展览馆 */}
北京展览馆
展览馆
北京市西城区西直门外大街135号
活动列表
伟大历程 辉煌成就——庆祝中华人民共和国成立70周年大型成就展
展会时间:2019年9月23日-2019年12月31日
{/* 高崎机场 */}
厦门高崎国际机场
厦门市湖里区翔云一路
电话:0592-5706078
0 ? "block" : "none",
}}
>
保安人员
{this.state.personList.map((item, index) => {
const xing = "********";
let idCardNo = "";
if (item.idCardNo) {
let front6 = item.idCardNo.substring(0, 6);
idCardNo =
front6 +
xing +
item.idCardNo.substring(14, item.idCardNo.length);
}
return (
{
if (item.lnglat) {
this.props.onClickPerson(item, index);
this.setState({
personClickIndex: index,
});
} else {
message.warning("该人员暂未定位");
}
}}
>
{item.lnglat && (
{index}
)}
{item.name}
手机号码:{item.mobilePhone}
证件号码:{idCardNo}
);
})}
{
this.getPersonList(number);
}}
defaultPageSize={this.state.searchData.pageSize}
current={this.state.searchData.pageNumber}
style={{
display:
this.state.total > this.state.searchData.pageSize
? "block"
: "none",
}}
/>
{/* 三维模型视图 */}
{this.state.treeDimenStatus && (
{
this.setState({
treeDimenStatus: value,
});
}}
/>
)}
);
}
}