From fc68f6006949a91fced69951778a7c88859cbb6c Mon Sep 17 00:00:00 2001
From: Mr Ke <kelq@hugeinfo.com.cn>
Date: Wed, 06 May 2020 10:49:07 +0800
Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/huge/frontEnd/hugeOA

---
 src/components/page/logManage/browseLog/index.jsx |   41 +++++++++++++++++++++++++++++++++--------
 1 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/src/components/page/logManage/browseLog/index.jsx b/src/components/page/logManage/browseLog/index.jsx
index f556d93..d7c38c3 100644
--- a/src/components/page/logManage/browseLog/index.jsx
+++ b/src/components/page/logManage/browseLog/index.jsx
@@ -6,7 +6,7 @@
 
 /** 浏览日志 */
 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';
@@ -41,26 +41,51 @@
       { 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={'失败'} />
     }

--
Gitblit v1.8.0