dev_forum
杨树林 5 years ago
parent a3af436dd3
commit 067fa76d20

@ -504,7 +504,7 @@ class GraduationTasksSubmitedit extends Component{
`}</style>
<Form.Item
label="内容"
className="mdInForm"
>
{getFieldDecorator('description', {
rules: [{

@ -31,7 +31,8 @@ class GraduationTasksSubmitnew extends Component{
minmaxtype:false,
selectobjct:undefined,
Loadtype:false,
spinnings:false
spinnings:false,
shixunsreplace:false
}
}
@ -88,111 +89,11 @@ class GraduationTasksSubmitnew extends Component{
if(fileList.length === 0){
this.setState({
Modalstype:true,
Modalstopval:'请上传附件!',
Loadtype:true,
ModalSave:this.cancelAttachment,
tshixunsreplace:true,
})
return
}
let userids=[];
for(var list of selectmemberslist){
if(list.user_id!=undefined&&list.user_id!=null){
userids.push(list.user_id)
}
}
if(workslist.task_type===1){
userids=undefined
}
let listid=[];
for(var list of fileList){
listid.push(list.response.id)
}
// e.preventDefault();
if( GraduationTasksnewtype===true){
this.props.form.validateFields((err, values) => {
if (!err) {
console.log(values.description);
// console.log(fileList);
if(values.description===undefined||values.description===""){
return
}
if(workslist&&workslist.task_type===2){
if(userids!=undefined){
if(userids.length<2){
this.setState({
minvalue:2,
setvalue:"小于",
minmaxtype:true
})
return
}else if(userids.length>5){
this.setState({
minvalue:5,
setvalue:"大于",
minmaxtype:true
})
return
}
}
}
this.setState({
spinnings:true
})
let id=this.props.match.params.task_Id;
let url="/graduation_tasks/"+id+"/graduation_works.json";
axios.post(url, {
description:values.description,
attachment_ids:listid,
user_ids:userids
}
).then((response) => {
this.setState({
spinnings:false
})
if(response.status===200) {
GraduationTasksnewtype=false;
if(response.data.status===0){
// this.setState({
// Modalstype:true,
// Modalstopval:response.data.message,
// ModalSave:()=>this.setedit(response.data.work_id),
// Loadtype:true
// })
this.setedit(response.data.work_id)
}else{
GraduationTasksnewtype=true;
}
}
}).catch((error) => {
console.log(error)
})
}
});
}
// setTimeout(function () {
// GraduationTasksnewtype=true
// },10000)
this.Commoninterface(fileList,selectmemberslist,workslist);
}
handleSelectChange = (value) => {
@ -433,10 +334,116 @@ class GraduationTasksSubmitnew extends Component{
window.history.go(-1)
}
//公用数据
Commoninterface = (fileList,selectmemberslist,workslist)=>{
let userids=[];
for(var list of selectmemberslist){
if(list.user_id!=undefined&&list.user_id!=null){
userids.push(list.user_id)
}
}
if(workslist.task_type===1){
userids=undefined
}
let listid=[];
for(var list of fileList){
listid.push(list.response.id)
}
// e.preventDefault();
if( GraduationTasksnewtype===true){
this.props.form.validateFields((err, values) => {
if (!err) {
console.log(values.description);
// console.log(fileList);
if(values.description===undefined||values.description===""){
return
}
if(workslist&&workslist.task_type===2){
if(userids!=undefined){
if(userids.length<2){
this.setState({
minvalue:2,
setvalue:"小于",
minmaxtype:true
})
return
}else if(userids.length>5){
this.setState({
minvalue:5,
setvalue:"大于",
minmaxtype:true
})
return
}
}
}
this.setState({
spinnings:true
})
let id=this.props.match.params.task_Id;
let url="/graduation_tasks/"+id+"/graduation_works.json";
axios.post(url, {
description:values.description,
attachment_ids:listid,
user_ids:userids
}
).then((response) => {
this.setState({
spinnings:false
})
if(response.status===200) {
GraduationTasksnewtype=false;
if(response.data.status===0){
// this.setState({
// Modalstype:true,
// Modalstopval:response.data.message,
// ModalSave:()=>this.setedit(response.data.work_id),
// Loadtype:true
// })
this.setedit(response.data.work_id)
}else{
GraduationTasksnewtype=true;
}
}
}).catch((error) => {
console.log(error)
})
}
});
}
}
//确认
hidestartshixunsreplace=()=>{
let {fileList,selectmemberslist,workslist}=this.state;
this.Commoninterface(fileList,selectmemberslist,workslist);
}
//取消
hidestartshixunsreplacetwo=()=>{
this.setState({
shixunsreplace:false,
})
}
render(){
const { getFieldDecorator } = this.props.form;
let {search,fileList, workslist,setvalue,minvalue,minmaxtype,Loadtype,
Modalstype,Modalstopval,ModalCancel,ModalSave,memberslist,task_status,selectmemberslist} =this.state;
Modalstype,Modalstopval,ModalCancel,ModalSave,memberslist,task_status,selectmemberslist,shixunsreplace} =this.state;
let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id;
@ -481,6 +488,24 @@ render(){
modalSave={ModalSave}
loadtype={Loadtype}
/>
<Modal
keyboard={false}
title="提示"
visible={shixunsreplace}
closable={false}
footer={null}
>
<div className="task-popup-content">
<p className="task-popup-text-center font-16 ">还未上传附件</p>
<p className="task-popup-text-center font-16 pb20">是否确认提交作品?</p>
</div>
<div className="task-popup-submit clearfix">
<a className="task-btn task-btn-orange fr "
onClick={() => this.hidestartshixunsreplace()}>确认</a>
<a className="task-btn fr mr50"
onClick={() => this.hidestartshixunsreplacetwo()}>取消</a>
</div>
</Modal>
<div className="newMain clearfix">
<div className={"educontent mb20"}>
@ -520,13 +545,10 @@ render(){
.upload_1 .ant-upload-list {
width: 350px;
}
.contentbox{
margin-bottom:0px !important;
}
`}</style>
<Form.Item
label="内容"
className={"contentbox"}
className={"contentbox mdInForm"}
>
{getFieldDecorator('description', {
rules: [{
@ -583,7 +605,7 @@ render(){
{workslist&&workslist.task_type===1?"":
<div className="stud-class-set pd20 coursenavbox edu-back-white"
style={{borderTop:'1px solid #ccc'}}
style={{borderTop:'0.5px solid #ccc'}}
>
<Form.Item
label="小组成员"

@ -344,10 +344,11 @@ class GraduationTasksedit extends Component{
.upload_1 .ant-upload-list {
width: 350px;
}
`}</style>
<Form.Item
label="内容"
className="mdInForm"
style={{marginBottom:'0px'}}
>
{getFieldDecorator('description', {

@ -339,9 +339,11 @@ class GraduationTasksnew extends Component {
.ant-form-item{
margin-bottom:0px
}
`}</style>
<Form.Item
label="内容"
className="mdInForm "
>
{getFieldDecorator('description', {

@ -1,425 +1,426 @@
import React,{ Component } from "react";
import {
Form, Input, InputNumber, Switch, Radio,
Slider, Button, Upload, Icon, Rate, Checkbox, message,
Row, Col, Select, Modal
} from 'antd';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import axios from 'axios'
import {getUrl} from 'educoder';
import "../../common/formCommon.css"
// import './board.css'
// import { RouteHOC } from './common.js'
const confirm = Modal.confirm;
const $ = window.$
const { Option } = Select;
// 提交作品
// https://lanhuapp.com/web/#/item/project/board/detail?pid=a3bcd4b1-99ce-4e43-8ead-5b8b0a410807&project_id=a3bcd4b1-99ce-4e43-8ead-5b8b0a410807&image_id=c6d9b36f-7701-4035-afdb-62404681108c
class GraduateTopicPostWorksNew extends Component{
constructor(props){
super(props);
this.mdRef = React.createRef();
this.state = {
fileList: [],
boards: []
}
}
componentDidMount = () => {
const topicId = this.props.match.params.topicId
const cid = this.props.match.params.coursesId
const boardsUrl = `/courses/${cid}/get_all_boards.json`
axios.get(boardsUrl, { })
.then((response) => {
if (response.data.status == 0) {
this.setState({
boards: response.data.data
})
}
})
.catch(function (error) {
console.log(error);
});
const isEdit = !!topicId
this.isEdit = isEdit
if (isEdit) {
const url = `/messages/${topicId}.json`
axios.get(url, {
})
.then((response) => {
if (response.data.status == 0) {
const { id, data } = response.data;
if (data) {
this.editTopic = data;
this.props.form.setFieldsValue({
content: data.content,
subject: data.subject,
board_id: data.board_id
});
this.mdRef.current.setValue(data.content)
const _fileList = data.attachments.map(item => {
return {
id: item.id,
uid: item.id,
name: item.title,
url: item.url,
status: 'done'
}
})
this.setState({ fileList: _fileList})
}
}
})
.catch(function (error) {
console.log(error);
});
} else {
const boardId = this.props.match.params.boardId
this.props.form.setFieldsValue({
board_id: parseInt(boardId)
});
}
}
handleSubmit = (e) => {
e.preventDefault();
const cid = this.props.match.params.coursesId
const boardId = this.props.match.params.boardId
this.props.form.validateFieldsAndScroll((err, values) => {
if (!err) {
console.log('Received values of form: ', values);
if (this.isEdit == true) {
const editTopic = this.editTopic
const editUrl = `/messages/${editTopic.id}.json`
let attachment_ids = undefined
if (this.state.fileList) {
attachment_ids = this.state.fileList.map(item => {
return item.response ? item.response.id : item.id
})
}
axios.put(editUrl, {
subject: values.subject,
board_id: values.board_id,
content: values.content,
sticky: values.sticky,
attachment_ids,
// board_id: 3779,
})
.then((response) => {
if (response.data.status == 0) {
const { id } = response.data;
console.log('--- success')
this.props.toDetailPage(cid, values.board_id, editTopic.id)
}
})
.catch(function (error) {
console.log(error);
});
} else {
const url = `/messages.json`
let attachment_ids = undefined
if (this.state.fileList) {
attachment_ids = this.state.fileList.map(item => {
return item.response.id
})
}
axios.post(url, {
...values,
course_id: cid,
board_id: boardId,
attachment_ids,
})
.then((response) => {
if (response.data) {
const { id } = response.data;
if (id) {
console.log('--- success')
}
}
})
.catch(function (error) {
console.log(error);
});
}
} else {
$("html").animate({ scrollTop: $('html').scrollTop() - 100 })
}
});
}
// 附件相关 START
handleChange = (info) => {
let fileList = info.fileList;
this.setState({ fileList });
}
onAttachmentRemove = (file) => {
confirm({
title: '确定要删除这个附件吗?',
okText: '确定',
cancelText: '取消',
// content: 'Some descriptions',
onOk: () => {
this.deleteAttachment(file)
},
onCancel() {
console.log('Cancel');
},
});
return false;
}
deleteAttachment = (file) => {
const url = `/attachments/${file.id}.json`
axios.delete(url, {
})
.then((response) => {
if (response.data) {
const { status } = response.data;
if (status == 0) {
console.log('--- success')
this.setState((state) => {
const index = state.fileList.indexOf(file);
const newFileList = state.fileList.slice();
newFileList.splice(index, 1);
return {
fileList: newFileList,
};
});
}
}
})
.catch(function (error) {
console.log(error);
});
}
// 附件相关 ------------ END
render() {
let { addGroup, fileList } = this.state;
const { getFieldDecorator } = this.props.form;
const formItemLayout = {
labelCol: {
xs: { span: 24 },
// sm: { span: 8 },
sm: { span: 24 },
},
wrapperCol: {
xs: { span: 24 },
// sm: { span: 16 },
sm: { span: 24 },
},
};
const tailFormItemLayout = {
wrapperCol: {
xs: {
span: 24,
offset: 0,
},
sm: {
span: 16,
offset: 8,
},
},
};
const uploadProps = {
width: 600,
fileList,
multiple: true,
// https://github.com/ant-design/ant-design/issues/15505
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
// showUploadList: false,
action: `${getUrl()}/api/attachments.json`,
onChange: this.handleChange,
onRemove: this.onAttachmentRemove,
beforeUpload: (file) => {
console.log('beforeUpload', file.name);
const isLt150M = file.size / 1024 / 1024 < 150;
if (!isLt150M) {
message.error('文件大小必须小于150MB!');
}
return isLt150M;
},
};
return(
<div className="newMain ">
<style>{`
.courseForm .ant-form {
}
`}</style>
<div className="edu-class-container edu-position courseForm">
<div style={{ width:'100%',height:'70px'}} >
<p className="ml15 fl color-black mt30 summaryname">提交作品</p>
<a href="/student_work?homework=16737" className="color-grey-6 fr font-16 ml30 mt18 mr20">返回</a>
</div>
<Form {...formItemLayout} onSubmit={this.handleSubmit}>
<div className="formBlock" style={{paddingBottom: '0px'}}>
<Form.Item
label="标题"
>
{getFieldDecorator('subject', {
rules: [{
required: true, message: '请输入标题',
}, {
max: 20, message: '最大限制为20个字符',
}],
})(
<Input placeholder="请输入帖子标题最大限制20个字符" />
)}
</Form.Item>
</div>
<style>{`
.courseMessageMD {
width: 1140px;
}
.uploadBtn.ant-btn {
border: none;
color: #4CACFF;
box-shadow: none;
background: transparent;
padding: 0 6px;
}
.upload_1 .ant-upload-list {
width: 350px;
}
`}</style>
<div className="formBlock">
<Form.Item
label="内容"
>
{getFieldDecorator('content', {
rules: [{
required: true, message: '请输入帖子内容',
}, {
max: 10000, message: '最大限制为10000个字符',
}],
})(
<TPMMDEditor ref={this.mdRef} placeholder={'请在此输入帖子详情最大限制为10000个字符'}
mdID={'courseMessageMD'} initValue={this.editTopic ? this.editTopic.content : ''} className="courseMessageMD"></TPMMDEditor>
)}
</Form.Item>
<Upload {...uploadProps} className="upload_1">
<Button className="uploadBtn">
<Icon type="upload" /> 上传附件
</Button>
(单个文件150M以内)
</Upload>
</div>
<style>{`
.courseForm .flexBlock.formBlock {
align-items: flex-end;
display: flex;
flex-wrap: wrap;
}
.courseForm .flexBlock .tag {
margin-left: 8px;
margin-right: 6px;
margin-bottom: 16px;
}
.flexBlock .ant-row.ant-form-item {
margin-bottom: 6px;
}
`}</style>
<div className="formBlock flexBlock" style={{ }} >
<Form.Item
label="分组设置"
className=" "
style={{ display: 'inline-block', marginLeft: "14px" }}
>
{getFieldDecorator('min', {
rules: [{
required: true, message: '请输入每组最小人数',
}],
})(
<Input placeholder="请填写每组最小人数" />
)}
</Form.Item>
<span className="tag">~</span>
<Form.Item
label=""
className=" "
style={{ }}
>
{getFieldDecorator('max', {
rules: [{
// required: true, message: '请输入每组最大人数',
}],
})(
<Input placeholder="请填写每组最大人数" />
)}
</Form.Item>
<span className="tag color-grey9 ">(项目管理员角色的成员都可以提交作品提交作品时需要关联同组成员组内成员作品共享)</span>
<Form.Item
label=""
className=" "
style={{ marginLeft: "14px" }}
>
{getFieldDecorator('c', {
rules: [],
})(
<Checkbox >基于项目实施</Checkbox>
)}
</Form.Item>
<span className="tag color-grey9 ">(勾选后各小组必须在educoder平台创建项目教师可随时观察平台对各小组最小进展的实时统计)</span>
</div>
<div className="formBlock">
<Form.Item
label="参考答案"
>
{getFieldDecorator('answer', {
rules: [{
required: true, message: '请输入帖子内容',
}, {
max: 10000, message: '最大限制为10000个字符',
}],
})(
<TPMMDEditor ref={this.mdRef} placeholder={'请在此输入参考答案最大限制为5000个字符'}
mdID={'courseAnswerMD'} initValue={this.editTopic ? this.editTopic.content : ''} className="courseMessageMD"></TPMMDEditor>
)}
</Form.Item>
</div>
<Form.Item>
<div className="clearfix mt30 mb30">
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">提交</Button>
<a className="defalutCancelbtn fl">取消</ a>
</div>
</Form.Item>
</Form>
</div>
</div>
)
}
}
const WrappedGraduateTopicPostWorksNew = Form.create({ name: 'topicPostWorksNew' })(GraduateTopicPostWorksNew);
// RouteHOC()
import React,{ Component } from "react";
import {
Form, Input, InputNumber, Switch, Radio,
Slider, Button, Upload, Icon, Rate, Checkbox, message,
Row, Col, Select, Modal
} from 'antd';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import axios from 'axios'
import {getUrl} from 'educoder';
import "../../common/formCommon.css"
// import './board.css'
// import { RouteHOC } from './common.js'
const confirm = Modal.confirm;
const $ = window.$
const { Option } = Select;
// 提交作品
// https://lanhuapp.com/web/#/item/project/board/detail?pid=a3bcd4b1-99ce-4e43-8ead-5b8b0a410807&project_id=a3bcd4b1-99ce-4e43-8ead-5b8b0a410807&image_id=c6d9b36f-7701-4035-afdb-62404681108c
class GraduateTopicPostWorksNew extends Component{
constructor(props){
super(props);
this.mdRef = React.createRef();
this.state = {
fileList: [],
boards: []
}
}
componentDidMount = () => {
const topicId = this.props.match.params.topicId
const cid = this.props.match.params.coursesId
const boardsUrl = `/courses/${cid}/get_all_boards.json`
axios.get(boardsUrl, { })
.then((response) => {
if (response.data.status == 0) {
this.setState({
boards: response.data.data
})
}
})
.catch(function (error) {
console.log(error);
});
const isEdit = !!topicId
this.isEdit = isEdit
if (isEdit) {
const url = `/messages/${topicId}.json`
axios.get(url, {
})
.then((response) => {
if (response.data.status == 0) {
const { id, data } = response.data;
if (data) {
this.editTopic = data;
this.props.form.setFieldsValue({
content: data.content,
subject: data.subject,
board_id: data.board_id
});
this.mdRef.current.setValue(data.content)
const _fileList = data.attachments.map(item => {
return {
id: item.id,
uid: item.id,
name: item.title,
url: item.url,
status: 'done'
}
})
this.setState({ fileList: _fileList})
}
}
})
.catch(function (error) {
console.log(error);
});
} else {
const boardId = this.props.match.params.boardId
this.props.form.setFieldsValue({
board_id: parseInt(boardId)
});
}
}
handleSubmit = (e) => {
e.preventDefault();
const cid = this.props.match.params.coursesId
const boardId = this.props.match.params.boardId
this.props.form.validateFieldsAndScroll((err, values) => {
if (!err) {
console.log('Received values of form: ', values);
if (this.isEdit == true) {
const editTopic = this.editTopic
const editUrl = `/messages/${editTopic.id}.json`
let attachment_ids = undefined
if (this.state.fileList) {
attachment_ids = this.state.fileList.map(item => {
return item.response ? item.response.id : item.id
})
}
axios.put(editUrl, {
subject: values.subject,
board_id: values.board_id,
content: values.content,
sticky: values.sticky,
attachment_ids,
// board_id: 3779,
})
.then((response) => {
if (response.data.status == 0) {
const { id } = response.data;
console.log('--- success')
this.props.toDetailPage(cid, values.board_id, editTopic.id)
}
})
.catch(function (error) {
console.log(error);
});
} else {
const url = `/messages.json`
let attachment_ids = undefined
if (this.state.fileList) {
attachment_ids = this.state.fileList.map(item => {
return item.response.id
})
}
axios.post(url, {
...values,
course_id: cid,
board_id: boardId,
attachment_ids,
})
.then((response) => {
if (response.data) {
const { id } = response.data;
if (id) {
console.log('--- success')
}
}
})
.catch(function (error) {
console.log(error);
});
}
} else {
$("html").animate({ scrollTop: $('html').scrollTop() - 100 })
}
});
}
// 附件相关 START
handleChange = (info) => {
let fileList = info.fileList;
this.setState({ fileList });
}
onAttachmentRemove = (file) => {
confirm({
title: '确定要删除这个附件吗?',
okText: '确定',
cancelText: '取消',
// content: 'Some descriptions',
onOk: () => {
this.deleteAttachment(file)
},
onCancel() {
console.log('Cancel');
},
});
return false;
}
deleteAttachment = (file) => {
const url = `/attachments/${file.id}.json`
axios.delete(url, {
})
.then((response) => {
if (response.data) {
const { status } = response.data;
if (status == 0) {
console.log('--- success')
this.setState((state) => {
const index = state.fileList.indexOf(file);
const newFileList = state.fileList.slice();
newFileList.splice(index, 1);
return {
fileList: newFileList,
};
});
}
}
})
.catch(function (error) {
console.log(error);
});
}
// 附件相关 ------------ END
render() {
let { addGroup, fileList } = this.state;
const { getFieldDecorator } = this.props.form;
const formItemLayout = {
labelCol: {
xs: { span: 24 },
// sm: { span: 8 },
sm: { span: 24 },
},
wrapperCol: {
xs: { span: 24 },
// sm: { span: 16 },
sm: { span: 24 },
},
};
const tailFormItemLayout = {
wrapperCol: {
xs: {
span: 24,
offset: 0,
},
sm: {
span: 16,
offset: 8,
},
},
};
const uploadProps = {
width: 600,
fileList,
multiple: true,
// https://github.com/ant-design/ant-design/issues/15505
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
// showUploadList: false,
action: `${getUrl()}/api/attachments.json`,
onChange: this.handleChange,
onRemove: this.onAttachmentRemove,
beforeUpload: (file) => {
console.log('beforeUpload', file.name);
const isLt150M = file.size / 1024 / 1024 < 150;
if (!isLt150M) {
message.error('文件大小必须小于150MB!');
}
return isLt150M;
},
};
return(
<div className="newMain ">
<style>{`
.courseForm .ant-form {
}
`}</style>
<div className="edu-class-container edu-position courseForm">
<div style={{ width:'100%',height:'70px'}} >
<p className="ml15 fl color-black mt30 summaryname">提交作品</p>
<a href="/student_work?homework=16737" className="color-grey-6 fr font-16 ml30 mt18 mr20">返回</a>
</div>
<Form {...formItemLayout} onSubmit={this.handleSubmit}>
<div className="formBlock" style={{paddingBottom: '0px'}}>
<Form.Item
label="标题"
>
{getFieldDecorator('subject', {
rules: [{
required: true, message: '请输入标题',
}, {
max: 20, message: '最大限制为20个字符',
}],
})(
<Input placeholder="请输入帖子标题最大限制20个字符" />
)}
</Form.Item>
</div>
<style>{`
.courseMessageMD {
width: 1140px;
}
.uploadBtn.ant-btn {
border: none;
color: #4CACFF;
box-shadow: none;
background: transparent;
padding: 0 6px;
}
.upload_1 .ant-upload-list {
width: 350px;
}
`}</style>
<div className="formBlock">
<Form.Item
label="内容"
className="mdInForm"
>
{getFieldDecorator('content', {
rules: [{
required: true, message: '请输入帖子内容',
}, {
max: 10000, message: '最大限制为10000个字符',
}],
})(
<TPMMDEditor ref={this.mdRef} placeholder={'请在此输入帖子详情最大限制为10000个字符'}
mdID={'courseMessageMD'} initValue={this.editTopic ? this.editTopic.content : ''} className="courseMessageMD"></TPMMDEditor>
)}
</Form.Item>
<Upload {...uploadProps} className="upload_1">
<Button className="uploadBtn">
<Icon type="upload" /> 上传附件
</Button>
(单个文件150M以内)
</Upload>
</div>
<style>{`
.courseForm .flexBlock.formBlock {
align-items: flex-end;
display: flex;
flex-wrap: wrap;
}
.courseForm .flexBlock .tag {
margin-left: 8px;
margin-right: 6px;
margin-bottom: 16px;
}
.flexBlock .ant-row.ant-form-item {
margin-bottom: 6px;
}
`}</style>
<div className="formBlock flexBlock" style={{ }} >
<Form.Item
label="分组设置"
className=" "
style={{ display: 'inline-block', marginLeft: "14px" }}
>
{getFieldDecorator('min', {
rules: [{
required: true, message: '请输入每组最小人数',
}],
})(
<Input placeholder="请填写每组最小人数" />
)}
</Form.Item>
<span className="tag">~</span>
<Form.Item
label=""
className=" "
style={{ }}
>
{getFieldDecorator('max', {
rules: [{
// required: true, message: '请输入每组最大人数',
}],
})(
<Input placeholder="请填写每组最大人数" />
)}
</Form.Item>
<span className="tag color-grey9 ">(项目管理员角色的成员都可以提交作品提交作品时需要关联同组成员组内成员作品共享)</span>
<Form.Item
label=""
className=" "
style={{ marginLeft: "14px" }}
>
{getFieldDecorator('c', {
rules: [],
})(
<Checkbox >基于项目实施</Checkbox>
)}
</Form.Item>
<span className="tag color-grey9 ">(勾选后各小组必须在educoder平台创建项目教师可随时观察平台对各小组最小进展的实时统计)</span>
</div>
<div className="formBlock">
<Form.Item
label="参考答案"
>
{getFieldDecorator('answer', {
rules: [{
required: true, message: '请输入帖子内容',
}, {
max: 10000, message: '最大限制为10000个字符',
}],
})(
<TPMMDEditor ref={this.mdRef} placeholder={'请在此输入参考答案最大限制为5000个字符'}
mdID={'courseAnswerMD'} initValue={this.editTopic ? this.editTopic.content : ''} className="courseMessageMD"></TPMMDEditor>
)}
</Form.Item>
</div>
<Form.Item>
<div className="clearfix mt30 mb30">
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">提交</Button>
<a className="defalutCancelbtn fl">取消</ a>
</div>
</Form.Item>
</Form>
</div>
</div>
)
}
}
const WrappedGraduateTopicPostWorksNew = Form.create({ name: 'topicPostWorksNew' })(GraduateTopicPostWorksNew);
// RouteHOC()
export default (WrappedGraduateTopicPostWorksNew);
Loading…
Cancel
Save