import React from 'react'; import { Link } from 'react-router-dom'; import { Button, Modal, Form, InputNumber, Row, Col } 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, bindSearch, getMap } from '@src/services/Tools'; import { asyncSMessage } from '@src/services/AsyncTools'; import { ExperienceScore, ExperiencePercent, PrepareStatus, ExperienceDay } from '../../../../Constant'; import { System } from '../../../stores/system'; import { Course } from '../../../stores/course'; import { User } from '../../../stores/user'; const PrepareStatusMap = getMap(PrepareStatus, 'value', 'short'); const ExperiencePercentMap = getMap(ExperiencePercent, 'value', 'label'); export default class extends Page { init() { this.filterForm = [{ key: 'keyword', type: 'input', allowClear: true, name: '搜索', placeholder: '标题或正文', }, { key: 'userId', type: 'select', name: '用户', allowClear: true, select: [], number: true, placeholder: '请输入', }, { key: 'prepareStatus', type: 'select', allowClear: true, name: '身份', select: PrepareStatus, placeholder: '请选择', }, { key: 'experienceDay', type: 'select', allowClear: true, name: '备考周期', select: ExperienceDay, placeholder: '请选择', }, { key: 'experienceScore', type: 'select', allowClear: true, name: '分手成绩', select: ExperienceScore, placeholder: '请选择', }, { key: 'experiencePercent', type: 'select', allowClear: true, name: '提分比例', select: ExperiencePercent, placeholder: '请选择', }]; this.actionList = [{ key: 'info', name: '数据管理', }, { key: 'add', type: 'primary', name: '创建', render: (item) => { return ; }, }]; this.columns = [{ title: '文章标题', dataIndex: 'title', }, { title: '作者', dataIndex: 'user', render: (text, record) => { return text ? text.nickname : record.nickname; }, }, { title: '更新时间', dataIndex: 'updateTime', render: (text) => { return formatDate(text, 'YYYY-MM-DD HH:mm:ss'); }, }, { title: '身份', dataIndex: 'prepareStatus', render: (text) => { return PrepareStatusMap[text] || text; }, }, { title: '备考周期', dataIndex: 'experienceDay', }, { title: '分手成绩', dataIndex: 'experienceScore', }, { title: '提分比例', dataIndex: 'experiencePercent', render: (text) => { return ExperiencePercentMap[text] || text; }, }, { title: '阅读数', dataIndex: 'viewNumber', }, { title: '收藏数', dataIndex: 'collectNumber', }, { title: '操作', dataIndex: 'handler', render: (text, record) => { return