/**
|
* 徐祥健<xuxj@hugeinfo.com.cn>
|
* 2018年7月17日 14:58
|
*
|
*/
|
|
|
import React from 'react';
|
import HeadView from '../view/HeadView';
|
import LinkView from '../view/LinkView';
|
import TableBtnView from '../view/TableBtnView';
|
import TableView from '../view/TableView';
|
import MsgView from '../view/MsgView';
|
import { Input, Button, DatePicker } from 'antd'
|
const { RangePicker } = DatePicker;
|
export default class MsgList extends React.Component {
|
render() {
|
const { title, local, type, contact, sed, resetKey, Seaech, onInputChange, Reset, columns, msgType, loading } = this.props;
|
document.title = title;
|
console.log(msgType)
|
return (
|
<div className="msg-list" style={{ width: '100%' }}>
|
<HeadView history={this.props.history} />
|
<LinkView local={local} sed={sed} />
|
<TableBtnView key={-resetKey} type="msg" name={type}>
|
<Input placeholder="根据消息内容模糊查询" style={{ width: "200px" }} name='content' onChange={onInputChange} />
|
<Input placeholder="根据发送人模糊查询" style={{ width: "200px" }} name='userName' onChange={onInputChange} />
|
<RangePicker onChange={(_, value) => onInputChange({ target: { name: 'time', value } })} />
|
<Button type="primary" onClick={Seaech}>查询</Button>
|
<Button onClick={Reset}>重置</Button>
|
</TableBtnView>
|
{(msgType == "online" || msgType == "onlineCompany") ?
|
<MsgView dataSource={contact} msgType={msgType} loading={loading}/> :
|
<TableView columns={columns} data={contact} pageSize='10' size='default' loading={loading}/>
|
}
|
</div>
|
);
|
}
|
|
}
|