forked from nsjcy/frontEnd/nsjcy

liuwh
2020-06-09 69155bb24070e22789fceb34d14fe3311874126f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
 * 徐祥健<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>
    );
  }
 
}