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

const search = topSearch('登记')

const baseFormDataRes = baseFormData()

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

  return (
    <div className={styles.G2actuality}>
      <div className='pageTitle'>现状登记</div>

      <TableList
        baseFormData={baseFormDataRes}
        getListAPI={G2_APIgetList}
        pageKey='actuality'
        tableInfo={tableInfo}
        columnsTemp={baseTableC('登记')}
        yHeight={585}
        searchDom={search}
      />
    </div>
  )
}

const MemoG2actuality = React.memo(G2actuality)

export default MemoG2actuality
