Commit b270d3cf by ethanlamzs

路由与参数的处理

1 parent b8821c9f
...@@ -175,10 +175,6 @@ export default class linkmanadm extends PureComponent { ...@@ -175,10 +175,6 @@ export default class linkmanadm extends PureComponent {
dataIndex: 'corp', dataIndex: 'corp',
}, },
{ {
title:'学校码',
dataIndex:'schoolCode',
},
{
title: '更新时间', title: '更新时间',
dataIndex: 'updatedAt', dataIndex: 'updatedAt',
sorter: true, sorter: true,
......
...@@ -53,8 +53,14 @@ export default class schoolmgr extends Component{ ...@@ -53,8 +53,14 @@ export default class schoolmgr extends Component{
componentDidMount() { componentDidMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
//console.log(this.props);
let schoolCode = 'test'; //console.log(this.state);
let schoolCode = this.props.match.params.schcode;
this.setState({
schoolCode:schoolCode
});
dispatch({ dispatch({
type: 'linkman/groups', type: 'linkman/groups',
payload:{schoolCode:schoolCode}, payload:{schoolCode:schoolCode},
...@@ -130,7 +136,7 @@ export default class schoolmgr extends Component{ ...@@ -130,7 +136,7 @@ export default class schoolmgr extends Component{
<Col {...topColResponsiveProps}> <Col {...topColResponsiveProps}>
<ChartCard <ChartCard
bordered={false} bordered={false}
title="学校名称" title={`学校名称-(${this.state.schoolCode})`}
action={ action={
<Tooltip title="指标说明"> <Tooltip title="指标说明">
<Icon type="info-circle-o" /> <Icon type="info-circle-o" />
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!