|
@@ -1,9 +1,12 @@
|
|
|
-import { Tabs, Table } from 'antd'
|
|
|
|
|
|
|
+import { Tabs } from 'antd'
|
|
|
import consts from '@/consts'
|
|
import consts from '@/consts'
|
|
|
import { isDevMode } from '@/utils/env'
|
|
import { isDevMode } from '@/utils/env'
|
|
|
import TimeLineList from '@/components/TimeLineList'
|
|
import TimeLineList from '@/components/TimeLineList'
|
|
|
import { renderServiceLogItem } from '@/pages/Customer/Client/components/ClientDetail/LowerList'
|
|
import { renderServiceLogItem } from '@/pages/Customer/Client/components/ClientDetail/LowerList'
|
|
|
|
|
+import { useMemo } from 'react'
|
|
|
|
|
+import { VList } from 'virtuallist-antd'
|
|
|
import type { ProColumns } from '@ant-design/pro-table'
|
|
import type { ProColumns } from '@ant-design/pro-table'
|
|
|
|
|
+import ProTable from '@ant-design/pro-table'
|
|
|
const { TabPane } = Tabs
|
|
const { TabPane } = Tabs
|
|
|
type CompanyLowerListProps = {
|
|
type CompanyLowerListProps = {
|
|
|
logList: {
|
|
logList: {
|
|
@@ -13,12 +16,13 @@ type CompanyLowerListProps = {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const CompanyLowerList: React.FC<CompanyLowerListProps> = ({ logList: { log: logs = [] }, serviceList }) => {
|
|
const CompanyLowerList: React.FC<CompanyLowerListProps> = ({ logList: { log: logs = [] }, serviceList }) => {
|
|
|
|
|
+ const tableHeight = (document.body.clientHeight - 124 - 54 - 40 - 40 - 4) / 2
|
|
|
const columns: ProColumns<API.LogItem>[] = [
|
|
const columns: ProColumns<API.LogItem>[] = [
|
|
|
{
|
|
{
|
|
|
title: '日期',
|
|
title: '日期',
|
|
|
dataIndex: 'createTime',
|
|
dataIndex: 'createTime',
|
|
|
key: 'createTime',
|
|
key: 'createTime',
|
|
|
- width: 100
|
|
|
|
|
|
|
+ width: 160
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '操作人',
|
|
title: '操作人',
|
|
@@ -52,9 +56,16 @@ const CompanyLowerList: React.FC<CompanyLowerListProps> = ({ logList: { log: log
|
|
|
{
|
|
{
|
|
|
title: '操作内容',
|
|
title: '操作内容',
|
|
|
dataIndex: 'content',
|
|
dataIndex: 'content',
|
|
|
- key: 'content'
|
|
|
|
|
|
|
+ key: 'content',
|
|
|
|
|
+ ellipsis: true
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
|
|
+ const vList = useMemo(() => {
|
|
|
|
|
+ return VList({
|
|
|
|
|
+ height: tableHeight,
|
|
|
|
|
+ vid: 'company_log_list'
|
|
|
|
|
+ })
|
|
|
|
|
+ }, [])
|
|
|
return (
|
|
return (
|
|
|
<div>
|
|
<div>
|
|
|
<div className="pl-4">
|
|
<div className="pl-4">
|
|
@@ -72,12 +83,16 @@ const CompanyLowerList: React.FC<CompanyLowerListProps> = ({ logList: { log: log
|
|
|
</TabPane>
|
|
</TabPane>
|
|
|
<TabPane tab="日志" key="日志">
|
|
<TabPane tab="日志" key="日志">
|
|
|
<div className="sheet-panel-record">
|
|
<div className="sheet-panel-record">
|
|
|
- <Table<API.LogItem>
|
|
|
|
|
|
|
+ <ProTable<API.LogItem>
|
|
|
|
|
+ search={false}
|
|
|
|
|
+ toolBarRender={false}
|
|
|
rowKey="id"
|
|
rowKey="id"
|
|
|
columns={columns}
|
|
columns={columns}
|
|
|
dataSource={logs}
|
|
dataSource={logs}
|
|
|
pagination={false}
|
|
pagination={false}
|
|
|
|
|
+ scroll={{ y: tableHeight }}
|
|
|
size="small"
|
|
size="small"
|
|
|
|
|
+ components={vList}
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</TabPane>
|
|
</TabPane>
|