|
|
@@ -16,7 +16,7 @@ import { longleSellStatusNum, longlePreserveStatusNum } from '@/pages/Product/Lo
|
|
|
import { renderBadge } from '@/pages/Workbench/Dashboard/components/RatioPanels'
|
|
|
import { DownOutlined } from '@ant-design/icons'
|
|
|
import { ProductLabel } from '@/pages/Product/Lock/LockStore/index'
|
|
|
-import VirtualTable from '@/components/Table/src/VirtualTable'
|
|
|
+// import VirtualTable from '@/components/Table/src/VirtualTable'
|
|
|
|
|
|
const CompanyTabList = ({
|
|
|
initData,
|
|
|
@@ -36,6 +36,11 @@ const CompanyTabList = ({
|
|
|
params: {},
|
|
|
visible: false
|
|
|
})
|
|
|
+ // const [tablistHeight, setTablistHeight] = useState(
|
|
|
+ // (document.body.tablistHeight - 48 - 92 - 64) / 2
|
|
|
+ // )
|
|
|
+ const [clientHeight] = useState((document.body.clientHeight - 48 - 92 - 64 - 120) / 2)
|
|
|
+ // console.log(clientHeight)
|
|
|
// 展示drawer
|
|
|
const showDrawer = id => {
|
|
|
setDrawerProps({
|
|
|
@@ -102,8 +107,7 @@ const CompanyTabList = ({
|
|
|
if (key !== defaultSelectedKey) {
|
|
|
changePriority(key, id)
|
|
|
}
|
|
|
- }}
|
|
|
- >
|
|
|
+ }}>
|
|
|
<Menu.Item key="1">1</Menu.Item>
|
|
|
<Menu.Item key="2">2</Menu.Item>
|
|
|
<Menu.Item key="3">3</Menu.Item>
|
|
|
@@ -122,8 +126,7 @@ const CompanyTabList = ({
|
|
|
<Dropdown
|
|
|
overlay={priorityMenu(text, record.id)}
|
|
|
trigger="click"
|
|
|
- className="hover:cursor-pointer"
|
|
|
- >
|
|
|
+ className="hover:cursor-pointer">
|
|
|
<span>
|
|
|
{text} <DownOutlined />
|
|
|
</span>
|
|
|
@@ -190,16 +193,14 @@ const CompanyTabList = ({
|
|
|
<Text delete type="secondary">
|
|
|
<span
|
|
|
onClick={() => showLongleDrawer(record.id)}
|
|
|
- className="cursor-pointer hover:text-hex-967bbd"
|
|
|
- >
|
|
|
+ className="cursor-pointer hover:text-hex-967bbd">
|
|
|
{clientName}
|
|
|
</span>
|
|
|
</Text>
|
|
|
) : (
|
|
|
<span
|
|
|
onClick={() => showLongleDrawer(record.id)}
|
|
|
- className="text-primary cursor-pointer hover:text-hex-967bbd"
|
|
|
- >
|
|
|
+ className="text-primary cursor-pointer hover:text-hex-967bbd">
|
|
|
{clientName}
|
|
|
</span>
|
|
|
)}
|
|
|
@@ -284,8 +285,7 @@ const CompanyTabList = ({
|
|
|
render: (text, record) => (
|
|
|
<span
|
|
|
onClick={() => showDrawerBusiness(record.id)}
|
|
|
- className="text-primary cursor-pointer hover:text-[#967bbd]"
|
|
|
- >
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
{text}
|
|
|
</span>
|
|
|
)
|
|
|
@@ -352,7 +352,7 @@ const CompanyTabList = ({
|
|
|
<Tabs>
|
|
|
<TabPane tab={<span>客户{renderBadge(client.total, true)}</span>} key="1">
|
|
|
<div className="sheet-right-panel" ref={tRef}>
|
|
|
- {/* <ProTable
|
|
|
+ <ProTable
|
|
|
size="small"
|
|
|
columns={columns}
|
|
|
search={false}
|
|
|
@@ -360,14 +360,15 @@ const CompanyTabList = ({
|
|
|
toolBarRender={false}
|
|
|
rowKey={record => record.id}
|
|
|
pagination={false}
|
|
|
- /> */}
|
|
|
- <VirtualTable
|
|
|
+ scroll={{ y: clientHeight }}
|
|
|
+ />
|
|
|
+ {/* <VirtualTable
|
|
|
size="small"
|
|
|
columns={columns}
|
|
|
search={false}
|
|
|
dataSource={client.client}
|
|
|
rowKey={record => record.id}
|
|
|
- />
|
|
|
+ /> */}
|
|
|
</div>
|
|
|
</TabPane>
|
|
|
<TabPane tab={<span>软件锁{renderBadge(software.total, true)}</span>} key="2">
|
|
|
@@ -380,6 +381,7 @@ const CompanyTabList = ({
|
|
|
rowKey={record => record.id}
|
|
|
dataSource={software.longle}
|
|
|
pagination={false}
|
|
|
+ scroll={{ y: clientHeight }}
|
|
|
/>
|
|
|
</div>
|
|
|
</TabPane>
|
|
|
@@ -393,6 +395,7 @@ const CompanyTabList = ({
|
|
|
rowKey={record => record.id}
|
|
|
dataSource={business.business}
|
|
|
pagination={false}
|
|
|
+ scroll={{ y: clientHeight }}
|
|
|
/>
|
|
|
</div>
|
|
|
</TabPane>
|