import React, { useCallback, useEffect, useMemo, useState } from 'react' import styles from './index.module.scss' import { Button, Checkbox } from 'antd' import MyTable from '@/components/MyTable' import { D1tableC } from '@/utils/tableData' import { D1siteListType } from '../type' import { D1_APIgetSiteList } from '@/store/action/D1storage' type Props = { lookFu: (val: string[]) => void TreeDom: React.ReactNode tableId: number } function D1Loc({ lookFu, TreeDom, tableId }: Props) { const [isNull, setIsNull] = useState(false) const tableLastBtn = useMemo(() => { return [ { title: '相关藏品', render: (item: any) => { return ( ) } } ] }, [lookFu]) // 右边表格 const [table, setTable] = useState([]) const getTableList = useCallback(async (id: number) => { const res = await D1_APIgetSiteList(id) if (res.code === 0) { setTable(res.data) } }, []) useEffect(() => { if (tableId) getTableList(tableId) }, [tableId, getTableList]) return (
{/* 待完善 */} setIsNull(e.target.checked)}> 仅查看空置库位
{TreeDom}
{/* 表格 */}
) } const MemoD1Loc = React.memo(D1Loc) export default MemoD1Loc