Merge branch 'mytree' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

competitions
杨树林 5 years ago
commit 5bf38587d8

@ -46,11 +46,17 @@ class HomeworkModal extends Component{
} }
if(this.props.starttimes!=undefined&&this.props.starttimes!=""){ if(this.props.starttimes!=undefined&&this.props.starttimes!=""){
if(this.props.starttimesend!=undefined&&this.props.starttimesend!=""){
this.setState({
endtime:this.props.starttimesend,
})
}else {
this.setState({ this.setState({
endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm") endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
}) })
} }
}
} }
componentDidUpdate=(prevProps)=>{ componentDidUpdate=(prevProps)=>{
// if(prevProps.visible!=this.props.visible){ // if(prevProps.visible!=this.props.visible){
@ -69,10 +75,17 @@ class HomeworkModal extends Component{
if(prevProps.starttimes!=this.props.starttimes){ if(prevProps.starttimes!=this.props.starttimes){
if(this.props.starttimes!=undefined&&this.props.starttimes!=""){ if(this.props.starttimes!=undefined&&this.props.starttimes!=""){
if(this.props.starttimesend!=undefined&&this.props.starttimesend!=""){
this.setState({
endtime:this.props.starttimesend,
})
}else{
this.setState({ this.setState({
endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm") endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
}) })
} }
}
} }
} }

@ -80,6 +80,7 @@ class Listofworksstudentone extends Component {
teacherdata: undefined, teacherdata: undefined,
task_status: [], task_status: [],
visibles: false, visibles: false,
starttimesend:undefined,
course_group_info: [], course_group_info: [],
styletable: { styletable: {
"display": "none" "display": "none"
@ -2789,6 +2790,7 @@ class Listofworksstudentone extends Component {
axios.get(url).then((response) => { axios.get(url).then((response) => {
if (response.status === 200) { if (response.status === 200) {
const dataformat = 'YYYY-MM-DD HH:mm';
let starttime = this.props.getNowFormatDates(1); let starttime = this.props.getNowFormatDates(1);
let endtime = this.props.getNowFormatDates(2); let endtime = this.props.getNowFormatDates(2);
this.setState({ this.setState({
@ -2801,6 +2803,7 @@ class Listofworksstudentone extends Component {
starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime: "截止时间:" + endtime, endtime: "截止时间:" + endtime,
starttimes:starttime, starttimes:starttime,
starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time,
typs:"start", typs:"start",
Cancelname: "暂不发布", Cancelname: "暂不发布",
Savesname: "立即发布", Savesname: "立即发布",
@ -2949,6 +2952,7 @@ class Listofworksstudentone extends Component {
course_groupyslstwo: undefined, course_groupyslstwo: undefined,
typs:undefined, typs:undefined,
starttimes:undefined, starttimes:undefined,
starttimesend:undefined,
}) })
} }
@ -3170,6 +3174,7 @@ class Listofworksstudentone extends Component {
course_groups={this.state.course_groups} course_groups={this.state.course_groups}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)} getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend}
typs={this.state.typs} typs={this.state.typs}
/> />
{ {

@ -61,9 +61,9 @@ class ShixunHomeworkPage extends Component {
} }
Getdataback = (jobsettingsdata, teacherdata) => { Getdataback = (jobsettingsdata, teacherdata) => {
// console.log("56"); console.log("ShixunHomeworkPage56");
// console.log(jobsettingsdata); console.log(jobsettingsdata);
// console.log(teacherdata); console.log(teacherdata);
this.setState({ this.setState({
jobsettingsdatapage: jobsettingsdata.data.message===undefined?jobsettingsdata:undefined, jobsettingsdatapage: jobsettingsdata.data.message===undefined?jobsettingsdata:undefined,

@ -74,6 +74,7 @@ class ShixunStudentWork extends Component {
DownloadType:false, DownloadType:false,
DownloadMessageval:undefined, DownloadMessageval:undefined,
lunxun:true, lunxun:true,
starttimesend:undefined,
} }
} }
@ -415,6 +416,7 @@ class ShixunStudentWork extends Component {
axios.get(url).then((response) => { axios.get(url).then((response) => {
if(response.status===200){ if(response.status===200){
const dataformat = 'YYYY-MM-DD HH:mm';
let starttime= this.props.getNowFormatDates(1); let starttime= this.props.getNowFormatDates(1);
let endtime=this.props.getNowFormatDates(2); let endtime=this.props.getNowFormatDates(2);
this.setState({ this.setState({
@ -432,6 +434,7 @@ class ShixunStudentWork extends Component {
Saves:this.homeworkstartend, Saves:this.homeworkstartend,
course_groups:response.data.course_groups, course_groups:response.data.course_groups,
starttimes:starttime, starttimes:starttime,
starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time,
typs:"start", typs:"start",
}) })
} }
@ -754,6 +757,7 @@ class ShixunStudentWork extends Component {
course_groups={this.state.course_groups} course_groups={this.state.course_groups}
getcourse_groupslist={(id)=>this.getcourse_groupslist(id)} getcourse_groupslist={(id)=>this.getcourse_groupslist(id)}
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend}
typs={this.state.typs} typs={this.state.typs}
/> />
<div className={"educontent "}> <div className={"educontent "}>

@ -120,7 +120,7 @@ class Trainingjobsetting extends Component {
showmodel:false, showmodel:false,
code_review:false, code_review:false,
testscripttiptype:false, testscripttiptype:false,
starttimesend:undefined,
end_timebool:false, end_timebool:false,
late_timesbool:false, late_timesbool:false,
work_efficiencys:false, work_efficiencys:false,
@ -1525,6 +1525,7 @@ class Trainingjobsetting extends Component {
axios.get(url).then((response) => { axios.get(url).then((response) => {
if (response.status === 200) { if (response.status === 200) {
const dataformat = 'YYYY-MM-DD HH:mm';
let starttime = this.props.getNowFormatDates(1); let starttime = this.props.getNowFormatDates(1);
let endtime = this.props.getNowFormatDates(2); let endtime = this.props.getNowFormatDates(2);
this.setState({ this.setState({
@ -1536,6 +1537,7 @@ class Trainingjobsetting extends Component {
Botval:`本操作只对"未发布"的分班有效`, Botval:`本操作只对"未发布"的分班有效`,
starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:starttime, starttimes:starttime,
starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time,
typs:"start", typs:"start",
endtime: "截止时间:" + endtime, endtime: "截止时间:" + endtime,
Cancelname: "暂不发布", Cancelname: "暂不发布",
@ -1668,6 +1670,7 @@ class Trainingjobsetting extends Component {
addnametab: undefined, addnametab: undefined,
typs:undefined, typs:undefined,
starttimes:undefined, starttimes:undefined,
starttimesend:undefined,
}) })
} }
cancelBox=()=>{ cancelBox=()=>{
@ -2120,6 +2123,7 @@ class Trainingjobsetting extends Component {
course_groups={this.state.course_groups} course_groups={this.state.course_groups}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)} getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend}
typs={this.state.typs} typs={this.state.typs}
/> />
<Modals <Modals

@ -77,7 +77,8 @@ class Workquestionandanswer extends Component {
polls_descriptiontest: "作业说明...", polls_descriptiontest: "作业说明...",
jobdescriptiondisplay: "none", jobdescriptiondisplay: "none",
score_open: false, score_open: false,
code_review: false code_review: false,
starttimesend:undefined,
} }
} }
@ -156,6 +157,7 @@ class Workquestionandanswer extends Component {
axios.get(url).then((response) => { axios.get(url).then((response) => {
if (response.status === 200) { if (response.status === 200) {
const dataformat = 'YYYY-MM-DD HH:mm';
let starttime = this.props.getNowFormatDates(1); let starttime = this.props.getNowFormatDates(1);
let endtime = this.props.getNowFormatDates(2); let endtime = this.props.getNowFormatDates(2);
this.setState({ this.setState({
@ -173,6 +175,7 @@ class Workquestionandanswer extends Component {
Saves: this.homeworkstartend, Saves: this.homeworkstartend,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
starttimes: starttime, starttimes: starttime,
starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time,
typs: "start", typs: "start",
}) })
} }
@ -441,6 +444,7 @@ class Workquestionandanswer extends Component {
course_groups={this.state.course_groups} course_groups={this.state.course_groups}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)} getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend}
typs={this.state.typs} typs={this.state.typs}
/> />
<div className={"educontent "}> <div className={"educontent "}>

@ -24,6 +24,7 @@ var newContainer={
} }
//兴趣页面
class EducoderInteresse extends Component { class EducoderInteresse extends Component {
constructor(props) { constructor(props) {
super(props); super(props);

@ -10,7 +10,8 @@ class SendTopics extends Component{
search:null, search:null,
Radiolist:undefined, Radiolist:undefined,
showcheck:false, showcheck:false,
smallisSpin:false smallisSpin:false,
yslbanksMenu:undefined
} }
} }
@ -18,8 +19,13 @@ class SendTopics extends Component{
componentDidMount(){ componentDidMount(){
// console.log("SendTopicssssssssssss");
// console.log(this.props);
let{search}=this.state; let{search}=this.state;
this.onupdatalist(search) this.onupdatalist(search)
this.setState({
yslbanksMenu:this.props.banksMenu,
})
} }
onupdatalist=(search)=>{ onupdatalist=(search)=>{
@ -49,6 +55,8 @@ class SendTopics extends Component{
onChange=(e)=>{ onChange=(e)=>{
console.log("SendTopics");
console.log(e);
this.setState({ this.setState({
Radiolist:e.target.value Radiolist:e.target.value
}) })
@ -78,9 +86,60 @@ class SendTopics extends Component{
smallisSpin:false smallisSpin:false
}) })
if(result.data.status===0){ if(result.data.status===0){
this.props.showNotification(result.data.message) this.props.showNotification(result.data.message);
this.props.topicscancelmodel() this.props.topicscancelmodel();
// result.data.task_ids;
try {
this.props.updataslist() this.props.updataslist()
}catch (e) {
}
debugger
if(this.props.mysendall===true){
//详情页面跳过来的
try {
var rurls="";
if(this.state.yslbanksMenu.category==="normal"){
//普通作业
rurls=`/courses/${this.state.Radiolist}/common_homeworks/${result.data.task_ids}/setting`;
}else if(this.state.yslbanksMenu.category==="group"){
//分组作业
rurls=`/courses/${this.state.Radiolist}/group_homeworks/${result.data.task_ids}/setting`;
}else if(this.state.yslbanksMenu.category==="exercise"){
// 试卷
rurls=`/courses/${this.state.Radiolist}/exercises/${result.data.task_ids}/student_exercise_list?tab=3`;
}else if(this.state.yslbanksMenu.category==="poll") {
//问卷
rurls=`/courses/${this.state.Radiolist}/polls/${result.data.task_ids}/detail?tab=3`
}
window.open(rurls,'_blank');
}catch (e) {
}
}else{
//外部多个列表页跳过来的
debugger
try {
var rurls="";
if(this.props.category==="normal"){
//普通作业
rurls=`/courses/${this.state.Radiolist}/common_homeworks/${result.data.category_id}`;
}else if(this.props.category==="group"){
//分组作业
rurls=`/courses/${this.state.Radiolist}/group_homeworks/${result.data.category_id}`;
}else if(this.props.category==="exercise"){
// 试卷
rurls=`/courses/${this.state.Radiolist}/exercises/${result.data.category_id}`;
}else if(this.props.category==="poll") {
//问卷
rurls=`/courses/${this.state.Radiolist}/polls/${result.data.category_id}`
}
window.open(rurls,'_blank');
}catch (e) {
console.log(e);
}
}
}else{ }else{
this.props.showNotification(result.data.message) this.props.showNotification(result.data.message)
} }

@ -361,6 +361,7 @@ class InfosTopics extends Component{
<SendTopics <SendTopics
{...this.state} {...this.state}
{...this.props} {...this.props}
mysendall={false}
visible={visible} visible={visible}
updataslist={()=>this.updataslist()} updataslist={()=>this.updataslist()}
topicscancelmodel={()=>this.topicscancelmodel()} topicscancelmodel={()=>this.topicscancelmodel()}

@ -25,7 +25,10 @@ class BanksMenu extends Component{
}) })
} }
componentDidMount() { componentDidMount() {
debugger // var thestring=this.props;
// var yslarr=thestring.split("/");
// console.log(yslarr);
try { try {
const query = this.props.location.search; const query = this.props.location.search;
const type = query.split('?tab='); const type = query.split('?tab=');
@ -80,9 +83,9 @@ class BanksMenu extends Component{
} }
topicssavedelete=(id,type)=>{ topicssavedelete=(id,type)=>{
console.log("删除了"); // console.log("删除了");
console.log(id); // console.log(id);
console.log(type); // console.log(type);
const url = `/question_banks/multi_delete.json`; const url = `/question_banks/multi_delete.json`;
axios.delete(url, { data: { axios.delete(url, { data: {
object_id: [id], object_id: [id],
@ -148,6 +151,7 @@ class BanksMenu extends Component{
<SendTopics <SendTopics
{...this.state} {...this.state}
{...this.props} {...this.props}
mysendall={true}
visible={visible} visible={visible}
category={banksMenu&&banksMenu.category} category={banksMenu&&banksMenu.category}
checkBoxValues={[banksMenu&&banksMenu.id]} checkBoxValues={[banksMenu&&banksMenu.id]}
@ -160,8 +164,9 @@ class BanksMenu extends Component{
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}> <Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}>
{ {
banksMenu.menuArray && banksMenu.menuArray.map((item,key)=>{ banksMenu.menuArray && banksMenu.menuArray.map((item,key)=>{
console.log("BanksMenu"); // console.log("BanksMenussss");
console.log(item); // console.log(this.props);
// console.log(this.props.content);
return( return(
<Menu.Item key={key}><Link to={`${item.to}`}>{item.content}</Link></Menu.Item> <Menu.Item key={key}><Link to={`${item.to}`}>{item.content}</Link></Menu.Item>
) )

Loading…
Cancel
Save