From 6626e3e9382612262d06993d1e57ba9165f8c678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 12 Oct 2019 09:12:09 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E6=96=B0=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/Listofworksstudentone.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 5eed392d5..4ca9b831c 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -40,7 +40,7 @@ const RadioGroup = Radio.Group; const CheckboxGroup = Checkbox.Group; const {Option} = Select; //GraduationTaskssetting.js - + //作品列表(学生) class Listofworksstudentone extends Component { //unifiedsetting 统一设置 From edf4973717c88ba85de50c2b18b7cf836fd5bb93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 12 Oct 2019 10:19:13 +0800 Subject: [PATCH 02/14] =?UTF-8?q?=E6=96=B0=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Listofworksstudentone.js | 2 +- public/react/src/modules/modals/SendTopics.js | 46 ++++++++++++++++--- .../modules/user/usersInfo/banks/banksMenu.js | 10 ++-- 3 files changed, 48 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 4ca9b831c..5eed392d5 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -40,7 +40,7 @@ const RadioGroup = Radio.Group; const CheckboxGroup = Checkbox.Group; const {Option} = Select; //GraduationTaskssetting.js - + //作品列表(学生) class Listofworksstudentone extends Component { //unifiedsetting 统一设置 diff --git a/public/react/src/modules/modals/SendTopics.js b/public/react/src/modules/modals/SendTopics.js index 265bcc7d7..3d5e50344 100644 --- a/public/react/src/modules/modals/SendTopics.js +++ b/public/react/src/modules/modals/SendTopics.js @@ -10,7 +10,8 @@ class SendTopics extends Component{ search:null, Radiolist:undefined, showcheck:false, - smallisSpin:false + smallisSpin:false, + yslbanksMenu:undefined } } @@ -18,8 +19,13 @@ class SendTopics extends Component{ componentDidMount(){ - let{search}=this.state; - this.onupdatalist(search) + // console.log("SendTopicssssss"); + // console.log(this.props); + let{search}=this.state; + this.onupdatalist(search) + this.setState({ + yslbanksMenu:this.props.banksMenu, + }) } onupdatalist=(search)=>{ @@ -49,6 +55,8 @@ class SendTopics extends Component{ onChange=(e)=>{ + console.log("SendTopics"); + console.log(e); this.setState({ Radiolist:e.target.value }) @@ -78,9 +86,35 @@ class SendTopics extends Component{ smallisSpin:false }) if(result.data.status===0){ - this.props.showNotification(result.data.message) - this.props.topicscancelmodel() - this.props.updataslist() + this.props.showNotification(result.data.message); + this.props.topicscancelmodel(); + // result.data.task_ids; + + try { + this.props.updataslist() + }catch (e) { + + } + try { + var rurls=""; + if(this.state.yslbanksMenu.category==="normal"){ + //普通作业 + rurls=`/courses/${this.state.Radiolist}/common_homeworks/${result.data.task_ids}/list`; + }else if(this.state.yslbanksMenu.category==="group"){ + //分组作业 + rurls=`/courses/${this.state.Radiolist}/group_homeworks/${result.data.task_ids}/list`; + }else if(this.state.yslbanksMenu.category==="exercise"){ + // 试卷 + rurls=`/courses/${this.state.Radiolist}/exercises/${result.data.task_ids}/student_exercise_list?tab=0`; + }else if(this.state.yslbanksMenu.category==="poll") { + //问卷 + rurls=`/courses/${this.state.Radiolist}/polls/${result.data.task_ids}/detail` + } + window.open(rurls,'_blank'); + }catch (e) { + + } + }else{ this.props.showNotification(result.data.message) } diff --git a/public/react/src/modules/user/usersInfo/banks/banksMenu.js b/public/react/src/modules/user/usersInfo/banks/banksMenu.js index 1c753450b..27980d567 100644 --- a/public/react/src/modules/user/usersInfo/banks/banksMenu.js +++ b/public/react/src/modules/user/usersInfo/banks/banksMenu.js @@ -25,7 +25,10 @@ class BanksMenu extends Component{ }) } componentDidMount() { - debugger + // var thestring=this.props; + // var yslarr=thestring.split("/"); + // console.log(yslarr); + try { const query = this.props.location.search; const type = query.split('?tab='); @@ -160,8 +163,9 @@ class BanksMenu extends Component{ { banksMenu.menuArray && banksMenu.menuArray.map((item,key)=>{ - console.log("BanksMenu"); - console.log(item); + // console.log("BanksMenussss"); + // console.log(this.props); + // console.log(this.props.content); return( {item.content} ) From 2eaa58c44b205cb42d9d1c0e6186b92f4a29a69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 12 Oct 2019 12:45:46 +0800 Subject: [PATCH 03/14] =?UTF-8?q?=E6=96=B0issues=20=E5=88=86=E6=94=AF?= =?UTF-8?q?=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/ShixunHomeworkPage.js | 6 +++--- public/react/src/modules/login/EducoderInteresse.js | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 9b0353b9e..32dd3a4ee 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -61,9 +61,9 @@ class ShixunHomeworkPage extends Component { } Getdataback = (jobsettingsdata, teacherdata) => { - // console.log("56"); - // console.log(jobsettingsdata); - // console.log(teacherdata); + console.log("ShixunHomeworkPage56"); + console.log(jobsettingsdata); + console.log(teacherdata); this.setState({ jobsettingsdatapage: jobsettingsdata.data.message===undefined?jobsettingsdata:undefined, diff --git a/public/react/src/modules/login/EducoderInteresse.js b/public/react/src/modules/login/EducoderInteresse.js index c69b2195d..4ad78ccf6 100644 --- a/public/react/src/modules/login/EducoderInteresse.js +++ b/public/react/src/modules/login/EducoderInteresse.js @@ -24,6 +24,7 @@ var newContainer={ } +//兴趣页面 class EducoderInteresse extends Component { constructor(props) { super(props); From f351a96ccdfe0bff4587f7f95a4f887b6e975b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 12 Oct 2019 14:07:15 +0800 Subject: [PATCH 04/14] =?UTF-8?q?=E6=96=B0=E5=88=86=E6=94=AF=E6=94=B9?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesPublic/HomeworkModal.js | 25 ++++++++++++++----- .../shixunHomework/Listofworksstudentone.js | 5 ++++ .../shixunHomework/ShixunStudentWork.js | 3 +++ .../shixunHomework/Trainingjobsetting.js | 9 ++++--- .../shixunHomework/Workquestionandanswer.js | 5 +++- 5 files changed, 37 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js index a001e6d86..ee19745c9 100644 --- a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js +++ b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js @@ -46,10 +46,16 @@ class HomeworkModal extends Component{ } 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({ + endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm") + }) + } - this.setState({ - endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm") - }) } } componentDidUpdate=(prevProps)=>{ @@ -69,9 +75,16 @@ class HomeworkModal extends Component{ if(prevProps.starttimes!=this.props.starttimes){ if(this.props.starttimes!=undefined&&this.props.starttimes!=""){ - this.setState({ - endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm") - }) + if(this.props.starttimesend!=undefined&&this.props.starttimesend!=""){ + this.setState({ + endtime:this.props.starttimesend, + }) + }else{ + this.setState({ + endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm") + }) + } + } } } diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 5eed392d5..6de412525 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -80,6 +80,7 @@ class Listofworksstudentone extends Component { teacherdata: undefined, task_status: [], visibles: false, + starttimesend:undefined, course_group_info: [], styletable: { "display": "none" @@ -2789,6 +2790,7 @@ class Listofworksstudentone extends Component { axios.get(url).then((response) => { if (response.status === 200) { + const dataformat = 'YYYY-MM-DD HH:mm'; let starttime = this.props.getNowFormatDates(1); let endtime = this.props.getNowFormatDates(2); this.setState({ @@ -2801,6 +2803,7 @@ class Listofworksstudentone extends Component { starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), endtime: "截止时间:" + endtime, starttimes:starttime, + starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:moment(response.data.end_time, dataformat), typs:"start", Cancelname: "暂不发布", Savesname: "立即发布", @@ -2949,6 +2952,7 @@ class Listofworksstudentone extends Component { course_groupyslstwo: undefined, typs:undefined, starttimes:undefined, + starttimesend:undefined, }) } @@ -3170,6 +3174,7 @@ class Listofworksstudentone extends Component { course_groups={this.state.course_groups} getcourse_groupslist={(id) => this.getcourse_groupslist(id)} starttimes={this.state.starttimes} + starttimesend={this.state.starttimesend} typs={this.state.typs} /> { diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index 3caa63ac3..074bab663 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -74,6 +74,7 @@ class ShixunStudentWork extends Component { DownloadType:false, DownloadMessageval:undefined, lunxun:true, + starttimesend:undefined, } } @@ -432,6 +433,7 @@ class ShixunStudentWork extends Component { Saves:this.homeworkstartend, course_groups:response.data.course_groups, starttimes:starttime, + starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:moment(response.data.end_time, dataformat), typs:"start", }) } @@ -754,6 +756,7 @@ class ShixunStudentWork extends Component { course_groups={this.state.course_groups} getcourse_groupslist={(id)=>this.getcourse_groupslist(id)} starttimes={this.state.starttimes} + starttimesend={this.state.starttimesend} typs={this.state.typs} />
diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index da1408d4a..9cd1ccdf5 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -120,7 +120,7 @@ class Trainingjobsetting extends Component { showmodel:false, code_review:false, testscripttiptype:false, - + starttimesend:undefined, end_timebool:false, late_timesbool:false, work_efficiencys:false, @@ -1536,7 +1536,8 @@ class Trainingjobsetting extends Component { Botval:`本操作只对"未发布"的分班有效`, starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:starttime, - typs:"start", + starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:moment(response.data.end_time, dataformat), + typs:"start", endtime: "截止时间:" + endtime, Cancelname: "暂不发布", Savesname: "立即发布", @@ -1668,6 +1669,7 @@ class Trainingjobsetting extends Component { addnametab: undefined, typs:undefined, starttimes:undefined, + starttimesend:undefined, }) } cancelBox=()=>{ @@ -2120,7 +2122,8 @@ class Trainingjobsetting extends Component { course_groups={this.state.course_groups} getcourse_groupslist={(id) => this.getcourse_groupslist(id)} starttimes={this.state.starttimes} - typs={this.state.typs} + starttimesend={this.state.starttimesend} + typs={this.state.typs} /> this.getcourse_groupslist(id)} starttimes={this.state.starttimes} + starttimesend={this.state.starttimesend} typs={this.state.typs} />
From c03a1725424845064f7a655c42a6c2bdad603b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 12 Oct 2019 15:11:38 +0800 Subject: [PATCH 05/14] =?UTF-8?q?=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/modals/SendTopics.js | 8 ++++---- .../react/src/modules/user/usersInfo/banks/banksMenu.js | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/modals/SendTopics.js b/public/react/src/modules/modals/SendTopics.js index 3d5e50344..fe1b52c66 100644 --- a/public/react/src/modules/modals/SendTopics.js +++ b/public/react/src/modules/modals/SendTopics.js @@ -99,16 +99,16 @@ class SendTopics extends Component{ var rurls=""; if(this.state.yslbanksMenu.category==="normal"){ //普通作业 - rurls=`/courses/${this.state.Radiolist}/common_homeworks/${result.data.task_ids}/list`; + 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}/list`; + 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=0`; + 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` + rurls=`/courses/${this.state.Radiolist}/polls/${result.data.task_ids}/detail?tab=3` } window.open(rurls,'_blank'); }catch (e) { diff --git a/public/react/src/modules/user/usersInfo/banks/banksMenu.js b/public/react/src/modules/user/usersInfo/banks/banksMenu.js index 27980d567..d94e06c58 100644 --- a/public/react/src/modules/user/usersInfo/banks/banksMenu.js +++ b/public/react/src/modules/user/usersInfo/banks/banksMenu.js @@ -83,9 +83,9 @@ class BanksMenu extends Component{ } topicssavedelete=(id,type)=>{ - console.log("删除了"); - console.log(id); - console.log(type); + // console.log("删除了"); + // console.log(id); + // console.log(type); const url = `/question_banks/multi_delete.json`; axios.delete(url, { data: { object_id: [id], From 083ed87e1d4412dc993740d103155478ac810471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 12 Oct 2019 15:15:07 +0800 Subject: [PATCH 06/14] =?UTF-8?q?=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/modals/SendTopics.js | 6 ++++++ public/react/src/modules/user/usersInfo/InfosTopics.js | 1 + public/react/src/modules/user/usersInfo/banks/banksMenu.js | 1 + 3 files changed, 8 insertions(+) diff --git a/public/react/src/modules/modals/SendTopics.js b/public/react/src/modules/modals/SendTopics.js index fe1b52c66..f48fc4e73 100644 --- a/public/react/src/modules/modals/SendTopics.js +++ b/public/react/src/modules/modals/SendTopics.js @@ -95,6 +95,8 @@ class SendTopics extends Component{ }catch (e) { } + if(this.props.mysendall===true){ + //详情页面跳过来的 try { var rurls=""; if(this.state.yslbanksMenu.category==="normal"){ @@ -114,6 +116,10 @@ class SendTopics extends Component{ }catch (e) { } + }else{ + //外部多个列表页跳过来的 + + } }else{ this.props.showNotification(result.data.message) diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js index 3b76bfa28..cd05d51ce 100644 --- a/public/react/src/modules/user/usersInfo/InfosTopics.js +++ b/public/react/src/modules/user/usersInfo/InfosTopics.js @@ -361,6 +361,7 @@ class InfosTopics extends Component{ this.updataslist()} topicscancelmodel={()=>this.topicscancelmodel()} diff --git a/public/react/src/modules/user/usersInfo/banks/banksMenu.js b/public/react/src/modules/user/usersInfo/banks/banksMenu.js index d94e06c58..aa2491ae8 100644 --- a/public/react/src/modules/user/usersInfo/banks/banksMenu.js +++ b/public/react/src/modules/user/usersInfo/banks/banksMenu.js @@ -151,6 +151,7 @@ class BanksMenu extends Component{ Date: Sat, 12 Oct 2019 15:25:33 +0800 Subject: [PATCH 07/14] =?UTF-8?q?=E7=AB=8B=E5=8D=B3=E5=8F=91=E5=B8=83=20?= =?UTF-8?q?=E6=88=AA=E6=AD=A2=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/busyWork/PublishRightnow.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/PublishRightnow.js b/public/react/src/modules/courses/busyWork/PublishRightnow.js index da2054124..93f740735 100644 --- a/public/react/src/modules/courses/busyWork/PublishRightnow.js +++ b/public/react/src/modules/courses/busyWork/PublishRightnow.js @@ -23,7 +23,8 @@ class PublishRightnow extends Component{ Savesname:undefined, Cancel:undefined, Saves:undefined, - Topvalright:undefined + Topvalright:undefined, + starttimesend:undefined, } } open = (usingCheckBeforePost) => { @@ -83,7 +84,8 @@ class PublishRightnow extends Component{ StudentList_value:undefined, addname:undefined, addnametype:false, - addnametab:undefined + addnametab:undefined, + starttimesend:undefined, }) } @@ -150,9 +152,12 @@ class PublishRightnow extends Component{ this.setState({ visible : false }) return; } + const dataformat = 'YYYY-MM-DD HH:mm'; this.showDialog() this.setState({ course_groups: response.data.course_groups, + starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:moment(response.data.end_time, dataformat), + }) }) .catch(function (error) { @@ -203,6 +208,7 @@ class PublishRightnow extends Component{ usingCheckBeforePost= {this.usingCheckBeforePost} onToPublishClick={this.props.onToPublishClick} typs={this.state.typs} + starttimesend={this.state.starttimesend} />:""} { showActionButton && { isPublish ? "立即发布" : "立即截止" } }
From 5c7bd64e6ac878b0fd8ca3e17f54710426736639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 12 Oct 2019 15:44:32 +0800 Subject: [PATCH 08/14] =?UTF-8?q?=E7=AB=8B=E5=8D=B3=E5=8F=91=E5=B8=83=20?= =?UTF-8?q?=E6=88=AA=E6=AD=A2=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/busyWork/PublishRightnow.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/PublishRightnow.js b/public/react/src/modules/courses/busyWork/PublishRightnow.js index 93f740735..da2054124 100644 --- a/public/react/src/modules/courses/busyWork/PublishRightnow.js +++ b/public/react/src/modules/courses/busyWork/PublishRightnow.js @@ -23,8 +23,7 @@ class PublishRightnow extends Component{ Savesname:undefined, Cancel:undefined, Saves:undefined, - Topvalright:undefined, - starttimesend:undefined, + Topvalright:undefined } } open = (usingCheckBeforePost) => { @@ -84,8 +83,7 @@ class PublishRightnow extends Component{ StudentList_value:undefined, addname:undefined, addnametype:false, - addnametab:undefined, - starttimesend:undefined, + addnametab:undefined }) } @@ -152,12 +150,9 @@ class PublishRightnow extends Component{ this.setState({ visible : false }) return; } - const dataformat = 'YYYY-MM-DD HH:mm'; this.showDialog() this.setState({ course_groups: response.data.course_groups, - starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:moment(response.data.end_time, dataformat), - }) }) .catch(function (error) { @@ -208,7 +203,6 @@ class PublishRightnow extends Component{ usingCheckBeforePost= {this.usingCheckBeforePost} onToPublishClick={this.props.onToPublishClick} typs={this.state.typs} - starttimesend={this.state.starttimesend} />:""} { showActionButton && { isPublish ? "立即发布" : "立即截止" } }
From f4155faacfe31cdd14a2e07ad0d31253bfc66a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 12 Oct 2019 16:03:56 +0800 Subject: [PATCH 09/14] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A2=98=E5=BA=93?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/modals/SendTopics.js | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/modals/SendTopics.js b/public/react/src/modules/modals/SendTopics.js index f48fc4e73..28a92451d 100644 --- a/public/react/src/modules/modals/SendTopics.js +++ b/public/react/src/modules/modals/SendTopics.js @@ -19,8 +19,8 @@ class SendTopics extends Component{ componentDidMount(){ - // console.log("SendTopicssssss"); - // console.log(this.props); + console.log("SendTopicssssssssssss"); + console.log(this.props); let{search}=this.state; this.onupdatalist(search) this.setState({ @@ -95,6 +95,7 @@ class SendTopics extends Component{ }catch (e) { } + if(this.props.mysendall===true){ //详情页面跳过来的 try { @@ -118,9 +119,26 @@ class SendTopics extends Component{ } }else{ //外部多个列表页跳过来的 - + try { + var rurls=""; + if(this.state.category==="normal"){ + //普通作业 + rurls=`/courses/${this.state.Radiolist}/common_homeworks/${result.data.category_id}`; + }else if(this.state.category==="group"){ + //分组作业 + rurls=`/courses/${this.state.Radiolist}/group_homeworks/${result.data.category_id}`; + }else if(this.state.category==="exercise"){ + // 试卷 + rurls=`/courses/${this.state.Radiolist}/exercises/${result.data.category_id}`; + }else if(this.state.category==="poll") { + //问卷 + rurls=`courses/${this.state.Radiolist}/polls/${result.data.category_id}` + } + window.open(rurls,'_blank'); + }catch (e) { + console.log(e); + } } - }else{ this.props.showNotification(result.data.message) } From 21b3ed3e163cdae692508e9a4adbd67778a5c51c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 12 Oct 2019 16:04:12 +0800 Subject: [PATCH 10/14] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A2=98=E5=BA=93?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/modals/SendTopics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/modals/SendTopics.js b/public/react/src/modules/modals/SendTopics.js index 28a92451d..9b9ef5101 100644 --- a/public/react/src/modules/modals/SendTopics.js +++ b/public/react/src/modules/modals/SendTopics.js @@ -19,8 +19,8 @@ class SendTopics extends Component{ componentDidMount(){ - console.log("SendTopicssssssssssss"); - console.log(this.props); + // console.log("SendTopicssssssssssss"); + // console.log(this.props); let{search}=this.state; this.onupdatalist(search) this.setState({ From d33014e9d527cf0531bc263ac789792d2a35b4d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 12 Oct 2019 16:10:54 +0800 Subject: [PATCH 11/14] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A2=98=E5=BA=93?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/modals/SendTopics.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/modals/SendTopics.js b/public/react/src/modules/modals/SendTopics.js index 9b9ef5101..94f134f3f 100644 --- a/public/react/src/modules/modals/SendTopics.js +++ b/public/react/src/modules/modals/SendTopics.js @@ -95,7 +95,7 @@ class SendTopics extends Component{ }catch (e) { } - +debugger if(this.props.mysendall===true){ //详情页面跳过来的 try { @@ -119,20 +119,21 @@ class SendTopics extends Component{ } }else{ //外部多个列表页跳过来的 + debugger try { var rurls=""; - if(this.state.category==="normal"){ + if(this.props.category==="normal"){ //普通作业 rurls=`/courses/${this.state.Radiolist}/common_homeworks/${result.data.category_id}`; - }else if(this.state.category==="group"){ + }else if(this.props.category==="group"){ //分组作业 rurls=`/courses/${this.state.Radiolist}/group_homeworks/${result.data.category_id}`; - }else if(this.state.category==="exercise"){ + }else if(this.props.category==="exercise"){ // 试卷 rurls=`/courses/${this.state.Radiolist}/exercises/${result.data.category_id}`; - }else if(this.state.category==="poll") { + }else if(this.props.category==="poll") { //问卷 - rurls=`courses/${this.state.Radiolist}/polls/${result.data.category_id}` + rurls=`/courses/${this.state.Radiolist}/polls/${result.data.category_id}` } window.open(rurls,'_blank'); }catch (e) { From f3f0fa16170da466e03d3ccea1fe968d1631d4a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 12 Oct 2019 16:16:00 +0800 Subject: [PATCH 12/14] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A2=98=E5=BA=93?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/Trainingjobsetting.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 9cd1ccdf5..5cf7b4f8b 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1525,6 +1525,7 @@ class Trainingjobsetting extends Component { axios.get(url).then((response) => { if (response.status === 200) { + const dataformat = 'YYYY-MM-DD HH:mm'; let starttime = this.props.getNowFormatDates(1); let endtime = this.props.getNowFormatDates(2); this.setState({ From 358c718f7e5a7f8e8dfa5d63ebc35edea7c2eb7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 12 Oct 2019 16:22:28 +0800 Subject: [PATCH 13/14] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/ShixunStudentWork.js | 1 + .../src/modules/courses/shixunHomework/Workquestionandanswer.js | 1 + 2 files changed, 2 insertions(+) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index 074bab663..e7f3ae5c7 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -416,6 +416,7 @@ class ShixunStudentWork extends Component { axios.get(url).then((response) => { if(response.status===200){ + const dataformat = 'YYYY-MM-DD HH:mm'; let starttime= this.props.getNowFormatDates(1); let endtime=this.props.getNowFormatDates(2); this.setState({ diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 57a51241e..f211b4a1d 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -157,6 +157,7 @@ class Workquestionandanswer extends Component { axios.get(url).then((response) => { if (response.status === 200) { + const dataformat = 'YYYY-MM-DD HH:mm'; let starttime = this.props.getNowFormatDates(1); let endtime = this.props.getNowFormatDates(2); this.setState({ From 076d09bc9b350c2f43121ba2bbe440b58af11c57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 12 Oct 2019 16:42:54 +0800 Subject: [PATCH 14/14] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/Listofworksstudentone.js | 2 +- .../src/modules/courses/shixunHomework/ShixunStudentWork.js | 2 +- .../src/modules/courses/shixunHomework/Trainingjobsetting.js | 2 +- .../src/modules/courses/shixunHomework/Workquestionandanswer.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 6de412525..926e1b023 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -2803,7 +2803,7 @@ class Listofworksstudentone extends Component { starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), endtime: "截止时间:" + endtime, starttimes:starttime, - starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:moment(response.data.end_time, dataformat), + starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time, typs:"start", Cancelname: "暂不发布", Savesname: "立即发布", diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index e7f3ae5c7..95de82445 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -434,7 +434,7 @@ class ShixunStudentWork extends Component { Saves:this.homeworkstartend, course_groups:response.data.course_groups, starttimes:starttime, - starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:moment(response.data.end_time, dataformat), + starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time, typs:"start", }) } diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 5cf7b4f8b..5d2462ec0 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1537,7 +1537,7 @@ class Trainingjobsetting extends Component { Botval:`本操作只对"未发布"的分班有效`, starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:starttime, - starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:moment(response.data.end_time, dataformat), + starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time, typs:"start", endtime: "截止时间:" + endtime, Cancelname: "暂不发布", diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index f211b4a1d..34c484b83 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -175,7 +175,7 @@ class Workquestionandanswer extends Component { Saves: this.homeworkstartend, course_groups: response.data.course_groups, starttimes: starttime, - starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:moment(response.data.end_time, dataformat), + starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time, typs: "start", }) }