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 { G3_APIgetList } from '@/store/action/Gmaintain/G3repair'
import { baseTableC } from '@/utils/tableData'

const search = topSearch('修复')

const baseFormDataRes = baseFormData()

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

  return (
    <div className={styles.G3repair}>
      <div className='pageTitle'>修复登记</div>

      <TableList
        baseFormData={baseFormDataRes}
        getListAPI={G3_APIgetList}
        pageKey='repair'
        tableInfo={tableInfo}
        columnsTemp={baseTableC('修复')}
        yHeight={585}
        searchDom={search}
      />
    </div>
  )
}

const MemoG3repair = React.memo(G3repair)

export default MemoG3repair
