import { FormType } from "@/components/form/interface";
import { UserDataType } from "@/model/userModel";
// import SourceConfig from "@/service/source_config";
// import { CompanyConfig, DepConfig, MenuConfig } from "@/service/user_config";
import { ColumnsType } from "antd/lib/table";

export const defaultConfig = [
  {
    type: FormType.input,
    label: "角色名称",
    name: "name",
    value: "",
    rules: [{ required: true, message: "请输入角色名称!" }],
  },

  {
    type: FormType.input,
    label: "角色描述",
    name: "desc",
    value: "",
    rules: [{ required: true, message: "请输入角色描述" }],
  },
  // {
  //   type: FormType.select,
  //   label: "所属部门",
  //   name: "dep_identity",
  //   selectUrl: DepConfig.LIST,
  //   keys: "dep_name",
  //   value: "",
  //   rules: [],
  // },
  // {
  //   type: FormType.treeSelect,
  //   label: "所属单位",
  //   name: "company_id",
  //   treeCheckbox:false,
  //   selectUrl: CompanyConfig.LIST,
  //   value: "",
  //   rules: [{ required: true, message: "所属单位不能为空" }],
  // },
  // {
  //   type: FormType.treeSelect,
  //   treeCheckbox:true,
  //   label: "菜单权限",
  //   name: "menu_id",
  //   selectUrl: MenuConfig.LIST,
  //   value: "",
  //   treeMultiple:true,
  //   rules: [{ required: true, message: "请选择菜单" }],
  // },
  // {
  //   type: FormType.cehckbox,
  //   label: "数据列",
  //   name: "column_ids",
  //   selectUrl: SourceConfig.Headers,
  //   value: [],
  //   rules: [{ required: true, message: "请选择默认数据" }],
  // },
];

export const columns: ColumnsType<UserDataType> = [
  {
    title: "角色名称",
    dataIndex: "name",
    fixed: "left",
  },
  {
    title: "角色描述",
    dataIndex: "desc",
  },

  // {
  //   title: "菜单权限",
  //   dataIndex: "menu_rights",
  // },

  // {
  //   title: "接口权限",
  //   dataIndex: "api_rights",
  // },
];
