Commit 8ce14d89 authored by 吴俊凯's avatar 吴俊凯

重点设备单页面查询

parent 48e95abd
......@@ -108,6 +108,10 @@ class MatchEquipment extends Component {
componentDidMount() {
if (this.props.location.state) {
let { equipmentId, show } = this.props.location.state;
if(equipmentId===undefined){
equipmentId = this.props.location.query.equipmentId
this.setState({ equipmentId:equipmentId });
}
let { searchParam } = this.state;
searchParam.pageNumber = 0;
searchParam.pageSize = 10;
......@@ -120,6 +124,19 @@ class MatchEquipment extends Component {
this.setState({ show });
}
}
//兼容url直接请求
if(this.props.location.query){
let { equipmentId } = this.props.location.query;
let { searchParam } = this.state;
searchParam.pageNumber = 0;
searchParam.pageSize = 10;
if (equipmentId) {
this.getEquipmentData(equipmentId);
this.setState({equipmentId},()=>this.getMatchEquipmentListData(searchParam));
this.setState({equipmentId},()=>this.getPrePlanPictureData());
this.setState({ equipmentId:equipmentId });
}
}
}
componentWillReceiveProps(nextProps) {
......@@ -195,7 +212,6 @@ class MatchEquipment extends Component {
// totalCount: data.totalElements
// });
// });
equipmentId && getFireEquipmentListsAction(searchParam, equipmentId,param.pageNumber, param.pageSize).then(data => {
this.setState({
dataList: data.content,
......
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