|
|
@@ -2,37 +2,40 @@ import React, { useRef } from 'react'
|
|
|
import { Tabs } from 'antd'
|
|
|
import ProTable from '@ant-design/pro-table'
|
|
|
|
|
|
+export const lockEnum = {
|
|
|
+ 1: '借出',
|
|
|
+ 2: '销售',
|
|
|
+ 3: '赠送'
|
|
|
+}
|
|
|
+
|
|
|
const RoadpricingTabList = props => {
|
|
|
const {
|
|
|
compilationList,
|
|
|
cloudUser: { online_list = [] }
|
|
|
} = props
|
|
|
- console.log(compilationList)
|
|
|
const { TabPane } = Tabs
|
|
|
const tRef = useRef(null)
|
|
|
const columns = [
|
|
|
{
|
|
|
title: '产品',
|
|
|
dataIndex: 'name',
|
|
|
- onFilter: true,
|
|
|
width: '17%'
|
|
|
},
|
|
|
{
|
|
|
title: '状态',
|
|
|
dataIndex: 'lock',
|
|
|
onFilter: true,
|
|
|
- width: '8%'
|
|
|
+ width: '8%',
|
|
|
+ render: lock => <span>{lockEnum[lock]}</span>
|
|
|
},
|
|
|
{
|
|
|
title: '专业版',
|
|
|
dataIndex: 'isUpgrade',
|
|
|
- onFilter: true,
|
|
|
width: '8%'
|
|
|
},
|
|
|
{
|
|
|
title: '限期',
|
|
|
dataIndex: 'deadline',
|
|
|
- onFilter: true,
|
|
|
width: '10%'
|
|
|
}
|
|
|
]
|
|
|
@@ -40,13 +43,11 @@ const RoadpricingTabList = props => {
|
|
|
{
|
|
|
title: '日期',
|
|
|
dataIndex: 'dateString',
|
|
|
- onFilter: true,
|
|
|
width: '12%'
|
|
|
},
|
|
|
{
|
|
|
title: '时长',
|
|
|
- dataIndex: 'online_time',
|
|
|
- onFilter: true,
|
|
|
+ dataIndex: 'online_times',
|
|
|
width: '17%'
|
|
|
}
|
|
|
]
|
|
|
@@ -60,9 +61,10 @@ const RoadpricingTabList = props => {
|
|
|
size="small"
|
|
|
columns={columns}
|
|
|
search={false}
|
|
|
- dataSource={compilationList}
|
|
|
toolBarRender={false}
|
|
|
- rowKey={record => record.id}
|
|
|
+ // eslint-disable-next-line no-underscore-dangle
|
|
|
+ rowKey={record => record._id}
|
|
|
+ dataSource={compilationList}
|
|
|
pagination={false}
|
|
|
/>
|
|
|
</div>
|
|
|
@@ -74,7 +76,8 @@ const RoadpricingTabList = props => {
|
|
|
columns={columnOnline}
|
|
|
search={false}
|
|
|
toolBarRender={false}
|
|
|
- rowKey={record => record.id}
|
|
|
+ // eslint-disable-next-line no-underscore-dangle
|
|
|
+ rowKey={record => record._id}
|
|
|
dataSource={online_list}
|
|
|
pagination={false}
|
|
|
/>
|