课堂返回调整

dev_admin
杨树明 6 years ago
parent d7e6fffe2d
commit e405f71dff

@ -75,14 +75,15 @@ class CommonWorkDetailIndex extends Component{
}) })
} }
goback = () => { goback = () => {
let workId=this.props.match.params.workId; // let workId=this.props.match.params.workId;
//
if ( window.location.pathname.indexOf('appraise') == -1) { // if ( window.location.pathname.indexOf('appraise') == -1) {
let category_id= this.state.category.category_id; // let category_id= this.state.category.category_id;
this.props.toListPage(this.props.match.params, category_id) // this.props.toListPage(this.props.match.params, category_id)
} else { // } else {
this.props.toWorkListPage(this.props.match.params, workId) // this.props.toWorkListPage(this.props.match.params, workId)
} // }
this.props.history.goBack()
} }
// 补交附件 // 补交附件

@ -262,8 +262,9 @@ class CommonWorkPost extends Component{
} }
goback=()=>{ goback=()=>{
this.props.toListPage(this.props.match.params, this.state.category ? this.state.category.category_id : '') // this.props.toListPage(this.props.match.params, this.state.category ? this.state.category.category_id : '')
} this.props.history.goBack()
}
// 输入title // 输入title

@ -31,14 +31,15 @@ class WorkDetailPageHeader extends Component{
} }
goback = () => { goback = () => {
let workId=this.props.match.params.workId; // let workId=this.props.match.params.workId;
//
if ( window.location.pathname.indexOf('appraise') == -1) { // if ( window.location.pathname.indexOf('appraise') == -1) {
let category_id= this.props.category.category_id; // let category_id= this.props.category.category_id;
this.props.toListPage(this.props.match.params, category_id) // this.props.toListPage(this.props.match.params, category_id)
} else { // } else {
this.props.toWorkListPage(this.props.match.params, this.props.match.params.category_id) // this.props.toWorkListPage(this.props.match.params, this.props.match.params.category_id)
} // }
this.props.history.goBack()
} }
// 补交附件 // 补交附件
Cancelvisible=()=>{ Cancelvisible=()=>{

@ -1,247 +1,247 @@
import React,{Component} from "React"; import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,DatePicker} from "antd"; import { Form, Select, Input, Button,Checkbox,DatePicker} from "antd";
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';
import "../css/Courses.css"; import "../css/Courses.css";
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
const { Option } = Select; const { Option } = Select;
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;
class Ecercisemount extends Component{ class Ecercisemount extends Component{
constructor(props){ constructor(props){
super(props) super(props)
this.state={ this.state={
} }
} }
componentDidMount(){ componentDidMount(){
} }
handleSubmit = (e) => { handleSubmit = (e) => {
e.preventDefault(); e.preventDefault();
this.props.form.validateFields((err, values) => { this.props.form.validateFields((err, values) => {
if (!err) { if (!err) {
console.log('Received values of form: ', values); console.log('Received values of form: ', values);
} }
}); });
} }
handleSelectChange = (value) => { handleSelectChange = (value) => {
console.log(value); console.log(value);
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
note: `Hi, ${value === 'male' ? 'man' : 'lady'}!`, note: `Hi, ${value === 'male' ? 'man' : 'lady'}!`,
}); });
} }
render(){ render(){
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
const dateFormat = 'YYYY-MM-DD HH:mm:ss'; const dateFormat = 'YYYY-MM-DD HH:mm:ss';
return( return(
<React.Fragment> <React.Fragment>
<div> <div>
<div className="newMain clearfix"> <div className="newMain clearfix">
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<div style={{ width:'100%',height:'70px'}} > <div style={{ width:'100%',height:'70px'}} >
<p className="ml15 fl color-black mt30 summaryname">Java语言之控制语句</p> <p className="ml15 fl color-black mt30 summaryname">Java语言之控制语句</p>
<CoursesListType <CoursesListType
typelist={["已开启补交"]} typelist={["已开启补交"]}
typesylename={"mt28"} typesylename={"mt28"}
/> />
<a href="/student_work?homework=16737" className="color-grey-6 fr font-16 ml20 mt18 mr20">返回</a> <a onClick={()=>this.props.history.goBack()} className="color-grey-6 fr font-16 ml20 mt18 mr20">返回</a>
<a href="/student_work?homework=16737" className="color-grey-6 fr font-16 ml30 mt18 " target={"_blank"}>实训详情</a> <a href="/student_work?homework=16737" className="color-grey-6 fr font-16 ml30 mt18 " target={"_blank"}>实训详情</a>
</div> </div>
<div className="stud-class-set bor-bottom-greyE"> <div className="stud-class-set bor-bottom-greyE">
<div className="mt10 clearfix edu-back-white poll_list pl20"> <div className="mt10 clearfix edu-back-white poll_list pl20">
<a className="active">答题列表</a> <a className="active">答题列表</a>
<a>统计结果</a> <a>统计结果</a>
<a>问卷预览</a> <a>问卷预览</a>
<a>配置</a> <a>配置</a>
<a className={"fr color-blue font-16"}>导出成绩</a> <a className={"fr color-blue font-16"}>导出成绩</a>
<a className={"fr color-blue font-16"}>导出空白试卷</a> <a className={"fr color-blue font-16"}>导出空白试卷</a>
</div> </div>
</div> </div>
<Form onSubmit={this.handleSubmit} className={"edu-back-white newcourses exercise"}> <Form onSubmit={this.handleSubmit} className={"edu-back-white newcourses exercise"}>
{/*内容*/} {/*内容*/}
<div className="stud-class-set bor-bottom-greyE pd20 exerciselist"> <div className="stud-class-set bor-bottom-greyE pd20 exerciselist">
<Form.Item label="发布设置" hasFeedback> <Form.Item label="发布设置" hasFeedback>
{getFieldDecorator("TestingProfile")( {getFieldDecorator("TestingProfile")(
<Checkbox id="TestingProfile" value={""} className="fl ml40">统一设置</Checkbox> <Checkbox id="TestingProfile" value={""} className="fl ml40">统一设置</Checkbox>
)} )}
<span className={"coursesselect"}>选中则所有分班使用相同的发布设置否则各个分班单独设置</span> <span className={"coursesselect"}>选中则所有分班使用相同的发布设置否则各个分班单独设置</span>
<div className={"clearfix"}> <div className={"clearfix"}>
<span className="color-grey-6 mt5 fl ml40" style={{minWidth: '70px'}}>发布时间</span> <span className="color-grey-6 mt5 fl ml40" style={{minWidth: '70px'}}>发布时间</span>
<span className="fl mt5"> <span className="fl mt5">
{getFieldDecorator("startTime")( {getFieldDecorator("startTime")(
<DatePicker <DatePicker
showTime showTime
showToday={false} showToday={false}
locale={locale} locale={locale}
format={dateFormat} format={dateFormat}
placeholder="请选择发布时间" placeholder="请选择发布时间"
id={"startTime"} id={"startTime"}
width={"210px"} width={"210px"}
// value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)} // value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)}
// onChange={this.onChangeTimePicker} // onChange={this.onChangeTimePicker}
/> />
)} )}
<span className={"exerciseselect"}>发布之前学生不会收到问卷</span> <span className={"exerciseselect"}>发布之前学生不会收到问卷</span>
</span> </span>
</div> </div>
<div className={"clearfix"}> <div className={"clearfix"}>
<span className="color-grey-6 mt5 fl ml40" style={{minWidth: '70px'}}>截止时间</span> <span className="color-grey-6 mt5 fl ml40" style={{minWidth: '70px'}}>截止时间</span>
<span className="fl mt5"> <span className="fl mt5">
{getFieldDecorator("endTime")( {getFieldDecorator("endTime")(
<DatePicker <DatePicker
showTime showTime
showToday={false} showToday={false}
locale={locale} locale={locale}
format={dateFormat} format={dateFormat}
placeholder="请选择截止时间" placeholder="请选择截止时间"
id={"endTime"} id={"endTime"}
width={"210px"} width={"210px"}
// value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)} // value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)}
// onChange={this.onChangeTimePicker} // onChange={this.onChangeTimePicker}
/> />
)} )}
<span className={"exerciseselect"}>截止时间点系统将自动提交所有学生的答题学生将不能继续答题</span> <span className={"exerciseselect"}>截止时间点系统将自动提交所有学生的答题学生将不能继续答题</span>
</span> </span>
</div> </div>
</Form.Item> </Form.Item>
</div> </div>
<div className="stud-class-set bor-bottom-greyE pd20 exercisetime"> <div className="stud-class-set bor-bottom-greyE pd20 exercisetime">
<Form.Item label="答题设置" hasFeedback> <Form.Item label="答题设置" hasFeedback>
<div className={"clearfix"}> <div className={"clearfix"}>
<span className="color-grey-6 mt5 fl ml40 font-16" style={{minWidth: '70px'}}>答题时长</span> <span className="color-grey-6 mt5 fl ml40 font-16" style={{minWidth: '70px'}}>答题时长</span>
{getFieldDecorator("TestingProfile" {getFieldDecorator("TestingProfile"
, { , {
rules: [{ rules: [{
pattern: /^[1-9]\d*$/, pattern: /^[1-9]\d*$/,
message: '答题时长必须为正整数', message: '答题时长必须为正整数',
}], }],
})( })(
<Input id="TestingProfile" className={"greyInput mt10 mr10"} style={{width:'108px',marginLeft:'0px'}} /> <Input id="TestingProfile" className={"greyInput mt10 mr10"} style={{width:'108px',marginLeft:'0px'}} />
)} )}
<span className={"mr10"}>分钟</span> <span className={"mr10"}>分钟</span>
<span className={"coursesselect"}>选中则所有分班使用相同的发布设置否则各个分班单独设置</span> <span className={"coursesselect"}>选中则所有分班使用相同的发布设置否则各个分班单独设置</span>
</div> </div>
</Form.Item> </Form.Item>
<Form.Item hasFeedback> <Form.Item hasFeedback>
<div className={"clearfix pd60"}> <div className={"clearfix pd60"}>
{getFieldDecorator("subject", { {getFieldDecorator("subject", {
valuePropName: 'checked', valuePropName: 'checked',
})( })(
<Checkbox id="subject" className="fl">题目顺序随机打乱</Checkbox> <Checkbox id="subject" className="fl">题目顺序随机打乱</Checkbox>
)} )}
<span className={"coursesselect"}>选中则学生答题时题目顺序按照题型随机显示</span> <span className={"coursesselect"}>选中则学生答题时题目顺序按照题型随机显示</span>
</div> </div>
<div className={"clearfix pd60"}> <div className={"clearfix pd60"}>
{getFieldDecorator("options", { {getFieldDecorator("options", {
valuePropName: 'checked', valuePropName: 'checked',
})( })(
<Checkbox id="options" className="fl">选项顺序随机打乱</Checkbox> <Checkbox id="options" className="fl">选项顺序随机打乱</Checkbox>
)} )}
<span className={"coursesselect"}>选中则学生答题时选项顺序随机显示</span> <span className={"coursesselect"}>选中则学生答题时选项顺序随机显示</span>
</div> </div>
</Form.Item> </Form.Item>
</div> </div>
<div className="stud-class-set pd20 coursenavbox"> <div className="stud-class-set pd20 coursenavbox">
<Form.Item <Form.Item
label="公开设置" label="公开设置"
hasFeedback hasFeedback
> >
<div className={"clearfix pd28"}> <div className={"clearfix pd28"}>
{getFieldDecorator("opergrdee", { {getFieldDecorator("opergrdee", {
valuePropName: 'checked', valuePropName: 'checked',
})( })(
<Checkbox id="opergrdee" className="fl">公开成绩</Checkbox> <Checkbox id="opergrdee" className="fl">公开成绩</Checkbox>
)} )}
<span className={"coursesselect"}>选中则在截止时间之后对提交答题的课堂成员公开所有成绩否则不公开</span> <span className={"coursesselect"}>选中则在截止时间之后对提交答题的课堂成员公开所有成绩否则不公开</span>
</div> </div>
<div className={"clearfix pd28"}> <div className={"clearfix pd28"}>
{getFieldDecorator("openanswer", { {getFieldDecorator("openanswer", {
valuePropName: 'checked', valuePropName: 'checked',
})( })(
<Checkbox id="openanswer" className="fl">公开答案</Checkbox> <Checkbox id="openanswer" className="fl">公开答案</Checkbox>
)} )}
<span className={"coursesselect"}>选中则在截止时间之后对提交答题的课堂成员公开试卷题目的答案否则不公开</span> <span className={"coursesselect"}>选中则在截止时间之后对提交答题的课堂成员公开试卷题目的答案否则不公开</span>
</div> </div>
<div className={"clearfix pd28"}> <div className={"clearfix pd28"}>
{getFieldDecorator("openstatisticss", { {getFieldDecorator("openstatisticss", {
valuePropName: 'checked', valuePropName: 'checked',
})( })(
<Checkbox id="openstatisticss" className="fl">公开统计</Checkbox> <Checkbox id="openstatisticss" className="fl">公开统计</Checkbox>
)} )}
<span className={"coursesselect"}>选中则在截止时间之后对提交答题的课堂成员公开答题统计否则不公开</span> <span className={"coursesselect"}>选中则在截止时间之后对提交答题的课堂成员公开答题统计否则不公开</span>
</div> </div>
</Form.Item> </Form.Item>
</div> </div>
<Form.Item wrapperCol={{ span: 12, offset: 5 }} > <Form.Item wrapperCol={{ span: 12, offset: 5 }} >
<div className="clearfix mt30 mb30"> <div className="clearfix mt30 mb30">
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20"> <Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">
提交 提交
</Button> </Button>
{/*<a className="defalutSubmitbtn fl mr20">提交</a>*/} {/*<a className="defalutSubmitbtn fl mr20">提交</a>*/}
<a className="defalutCancelbtn fl">取消</a> <a className="defalutCancelbtn fl">取消</a>
</div> </div>
</Form.Item> </Form.Item>
</Form> </Form>
</div> </div>
</div> </div>
</div> </div>
</React.Fragment> </React.Fragment>
) )
} }
} }
const EcercisemountApp = Form.create({ name: 'coursesNew' })(Ecercisemount); const EcercisemountApp = Form.create({ name: 'coursesNew' })(Ecercisemount);
export default EcercisemountApp; export default EcercisemountApp;

@ -248,13 +248,13 @@ class Testpapersettinghomepage extends Component{
// let category_id=this.props.match.params.category_id; // let category_id=this.props.match.params.category_id;
// //
// window.location.href="/courses/"+courseId+"/graduation_tasks/"+datalist.graduation_id; // window.location.href="/courses/"+courseId+"/graduation_tasks/"+datalist.graduation_id;
let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
if(courseId===undefined){ // if(courseId===undefined){
this.props.history.push("/courses"); // this.props.history.push("/courses");
}else{ // }else{
this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
} // }
this.props.history.goBack()
} }
render(){ render(){
let {tab,visible,Commonheadofthetestpaper}=this.state; let {tab,visible,Commonheadofthetestpaper}=this.state;

@ -97,13 +97,13 @@ class GraduationTasksSubmitedit extends Component{
goback=()=>{ goback=()=>{
let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
if(courseId===undefined){ // if(courseId===undefined){
this.props.history.push("/courses"); // this.props.history.push("/courses");
}else{ // }else{
this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
} // }
this.props.history.goBack()
} }

@ -99,14 +99,14 @@ class GraduationTasksSubmitnew extends Component{
} }
goback=()=>{ goback=()=>{
let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
if(courseId===undefined){ // if(courseId===undefined){
this.props.history.push("/courses"); // this.props.history.push("/courses");
}else{ // }else{
this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
} // }
this.props.history.goBack()
} }
// 输入title // 输入title

@ -70,13 +70,13 @@ class GraduationTasksappraise extends Component{
// let category_id=this.props.match.params.category_id; // let category_id=this.props.match.params.category_id;
// //
// window.location.href="/courses/"+courseId+"/graduation_tasks/"+datalist.graduation_id; // window.location.href="/courses/"+courseId+"/graduation_tasks/"+datalist.graduation_id;
let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
if(courseId===undefined){ // if(courseId===undefined){
this.props.history.push("/courses"); // this.props.history.push("/courses");
}else{ // }else{
this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
} // }
this.props.history.goBack()
} }
Cancelvisible=()=>{ Cancelvisible=()=>{

@ -82,13 +82,13 @@ class GraduationTasksedit extends Component{
goback=()=>{ goback=()=>{
let courseId = this.props.match.params.coursesId; // let courseId = this.props.match.params.coursesId;
if(courseId===undefined){ // if(courseId===undefined){
this.props.history.push("/courses"); // this.props.history.push("/courses");
}else{ // }else{
this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
} // }
this.props.history.goBack()
} }

@ -107,12 +107,13 @@ class GraduationTasksnew extends Component {
goback = () => { goback = () => {
let courseId = this.props.match.params.coursesId; // let courseId = this.props.match.params.coursesId;
if(courseId===undefined){ // if(courseId===undefined){
this.props.history.push("/courses"); // this.props.history.push("/courses");
}else{ // }else{
this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
} // }
this.props.history.goBack()
} }

@ -765,12 +765,13 @@ class GraduationTaskssettingapp extends Component{
} }
goback=()=>{ goback=()=>{
let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
if(courseId===undefined){ // if(courseId===undefined){
this.props.history.push("/courses"); // this.props.history.push("/courses");
}else{ // }else{
this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
} // }
this.props.history.goBack()
} }
isgoback=()=>{ isgoback=()=>{

@ -60,13 +60,13 @@ class GraduationTaskssettinglist extends Component{
goback=()=>{ goback=()=>{
// window.history.back(-1) // window.history.back(-1)
let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
if(courseId===undefined){ // if(courseId===undefined){
this.props.history.push("/courses"); // this.props.history.push("/courses");
}else{ // }else{
this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
} // }
this.props.history.goBack()
} }
seacthdata=(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pages)=>{ seacthdata=(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pages)=>{

@ -55,12 +55,14 @@ class GraduationTasksquestions extends Component{
// let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
// let category_id=this.props.match.params.category_id; // let category_id=this.props.match.params.category_id;
// window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id; // window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id;
let courseId = this.props.match.params.coursesId; // let courseId = this.props.match.params.coursesId;
if(courseId===undefined){ // if(courseId===undefined){
this.props.history.push("/courses"); // this.props.history.push("/courses");
}else{ // }else{
this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
} // }
this.props.history.goBack()
} }
end=()=>{ end=()=>{

@ -265,7 +265,7 @@ class GraduateTopicPostWorksNew extends Component{
<div style={{ width:'100%',height:'70px'}} > <div style={{ width:'100%',height:'70px'}} >
<p className="ml15 fl color-black mt30 summaryname">提交作品</p> <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> <a onClick={()=>this.props.history.goBack()} className="color-grey-6 fr font-16 ml30 mt18 mr20">返回</a>
</div> </div>
<Form {...formItemLayout} onSubmit={this.handleSubmit}> <Form {...formItemLayout} onSubmit={this.handleSubmit}>

@ -257,12 +257,13 @@ class CoursesNew extends Component {
goback = () => { goback = () => {
if(this.props.match.params.coursesId===undefined){ // if(this.props.match.params.coursesId===undefined){
this.props.history.push("/courses"); // this.props.history.push("/courses");
}else{ // }else{
this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
} // }
// window.history.go(-1) // window.history.go(-1)
this.props.history.goBack()
} }
onCheckAllChange = (e) => { onCheckAllChange = (e) => {

@ -2337,11 +2337,11 @@ class PollNew extends Component {
} }
gotohome=()=>{ gotohome=()=>{
const { current_user} = this.props // const { current_user} = this.props
this.props.history.push(current_user && current_user.first_category_url);
// this.props.history.push(current_user && current_user.first_category_url);
//
this.props.history.goBack()
// let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
// if(courseId===undefined){ // if(courseId===undefined){
// this.props.history.push("/courses"); // this.props.history.push("/courses");

@ -1,157 +1,157 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder'; import { SnackbarHOC } from 'educoder';
import { TPMIndexHOC } from '../../tpm/TPMIndexHOC'; import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
import { Checkbox,Input,DatePicker } from 'antd'; import { Checkbox,Input,DatePicker } from 'antd';
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';
import "../css/Courses.css"; import "../css/Courses.css";
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
//引入对应跳转的组件 //引入对应跳转的组件
class Polldepoly extends Component{ class Polldepoly extends Component{
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
contents: [{val:"",id:1}], contents: [{val:"",id:1}],
} }
} }
componentDidMount() { componentDidMount() {
} }
submitCommitSummary=()=> { submitCommitSummary=()=> {
const mdContnet = this.refs[`md${1}`].getValue().trim();; const mdContnet = this.refs[`md${1}`].getValue().trim();;
console.log(mdContnet) console.log(mdContnet)
} }
asdasdsad=()=>{ asdasdsad=()=>{
this.setState({ this.setState({
contents:"" contents:""
}) })
} }
render() { render() {
let {contents}=this.state; let {contents}=this.state;
const dateFormat = 'YYYY-MM-DD HH:mm:ss'; const dateFormat = 'YYYY-MM-DD HH:mm:ss';
return ( return (
<React.Fragment> <React.Fragment>
<div> <div>
<div className="newMain clearfix"> <div className="newMain clearfix">
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<div style={{ <div style={{
width:'100%', width:'100%',
height:'70px' height:'70px'
}} > }} >
<p className="ml15 fl color-black mt30 summaryname" onClick={this.asdasdsad}>Java语言之控制语句</p> <p className="ml15 fl color-black mt30 summaryname" onClick={this.asdasdsad}>Java语言之控制语句</p>
<CoursesListType <CoursesListType
typelist={["已开启补交"]} typelist={["已开启补交"]}
typesylename={"mt28"} typesylename={"mt28"}
/> />
<a href="/student_work?homework=16737" className="color-grey-6 fr font-16 ml30 mt18 mr20">返回</a> <a onClick={()=>this.props.history.goBack()} className="color-grey-6 fr font-16 ml30 mt18 mr20">返回</a>
</div> </div>
{/*<div className={"edu-con-bg01 user_bg_shadow bor-grey-e educontentbox"}>*/} {/*<div className={"edu-con-bg01 user_bg_shadow bor-grey-e educontentbox"}>*/}
{/*<span className={"commitcontents"}>*/} {/*<span className={"commitcontents"}>*/}
{/*<span className={"color-red"}>*</span>*/} {/*<span className={"color-red"}>*</span>*/}
{/*内容</span>*/} {/*内容</span>*/}
{/*<div className={"ml30 mr30 mt10"}>*/} {/*<div className={"ml30 mr30 mt10"}>*/}
{/*</div>*/} {/*</div>*/}
{/*</div>*/} {/*</div>*/}
<div className="stud-class-set bor-bottom-greyE"> <div className="stud-class-set bor-bottom-greyE">
<div className="mt10 clearfix edu-back-white poll_list pl20"> <div className="mt10 clearfix edu-back-white poll_list pl20">
<a className="active">答题列表</a> <a className="active">答题列表</a>
<a>统计结果</a> <a>统计结果</a>
<a>问卷预览</a> <a>问卷预览</a>
<a>配置</a> <a>配置</a>
<a className={"fr color-blue font-16"}>导出统计</a> <a className={"fr color-blue font-16"}>导出统计</a>
</div> </div>
</div> </div>
<div className="stud-class-set edu-back-white pt30 pb30 pr10 pl20"> <div className="stud-class-set edu-back-white pt30 pb30 pr10 pl20">
<div className="clearfix"> <div className="clearfix">
<p className="ml22 fl font-16 mt5 color-grey-6">发布设置</p> <p className="ml22 fl font-16 mt5 color-grey-6">发布设置</p>
{/*<a href="javascript:void(0);" className="white-btn orange-btn fr mr15 mt15" title="编辑"*/} {/*<a href="javascript:void(0);" className="white-btn orange-btn fr mr15 mt15" title="编辑"*/}
{/*onClick="show_poll_edit_setting();">编辑</a>*/} {/*onClick="show_poll_edit_setting();">编辑</a>*/}
</div> </div>
<div className="clearfix pl60 pt20"> <div className="clearfix pl60 pt20">
<Checkbox className={"color-grey-6"}>统一设置 </Checkbox> <span className={"color-grey-9"}>(使)</span> <Checkbox className={"color-grey-6"}>统一设置 </Checkbox> <span className={"color-grey-9"}>(使)</span>
</div> </div>
<div className="clearfix pl60 pt20"> <div className="clearfix pl60 pt20">
{/*<span className={"color-grey-6"}>发布时间:</span> <Input size="large" placeholder="请选择发布时间" /><span className={"color-grey-9"}>(发布之前,学生不会收到问卷)</span>*/} {/*<span className={"color-grey-6"}>发布时间:</span> <Input size="large" placeholder="请选择发布时间" /><span className={"color-grey-9"}>(发布之前,学生不会收到问卷)</span>*/}
<span className="color-grey-6 mt5 fl" style={{minWidth: '70px'}}>发布时间</span> <span className="color-grey-6 mt5 fl" style={{minWidth: '70px'}}>发布时间</span>
<span className="fl mt5"> <span className="fl mt5">
<DatePicker <DatePicker
showTime showTime
showToday={false} showToday={false}
locale={locale} locale={locale}
format={dateFormat} format={dateFormat}
placeholder="请选择发布时间" placeholder="请选择发布时间"
// value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)} // value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)}
// onChange={this.onChangeTimePicker} // onChange={this.onChangeTimePicker}
/> />
<label style={{top:'6px'}} className="color-grey-9 ml10" >发布之前学生不会收到问卷</label> <label style={{top:'6px'}} className="color-grey-9 ml10" >发布之前学生不会收到问卷</label>
</span> </span>
</div> </div>
<div className="clearfix pl60 pt20"> <div className="clearfix pl60 pt20">
{/*<span className={"color-grey-6"}>发布时间:</span> <Input size="large" placeholder="请选择发布时间" /><span className={"color-grey-9"}>(发布之前,学生不会收到问卷)</span>*/} {/*<span className={"color-grey-6"}>发布时间:</span> <Input size="large" placeholder="请选择发布时间" /><span className={"color-grey-9"}>(发布之前,学生不会收到问卷)</span>*/}
<span className="color-grey-6 mt5 fl" style={{minWidth: '70px'}}>截止时间</span> <span className="color-grey-6 mt5 fl" style={{minWidth: '70px'}}>截止时间</span>
<span className="fl mt5"> <span className="fl mt5">
<DatePicker <DatePicker
showToday={false} showToday={false}
showTime showTime
locale={locale} locale={locale}
format={dateFormat} format={dateFormat}
placeholder="请选择截止时间" placeholder="请选择截止时间"
// value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)} // value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)}
// onChange={this.onChangeTimePicker} // onChange={this.onChangeTimePicker}
/> />
<label style={{top:'6px'}} className="color-grey-9 ml10" >截止时间点系统将自动提交所有学生的答题学生将不能继续答题</label> <label style={{top:'6px'}} className="color-grey-9 ml10" >截止时间点系统将自动提交所有学生的答题学生将不能继续答题</label>
</span> </span>
</div> </div>
<div className="stud-class-set edu-back-white pt30 pb30 pr10 pl20"> <div className="stud-class-set edu-back-white pt30 pb30 pr10 pl20">
<div className="clearfix"> <div className="clearfix">
<p className="ml22 fl font-16 mt5 color-grey-6">公开设置</p> <p className="ml22 fl font-16 mt5 color-grey-6">公开设置</p>
{/*<a href="javascript:void(0);" className="white-btn orange-btn fr mr15 mt15" title="编辑"*/} {/*<a href="javascript:void(0);" className="white-btn orange-btn fr mr15 mt15" title="编辑"*/}
{/*onClick="show_poll_edit_setting();">编辑</a>*/} {/*onClick="show_poll_edit_setting();">编辑</a>*/}
</div> </div>
<div className="clearfix pl40 pt20"> <div className="clearfix pl40 pt20">
<Checkbox className={"color-grey-6"}>公开统计 </Checkbox> <span className={"color-grey-9"}></span> <Checkbox className={"color-grey-6"}>公开统计 </Checkbox> <span className={"color-grey-9"}></span>
</div> </div>
<div className="clearfix pl40 pt10"> <div className="clearfix pl40 pt10">
<Checkbox className={"color-grey-6"}>实名问卷 </Checkbox> <span className={"color-grey-9"}></span> <Checkbox className={"color-grey-6"}>实名问卷 </Checkbox> <span className={"color-grey-9"}></span>
</div> </div>
</div> </div>
</div> </div>
<div className="clearfix mt30 mb30"> <div className="clearfix mt30 mb30">
<a className="defalutSubmitbtn fl mr20" <a className="defalutSubmitbtn fl mr20"
onClick={this.submitCommitSummary}>提交</a> onClick={this.submitCommitSummary}>提交</a>
<a className="defalutCancelbtn fl">取消</a> <a className="defalutCancelbtn fl">取消</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</React.Fragment> </React.Fragment>
) )
} }
} }
export default SnackbarHOC() ( TPMIndexHOC(Polldepoly) ); export default SnackbarHOC() ( TPMIndexHOC(Polldepoly) );

@ -71,13 +71,14 @@ class CommitSummary extends Component{
console.log(mdContnet) console.log(mdContnet)
} }
gotohome=()=>{ gotohome=()=>{
let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
if(courseId===undefined){ // if(courseId===undefined){
this.props.history.push("/courses"); // this.props.history.push("/courses");
}else{ // }else{
this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
} // }
} this.props.history.goBack()
}
asdasdsad=()=>{ asdasdsad=()=>{
this.setState({ this.setState({
contents:"" contents:""

@ -113,12 +113,13 @@ class ShixunHomeworkPage extends Component {
bindRef = ref => { this.child = ref } bindRef = ref => { this.child = ref }
///////////////教师截止 ///////////////教师截止
gotohome=()=>{ gotohome=()=>{
let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
if(courseId===undefined){ // if(courseId===undefined){
this.props.history.push("/courses"); // this.props.history.push("/courses");
}else{ // }else{
this.props.history.push(this.props.current_user.first_category_url); // this.props.history.push(this.props.current_user.first_category_url);
} // }
this.props.history.goBack()
} }
render() { render() {
let {tab, teacherdatapage, jobsettingsdatapage} = this.state; let {tab, teacherdatapage, jobsettingsdatapage} = this.state;

@ -52,13 +52,13 @@ class ShixunWorkDetails extends Component {
} }
goback=(sum)=>{ goback=(sum)=>{
let{data}=this.state // let{data}=this.state
if(sum===1){ // if(sum===1){
window.location.href = "/courses/"+data.course_id+"/students"; // window.location.href = "/courses/"+data.course_id+"/students";
}else{ // }else{
window.history.go(-1) // window.history.go(-1)
} // }
this.props.history.goBack()
} }
render() { render() {
let{data}=this.state; let{data}=this.state;

@ -1,246 +1,246 @@
import React,{Component} from "React"; import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,DatePicker} from "antd"; import { Form, Select, Input, Button,Checkbox,DatePicker} from "antd";
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';
import "../css/Courses.css"; import "../css/Courses.css";
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
const { Option } = Select; const { Option } = Select;
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;
class StudentHomework extends Component{ class StudentHomework extends Component{
constructor(props){ constructor(props){
super(props) super(props)
this.state={ this.state={
} }
} }
componentDidMount(){ componentDidMount(){
} }
handleSubmit = (e) => { handleSubmit = (e) => {
e.preventDefault(); e.preventDefault();
this.props.form.validateFields((err, values) => { this.props.form.validateFields((err, values) => {
if (!err) { if (!err) {
console.log('Received values of form: ', values); console.log('Received values of form: ', values);
} }
}); });
} }
handleSelectChange = (value) => { handleSelectChange = (value) => {
console.log(value); console.log(value);
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
note: `Hi, ${value === 'male' ? 'man' : 'lady'}!`, note: `Hi, ${value === 'male' ? 'man' : 'lady'}!`,
}); });
} }
render(){ render(){
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
const dateFormat = 'YYYY-MM-DD HH:mm:ss'; const dateFormat = 'YYYY-MM-DD HH:mm:ss';
return( return(
<React.Fragment> <React.Fragment>
<div> <div>
<div className="newMain clearfix"> <div className="newMain clearfix">
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<div style={{ width:'100%',height:'70px'}} > <div style={{ width:'100%',height:'70px'}} >
<p className="ml15 fl color-black mt30 summaryname">Java语言之控制语句</p> <p className="ml15 fl color-black mt30 summaryname">Java语言之控制语句</p>
<CoursesListType <CoursesListType
typelist={["已开启补交"]} typelist={["已开启补交"]}
typesylename={"mt28"} typesylename={"mt28"}
/> />
<a href="/student_work?homework=16737" className="color-grey-6 fr font-16 ml20 mt18 mr20">返回</a> <a onClick={()=>this.props.history.goBack()} className="color-grey-6 fr font-16 ml20 mt18 mr20">返回</a>
<a href="/student_work?homework=16737" className="color-grey-6 fr font-16 ml30 mt18 " target={"_blank"}>实训详情</a> <a href="/student_work?homework=16737" className="color-grey-6 fr font-16 ml30 mt18 " target={"_blank"}>实训详情</a>
</div> </div>
<div className="stud-class-set bor-bottom-greyE"> <div className="stud-class-set bor-bottom-greyE">
<div className="mt10 clearfix edu-back-white poll_list pl20"> <div className="mt10 clearfix edu-back-white poll_list pl20">
<a className="active">作业列表</a> <a className="active">作业列表</a>
<a>作业问答</a> <a>作业问答</a>
<a>配置</a> <a>配置</a>
<a className={"fr color-blue font-16"}>立即发布</a> <a className={"fr color-blue font-16"}>立即发布</a>
<a className={"fr color-blue font-16"}>导出成绩</a> <a className={"fr color-blue font-16"}>导出成绩</a>
</div> </div>
</div> </div>
<Form onSubmit={this.handleSubmit} className={"edu-back-white newcourses exercise"}> <Form onSubmit={this.handleSubmit} className={"edu-back-white newcourses exercise"}>
{/*内容*/} {/*内容*/}
<div className="stud-class-set bor-bottom-greyE pd20 exerciselist"> <div className="stud-class-set bor-bottom-greyE pd20 exerciselist">
<Form.Item label="发布设置" hasFeedback> <Form.Item label="发布设置" hasFeedback>
{getFieldDecorator("TestingProfile")( {getFieldDecorator("TestingProfile")(
<Checkbox id="TestingProfile" value={""} className="fl ml40">统一设置</Checkbox> <Checkbox id="TestingProfile" value={""} className="fl ml40">统一设置</Checkbox>
)} )}
<span className={"coursesselect"}>选中则所有分班使用相同的发布设置否则各个分班单独设置</span> <span className={"coursesselect"}>选中则所有分班使用相同的发布设置否则各个分班单独设置</span>
<div className={"clearfix"}> <div className={"clearfix"}>
<span className="color-grey-6 mt5 fl ml40" style={{minWidth: '70px'}}>发布时间</span> <span className="color-grey-6 mt5 fl ml40" style={{minWidth: '70px'}}>发布时间</span>
<span className="fl mt5"> <span className="fl mt5">
{getFieldDecorator("startTime")( {getFieldDecorator("startTime")(
<DatePicker <DatePicker
showToday={false} showToday={false}
showTime showTime
locale={locale} locale={locale}
format={dateFormat} format={dateFormat}
placeholder="请选择发布时间" placeholder="请选择发布时间"
id={"startTime"} id={"startTime"}
width={"210px"} width={"210px"}
// value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)} // value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)}
// onChange={this.onChangeTimePicker} // onChange={this.onChangeTimePicker}
/> />
)} )}
<span className={"exerciseselect"}>发布之前学生不会收到问卷</span> <span className={"exerciseselect"}>发布之前学生不会收到问卷</span>
</span> </span>
</div> </div>
<div className={"clearfix"}> <div className={"clearfix"}>
<span className="color-grey-6 mt5 fl ml40" style={{minWidth: '70px'}}>截止时间</span> <span className="color-grey-6 mt5 fl ml40" style={{minWidth: '70px'}}>截止时间</span>
<span className="fl mt5"> <span className="fl mt5">
{getFieldDecorator("endTime")( {getFieldDecorator("endTime")(
<DatePicker <DatePicker
showToday={false} showToday={false}
showTime showTime
locale={locale} locale={locale}
format={dateFormat} format={dateFormat}
placeholder="请选择截止时间" placeholder="请选择截止时间"
id={"endTime"} id={"endTime"}
width={"210px"} width={"210px"}
// value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)} // value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)}
// onChange={this.onChangeTimePicker} // onChange={this.onChangeTimePicker}
/> />
)} )}
<span className={"exerciseselect"}>截止时间点系统将自动提交所有学生的答题学生将不能继续答题</span> <span className={"exerciseselect"}>截止时间点系统将自动提交所有学生的答题学生将不能继续答题</span>
</span> </span>
</div> </div>
</Form.Item> </Form.Item>
</div> </div>
<div className="stud-class-set bor-bottom-greyE pd20 exercisetime"> <div className="stud-class-set bor-bottom-greyE pd20 exercisetime">
<Form.Item label="补交设置" hasFeedback> <Form.Item label="补交设置" hasFeedback>
<div className={"clearfix"}> <div className={"clearfix"}>
<span className="color-grey-6 mt5 fl ml40 font-16" style={{minWidth: '70px'}}>答题时长</span> <span className="color-grey-6 mt5 fl ml40 font-16" style={{minWidth: '70px'}}>答题时长</span>
{getFieldDecorator("TestingProfile" {getFieldDecorator("TestingProfile"
, { , {
rules: [{ rules: [{
pattern: /^[1-9]\d*$/, pattern: /^[1-9]\d*$/,
message: '答题时长必须为正整数', message: '答题时长必须为正整数',
}], }],
})( })(
<Input id="TestingProfile" className={"greyInput mt10 mr10"} style={{width:'108px',marginLeft:'0px'}} /> <Input id="TestingProfile" className={"greyInput mt10 mr10"} style={{width:'108px',marginLeft:'0px'}} />
)} )}
<span className={"mr10"}>分钟</span> <span className={"mr10"}>分钟</span>
<span className={"coursesselect"}>选中则所有分班使用相同的发布设置否则各个分班单独设置</span> <span className={"coursesselect"}>选中则所有分班使用相同的发布设置否则各个分班单独设置</span>
</div> </div>
</Form.Item> </Form.Item>
<Form.Item hasFeedback> <Form.Item hasFeedback>
<div className={"clearfix pd60"}> <div className={"clearfix pd60"}>
{getFieldDecorator("subject", { {getFieldDecorator("subject", {
valuePropName: 'checked', valuePropName: 'checked',
})( })(
<Checkbox id="subject" className="fl">题目顺序随机打乱</Checkbox> <Checkbox id="subject" className="fl">题目顺序随机打乱</Checkbox>
)} )}
<span className={"coursesselect"}>选中则学生答题时题目顺序按照题型随机显示</span> <span className={"coursesselect"}>选中则学生答题时题目顺序按照题型随机显示</span>
</div> </div>
<div className={"clearfix pd60"}> <div className={"clearfix pd60"}>
{getFieldDecorator("options", { {getFieldDecorator("options", {
valuePropName: 'checked', valuePropName: 'checked',
})( })(
<Checkbox id="options" className="fl">选项顺序随机打乱</Checkbox> <Checkbox id="options" className="fl">选项顺序随机打乱</Checkbox>
)} )}
<span className={"coursesselect"}>选中则学生答题时选项顺序随机显示</span> <span className={"coursesselect"}>选中则学生答题时选项顺序随机显示</span>
</div> </div>
</Form.Item> </Form.Item>
</div> </div>
<div className="stud-class-set pd20 coursenavbox"> <div className="stud-class-set pd20 coursenavbox">
<Form.Item <Form.Item
label="公开设置" label="公开设置"
hasFeedback hasFeedback
> >
<div className={"clearfix pd28"}> <div className={"clearfix pd28"}>
{getFieldDecorator("opergrdee", { {getFieldDecorator("opergrdee", {
valuePropName: 'checked', valuePropName: 'checked',
})( })(
<Checkbox id="opergrdee" className="fl">公开成绩</Checkbox> <Checkbox id="opergrdee" className="fl">公开成绩</Checkbox>
)} )}
<span className={"coursesselect"}>选中则在截止时间之后对提交答题的课堂成员公开所有成绩否则不公开</span> <span className={"coursesselect"}>选中则在截止时间之后对提交答题的课堂成员公开所有成绩否则不公开</span>
</div> </div>
<div className={"clearfix pd28"}> <div className={"clearfix pd28"}>
{getFieldDecorator("openanswer", { {getFieldDecorator("openanswer", {
valuePropName: 'checked', valuePropName: 'checked',
})( })(
<Checkbox id="openanswer" className="fl">公开答案</Checkbox> <Checkbox id="openanswer" className="fl">公开答案</Checkbox>
)} )}
<span className={"coursesselect"}>选中则在截止时间之后对提交答题的课堂成员公开试卷题目的答案否则不公开</span> <span className={"coursesselect"}>选中则在截止时间之后对提交答题的课堂成员公开试卷题目的答案否则不公开</span>
</div> </div>
<div className={"clearfix pd28"}> <div className={"clearfix pd28"}>
{getFieldDecorator("openstatisticss", { {getFieldDecorator("openstatisticss", {
valuePropName: 'checked', valuePropName: 'checked',
})( })(
<Checkbox id="openstatisticss" className="fl">公开统计</Checkbox> <Checkbox id="openstatisticss" className="fl">公开统计</Checkbox>
)} )}
<span className={"coursesselect"}>选中则在截止时间之后对提交答题的课堂成员公开答题统计否则不公开</span> <span className={"coursesselect"}>选中则在截止时间之后对提交答题的课堂成员公开答题统计否则不公开</span>
</div> </div>
</Form.Item> </Form.Item>
</div> </div>
<Form.Item wrapperCol={{ span: 12, offset: 5 }} > <Form.Item wrapperCol={{ span: 12, offset: 5 }} >
<div className="clearfix mt30 mb30"> <div className="clearfix mt30 mb30">
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20"> <Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">
提交 提交
</Button> </Button>
{/*<a className="defalutSubmitbtn fl mr20">提交</a>*/} {/*<a className="defalutSubmitbtn fl mr20">提交</a>*/}
<a className="defalutCancelbtn fl">取消</a> <a className="defalutCancelbtn fl">取消</a>
</div> </div>
</Form.Item> </Form.Item>
</Form> </Form>
</div> </div>
</div> </div>
</div> </div>
</React.Fragment> </React.Fragment>
) )
} }
} }
const StudentHomeworkApp = Form.create({ name: 'coursesNew' })(StudentHomework); const StudentHomeworkApp = Form.create({ name: 'coursesNew' })(StudentHomework);
export default StudentHomeworkApp; export default StudentHomeworkApp;
Loading…
Cancel
Save