<template>
  <table-template :soul="this"> </table-template>
</template>
<script>
import { TableTemplate, TableScript, SearchType } from '@/components/table'
import { getPage } from '@/api/base/baseErrorLog'
import dayjs from 'dayjs'

const columns = [
  {
    title: '项目名称',
    width: 130,
    dataIndex: 'projectName',
    filter: { type: SearchType.STRING }
  },
  {
    title: '错误码',
    width: 100,
    dataIndex: 'errorCode',
    filter: { type: SearchType.STRING }
  },
  { title: '平台类型', width: 100, dataIndex: 'platform' },
  { title: '日志异常信息', dataIndex: 'content', width: 300, ellipsis: true },
  {
    title: '创建时间',
    dataIndex: 'createTime',
    width: 120,
    sorter: true,
    filter: { type: SearchType.RANGE },
    customRender: (text) => dayjs(text).format('YYYY-MM-DD HH:mm:ss')
  }
]

export default {
  name: 'ErrorLogList',
  mixins: [TableScript],
  components: { TableTemplate },
  data() {
    return {
      columns,
      useYScroll: true,
      title: '错误日志'
    }
  },
  methods: {
    queryData: getPage
  }
}
</script>