import { ContentConfig } from "/@/components/PageContent";
import { httpList } from "/@/api/interest/handover";
import { renderStatus } from "/@/utils/column-helper";
import { statusOptions } from "./_options";

const columns = [
  {
    type: "selection",
    width: 55,
    hide: ({ checkList }) => !checkList.includes("勾选列")
  },
  {
    label: "序号",
    type: "index",
    width: 70,
    hide: ({ checkList }) => !checkList.includes("序号列")
  },
  {
    prop: "resign_name",
    label: "离职人"
  },
  {
    prop: "hand_name",
    label: "接收人"
  },
  {
    prop: "status",
    label: "状态",
    ...renderStatus(statusOptions)
  },
  {
    prop: "expire_date",
    label: "生效时间",
    sortable: true
  },
  {
    prop: "addtime",
    label: "创建时间",
    sortable: true
  },
  {
    label: "操作",
    fixed: "right",
    width: 150,
    slot: "operation"
  }
];

const contentConfig: ContentConfig = {
  title: "离职交接",
  columns,
  apis: {
    httpList
  }
};

export default contentConfig;
