import React, { Component } from 'react'; import { connect } from 'dva'; import { Card } from 'antd'; import { StandardTableList } from '../../../components/AXList'; import { addRowKey, renderStatus } from '../../../utils/utils'; @connect(({ loading, accounts }) => ({ accounts, loading: loading.models.accounts, })) export default class TotalListAccountsPage extends Component { constructor(props) { super(props); const { state } = props.location; this.state = { UIParams: (state || {}).UIParams, // 组件的状态参数 Queryers: (state || {}).Queryers, // 查询的条件参数 }; } componentWillMount() { this.props.dispatch({ type: 'accounts/fetchCampusAmount', payload: {} }); this.props.dispatch({ type: 'accounts/fetchTerminalsAmount', payload: {} }); this.props.dispatch({ type: 'accounts/fetchTotalList', payload: { ...this.state.Queryers } }); } handleFilterOperation = (params, states) => { this.setState({ UIParams: states, Queryers: params, }); this.props.dispatch({ type: 'accounts/fetchTotalList', payload: { ...params, }, }); }; render() { const { loading,accounts } = this.props; const { list, totalSize, pageSize, pageNo, campusAmount, terminalsAmount} = accounts; const basicSearch = { keys: [{ name: '终端编号', field: 'code', }], }; const pagination = { pageNo, pageSize, totalSize, }; const columns = [{ title: '校区类型', key: 1, dataIndex: 'merchantName', width: '15%', }, { title: '校区名称', key: 2, dataIndex: 'campusName', width: '20%', }, { title: '终端编号', key: 3, dataIndex: 'code', width: '20%', }, { title: '终端名称', key: 4, dataIndex: 'name', width: '30%', }, { title: '课程状态', key: 5, dataIndex: 'status', render: text => renderStatus(text), width: '15%', }]; return ( ); } }