import TabsComp from '@/components/TabsComp';
import styles from '../../../GLQ/index.less';
import { useState } from 'react';
import { ConfigProvider, Table } from 'antd';

import { rowClassName } from '@/utils';
import ButtonComp from '@/components/ButtonComp';

export default function Page() {
  const [activeTab, setActiveTab] = useState(1)
  const [tableData, setTableData] = useState([]);

  const columns: any = [
    { title: '管理盘号', dataIndex: 'name', key: 'name', align: 'center' },
    { title: '文件数量', dataIndex: 'name', key: 'name', align: 'center' },
    { title: '使用状态', dataIndex: 'name', key: 'name', align: 'center' }
  ]

  const columns1: any = [
    { title: '管理盘号', dataIndex: 'name', key: 'name', align: 'center' },
    { title: '文件名', dataIndex: 'name', key: 'name', align: 'center' },
    { title: '文件长度', dataIndex: 'name', key: 'name', align: 'center' }
  ]

  return (
    <div className={`${styles.params_warp}`}>
      <TabsComp
        dataSource={[{ id: 1, name: '管理盘维护' }]}
        activeTab={activeTab}
        onChange={(e) => setActiveTab(e)} />

      <ButtonComp type={'special'} text={'管理盘列表（共0条）'} onClick={() => { }} />
      <Table
        scroll={tableData.length > 0 ? { y: 41 * 5 } : {}}
        pagination={false}
        bordered
        columns={columns}
        dataSource={tableData}
        rowKey={(record: any) => record?.id}
        rowClassName={rowClassName}
      />
      <div className='flex_jE mt20 mb20'>
        <ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'刷新'} onClick={() => { }} />
        <ButtonComp style={{ marginRight: 20 }} text={'导入'} onClick={() => { }} />
        <ButtonComp type={'delete'} text={'删除'} onClick={() => { }} />
      </div>

      <ButtonComp type={'special'} text={'管理盘文件列表'} onClick={() => { }} />
      <Table
        scroll={tableData.length > 0 ? { y: 41 * 5 } : {}}
        pagination={false}
        bordered
        columns={columns1}
        dataSource={tableData}
        rowKey={(record: any) => record?.id}
        rowClassName={rowClassName}
      />
    </div>
  );
}
