|
@@ -1,8 +1,11 @@
|
|
|
import { Button, Tabs, Tag } from 'antd'
|
|
import { Button, Tabs, Tag } from 'antd'
|
|
|
import React, { useRef } from 'react'
|
|
import React, { useRef } from 'react'
|
|
|
import ProTable from '@ant-design/pro-table'
|
|
import ProTable from '@ant-design/pro-table'
|
|
|
|
|
+import { renderBadge } from '@/pages/Workbench/Dashboard/components/RatioPanels'
|
|
|
|
|
|
|
|
-const EnterpriseTabList = () => {
|
|
|
|
|
|
|
+const EnterpriseTabList = props => {
|
|
|
|
|
+ const { authUsers, compilationList } = props
|
|
|
|
|
+ console.log(authUsers.users)
|
|
|
const { TabPane } = Tabs
|
|
const { TabPane } = Tabs
|
|
|
const tRef = useRef(null)
|
|
const tRef = useRef(null)
|
|
|
const columns = [
|
|
const columns = [
|
|
@@ -28,29 +31,23 @@ const EnterpriseTabList = () => {
|
|
|
width: '10%'
|
|
width: '10%'
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
- // const columnOnline = [
|
|
|
|
|
- // {
|
|
|
|
|
- // title: '产品',
|
|
|
|
|
- // dataIndex: 'name',
|
|
|
|
|
- // width: '30%',
|
|
|
|
|
- // render: (_, record) => <Tag color="purple">{record.name}</Tag>
|
|
|
|
|
- // },
|
|
|
|
|
- // {
|
|
|
|
|
- // title: '状态',
|
|
|
|
|
- // dataIndex: 'isUpgrade',
|
|
|
|
|
- // width: '8%'
|
|
|
|
|
- // },
|
|
|
|
|
- // {
|
|
|
|
|
- // title: '限期',
|
|
|
|
|
- // dataIndex: 'deadline',
|
|
|
|
|
- // width: '10%'
|
|
|
|
|
- // },
|
|
|
|
|
- // {
|
|
|
|
|
- // title: '责任人',
|
|
|
|
|
- // dataIndex: 'a1',
|
|
|
|
|
- // width: '10%'
|
|
|
|
|
- // }
|
|
|
|
|
- // ]
|
|
|
|
|
|
|
+ const columnOnline = [
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '姓名',
|
|
|
|
|
+ dataIndex: 'name',
|
|
|
|
|
+ width: '15%'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '手机',
|
|
|
|
|
+ dataIndex: 'phone',
|
|
|
|
|
+ width: '8%'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '职位',
|
|
|
|
|
+ dataIndex: 'position',
|
|
|
|
|
+ width: '10%'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
return (
|
|
return (
|
|
|
<div>
|
|
<div>
|
|
|
<div className="pl-15px">
|
|
<div className="pl-15px">
|
|
@@ -63,24 +60,24 @@ const EnterpriseTabList = () => {
|
|
|
search={false}
|
|
search={false}
|
|
|
toolBarRender={false}
|
|
toolBarRender={false}
|
|
|
// eslint-disable-next-line no-underscore-dangle
|
|
// eslint-disable-next-line no-underscore-dangle
|
|
|
- // rowKey={record => record._id}
|
|
|
|
|
- // dataSource={compilationList}
|
|
|
|
|
|
|
+ rowKey={record => record._id}
|
|
|
|
|
+ dataSource={compilationList}
|
|
|
pagination={false}
|
|
pagination={false}
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</TabPane>
|
|
</TabPane>
|
|
|
- <TabPane tab={<span>授权用户</span>} key="2">
|
|
|
|
|
|
|
+ <TabPane tab={<span>授权用户{renderBadge(authUsers.total, true)}</span>} key="2">
|
|
|
<div className="sheet-right-panel">
|
|
<div className="sheet-right-panel">
|
|
|
- {/* <ProTable
|
|
|
|
|
|
|
+ <ProTable
|
|
|
size="small"
|
|
size="small"
|
|
|
columns={columnOnline}
|
|
columns={columnOnline}
|
|
|
search={false}
|
|
search={false}
|
|
|
toolBarRender={false}
|
|
toolBarRender={false}
|
|
|
// eslint-disable-next-line no-underscore-dangle
|
|
// eslint-disable-next-line no-underscore-dangle
|
|
|
- // rowKey={record => record._id}
|
|
|
|
|
- // dataSource={online_list}
|
|
|
|
|
|
|
+ rowKey={record => record.id}
|
|
|
|
|
+ dataSource={authUsers.users}
|
|
|
pagination={false}
|
|
pagination={false}
|
|
|
- /> */}
|
|
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</TabPane>
|
|
</TabPane>
|
|
|
</Tabs>
|
|
</Tabs>
|