| | |
| | | |
| | | /** 浏览日志 */ |
| | | import React, { ReactNode, ReactEventHandler, Component } from 'react'; |
| | | import { Badge } from 'antd'; |
| | | import { Badge, Tooltip } from 'antd'; |
| | | import TableView from '../../../common/TableView'; |
| | | import SearchFormView from '../../../common/SearchFormView'; |
| | | import './index.scss'; |
| | |
| | | { title: '序号', dataIndex: 'index' }, |
| | | { title: '浏览者', dataIndex: 'userName' }, |
| | | { title: '浏览模块', dataIndex: 'moduleName' }, |
| | | { title: '浏览功能', dataIndex: 'functionName' }, |
| | | { title: '浏览描述', dataIndex: 'operDesc' }, |
| | | { |
| | | title: '浏览功能', dataIndex: 'functionName', |
| | | render: (cur, item) => { |
| | | return <Tooltip title={cur}><span>{this.fontNumber(cur||'')}</span></Tooltip> |
| | | } |
| | | }, |
| | | { |
| | | title: '浏览描述', dataIndex: 'operDesc', |
| | | render: (cur, item) => { |
| | | return <Tooltip title={cur}><span>{this.fontNumber(cur||'')}</span></Tooltip> |
| | | } |
| | | }, |
| | | { |
| | | title: '浏览日期', dataIndex: 'createTime', render: (cur, item) => { |
| | | return cur ? moment(cur).format("YYYY-MM-DD HH:mm") : "" |
| | | return cur ? moment(cur).format("YYYY-MM-DD HH:mm:ss") : "" |
| | | } |
| | | }, |
| | | { title: 'IP地址', dataIndex: 'operIp' }, |
| | | { title: '访问终端', dataIndex: 'operTerminal' }, |
| | | { title: '访问浏览器', dataIndex: 'operBrowser' }, |
| | | { title: '状态', dataIndex: 'operStatus', render: (cur, item)=> { |
| | | return this.operStatus(cur) |
| | | }} |
| | | { |
| | | title: '状态', dataIndex: 'operStatus', render: (cur, item) => { |
| | | return cur == '1' ? <Badge count={'成功'} style={{ backgroundColor: '#52c41a' }} /> : <Badge count={'失败'} /> |
| | | |
| | | } |
| | | } |
| | | ]; |
| | | } |
| | | |
| | | |
| | | fontNumber(date) { |
| | | const length = date.length |
| | | if (length > 16) { |
| | | var str = '' |
| | | str = date.substring(0, 16) + '......' |
| | | return str |
| | | } else { |
| | | return date |
| | | } |
| | | } |
| | | |
| | | operStatus = (status) => { |
| | | switch (status) { |
| | | case '1': |
| | | return <Badge count={'成功'} style={{ backgroundColor: '#52c41a' }}/> |
| | | return <Badge count={'成功'} style={{ backgroundColor: '#52c41a' }} /> |
| | | case '99': |
| | | return <Badge count={'失败'} /> |
| | | } |