import React from 'react'; import { Link } from 'react-router-dom'; import { Button } from 'antd'; import './index.less'; import Page from '@src/containers/Page'; import Block from '@src/components/Block'; import FilterLayout from '@src/layouts/FilterLayout'; import ActionLayout from '@src/layouts/ActionLayout'; import TableLayout from '@src/layouts/TableLayout'; import { formatDate, getMap } from '@src/services/Tools'; import { ArticleChannel } from '../../../../Constant'; import { System } from '../../../stores/system'; const ArticleChannelMap = getMap(ArticleChannel, 'value', 'label'); export default class extends Page { init() { this.filterForm = [{ key: 'channel', type: 'select', allowClear: true, name: '频道', select: ArticleChannel, placeholder: '请选择', }, { key: 'position', type: 'select', allowClear: true, name: '位置', select: [], placeholder: '请选择', }]; this.actionList = [{ key: 'add', type: 'primary', name: '创建', render: (item) => { return ; }, }]; this.columns = [{ title: '频道', dataIndex: 'channel', render: (text) => { return ArticleChannelMap[text] || ''; }, }, { title: '位置', dataIndex: 'position', }, { title: '文章标题', dataIndex: 'title', }, { title: '更新时间', dataIndex: 'updateTime', render: (text) => { return formatDate(text); }, }, { title: '操作', dataIndex: 'handler', render: (text, record) => { return