import React from 'react'
import styles from './index.module.scss'
import { useSelector } from 'react-redux'
import { RootState } from '@/store'
import { D1_APIgetList } from '@/store/action/Dmanage/D1register'
import TableList from '@/pages/Zother/TableList'
import { baseFormData, topSearch } from '@/pages/Zother/data'
import { baseTableC } from '@/utils/tableData'

const D1search = topSearch('登记')

const D1baseFormData = baseFormData()

function D1register() {
  // 从仓库拿数据
  const tableInfo = useSelector((state: RootState) => state.D1register.tableInfo)

  return (
    <div className={styles.D1register}>
      <div className='pageTitle'>藏品登记</div>

      <TableList
        baseFormData={D1baseFormData}
        getListAPI={D1_APIgetList}
        pageKey='register'
        tableInfo={tableInfo}
        columnsTemp={baseTableC('登记')}
        yHeight={585}
        searchDom={D1search}
      />
    </div>
  )
}

const MemoD1register = React.memo(D1register)

export default MemoD1register
