import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import './index.less';
import { Icon, Popover } from 'antd';
import FileUpload from '@src/components/FileUpload';
import Page from '@src/containers/Page';
import Assets from '@src/components/Assets';
import { asyncSMessage } from '@src/services/AsyncTools';
import { formatDate, formatSeconds, formatPercent } from '@src/services/Tools';
import UserLayout from '../../../layouts/User';
import Button from '../../../components/Button';
import ProgressText from '../../../components/ProgressText';
import IconButton from '../../../components/IconButton';
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 DatePlane from '../../../components/Date';
import Note from '../../../components/Note';
import { FinishModal, CommentModal } from '../../../components/OtherModal';
import { My } from '../../../stores/my';
import { User } from '../../../stores/user';
import { Question } from '../../../stores/question';
import { Order } from '../../../stores/order';
import { Common } from '../../../stores/common';
export default class extends Page {
initState() {
return {
tab: 'online',
status: 'all',
};
}
formatRecord(row) {
if (row.useEndTime) {
if (row.isSuspend && !row.restoreTime) {
row.status = 'suspend';
} else if (new Date(row.useEndTime).getTime() < new Date().getTime()) {
row.status = 'end';
} else {
row.status = 'ing';
}
} else {
row.status = 'not';
}
row.paperMap = {};
row.appointmentPaperMap = {};
if (row.papers) {
row.papers.forEach(paper => {
if (paper.courseNo) row.paperMap[paper.courseNo] = paper;
if (paper.appointment) row.appointmentPaperMap[paper.appointment] = paper;
});
}
row.progressMap = {};
if (row.progress) {
row.progress.forEach(progress => {
row.progressMap[progress.courseNoId] = progress;
});
}
row.courseNoMap = {};
row.courseTime = 0;
if (row.courseNos) {
row.courseNos.forEach(no => {
row.courseNoMap[no.id] = no;
row.courseTime += no.time;
no.paper = row.paperMap[no.id];
no.progress = row.progressMap[no.id];
});
}
if (row.currentNo) {
row.currentCourseNo = row.courseNoMap[row.currentNo];
} else {
row.currentNo = 0;
}
// 如果已经最新预约结束,则添加一个空记录作为最新预约
if (row.appointments) {
row.appointments.forEach(r => {
r.paper = row.appointmentPaperMap[r.id];
r.noteList = (row.comments || []).filter(c => c.type === 'note' && c.appointmentId === r.id);
r.supplyList = (row.comments || []).filter(c => c.type === 'supply' && c.appointmentId === r.id);
});
// 是否是最后一课时,是否过预约时间
const last = row.appointments.length - 1;
const appointment = row.appointments[last];
if (new Date(appointment.endTime).getTime() < new Date().getTime()) {
// row.status = 'end';
if (row.number !== row.appointments.length) {
row.appointments.push([{}]);
}
}
}
row.days = new Date(row.userEndTime);
return row;
}
initData() {
const data = Object.assign(this.state, this.state.search);
data.filterMap = this.state.search;
if (data.order) {
data.sortMap = { [data.order]: data.direction };
}
this.setState(data);
let isUsed = null;
let isEnd = null;
switch (data.status) {
case 'learning':
isUsed = true;
isEnd = false;
break;
case 'end':
isUsed = true;
isEnd = true;
break;
case 'nouse':
isUsed = false;
isEnd = false;
break;
case 'all':
default:
}
My.listCourse(Object.assign({ courseModule: data.tab }, this.state.search, { isUsed, isEnd })).then(result => {
result.list = result.list.map(row => {
return this.formatRecord(row);
});
this.setState({ list: result.list, total: result.total, page: data.page });
});
}
onAction() { }
onTabChange(tab) {
const data = { tab };
this.refreshQuery(data);
}
onStatusChange(status) {
this.search({ status });
}
openTime(record) {
if (record.courseTimeMap) {
this.setState({ data: record, showTime: true });
return;
}
My.timeCourse(record.id).then(result => {
const courseMap = {};
const previewMap = {};
const stopMap = {};
result.forEach(row => {
const date = formatDate(row.day, 'YYYY-MM-DD');
if (row.type === 'stop') {
stopMap[date] = true;
} else if (row.type === 'preview') {
previewMap[date] = true;
} else if (row.type === 'course') {
courseMap[date] = true;
}
});
record.courseTimeMap = courseMap;
record.previewTimeMap = previewMap;
record.stopTimeMap = stopMap;
this.setState({ data: record, showTime: true });
});
}
refreshDetail(recordId) {
My.detailCourse(recordId).then(result => {
let { list } = this.state;
list = list.map(row => {
if (row.id === recordId) return this.formatRecord(result);
return row;
});
this.setState({ list });
});
}
suspend() {
const { suspend } = this.state;
My.suspendCourse(suspend.id)
.then(() => {
asyncSMessage('停课成功');
this.setState({ showSuspend: false });
this.refreshDetail(suspend.id);
})
.catch(err => {
asyncSMessage(err.message, 'error');
});
}
restore() {
const { restore } = this.state;
My.restoreCourse(restore.id)
.then(() => {
asyncSMessage('恢复成功');
this.setState({ showRestore: false });
this.refreshDetail(restore.id);
})
.catch(err => {
asyncSMessage(err.message, 'error');
});
}
submitAppointmentComment(data, type) {
data.type = type;
if (data.id) {
My.editAppointmentComment(data).then(() => {
this.refreshDetail(data.recordId);
});
} else {
My.addAppointmentComment(data).then(() => {
this.refreshDetail(data.recordId);
});
}
}
deleteAppointmentComment(row) {
My.delAppointmentComment(row.id).then(() => {
this.refreshDetail(row.recordId);
});
}
submitQuestionFile(data) {
My.uploadAppointmentQuestion(data).then(() => {
this.refreshDetail(data.recordId);
});
}
setCCTalkName(recordId, cctalkname) {
My.setCCTalkName(recordId, cctalkname).then(() => {
this.refreshDetail(recordId);
});
}
open(recordId) {
Order.useRecord(recordId).then(() => {
this.refreshDetail(recordId);
});
}
closeCommentTips(recordId) {
My.courseCommentTips(recordId);
}
uploadNote(file) {
const { note = {} } = this.state;
Common.uploadImage(file).then(result => {
note.file = result.url;
note.name = file.name;
this.setState({ note });
});
}
uploadSupply(file) {
const { supply = {} } = this.state;
Common.uploadImage(file).then(result => {
supply.file = result.url;
supply.name = file.name;
this.setState({ supply });
});
}
renderView() {
const { config } = this.props;
return ;
}
renderDetail() {
const {
tab,
status,
showTips,
showTime,
showSuspend,
showRestore,
showUploadNote,
showUploadSupply,
showSupply,
showNote,
showComment,
showFinish,
comment = {},
data = {},
note = {},
supply = {},
appointment = {},
} = this.state;
return (
理清备考思路,避开常见误区,让学习的每一分钟发光发热!
去填写 >
this.setState({ showTips: false })} />
this.onTabChange(key)}
/>
this.onStatusChange(key)}
/>
{this[`renderTab${tab}`]()}
this.setState({ showTime: false })}
>
听课频率
{data.currentNo ? data.totalDays / data.currentNo : 0}天/课时
作业完成度
{data.previewProgress || 0}%
{ }}
disabledDate={current => {
const date = current.format('YYYY-MM-DD');
return data.stopTimeMap[date];
}}
dateRender={current => {
const date = current.format('YYYY-MM-DD');
return (
{current.get('date')}
{data.courseTimeMap[date] && }
{data.previewTimeMap[date] && }
);
}}
checkRefresh={(date, refresh) => {
setTimeout(() => {
refresh();
}, 2000);
return true;
}}
/>
*听课频率≤2天/课时,作业完成度≥90%,课程有效期可延长7-10天。
this.suspend()}
onCancel={() => this.setState({ showSuspend: false })}
>
最长停课周期为1个月,到期后系统自动恢复至“学习中”状态。
每门课程只有一次申请机会,是否需要停课?
*停课不影响听课频率的计算;
{' '}
停课期间可随时恢复学习。
this.restore()}
onCancel={() => this.setState({ showRestore: false })}
>
恢复学习后,本课程的停课功能将无法使用。是否恢复学习?
this.submitAppointmentComment(note, 'note')}
onCancel={() => this.setState({ showUploadNote: false, note: {} })}
>
this.setState({ showNote: false })}
>
{appointment.noteList &&
appointment.noteList.map(row => {
return ;
})}
this.setState({ showSupply: false })}
>
{appointment.supplyList &&
appointment.supplyList.map(row => {
return ;
})}
this.submitAppointmentComment(supply, 'supply')}
onCancel={() => this.setState({ showUploadSupply: false, supply: {} })}
>
this.setState({ showComment: false, showFinish: true })}
onCancel={() => this.setState({ showComment: false })}
onClose={() => this.setState({ showComment: false })}
/>
this.setState({ showFinish: false })}
/>
);
}
renderTabonline() {
const { list = [] } = this.state;
return list.map(item => {
return (
{
this.refreshDetail(recordId);
}}
onRestore={() => {
this.setState({ showRestore: true, restore: item });
}}
onSuspend={() => {
this.setState({ showSuspend: true, suspend: item });
}}
onTime={() => {
this.openTime(item);
}}
onComment={() => {
this.setState({ showComment: true, comment: { channel: 'course-video', position: item.course.id } });
}}
closeCommentTips={() => this.closeCommentTips(item.id)}
/>
);
});
}
renderTabvs() {
const { list = [] } = this.state;
return list.map(item => {
return (
{
this.refreshDetail(recordId);
}}
onRestore={() => {
this.setState({ showRestore: true, restore: item });
}}
onSuspend={() => {
this.setState({ showSuspend: true, suspend: item });
}}
onComment={() => {
this.setState({ showComment: true, comment: { channel: 'course-vs', position: item.course.id } });
}}
closeCommentTips={() => this.closeCommentTips(item.id)}
onUploadNote={(appointment, row) => {
this.setState({ showUploadNote: true, appointment, data: item, note: row || {} });
}}
onUploadSupply={(appointment, row) => {
this.setState({ showUploadSupply: true, appointment, data: item, supply: row || {} });
}}
onDeleteNote={(appointment, row) => this.deleteAppointmentComment(row)}
onDeleteSupply={(appointment, row) => this.deleteAppointmentComment(row)}
onNote={appointment => this.setState({ showNote: true, appointment, data: item })}
onSupply={appointment => this.setState({ showSupply: true, appointment, data: item })}
onUploadQuestion={(appointment, file, name) => {
this.submitQuestionFile({
id: appointment.id,
recordId: appointment.recordId,
questionFile: file,
questionFileName: name,
});
}}
setCCTalkName={(appointment, cctalkName) => this.setCCTalkName(appointment.recordId, cctalkName)}
/>
);
});
}
}
class CourseOnline extends Component {
constructor(props) {
super(props);
this.columns = [
{
title: '学习内容',
key: 'title',
render: (text, record) => {
return `课时 ${record.no}: ${text}`;
},
},
{
title: '预习作业',
key: 'paper',
render: text => {
text = text || {};
const progress = text.report ? formatPercent(text.report.userNumber, text.report.questionNumber) : 0;
const times = text.paper ? text.paper.times : 0;
return (
{!text.report && (
{
User.needLogin().then(() => {
Question.startLink('preview', text);
});
}}
/>
)}
{text.report && !text.report.isFinish && (
{
User.needLogin().then(() => {
Question.continueLink('preview', text);
});
}}
/>
)}
{text.report && !!text.report.isFinish && (
{
User.needLogin().then(() => {
Question.restart('preview', text);
});
}}
/>
)}
{text.report && !!text.report.isFinish && (
{
User.needLogin().then(() => {
Question.reportLink('preview', text);
});
}}
/>
)}
);
},
},
{
title: '进度',
key: 'progress',
render: (text, record) => {
const { paper = {} } = record;
return `${paper.paper && paper.paper.times > 0 ? `${paper.paper.times}次+` : ''}${
paper.report ? formatPercent(paper.report.userNumber, paper.report.questionNumber, false) : '0%'}`;
},
},
{
title: '最近学习',
key: 'lastTime',
render: (text, record) => {
const { paper = {} } = record;
return paper.report && formatDate(paper.report.updateTime, 'YYYY-MM-DD HH:mm:ss');
},
},
{
title: '笔记',
key: 'note',
render: (text, record) => {
return ;
},
},
{
title: '问答',
key: 'ask',
render: (text, record) => {
return (
{`${record.answerNumber ||
0}/${record.askNumber || 0}`}
);
},
},
];
this.state = { open: props.data.status === 'ing' };
}
render() {
const { data = {} } = this.props;
switch (data.status) {
case 'ing':
return this.renderIng();
case 'not':
return this.renderNot();
case 'end':
return this.renderEnd();
case 'suspend':
return this.renderSuspend();
default:
return
;
}
}
renderIng() {
const { data, onTime, onComment, onSuspend } = this.props;
const { open } = this.state;
return (
学习中
{data.course.title}
{
const { key } = value;
if (key === 'comment') {
onComment();
} else if (key === 'suspend') {
onSuspend();
}
}}
/>
{data.currentCourseNo && (
{
linkTo(`/course/detail/${data.course.id}`);
}}
>
继续学习:课时 {data.currentNo}:{data.currentCourseNo.title}
)}
授课老师
{data.course.teacher}
有效期
{data.useExpireDays}Days
{data.currentNo} /{data.courseNos.length}
{data.answerNumber} /{data.askNumber}
onTime()}>
{formatSeconds(data.totalTime)} {data.previewProgress || 0}%
this.setState({ open: !open })} />
{open && this.renderTable()}
);
}
renderNot() {
const { data } = this.props;
return (
授课老师
{data.course.teacher}
课时
{data.courseNos.length}
总时长
{formatSeconds(data.time || data.courseTime)}
请于 {formatDate(data.endTime, 'YYYY-MM-DD')} 前开通
{
this.open(data.id);
}}
>
立即开通
);
}
renderEnd() {
const { data, onTime, onComment } = this.props;
const { open } = this.state;
return (
已结束
{data.course.title}
{
const { key } = value;
if (key === 'comment') {
onComment();
}
}}
/>
授课老师
{data.course.teacher}
有效期
{formatDate(data.useStartTime, 'YYYY-MM-DD')}
至{formatDate(data.useEndTime, 'YYYY-MM-DD')}
{data.answerNumber} /{data.askNumber}
onTime()}>
{formatSeconds(data.totalTime)} {data.previewProgress || 0}%
{data.courseAward > 0 && (
)}
this.setState({ open: !open })} />
{open && this.renderTable()}
);
}
renderSuspend() {
const { data, onTime, onRestore, onComment } = this.props;
const { open } = this.state;
return (
已停课
{data.course.title}
onRestore()}>
恢复上课
申请时间:
{formatDate(data.suspendTime, 'YYYY-MM-DD HH:mm:ss')}
已停课:
{parseInt((new Date().getTime() - new Date(data.suspendTime).getTime()) / 86400000, 10)}Days/30
{
const { key } = value;
if (key === 'comment') {
onComment();
}
}}
/>
授课老师
{data.course.teacher}
有效期
{data.useExpireDays}Days
{data.currentNo} /{data.courseNos.length}
{data.answerNumber} /{data.askNumber}
onTime()}>
{formatSeconds(data.totalTime)} {data.previewProgress || 0}%
this.setState({ open: !open })} />
{open && this.renderTable()}
);
}
renderTable() {
const { data = {} } = this.props;
const { courseNos = [] } = data;
return ;
}
}
const titleMap = {
1: '预约时间',
2: '答疑文档',
3: '上课',
4: '课后笔记',
5: '课后补充',
6: '备考信息',
7: '完成作业',
};
const iconMap = {
1: 'time-icon',
2: 'QA-icon',
3: 'class-icon',
4: 'note-icon',
5: 'supplement-icon',
6: 'information-icon',
7: 'homework-icon',
};
const statusMap = {
1: appointment => {
if (!appointment.id) return 'end';
return '';
},
2: appointment => {
if (!appointment.questionFile) return 'not';
return '';
},
3: (appointment, data) => {
if (!data.cctalkName) return 'not';
// if (new Date(appointment.endTime).getTime() > new Date()) return 'not';
return '';
},
4: appointment => {
if (!appointment.noteList || appointment.noteList.length === 0) return 'not';
return '';
},
5: appointment => {
if (!appointment.supplyList || appointment.supplyList.length === 0) return 'not';
return '';
},
6: () => {
return '';
},
7: appointment => {
const { paper = {} } = appointment;
if (!paper.report || formatPercent(paper.report.userNumber, paper.report.questionNumber) < 100) return 'not';
return '';
},
};
class CourseVs extends Component {
constructor(props) {
super(props);
this.columns = {
system: [
{ title: '学习内容', key: 'title' },
{
title: '预习作业',
key: 'paper',
render: text => {
text = text || {};
const progress = text.report ? formatPercent(text.report.userNumber, text.report.questionNumber) : 0;
const times = text.paper ? text.paper.times : 0;
return (
{!text.report && (
{
User.needLogin().then(() => {
Question.startLink('preview', text);
});
}}
/>
)}
{text.report && !text.report.isFinish && (
{
User.needLogin().then(() => {
Question.continueLink('preview', text);
});
}}
/>
)}
{text.report && !!text.report.isFinish && (
{
User.needLogin().then(() => {
Question.restart('preview', text);
});
}}
/>
)}
{text.report && !!text.report.isFinish && (
{
User.needLogin().then(() => {
Question.reportLink('preview', text);
});
}}
/>
)}
);
},
},
{
title: '授课时间',
key: 'time',
render: (text, record) => {
return (
{formatDate(record.startTime, 'YYYY-MM-DD')}
{formatDate(record.startTime, 'HH:mm:ss')} ~ {formatDate(record.endTime, 'HH:mm:ss')}
);
},
},
{
title: '课后笔记',
key: 'note',
render: (text, record) => {
return record.noteList && record.noteList.length > 0 ? (
this.props.onNote(record)}>查看
) : (查看 );
},
},
{
title: '课后补充',
key: 'supply',
render: (text, record) => {
return record.supplyList && record.supplyList.length > 0 ? (
this.props.onSupply(record)}>查看
) : (查看 );
},
},
],
answer: [
{ title: '学习内容', key: 'title' },
{
title: '答疑文档',
key: 'questionFile',
render: (text, record) => {
return (
{record.questionFileName}
);
},
},
{
title: '授课时间',
key: 'time',
render: (text, record) => {
return `${formatDate(record.startTime, 'YYYY-MM-DD HH:mm:ss')} ~ ${formatDate(record.endTime, 'HH:mm:ss')}`;
},
},
{
title: '课后补充',
key: 'supply',
render: (text, record) => {
return record.supplyList ? this.props.onSupply(record)}>查看 : 查看 ;
},
},
],
};
this.listMap = {
novice: [1, 3],
coach: [1, 6, 3],
system: [1, 7, 3, 4],
answer: [1, 2, 3],
};
const index = props.data.appointments.length - 1;
this.state = {
open: props.data.status === 'ing',
tab: 'ing',
index,
list: this.listMap[this.props.data.course.vsType],
showTips:
props.data.commentTips === 0 &&
(props.data.appointments.length === Math.ceil(props.data.number / 2) ||
props.data.appointments.length === props.data.number),
};
}
closeCommentTips() {
My.courseCommentTips(this.props.data.id).then(() => {
this.setState({ showTips: false });
});
}
render() {
const { data = {} } = this.props;
switch (data.status) {
case 'ing':
return this.renderIng();
case 'not':
return this.renderNot();
case 'end':
return this.renderEnd();
case 'suspend':
return this.renderSuspend();
default:
return
;
}
}
renderIng() {
const { data, onComment, closeCommentTips } = this.props;
const { tab, showTips, open } = this.state;
return (
学习中
{data.course.title}
{data.vsNo > 0 ? `V${data.vsNo}` : ''}
{data.number > 0 ? `(${data.number}课时)` : ''}
{
const { key } = value;
if (key === 'comment') {
onComment();
}
}}
/>
{showTips && (
)}
授课老师
{data.teacher.realname}
有效期
{data.useExpireDays}Days
{data.appointments.length} /{data.number}
{data.appointments.length > 0 ? data.totalDays / data.appointments.length : 0} /课时
this.setState({ open: !open })} />
{open && (data.course.vsType === 'system' || data.course.vsType === 'answer') && (
this.setState({ tab: key })}
/>
)}
{open && (tab === 'ing' ? this.renderTimeLine() : this.renderTable())}
);
}
renderNot() {
const { data } = this.props;
return (
未开通
{data.course.title}
{data.vsNo > 0 ? `V${data.vsNo}` : ''}
{data.number > 0 ? `(${data.number}课时)` : ''}
授课老师
{data.teacher.realname}
请尽快与老师预约上课时间
请于 {formatDate(data.endTime, 'YYYY-MM-DD')} 前开通课程
{/* {this.renderTimeLine()} */}
);
}
renderEnd() {
const { data, onComment, closeCommentTips } = this.props;
const { open, tab, showTips } = this.state;
return (
已结课
{data.course.title}
{data.vsNo > 0 ? `V${data.vsNo}` : ''}
{data.number > 0 ? `(${data.number}课时)` : ''}
{
const { key } = value;
if (key === 'comment') {
onComment();
}
}}
/>
{showTips && (
)}
授课老师
{data.teacher.realname}
有效期
{data.useExpireDays}Days
{data.appointments.length} /{data.number}
{data.appointments.length > 0 ? data.totalDays / data.appointments.length : 0} /课时
this.setState({ open: !open })} />
{open && (data.course.vsType === 'system' || data.course.vsType === 'answer') && (
this.setState({ tab: key })}
/>
)}
{open && (tab === 'ing' ? this.renderTimeLine() : this.renderTable())}
);
}
renderSuspend() {
const { data, onRestore, onComment } = this.props;
return (
已停课
{data.course.title}
{data.vsNo > 0 ? `V${data.vsNo}` : ''}
{data.number > 0 ? `(${data.number}课时)` : ''}
onRestore()}>
恢复上课
申请时间:
{formatDate(data.suspendTime, 'YYYY-MM-DD HH:mm:ss')}
已停课:
{parseInt((new Date().getTime() - new Date(data.suspendTime).getTime()) / 86400000, 10)}Days/30
{
const { key } = value;
if (key === 'comment') {
onComment();
}
}}
/>
授课老师
{data.teacher.realname}
有效期
{data.useExpireDays}Days
{data.appointments.length} /{data.number}
{data.appointments.length > 0 ? data.totalDays / data.appointments.length : 0} /课时
);
}
renderTimeLine() {
const { data = {}, onUploadNote, onUploadSupply, onUploadQuestion, setCCTalkName } = this.props;
const { list = [], index } = this.state;
const appointment = data.appointments[index] || {};
let status = '';
return [
{data.number > 1 && (
课时 {appointment.no}:{appointment.title}
)}
{data.number > 1 && (
this.setState({ index: index === 0 ? index : index - 1 })} />
上一课时
下一课时
this.setState({ index: index >= data.appointments.length - 1 ? index : index + 1 })}
/>
)}
,
{list.map(item => {
if (status === '') {
// 上一阶段完成
status = statusMap[item](appointment, data);
} else {
// 上一阶段未完成
status = 'end';
}
return (
);
})}
,
];
}
renderTable() {
const { data = {} } = this.props;
const { appointments = [] } = data;
return (
row.id)} />
);
}
}
class TimeLineItem extends Component {
constructor(props) {
super(props);
this.state = {};
}
onClick(key) {
const { onClick } = this.props;
const { status } = this.props;
if (status === 'not') return;
if (onClick) onClick(key);
}
render() {
const { type } = this.props;
const { status } = this.props;
return (
);
}
renderDetail() {
const {
data = {},
appointment = {},
type,
onUploadNote,
onUploadSupply,
onDeleteNote,
onDeleteSupply,
onUploadQuestion,
setCCTalkName,
} = this.props;
const { status } = this.props;
const { paper } = appointment;
switch (type) {
case '1':
switch (status) {
case 'end':
case 'not':
return (
请尽快与老师预约上课时间,老师微信:{data.teacher.wechat}扫码加微信{' '}
}>
);
default:
return (
{formatDate(appointment.startTime, 'YYYY-MM-DD HH:mm:ss')} ~{' '}
{formatDate(appointment.endTime, 'HH:mm:ss')}
);
}
case '2':
switch (status) {
case 'end':
return 点此上传 ;
case 'not':
return (
{
return Common.upload({ file }).then(result => onUploadQuestion(appointment, result.url, file.name));
}}
>
点此上传
);
default:
return (
{appointment.questionFileName || '文件'}
);
}
case '3':
switch (status) {
case 'end':
return data.cctalkName ? (
CCtalk 频道号 :{appointment.cctalkChannel}{' '}
CC talk使用手册
) : (
{
this.setState({ cctalkName: e.target.value });
}}
/>
提交
);
case 'not':
return data.cctalkName ? (
CCtalk 频道号 :{appointment.cctalkChannel}{' '}
CC talk使用手册
) : (
{
this.setState({ cctalkName: e.target.value });
}}
/>
{
if (this.state.cctalkName) setCCTalkName(appointment, this.state.cctalkName);
}}
>
提交
);
default:
return (
CCtalk 频道号 :{appointment.cctalkChannel}{' '}
CC talk使用手册
);
}
case '4':
switch (status) {
case 'end':
return 点此上传 ;
case 'not':
return (
{
onUploadNote(appointment, { appointmentId: appointment.id, recordId: appointment.recordId });
}}
>
点此上传
);
default:
return (
{
onUploadNote(appointment, { appointmentId: appointment.id, recordId: appointment.recordId });
}}
>
点此上传
{appointment.noteList.map(row => {
return (
{
switch (key) {
case 'edit':
onUploadNote(appointment, row);
break;
case 'delete':
onDeleteNote(appointment, row);
break;
case 'reply':
onUploadNote(appointment, {
parentId: row.id,
appointmentId: appointment.id,
recordId: appointment.recordId,
});
break;
default:
}
}}
/>
);
})}
);
}
case '5':
switch (status) {
case 'end':
return 写留言 ;
case 'not':
return (
{
onUploadSupply(appointment, { appointmentId: appointment.id, recordId: appointment.recordId });
}}
>
写留言
);
default:
return (
{
onUploadSupply(appointment, { appointmentId: appointment.id, recordId: appointment.recordId });
}}
>
写留言
{appointment.supplyList.map(row => {
return (
{
switch (key) {
case 'edit':
onUploadSupply(appointment, row);
break;
case 'delete':
onDeleteSupply(appointment, row);
break;
case 'reply':
onUploadSupply(appointment, {
parentId: row.id,
appointmentId: appointment.id,
recordId: appointment.recordId,
});
break;
default:
}
}}
/>
);
})}
);
}
case '6':
return [
,
,
];
case '7':
return (
);
default:
return
;
}
}
}