import React, { useState } from "react";
import AutoTable from "@/components/AutoTable";
import DrawInitForm from "@/components/DrawInitForm";
import { Button } from "antd";

function Table({ route }) {
  const [vs, setvs] = useState();
  return (
    <div style={{ height: "200vh" }}>
      {/* <AutoTable
        pagetitle={route.name}
        pageextra={() => <Button onClick={() => {
          setvs(true)
        }}>add</Button>
        }
        columns={[
          {
            "title": "姓名",
            "dataIndex": "userName",
            "key": "userName"
          },
          {
            "title": "用户名",
            "dataIndex": "accountName",
            "key": "accountName"
          },
          {
            "title": "性别1：男；2：女",
            "dataIndex": "gender",
            "key": "gender",
            "valueType": "select",
            "request": [
              {
                "label": "男",
                "value": "1"
              },
              {
                "label": "女",
                "value": "2"
              }
            ],
            "fftype": 0
          },
          {
            "title": "电话",
            "dataIndex": "telephone",
            "key": "telephone"
          },
          {
            "title": "邮箱",
            "dataIndex": "mailNo",
            "key": "mailNo",
            "search": false
          },
          {
            "title": "组织名称",
            "dataIndex": "departmentName",
            "key": "departmentName"
          },
          {
            "title": "工厂名称",
            "dataIndex": "factoryName",
            "key": "factoryName"
          },
          {
            "title": "车间名称",
            "dataIndex": "shopNames",
            "key": "shopNames"
          },
          {
            "title": "工段",
            "dataIndex": "sectionNames",
            "key": "sectionNames"
          },
          {
            "title": "产线",
            "dataIndex": "productionLines",
            "key": "productionLines"
          },
          {
            "title": "分组",
            "dataIndex": "groupNames",
            "key": "groupNames"
          },
          {
            "title": "角色",
            "dataIndex": "roleNames",
            "key": "roleNames"
          },
          {
            "title": "直属领导",
            "dataIndex": "parentName",
            "key": "parentName"
          },
          {
            "title": "学历",
            "dataIndex": "academicCareer",
            "key": "academicCareer",
            "search": false
          },
          {
            "title": "毕业院校",
            "dataIndex": "university",
            "key": "university",
            "search": false
          },
          {
            "title": "专业",
            "dataIndex": "major",
            "key": "major",
            "search": false
          },
          {
            "title": "备注",
            "dataIndex": "remarks",
            "key": "remarks",
            "search": false
          }
        ]}
        path="/ngic-auth/sysUser/query/page"
      >

      </AutoTable>
      <DrawInitForm
        title="Basic Drawer"
        onClose={() => {
          setvs(false)
        }}
        visible={vs}
        fields={{
          "a": {
            "value": null,
            "type": "input",
            "title": "b",
            "name": [
              "a"
            ],
            "required": true
          }
        }}

      >

      </DrawInitForm> */}
    </div>
  );
}

export default Table;
