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, formatTreeData, bindSearch } from '@src/services/Tools'; import { asyncSMessage, asyncDelConfirm } from '@src/services/AsyncTools'; import { CourseModule, QuestionType } from '../../../../Constant'; import { Exercise } from '../../../stores/exercise'; import { Course } from '../../../stores/course'; import { Preview } from '../../../stores/preview'; const CourseModuleMap = getMap(CourseModule, 'value', 'label'); const QuestionTypeMap = getMap(QuestionType, 'value', 'label'); export default class extends Page { init() { this.exerciseMap = {}; this.actionList = [{ key: 'addVideo', type: 'primary', name: '创建视频作业', render: (item) => { return ; }, }, { key: 'addOnline', type: 'primary', name: '创建小班作业', render: (item) => { return ; }, }, { key: 'addVs', type: 'primary', name: '创建1vs1作业', render: (item) => { return ; }, }]; this.filterForm = [{ key: 'courseModule', type: 'select', allowClear: true, name: '课程类型', placeholder: '请选择', select: CourseModule, }, { key: 'questionType', type: 'select', allowClear: true, name: '题型', placeholder: '请选择', select: QuestionType, }, { key: 'courseId', type: 'select', name: '课程名称', select: [], number: true, placeholder: '请选择', }]; this.columns = [{ title: '课程类型', dataIndex: 'courseModule', render: (text) => { return CourseModuleMap[text] || text; }, }, { title: '课程名称', dataIndex: 'course.title', }, { title: '题型', dataIndex: 'questionType', render: (text) => { return QuestionTypeMap[text] || ''; }, }, { title: '作业标题', dataIndex: 'title', }, { title: '操作', dataIndex: 'handler', render: (text, record) => { return