import React, { Component } from 'react'; import moment from 'moment'; import { connect } from 'dva'; import { Card, Badge } from 'antd'; import { StandardTableList } from '../../../components/AXList'; import { addRowKey } from '../../../utils/utils'; import styles from './AccountsTerminals.less'; @connect(({ loading, accounts }) => ({ accounts, loading: loading.models.accounts, })) export default class TerminalsAccountsPage extends Component { constructor(props) { super(props); const { state } = props.location; this.state = { UIParams: (state || {}).UIParams, // 组件的状态参数 Queryers: (state || {}).Queryers, // 查询的条件参数 }; } componentWillMount() { this.props.dispatch({ type: 'accounts/fetchTerminalsList', payload: { ...this.state.Queryers } }) } // 下载 handleDownloadOperation = () => { this.props.dispatch({ type: 'accounts/fetchTerminalsExcel', }) }; handleFilterOperation = (params, states) => { this.setState({ UIParams: states, Queryers: params, }); this.props.dispatch({ type: 'accounts/fetchTerminalsList', payload: { ...params, }, }); }; render() { const { loading,accounts } = this.props; const { list, totalSize, pageSize, pageNo } = accounts; const basicSearch = { keys: [{ name: '终端编号', field: 'code', }], }; const pagination = { pageNo, pageSize, totalSize, }; const columns = [{ title: '终端编号', key: 1, dataIndex: 'ucode', width: '15%', }, { title: '课程包编号', key: 2, dataIndex: 'pcode', width: '10%', }, { title: '课程包名称', key: 3, dataIndex: 'pname', width: '15%', }, { title: '权限有效期', key: 4, render: (_, record) => { const { startTimeStr, endTimeStr } = record; return (
起始时间: {`${startTimeStr}`}
到期时间: {`${endTimeStr}`}