import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import './index.less';
import { Icon } from 'antd';
import FileUpload from '@src/components/FileUpload';
import Page from '@src/containers/Page';
import Assets from '@src/components/Assets';
import UserLayout from '../../../layouts/User';
import Button from '../../../components/Button';
import ProgressText from '../../../components/ProgressText';
import { Icon as GIcon } from '../../../components/Icon';
import menu from '../index';
import Tabs from '../../../components/Tabs';
import UserTable from '../../../components/UserTable';
import More from '../../../components/More';
import Modal from '../../../components/Modal';
import Date from '../../../components/Date';
export default class extends Page {
initState() {
return {
tab1: '1',
tab2: '1',
data: [
{
status: 'ing',
history: [{}],
list: [
{ status: 'ing', type: '1' },
{ status: 'not', type: '2' },
{ status: 'end', type: '3' },
{ status: 'not', type: '4' },
{ status: 'end', type: '5' },
{ status: 'not', type: '6' },
{ status: 'end', type: '7' },
],
},
{
status: 'not',
history: [{}],
list: [
{ status: 'ing', type: '1' },
{ status: 'not', type: '2' },
{ status: 'end', type: '3' },
{ status: 'not', type: '4' },
{ status: 'end', type: '5' },
{ status: 'not', type: '6' },
{ status: 'end', type: '7' },
],
},
{ status: 'end', history: [{}], list: [] },
],
};
}
onAction() {}
refresh(tab1, tab2) {
this.setState({ tab1, tab2 });
}
renderView() {
const { config } = this.props;
return ;
}
renderDetail() {
const { tab1, tab2 } = this.state;
return (
理清备考思路,避开常见误区,让学习的每一分钟发光发热!
去填写 >
this.refresh(key, tab2)}
/>
this.refresh(tab1, key)}
/>
{this[`renderTab${tab1}`]()}
{}}>
false}
dateRender={current => {
return (
{current.get('date')}
);
}}
checkRefresh={(date, refresh) => {
console.log(date);
setTimeout(() => {
refresh();
}, 2000);
return true;
}}
/>
*听课频率≤2天/课时,作业完成度≥90%,课程有效期可延长7-10天。
{}} onCancel={() => {}}>
恢复学习后,本课程的停课功能将无法使用。是否恢复学习?
{}} onCancel={() => {}}>
上传文件
支持 docx, xls, PDF, rar, zip, PNG, JPG 等类型的文件
);
}
renderTab1() {
const { data = [] } = this.state;
return data.map(item => {
return ;
});
}
renderTab2() {
const { data = [] } = this.state;
return data.map(item => {
return ;
});
}
}
class Course extends Component {
constructor(props) {
super(props);
this.columns = [
{ title: '学习内容' },
{ title: '预习作业' },
{ title: '进度' },
{ title: '最近学习' },
{ title: '笔记' },
{ title: '问答' },
];
this.state = { open: false };
}
render() {
const { data = {} } = this.props;
switch (data.status) {
case 'ing':
return this.renderIng();
case 'not':
return this.renderNot();
case 'end':
return this.renderEnd();
default:
return ;
}
}
renderIng() {
const { data } = this.props;
const { history = [] } = data;
return (
);
}
renderNot() {
return (
);
}
renderEnd() {
return (
);
}
}
class Education extends Component {
constructor(props) {
super(props);
this.columns = [
{ title: '学习内容' },
{ title: '预习作业' },
{ title: '授课时间' },
{ title: '课后笔记' },
{ title: '课后补充' },
];
this.state = { open: true, tab: '1' };
}
render() {
const { data = {} } = this.props;
switch (data.status) {
case 'ing':
return this.renderIng();
case 'not':
return this.renderNot();
case 'end':
return this.renderEnd();
default:
return ;
}
}
renderIng() {
const { tab } = this.state;
return (
this.setState({ tab: key })}
/>
课时 5:解读句子属性
{}} />
上一课时
下一课时
{}} />
{tab === '1' ? this.renderTimeLine() : this.renderTable()}
);
}
renderNot() {
return (
请尽快与老师预约上课时间
请于 2019-07-25 前开通课程
{this.renderTimeLine()}
);
}
renderEnd() {
const { open } = this.state;
return (
this.setState({ open: !open })} />
{open && this.renderTable()}
);
}
renderTimeLine() {
const { data = {} } = this.props;
const { list = [] } = data;
return (
{list.map(item => {
return ;
})}
);
}
renderTable() {
const { data = {} } = this.props;
const { history = [] } = data;
return ;
}
}
class TimeLineItem extends Component {
constructor(props) {
super(props);
this.titleMap = {
1: '预约时间',
2: '答疑文档',
3: '上课',
4: '课后笔记',
5: '课后补充',
6: '备考信息',
7: '完成作业',
};
this.iconMap = {
1: 'time-icon',
2: 'QA-icon',
3: 'class-icon',
4: 'note-icon',
5: 'supplement-icon',
6: 'information-icon',
7: 'homework-icon',
};
}
onClick(key) {
const { data = {}, onClick } = this.props;
const { status } = data;
if (status === 'not') return;
if (onClick) onClick(key);
}
render() {
const { data = {} } = this.props;
const { status, type } = data;
return (
);
}
renderDetail() {
const { data = {} } = this.props;
const { type, status } = data;
switch (type) {
case '1':
return status === 'not' ? (
请尽快与老师预约上课时间,扫码加微信
) : (
2019-07-24 09:00 ~ 10:00
);
case '2':
return 点此上传;
case '3':
return status === 'end' ? (
CCtalk 频道号 :1234567 CC talk使用手册
) : (
);
case '4':
return 点此上传;
case '5':
return 写留言;
case '6':
return [
基本情况梳理
2019-08-20 更新
修改
,
备考细节梳理
填写
,
];
case '7':
return ;
default:
return ;
}
}
}