import { isString } from "@pureadmin/utils";
import { h } from "vue";
import { ContentConfig } from "/@/components/PageContent";
import { httpList } from "/@/api/system/oplog";
import { renderStatus } from "/@/utils/column-helper";
import { STATUS_OPTIONS } from "/@/config/status";
import { ElTag } from "element-plus";

const columns = [
  {
    type: "selection",
    width: 55,
    hide: ({ checkList }) => !checkList.includes("勾选列")
  },
  {
    prop: "id",
    label: "日志编码",
    width: "100px"
  },
  // {
  //   prop: "status",
  //   label: "状态",
  //   minWidth: "90px",
  //   ...renderStatus(STATUS_OPTIONS)
  // },
  {
    prop: "username",
    label: "操作账号",
    minWidth: "100px"
  },
  {
    prop: "role",
    label: "用户角色",
    minWidth: "100px"
  },
  {
    prop: "module",
    label: "模块",
    minWidth: "100px"
  },
  {
    prop: "msg",
    label: "事件",
    minWidth: "200px"
  },
  {
    prop: "addtime",
    label: "创建时间",
    width: "160px"
  }
];
const contentConfig: ContentConfig = {
  title: "操作日志",
  columns,
  apis: {
    httpList
  }
};

export default contentConfig;
