|
|
@@ -10,7 +10,7 @@ import ProTable from '@ant-design/pro-table'
|
|
|
import { useModal } from '@/components/Modal'
|
|
|
// import { queryContact } from '@/services/contact'
|
|
|
|
|
|
-const CompanyTabList = ({ initData, customerId, client, software, departmentsMap }) => {
|
|
|
+const CompanyTabList = ({ initData, customerId, client, software }) => {
|
|
|
const { toggleDrawer, setDrawerProps } = useModal()
|
|
|
const { TabPane } = Tabs
|
|
|
const tRef = useRef(null)
|
|
|
@@ -32,8 +32,13 @@ const CompanyTabList = ({ initData, customerId, client, software, departmentsMap
|
|
|
{
|
|
|
title: '所有部门',
|
|
|
dataIndex: 'department',
|
|
|
+ onFilter: true,
|
|
|
filters: true,
|
|
|
- valueEnum: departmentsMap
|
|
|
+ valueEnum: client.client
|
|
|
+ ?.map(item => item.department)
|
|
|
+ ?.reduce((prev, curr) => {
|
|
|
+ return { ...prev, [curr]: { text: curr } }
|
|
|
+ }, {})
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
@@ -77,20 +82,6 @@ const CompanyTabList = ({ initData, customerId, client, software, departmentsMap
|
|
|
dataIndex: 'client'
|
|
|
}
|
|
|
]
|
|
|
- // const [dataSource, setDataSource] = useState([])
|
|
|
- // useEffect(() => {
|
|
|
- // const fetchClients = async () => {
|
|
|
- // const { code = -1, data: { client = [] } = { client: [], total: 0 } } = await queryContact({
|
|
|
- // customerId,
|
|
|
- // current: 1,
|
|
|
- // pageSize: consts.MAX_PAGE_SIZE
|
|
|
- // })
|
|
|
- // if (code === consts.RET_CODE.SUCCESS) {
|
|
|
- // setDataSource(client)
|
|
|
- // }
|
|
|
- // }
|
|
|
- // fetchClients()
|
|
|
- // }, [])
|
|
|
|
|
|
const handleAddClient = async values => {
|
|
|
// 客户id
|
|
|
@@ -116,7 +107,6 @@ const CompanyTabList = ({ initData, customerId, client, software, departmentsMap
|
|
|
rowKey={record => record.id}
|
|
|
pagination={false}
|
|
|
/>
|
|
|
- {/* <Table columns={columns} dataSource={state.dataSource} pagination={false} /> */}
|
|
|
</div>
|
|
|
</TabPane>
|
|
|
<TabPane tab="软件锁" key="软件锁">
|