import React from 'react'; import { Button } from 'antd'; import { Link } from 'react-router-dom'; 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 { getMap, bindSearch, formatDate } from '@src/services/Tools'; import { asyncDelConfirm, asyncSMessage } from '@src/services/AsyncTools'; // import { TextbookType } from '../../../../Constant'; import { Textbook } from '../../../stores/textbook'; import { TextbookSubject, TextbookQuality } from '../../../../Constant'; // import { Slient } from '../../../stores/slient'; const TextbookSubjectMap = getMap(TextbookSubject, 'value', 'label'); const TextbookQualityMap = getMap(TextbookQuality, 'value', 'label'); export default class extends Page { constructor(props) { super(props); this.actionList = [{ key: 'add', name: '新建', render: (item) => { return ; }, }]; this.filterForm = [{ key: 'textbookSubject', type: 'select', name: '单项', select: TextbookSubject, allowClear: true, }, { key: 'libraryId', type: 'select', name: '换库表', select: [], number: true, allowClear: true, }, { key: 'quality', type: 'select', name: '机经质量', select: TextbookQuality, allowClear: true, }]; this.columns = [{ title: '单项', dataIndex: 'textbookSubject', render: (text) => { return TextbookSubjectMap[text] || ''; }, }, { title: '所属库', dataIndex: 'library', render: (text) => { return `${formatDate(text.startDate, 'YYYY-MM-DD')}-${text.endDate ? `${formatDate(text.endDate, 'YYYY-MM-DD')}` : '至今'}`; }, }, { title: '题目序号', dataIndex: 'no', }, { title: '关键词', dataIndex: 'keyword', }, { title: '机经质量', dataIndex: 'quality', render: (text) => { return TextbookQualityMap[text] || ''; }, }, { title: '操作', dataIndex: 'handler', render: (text, record) => { return