|
@@ -31,20 +31,16 @@ export default class extends Page {
|
|
|
}
|
|
|
|
|
|
formatRecord(row) {
|
|
|
- if (row.number > 1 && row.number === row.appointments.length) {
|
|
|
- row.status = 'end';
|
|
|
- } else if (row.useEndTime) {
|
|
|
- if (new Date(row.useEndTime).getTime() > new Date().getTime()) {
|
|
|
- row.status = 'end';
|
|
|
- } else if (row.isSuspend && !row.restoreTime) {
|
|
|
+ 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 if (new Date(row.useEndTime).getTime() < new Date().getTime()) {
|
|
|
- row.status = 'end';
|
|
|
} else {
|
|
|
- row.status = 'no';
|
|
|
+ row.status = 'not';
|
|
|
}
|
|
|
row.paperMap = {};
|
|
|
row.appointmentPaperMap = {};
|
|
@@ -77,15 +73,22 @@ export default class extends Page {
|
|
|
row.currentNo = 0;
|
|
|
}
|
|
|
// 如果已经最新预约结束,则添加一个空记录作为最新预约
|
|
|
- if (!row.appointments || row.appointments.length === 0) {
|
|
|
- row.appointments = [{}];
|
|
|
- } else {
|
|
|
+ if (row.appointments) {
|
|
|
row.appointments.forEach(r => {
|
|
|
r.paper = row.appointmentPaperMap[r.id];
|
|
|
- r.noteList = (row.comments || []).map(c => c.type === 'note' && c.appointmentId === r.id);
|
|
|
- r.supplyList = (row.comments || []).map(c => c.type === 'supply' && c.appointmentId === 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);
|
|
@@ -198,7 +201,8 @@ export default class extends Page {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- submitAppointmentComment(data) {
|
|
|
+ submitAppointmentComment(data, type) {
|
|
|
+ data.type = type;
|
|
|
if (data.id) {
|
|
|
My.editAppointmentComment(data)
|
|
|
.then(() => {
|
|
@@ -288,7 +292,7 @@ export default class extends Page {
|
|
|
onChange={key => this.onStatusChange(key)}
|
|
|
/>
|
|
|
{this[`renderTab${tab}`]()}
|
|
|
- <Modal show={showTime} className="clock-modal" title="打卡表" width={460} onClose={() => { }}>
|
|
|
+ <Modal show={showTime} className="clock-modal" title="打卡表" width={460} onClose={() => this.setState({ showTime: false })}>
|
|
|
<div>
|
|
|
<div className="d-i-b w-3">
|
|
|
<div className="t-2 t-s-14">听课频率</div>
|
|
@@ -316,6 +320,8 @@ export default class extends Page {
|
|
|
</div>
|
|
|
<DatePlane
|
|
|
hideInput
|
|
|
+ show={showTime}
|
|
|
+ onChange={() => { }}
|
|
|
disabledDate={(current) => {
|
|
|
const date = current.format('YYYY-MM-DD');
|
|
|
return data.stopTimeMap[date];
|
|
@@ -383,7 +389,7 @@ export default class extends Page {
|
|
|
title="上传笔记"
|
|
|
width={630}
|
|
|
confirmText="提交"
|
|
|
- onConfirm={() => this.submitAppointmentComment(note)}
|
|
|
+ onConfirm={() => this.submitAppointmentComment(note, 'note')}
|
|
|
onCancel={() => this.setState({ showUploadNote: false, note: {} })}
|
|
|
>
|
|
|
<textarea
|
|
@@ -398,15 +404,15 @@ export default class extends Page {
|
|
|
/>
|
|
|
<div className={`t-c drag-upload ${this.state.draging ? 'draging' : ''}`}>
|
|
|
<Button theme="file">上传文件</Button>
|
|
|
- <span className="m-l-1 t-3 t-s-14">支持 docx, xls, PDF, rar, zip, PNG, JPG 等类型的文件</span>
|
|
|
+ <span className="m-l-1 t-3 t-s-14">{note.file ? `上传文件:${note.name} 成功` : '支持 docx, xls, PDF, rar, zip, PNG, JPG 等类型的文件'}</span>
|
|
|
<div className="fixed">
|
|
|
- <span className="f-w-b t-s-18">放开文件立刻上传{supply.file && `上传文件:${supply.name} 成功`}</span>
|
|
|
+ <span className="f-w-b t-s-18">放开文件立刻上传</span>
|
|
|
</div>
|
|
|
<FileUpload
|
|
|
type="none"
|
|
|
onDragEnter={() => this.setState({ draging: true })}
|
|
|
onDragLeave={() => this.setState({ draging: false })}
|
|
|
- onUpload={(file) => Common.uploadImage(file).then(result => {
|
|
|
+ onUpload={({ file }) => Common.upload(file).then(result => {
|
|
|
note.file = result.url;
|
|
|
note.name = file.name;
|
|
|
this.setState({ note });
|
|
@@ -427,7 +433,7 @@ export default class extends Page {
|
|
|
</Modal>
|
|
|
<Modal show={showUploadSupply} title="上传留言"
|
|
|
width={630}
|
|
|
- confirmText="提交" onConfirm={() => this.submitAppointmentComment(supply)} onCancel={() => this.setState({ showUploadSupply: false, supply: {} })}>
|
|
|
+ confirmText="提交" onConfirm={() => this.submitAppointmentComment(supply, 'supply')} onCancel={() => this.setState({ showUploadSupply: false, supply: {} })}>
|
|
|
<textarea
|
|
|
className="b-c-1 w-10 p-10 m-b-1"
|
|
|
rows={6}
|
|
@@ -440,15 +446,15 @@ export default class extends Page {
|
|
|
/>
|
|
|
<div className={`t-c drag-upload ${this.state.draging ? 'draging' : ''}`}>
|
|
|
<Button theme="file">上传文件</Button>
|
|
|
- <span className="m-l-1 t-3 t-s-14">支持 docx, xls, PDF, rar, zip, PNG, JPG 等类型的文件</span>
|
|
|
+ <span className="m-l-1 t-3 t-s-14">{supply.file ? `上传文件:${supply.name} 成功` : '支持 docx, xls, PDF, rar, zip, PNG, JPG 等类型的文件'}</span>
|
|
|
<div className="fixed">
|
|
|
- <span className="f-w-b t-s-18">放开文件立刻上传{supply.file && `上传文件:${supply.name} 成功`}</span>
|
|
|
+ <span className="f-w-b t-s-18">放开文件立刻上传</span>
|
|
|
</div>
|
|
|
<FileUpload
|
|
|
type="none"
|
|
|
onDragEnter={() => this.setState({ draging: true })}
|
|
|
onDragLeave={() => this.setState({ draging: false })}
|
|
|
- onUpload={(file) => Common.uploadImage(file).then(result => {
|
|
|
+ onUpload={({ file }) => Common.upload(file).then(result => {
|
|
|
supply.file = result.url;
|
|
|
supply.name = file.name;
|
|
|
this.setState({ supply });
|
|
@@ -463,7 +469,6 @@ export default class extends Page {
|
|
|
|
|
|
renderTabonline() {
|
|
|
const { list = [] } = this.state;
|
|
|
- console.log(list);
|
|
|
return list.map(item => {
|
|
|
return <CourseOnline data={item} user={this.props.user} refreshDetail={(recordId) => {
|
|
|
this.refreshDetail(recordId);
|
|
@@ -491,12 +496,12 @@ export default class extends Page {
|
|
|
}} onComment={() => {
|
|
|
this.setState({ showComment: true, comment: { channel: 'course-vs', position: item.course.id } });
|
|
|
}} closeCommentTips={() => this.closeCommentTips(item.id)}
|
|
|
- onNote={(appointment) => this.setState({ showNote: true, appointment, data: item })}
|
|
|
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)}
|
|
|
- onSupply={(appointment) => this.setState({ whoSupply: true, appointment, data: item })}
|
|
|
+ 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)} />;
|
|
|
});
|
|
@@ -706,7 +711,7 @@ class CourseOnline extends Component {
|
|
|
<div className="t1">授课老师</div>
|
|
|
<div className="t2">{data.course.teacher}</div>
|
|
|
<div className="t1">有效期</div>
|
|
|
- <div className="t2">{formatDate(data.useStartTime, 'YYYY-MM-DD')}至{formatDate(data.useEndTime, 'YYYY-MM-DD')}</div>
|
|
|
+ <div className="t-s-12">{formatDate(data.useStartTime, 'YYYY-MM-DD')}<br />至{formatDate(data.useEndTime, 'YYYY-MM-DD')}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div className="right">
|
|
@@ -845,21 +850,22 @@ const statusMap = {
|
|
|
},
|
|
|
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';
|
|
|
+ if (!appointment.noteList || appointment.noteList.length === 0) return 'not';
|
|
|
return '';
|
|
|
},
|
|
|
5: (appointment) => {
|
|
|
- if (!appointment.supplyList && appointment.supplyList.length === 0) return 'not';
|
|
|
+ if (!appointment.supplyList || appointment.supplyList.length === 0) return 'not';
|
|
|
return '';
|
|
|
},
|
|
|
6: () => {
|
|
|
return '';
|
|
|
},
|
|
|
7: (appointment) => {
|
|
|
- const { paper } = appointment;
|
|
|
+ const { paper = {} } = appointment;
|
|
|
if (!paper.report || formatPercent(paper.report.userNumber, paper.report.questionNumber) < 100) return 'not';
|
|
|
return '';
|
|
|
},
|
|
@@ -919,7 +925,7 @@ class CourseVs extends Component {
|
|
|
title: '课后补充',
|
|
|
key: 'supply',
|
|
|
render: (text, record) => {
|
|
|
- this.props.onSupply(record);
|
|
|
+ return <a onClick={() => this.props.onSupply(record)}>查看</a>;
|
|
|
},
|
|
|
},
|
|
|
],
|
|
@@ -960,7 +966,7 @@ class CourseVs extends Component {
|
|
|
|
|
|
renderIng() {
|
|
|
const { data, onComment, closeCommentTips } = this.props;
|
|
|
- const { tab, showTips } = this.state;
|
|
|
+ const { tab, showTips, open } = this.state;
|
|
|
return (
|
|
|
<div className="education-item ing">
|
|
|
<div className="title">
|
|
@@ -976,8 +982,8 @@ class CourseVs extends Component {
|
|
|
}} />
|
|
|
</div>
|
|
|
</div>
|
|
|
- {showTips && <div className="continue" onClick={() => closeCommentTips()}>
|
|
|
- <Assets name="notice" />
|
|
|
+ {showTips && <div className="continue">
|
|
|
+ <Icon className='close m-r-5 t-3' type="close-circle" theme="filled" onClick={() => closeCommentTips()} />
|
|
|
课程已过半,可以来写写评价啦<a onClick={() => onComment()}>去写评价 ></a>
|
|
|
</div>}
|
|
|
<div className="detail">
|
|
@@ -1004,8 +1010,11 @@ class CourseVs extends Component {
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div className="open">
|
|
|
+ <GIcon name={open ? 'up' : 'down'} onClick={() => this.setState({ open: !open })} />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- {(data.course.vsType === 'system' || data.course.vsType === 'answer') && <Tabs
|
|
|
+ {open && (data.course.vsType === 'system' || data.course.vsType === 'answer') && <Tabs
|
|
|
className="t-l"
|
|
|
type="line"
|
|
|
theme="theme"
|
|
@@ -1015,7 +1024,7 @@ class CourseVs extends Component {
|
|
|
tabs={[{ key: 'ing', title: '授课中' }, { key: 'end', title: '已结课' }]}
|
|
|
onChange={key => this.setState({ tab: key })}
|
|
|
/>}
|
|
|
- {tab === 'ing' ? this.renderTimeLine() : this.renderTable()}
|
|
|
+ {open && (tab === 'ing' ? this.renderTimeLine() : this.renderTable())}
|
|
|
</div>
|
|
|
);
|
|
|
}
|
|
@@ -1079,8 +1088,8 @@ class CourseVs extends Component {
|
|
|
}} />
|
|
|
</div>
|
|
|
</div>
|
|
|
- {showTips && <div className="continue" onClick={() => closeCommentTips()}>
|
|
|
- <Assets name="notice" />
|
|
|
+ {showTips && <div className="continue">
|
|
|
+ <Icon className='close m-r-5 t-3' type="close-circle" theme="filled" onClick={() => closeCommentTips()} />
|
|
|
课程已结束,可以来写写评价啦<a onClick={() => onComment()}>去写评价 ></a>
|
|
|
</div>}
|
|
|
<div className="detail">
|
|
@@ -1111,7 +1120,7 @@ class CourseVs extends Component {
|
|
|
<GIcon name={open ? 'up' : 'down'} onClick={() => this.setState({ open: !open })} />
|
|
|
</div>
|
|
|
</div>
|
|
|
- {(data.course.vsType === 'system' || data.course.vsType === 'answer') && <Tabs
|
|
|
+ {open && (data.course.vsType === 'system' || data.course.vsType === 'answer') && <Tabs
|
|
|
className="t-l"
|
|
|
type="line"
|
|
|
theme="theme"
|
|
@@ -1121,7 +1130,7 @@ class CourseVs extends Component {
|
|
|
tabs={[{ key: 'ing', title: '授课中' }, { key: 'end', title: '已结课' }]}
|
|
|
onChange={key => this.setState({ tab: key })}
|
|
|
/>}
|
|
|
- {tab === 'ing' ? this.renderTimeLine() : this.renderTable()}
|
|
|
+ {open && (tab === 'ing' ? this.renderTimeLine() : this.renderTable())}
|
|
|
</div>
|
|
|
);
|
|
|
}
|
|
@@ -1180,24 +1189,24 @@ class CourseVs extends Component {
|
|
|
let status = '';
|
|
|
return ([
|
|
|
<div className="class-hour">
|
|
|
- <div className="text">课时 {appointment.no}:{appointment.title}</div>
|
|
|
- <div className="right">
|
|
|
+ {data.number > 1 && <div className="text">课时 {appointment.no}:{appointment.title}</div>}
|
|
|
+ {data.number > 1 && <div className="right">
|
|
|
<GIcon name="prev" onClick={() => this.setState({ index: index === 0 ? index : index - 1 })} />
|
|
|
<span>上一课时</span>
|
|
|
<span>下一课时</span>
|
|
|
<GIcon name="next" onClick={() => this.setState({ index: index >= data.appointments.length - 1 ? index : index + 1 })} />
|
|
|
- </div>
|
|
|
+ </div>}
|
|
|
</div>,
|
|
|
<div className="time-line">
|
|
|
{list.map(item => {
|
|
|
if (status === '') {
|
|
|
// 上一阶段完成
|
|
|
- status = statusMap(appointment, data);
|
|
|
+ status = statusMap[item](appointment, data);
|
|
|
} else {
|
|
|
// 上一阶段未完成
|
|
|
status = 'end';
|
|
|
}
|
|
|
- return <TimeLineItem type={item} user={this.props.user} appointment={appointment} data={data} status={status} onUploadNote={onUploadNote} onUploadSupply={onUploadSupply} onUploadQuestion={onUploadQuestion} setCCTalkName={setCCTalkName} />;
|
|
|
+ return <TimeLineItem type={`${item}`} user={this.props.user} appointment={appointment} data={data} status={status} onUploadNote={onUploadNote} onUploadSupply={onUploadSupply} onUploadQuestion={onUploadQuestion} setCCTalkName={setCCTalkName} />;
|
|
|
})}
|
|
|
</div>,
|
|
|
]);
|
|
@@ -1206,7 +1215,7 @@ class CourseVs extends Component {
|
|
|
renderTable() {
|
|
|
const { data = {} } = this.props;
|
|
|
const { appointments = [] } = data;
|
|
|
- return <UserTable size="small" columns={this.columns[data.course.vsType]} data={appointments} />;
|
|
|
+ return <UserTable size="small" columns={this.columns[data.course.vsType]} data={appointments.filter(row => row.id)} />;
|
|
|
}
|
|
|
}
|
|
|
class TimeLineItem extends Component {
|
|
@@ -1228,7 +1237,7 @@ class TimeLineItem extends Component {
|
|
|
return (
|
|
|
<div className={`time-line-item ${status}`}>
|
|
|
<div className="icon-title">
|
|
|
- <GIcon name={iconMap[type]} active={status !== 'not'} noHover />
|
|
|
+ <GIcon name={iconMap[type]} active={!status} noHover />
|
|
|
<div className="title">{titleMap[type]}</div>
|
|
|
</div>
|
|
|
<div className="time-line-detail">{this.renderDetail()}</div>
|
|
@@ -1255,7 +1264,7 @@ class TimeLineItem extends Component {
|
|
|
return <span className="link">点此上传</span>;
|
|
|
case 'not':
|
|
|
return <FileUpload onUpload={(file) => {
|
|
|
- return Common.upload(file).then((result => onUploadQuestion(appointment, result.url, file.name)));
|
|
|
+ return Common.upload({ file }).then((result => onUploadQuestion(appointment, result.url, file.name)));
|
|
|
}}><span className="link">点此上传</span></FileUpload>;
|
|
|
default:
|
|
|
return <a href={appointment.questionFile} target="_blank">{appointment.questionFileName || '文件'}</a>;
|
|
@@ -1263,11 +1272,19 @@ class TimeLineItem extends Component {
|
|
|
case '3':
|
|
|
switch (status) {
|
|
|
case 'end':
|
|
|
- return <input placeholder="请输入CCtalk用户名查看授课频道" />;
|
|
|
+ return data.cctalkName ? <span>
|
|
|
+ CCtalk 频道号 :{appointment.cctalkChannel} <a className="link" href="" target="_black">CC talk使用手册</a>
|
|
|
+ </span> : <div><input style={{ width: 200 }} className='b-c-1 p-l-1 p-r-1 t-s-12 m-r-1' placeholder="请输入CCtalk用户名查看授课频道" onChange={(e) => {
|
|
|
+ this.setState({ cctalkName: e.target.value });
|
|
|
+ }} /><Button size="small" radius disabled>提交</Button></div>;
|
|
|
case 'not':
|
|
|
- return <input placeholder="请输入CCtalk用户名查看授课频道" onChange={(e) => {
|
|
|
- setCCTalkName(e.target.value);
|
|
|
- }} />;
|
|
|
+ return data.cctalkName ? <span>
|
|
|
+ CCtalk 频道号 :{appointment.cctalkChannel} <a className="link" href="" target="_black">CC talk使用手册</a>
|
|
|
+ </span> : <div><input style={{ width: 200 }} className='b-c-1 p-l-1 p-r-1 t-s-12 m-r-1' placeholder="请输入CCtalk用户名查看授课频道" onChange={(e) => {
|
|
|
+ this.setState({ cctalkName: e.target.value });
|
|
|
+ }} /><Button size="small" radius onClick={() => {
|
|
|
+ if (this.state.cctalkName) setCCTalkName(appointment, this.state.cctalkName);
|
|
|
+ }} >提交</Button></div>;
|
|
|
default:
|
|
|
return <span>
|
|
|
CCtalk 频道号 :{appointment.cctalkChannel} <a className="link" href="" target="_black">CC talk使用手册</a>
|
|
@@ -1278,16 +1295,17 @@ class TimeLineItem extends Component {
|
|
|
case 'end':
|
|
|
return <span className="link" >点此上传</span>;
|
|
|
case 'not':
|
|
|
- return <span className="link" onClick={() => onUploadNote(appointment)}>点此上传</span>;
|
|
|
+ return <span className="link" onClick={() => onUploadNote(appointment, { appointmentId: appointment.id, recordId: appointment.recordId })}>点此上传</span>;
|
|
|
default:
|
|
|
return (
|
|
|
<div>
|
|
|
<div>
|
|
|
- <span className="link" onClick={() => onUploadNote(appointment)}>点此上传</span>
|
|
|
+ <span className="link" onClick={() => onUploadNote(appointment, { appointmentId: appointment.id, recordId: appointment.recordId })}>点此上传</span>
|
|
|
</div>
|
|
|
<div className="note-list">
|
|
|
{appointment.noteList.map(row => {
|
|
|
- return <Note user={this.props.user} teacher={data.teacher} data={row} reply={!row.userId} actionList={[row.userId && { key: 'edit', title: '编辑' }, row.userId && { key: 'delete', title: '删除' }]} onAction={(key) => {
|
|
|
+ console.log(row);
|
|
|
+ return <Note user={this.props.user} teacher={data.teacher} data={row} reply={!row.userId} actionList={row.userId ? [{ key: 'edit', label: '编辑' }, { key: 'delete', label: '删除' }] : null} onAction={(key) => {
|
|
|
switch (key) {
|
|
|
case 'edit':
|
|
|
onUploadNote(appointment, row);
|
|
@@ -1296,7 +1314,7 @@ class TimeLineItem extends Component {
|
|
|
onDeleteNote(appointment, row);
|
|
|
break;
|
|
|
case 'reply':
|
|
|
- onUploadNote(appointment, { parentId: row.id });
|
|
|
+ onUploadNote(appointment, { parentId: row.id, appointmentId: appointment.id, recordId: appointment.recordId });
|
|
|
break;
|
|
|
default:
|
|
|
}
|
|
@@ -1311,16 +1329,16 @@ class TimeLineItem extends Component {
|
|
|
case 'end':
|
|
|
return <span className="link" >写留言</span>;
|
|
|
case 'not':
|
|
|
- return <span className="link" onClick={() => onUploadSupply(appointment)}>写留言</span>;
|
|
|
+ return <span className="link" onClick={() => onUploadSupply(appointment, { appointmentId: appointment.id, recordId: appointment.recordId })}>写留言</span>;
|
|
|
default:
|
|
|
return (
|
|
|
<div>
|
|
|
<div>
|
|
|
- <span className="link" onClick={() => onUploadSupply(appointment)}>写留言</span>
|
|
|
+ <span className="link" onClick={() => onUploadSupply(appointment, { appointmentId: appointment.id, recordId: appointment.recordId })}>写留言</span>
|
|
|
</div>
|
|
|
<div className="note-list">
|
|
|
{appointment.supplyList.map(row => {
|
|
|
- return <Note user={this.props.user} teacher={data.teacher} data={row} reply={!row.userId} actionList={[row.userId && { key: 'edit', title: '编辑' }, row.userId && { key: 'delete', title: '删除' }]} onAction={(key) => {
|
|
|
+ return <Note user={this.props.user} teacher={data.teacher} data={row} reply={!row.userId} actionList={row.userId ? [{ key: 'edit', label: '编辑' }, { key: 'delete', label: '删除' }] : null} onAction={(key) => {
|
|
|
switch (key) {
|
|
|
case 'edit':
|
|
|
onUploadSupply(appointment, row);
|
|
@@ -1329,7 +1347,7 @@ class TimeLineItem extends Component {
|
|
|
onDeleteSupply(appointment, row);
|
|
|
break;
|
|
|
case 'reply':
|
|
|
- onUploadSupply(appointment, { parentId: row.id });
|
|
|
+ onUploadSupply(appointment, { parentId: row.id, appointmentId: appointment.id, recordId: appointment.recordId });
|
|
|
break;
|
|
|
default:
|
|
|
}
|