dev_cs_new
杨树林 6 years ago
commit 3029f1cbd2

@ -3,6 +3,8 @@ class Users::PrivateMessageDetailsController < Users::BaseController
after_action :update_message_status, only: [:show] after_action :update_message_status, only: [:show]
helper_method :target_user
def show def show
messages = observed_user.private_messages.without_deleted.where(target: target_user) messages = observed_user.private_messages.without_deleted.where(target: target_user)

@ -15,6 +15,7 @@ class Memo < ApplicationRecord
has_many :descendants, foreign_key: :root_id, class_name: 'Memo' has_many :descendants, foreign_key: :root_id, class_name: 'Memo'
has_many :children, foreign_key: :parent_id, class_name: 'Memo' has_many :children, foreign_key: :parent_id, class_name: 'Memo'
has_many :attachments, as: :container, dependent: :destroy has_many :attachments, as: :container, dependent: :destroy
has_many :tidings, as: :container, dependent: :destroy
scope :field_for_list, lambda{ scope :field_for_list, lambda{
select([:id, :subject, :author_id, :sticky, :updated_at, :language, :reward, :all_replies_count, :viewed_count, :forum_id]) select([:id, :subject, :author_id, :sticky, :updated_at, :language, :reward, :all_replies_count, :viewed_count, :forum_id])

@ -69,7 +69,7 @@ class Users::UpdateAccountService < ApplicationService
end end
def sms_notify_admin name def sms_notify_admin name
Educoder::Sms.send(mobile:'18182021083', send_type:'teacher_register', name: name, user_name:'管理员') Educoder::Sms.send(mobile:'17680641960', send_type:'teacher_register', name: name, user_name:'管理员')
rescue => ex rescue => ex
Util.logger_error(ex) Util.logger_error(ex)
end end

@ -1,9 +1,13 @@
json.count @count json.count @count
json.target do
json.partial! 'users/user_simple', user: target_user
end
json.messages do json.messages do
json.array! @messages.each do |message| json.array! @messages.each do |message|
json.extract! message, :id, :user_id, :receiver_id, :sender_id, :content json.extract! message, :id, :user_id, :receiver_id, :sender_id, :content
json.send_time message.display_send_time json.send_time message.display_send_time
json.send_day message.send_time.strftime('%Y-%m-%d')
json.sender do json.sender do
json.partial! 'users/user_simple', user: message.sender json.partial! 'users/user_simple', user: message.sender
end end

@ -21,7 +21,7 @@ module Educoder
def self.notify_admin(opt) def self.notify_admin(opt)
opt[:name] = '管理员' opt[:name] = '管理员'
opt[:mobile] = ENV['NOTIFY_ADMIN_PHONE'] || EduSetting.get('notify_admin_phone') || '18182021083' opt[:mobile] = ENV['NOTIFY_ADMIN_PHONE'] || EduSetting.get('notify_admin_phone') || '18711085785'
send(opt) send(opt)
end end
@ -39,27 +39,22 @@ module Educoder
params['text'] = "【Edu实训】" + code + "手机验证码有效期为10分钟。如非本人操作请忽略。" params['text'] = "【Edu实训】" + code + "手机验证码有效期为10分钟。如非本人操作请忽略。"
elsif send_type == 'competition_start' elsif send_type == 'competition_start'
params['text'] = "【Edu实训】亲爱的#{user_name},你参与的#{name}将于#{result}开始,请及时参赛" params['text'] = "【Edu实训】亲爱的#{user_name},你参与的#{name}将于#{result}开始,请及时参赛"
Rails.logger.info "#{params['text']}"
elsif send_type == "teacher_register" elsif send_type == "teacher_register"
params['mobile'] = EduSetting.get('teacher_register_phone') || '17680641960'
params['text'] = "【Edu实训】亲爱的#{user_name},有新的老师#{name}注册啦,请尽快处理" params['text'] = "【Edu实训】亲爱的#{user_name},有新的老师#{name}注册啦,请尽快处理"
elsif send_type == 'subject_authorization' || send_type == 'shixun_authorization' elsif send_type == 'subject_authorization' || send_type == 'shixun_authorization'
params['text'] = "【Edu实训】亲爱的#{user_name},您提交的#{name}#{send_type=='subject_authorization'?'':''}发布申请#{result},请登录平台查看详情" params['text'] = "【Edu实训】亲爱的#{user_name},您提交的#{name}#{send_type=='subject_authorization'?'':''}发布申请#{result},请登录平台查看详情"
Rails.logger.info "#{params['text']}"
elsif send_type == 'authentication_pro' || send_type == 'authentication'|| send_type == 'trial_authorization' || send_type == 'project_info' elsif send_type == 'authentication_pro' || send_type == 'authentication'|| send_type == 'trial_authorization' || send_type == 'project_info'
params['text'] = "【Edu实训】亲爱的#{user_name},您提交的#{send_type == 'authentication_pro'?'':(send_type == 'authentication'? '' : (send_type == 'project_info'?'':'' ))}#{result},请登录平台查看详情" params['text'] = "【Edu实训】亲爱的#{user_name},您提交的#{send_type == 'authentication_pro'?'':(send_type == 'authentication'? '' : (send_type == 'project_info'?'':'' ))}#{result},请登录平台查看详情"
Rails.logger.info "#{params['text']}"
elsif send_type == "apply_pro_certification" || send_type == "apply_auth" elsif send_type == "apply_pro_certification" || send_type == "apply_auth"
params['text'] = "【Edu实训】亲爱的#{name},有新的#{send_type == 'apply_pro_certification'?'':''}认证申请,请尽快处理" params['text'] = "【Edu实训】亲爱的#{name},有新的#{send_type == 'apply_pro_certification'?'':''}认证申请,请尽快处理"
Rails.logger.info "#{params['text']}"
elsif send_type == "publish_subject" ||send_type == "publish_shixun"|| send_type == "user_apply_auth" || send_type == "discuss" elsif send_type == "publish_subject" ||send_type == "publish_shixun"|| send_type == "user_apply_auth" || send_type == "discuss"
params['mobile'] = EduSetting.get('subject_shixun_notify_phone') || '18711011226' if send_type == "publish_subject" || send_type == "publish_shixun"
params['text'] = "【Edu实训】亲爱的#{name},有新的#{send_type == 'publish_subject'?'':(send_type == 'publish_shixun' ? '' : (send_type == 'discuss' ? '':''))}申请发布,请尽快处理" params['text'] = "【Edu实训】亲爱的#{name},有新的#{send_type == 'publish_subject'?'':(send_type == 'publish_shixun' ? '' : (send_type == 'discuss' ? '':''))}申请发布,请尽快处理"
Rails.logger.info "#{params['text']}"
elsif send_type == 'join_course_multi_role' elsif send_type == 'join_course_multi_role'
params['text'] = "【Edu实训】亲爱的#{user_name},您的课堂#{name}有助教或者教师申请加入,请尽快审核" params['text'] = "【Edu实训】亲爱的#{user_name},您的课堂#{name}有助教或者教师申请加入,请尽快审核"
Rails.logger.info "#{params['text']}"
elsif send_type == 'applied_project_info' elsif send_type == 'applied_project_info'
params['text'] = "【Edu实训】亲爱的#{user_name},您的项目#{name}有成员申请加入,请尽快审核" params['text'] = "【Edu实训】亲爱的#{user_name},您的项目#{name}有成员申请加入,请尽快审核"
Rails.logger.info "#{params['text']}"
end end
http = Net::HTTP.new(send_tpl_sms_uri.host, send_tpl_sms_uri.port) http = Net::HTTP.new(send_tpl_sms_uri.host, send_tpl_sms_uri.port)

@ -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
@ -469,7 +470,7 @@ class CommonWorkPost extends Component{
} }
gocannel=()=>{ gocannel=()=>{
window.history.go(-1) this.props.history.goBack()
} }
render(){ render(){

@ -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()
} }
@ -362,7 +362,7 @@ class GraduationTasksSubmitedit extends Component{
} }
gocannel=()=>{ gocannel=()=>{
window.history.go(-1) this.props.history.goBack()
} }
handleSubmit=(e) => { handleSubmit=(e) => {

@ -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
@ -362,7 +362,7 @@ class GraduationTasksSubmitnew extends Component{
} }
} }
gocannel=()=>{ gocannel=()=>{
window.history.go(-1) this.props.history.goBack()
} }
//公用数据 //公用数据

@ -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;

@ -11,10 +11,10 @@
} }
.user_navlist{ .user_navlist{
margin-left: 40px; /*margin-left: 40px;*/
} }
.next-slick-list{ .next-slick-list{
margin-left: 12px; /*margin-left: 12px;*/
} }
.black_nav_span{ .black_nav_span{
@ -58,7 +58,7 @@
} }
.educontentSlider{ .educontentSlider{
width: 1282px !important; /*width: 1282px !important;*/
} }
.user_navlist_white{ .user_navlist_white{
max-height:350px !important; max-height:350px !important;
@ -72,4 +72,8 @@
.iconfontshixundaibeijing{ .iconfontshixundaibeijing{
font-size: 18px !important; font-size: 18px !important;
line-height: 24px; line-height: 24px;
}
.next-slick.next-slick-horizontal.next-slick-outer{
padding:0px !important;
} }

@ -125,7 +125,16 @@ class ShixunsHome extends Component {
{/*<SiderBar/>*/} {/*<SiderBar/>*/}
<div className="clearfix"> <div className="clearfix">
<div className="clearfix edu-back-white pb40 pt30 mb20" id="index-top" onMouseMove={this.bannaronmousemove} onMouseOut={this.bannaronmouseout}> <style>
{
`
.banners{
overflow: hidden;
}
`
}
</style>
<div className="clearfix edu-back-white pb40 pt30 mb20 banners" id="index-top" onMouseMove={this.bannaronmousemove} onMouseOut={this.bannaronmouseout}>
<div className="educontent pr educontentSlider"> <div className="educontent pr educontentSlider">
{homedatalist===undefined?"": {homedatalist===undefined?"":
<Slider <Slider

@ -112,14 +112,14 @@ class PathDetailIndex extends Component{
this.setState({ this.setState({
Modalstype:false, Modalstype:false,
}) })
window.history.go(-1) this.props.history.goBack()
} }
cardsModalsave=()=>{ cardsModalsave=()=>{
this.setState({ this.setState({
Modalstype:false, Modalstype:false,
}) })
window.history.go(-1) this.props.history.goBack()
} }
// 加载markdown // 加载markdown
updatamakedown=(id)=>{ updatamakedown=(id)=>{

@ -1,7 +1,7 @@
import React, {Component} from 'react'; import React, {Component} from 'react';
import {Link} from "react-router-dom"; import {Link} from "react-router-dom";
import axios from 'axios'; import axios from 'axios';
import { Input ,Icon,Button,Pagination} from 'antd'; import { Input ,Icon,Button,Pagination,Spin} from 'antd';
import moment from 'moment'; import moment from 'moment';
import '../packageconcnet.css'; import '../packageconcnet.css';
import AccountProfile from"../../user/AccountProfile"; import AccountProfile from"../../user/AccountProfile";
@ -50,7 +50,8 @@ class PackageConcent extends Component {
per_page:20, per_page:20,
categories:[], categories:[],
isRender:false, isRender:false,
AccountProfiletype:false AccountProfiletype:false,
isSpin:false
} }
} }
//desc, desc, asc //desc, desc, asc
@ -74,7 +75,9 @@ class PackageConcent extends Component {
} }
setdatas=(category,keyword,sort_by,sort_direction,page)=>{ setdatas=(category,keyword,sort_by,sort_direction,page)=>{
this.setState({
isSpin:true
})
let Url = `/project_packages.json`; let Url = `/project_packages.json`;
axios.get(Url,{params:{ axios.get(Url,{params:{
category_id:category, category_id:category,
@ -87,6 +90,7 @@ class PackageConcent extends Component {
).then((response) => { ).then((response) => {
this.setState({ this.setState({
data:response.data, data:response.data,
isSpin:false,
project_packages:response.data.project_packages project_packages:response.data.project_packages
}) })
}).catch((error) => { }).catch((error) => {
@ -266,7 +270,7 @@ class PackageConcent extends Component {
</p> </p>
</div> </div>
<Spin size="large" spinning={this.state.isSpin}>
{project_packages&&project_packages.map((item,key)=>{ {project_packages&&project_packages.map((item,key)=>{
return( return(
<div className="educontent project-packages-list mb30" key={key}> <div className="educontent project-packages-list mb30" key={key}>
@ -311,16 +315,16 @@ class PackageConcent extends Component {
<div className=" item-group item-other-deadline"> <div className=" item-group item-other-deadline">
<span className=" item-group-icon mr10"><i className="fa fa-clock-o"></i></span> <span className=" item-group-icon mr10"><i className="fa fa-clock-o"></i></span>
<span className=" item-group-text">{item.deadline_at}竞标截止</span> <span className=" item-group-text">{moment(item.deadline_at).format("YYYY-MM-DD HH:mm")}竞标截止</span>
</div> </div>
<div className=" item-group item-other-bidding ml0"> <div className=" item-group item-other-bidding ml0 pagemancenter">
<span className=" item-group-icon mr10"><i className="fa fa-user" ></i></span> <span className=" item-group-icon mr10"><i className="fa fa-user" ></i></span>
<span className=" item-group-text">{item.bidding_users_count}人竞标</span> <span className=" item-group-text">{item.bidding_users_count}人竞标</span>
</div> </div>
<div className=" item-other-blank"></div> {/*<div className=" item-other-blank"></div>*/}
<div className=" item-group item-other-publish-at"> <div className=" item-group item-other-publish-at">
{item.published_at===null?<span className="item-group-text">更新于{moment(item.updated_at).format("YYYY-MM-DD HH:mm")} </span>: {item.published_at===null?<span className="item-group-text">更新于{moment(item.updated_at).format("YYYY-MM-DD HH:mm")} </span>:
<span className=" item-group-text">发布于{moment(item.published_at).format("YYYY-MM-DD HH:mm")} </span>} <span className=" item-group-text">发布于{moment(item.published_at).format("YYYY-MM-DD HH:mm")} </span>}
@ -333,6 +337,7 @@ class PackageConcent extends Component {
</div> </div>
) )
})} })}
</Spin>
{project_packages&&project_packages.length===0?<div className="edu-back-white"> {project_packages&&project_packages.length===0?<div className="edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center"> <div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="https://www.educoder.net/images/educoder/nodata.png" /> <img className="edu-nodata-img mb20" src="https://www.educoder.net/images/educoder/nodata.png" />

@ -230,7 +230,8 @@ class PackageIndexNEITaskDetails extends Component {
} }
goback = () => { goback = () => {
// window.history.go(-1) // window.history.go(-1)
window.location.href="/crowdsourcing"; // window.location.href="/crowdsourcing";
this.props.history.goBack()
} }
render() { render() {

@ -30,7 +30,8 @@ class PackageIndexNewandEditIndex extends Component{
goback = () => { goback = () => {
// window.history.go(-1) // window.history.go(-1)
window.location.href="/crowdsourcing"; // window.location.href="/crowdsourcing";
this.props.history.goBack()
} }
render() { render() {

@ -309,13 +309,11 @@ export function TPMIndexHOC(WrappedComponent) {
<style>{ <style>{
` `
.newContainers{ .newContainers{
width: 100%; min-width: 1200px;
/*min-width: 1440px;*/ max-width: unset;
max-width: unset; overflow: hidden;
} }
// .-task-sidebar{
// right: 270px !important;
// }
` `
}</style> }</style>
<NewHeader {...this.state} {...this.props}></NewHeader> <NewHeader {...this.state} {...this.props}></NewHeader>

@ -193,15 +193,14 @@ class InfosPackage extends Component{
</div> </div>
<div className="item-group item-other-deadline"> <div className="item-group item-other-deadline">
<span className="item-group-icon"><i className="fa fa-clock-o"></i></span> <span className="item-group-icon"><i className="fa fa-clock-o"></i></span>
<span className="item-group-text">{moment(item.deadline_at).endOf('day').fromNow()}竞标截止</span> <span className="item-group-text">{moment(item.deadline_at).format("YYYY-MM-DD HH:mm")}竞标截止</span>
</div> </div>
<div className="item-group item-other-bidding"> <div className="item-group item-other-bidding pagemancenter">
<span className="item-group-icon"><i className="fa fa-user"></i></span> <span className="item-group-icon"><i className="fa fa-user"></i></span>
<span className="item-group-text">{item.bidding_users_count}人竞标</span> <span className="item-group-text">{item.bidding_users_count}人竞标</span>
</div> </div>
<div className="item-group"></div>
<div className="item-group item-other-publish-at"> <div className="item-group item-other-publish-at">
发布于{item.published_at} 发布于{moment(item.published_at).format("YYYY-MM-DD HH:mm")}
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save