From a3c46ee41ac79619d0a07231a540b78e33099f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 16 Mar 2020 15:14:39 +0800 Subject: [PATCH 01/19] =?UTF-8?q?=E7=AB=8B=E5=8D=B3=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coursesPublic/OneSelfOrderModal.js | 33 ++++++++++--------- .../shixunHomework/Trainingjobsetting.js | 5 +++ 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js b/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js index 1f7fec57a..fb915164c 100644 --- a/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js +++ b/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js @@ -202,29 +202,32 @@ class OneSelfOrderModal extends Component{ } propsSaves=(ds,endtime)=>{ + debugger let {course_groups}=this.state; if(this.props.typs=="end"){ this.props.Saves() }else{ - - if(this.props.typs!="end"){ - if(!endtime){ - this.setState({ - endtimetype:true, - endtimetypevalue:"截止时间不能为空" - }) - return - } - if(moment(endtime,"YYYY-MM-DD HH:mm") <= moment(this.props.starttime,"YYYY-MM-DD HH:mm")){ - this.setState({ - endtimetype:true, - endtimetypevalue:"必须晚于当前时间" - }) - return + if(!this.props.immediatelyopen){ + if(this.props.typs!="end"){ + if(!endtime){ + this.setState({ + endtimetype:true, + endtimetypevalue:"截止时间不能为空" + }) + return + } + if(moment(endtime,"YYYY-MM-DD HH:mm") <= moment(this.props.starttime,"YYYY-MM-DD HH:mm")){ + this.setState({ + endtimetype:true, + endtimetypevalue:"必须晚于当前时间" + }) + return + } } } + let type=false if(course_groups===undefined||course_groups.length===0){ this.props.Saves(ds,moment(handleDateString(endtime),"YYYY-MM-DD HH:mm").format("YYYY-MM-DD HH:mm")) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index a6cefb466..427354bae 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -135,6 +135,7 @@ class Trainingjobsetting extends Component { borredszfls:'', total_scoretwo:0, total_score:0, + immediatelyopen:false } // console.log("获取到的值") // console.log("Trainingjobsetting") @@ -1758,6 +1759,7 @@ class Trainingjobsetting extends Component { Cancel: this.homeworkhide, Saves: this.homeworkstartend, course_groups: response.data.course_groups, + immediatelyopen:true }) } }).catch((error) => { @@ -1799,6 +1801,7 @@ class Trainingjobsetting extends Component { } // 立即发布 homeworkstartend = (ds, endtime) => { + debugger var homeworkid = this.props.match.params.homeworkid; let data = {} @@ -1914,6 +1917,7 @@ class Trainingjobsetting extends Component { typs: undefined, starttimes: undefined, starttimesend: undefined, + immediatelyopen:false }) } cancelBox = () => { @@ -2401,6 +2405,7 @@ class Trainingjobsetting extends Component { starttimes={this.state.starttimes} starttimesend={this.state.starttimesend} typs={this.state.typs} + immediatelyopen={this.state.immediatelyopen} /> : ""} Date: Mon, 16 Mar 2020 16:25:28 +0800 Subject: [PATCH 02/19] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=AB=8B=E5=8D=B3?= =?UTF-8?q?=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coursesPublic/OneSelfOrderModal.js | 30 +++++++++++++++++-- .../shixunHomework/Trainingjobsetting.js | 12 +++++--- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js b/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js index fb915164c..d02b99834 100644 --- a/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js +++ b/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js @@ -35,7 +35,10 @@ class OneSelfOrderModal extends Component{ group_ids:[], endtime:"", course_groups:undefined, - Checkboxtype:true + Checkboxtype:true, + endtimetypevalue:undefined, + endtimetypeid:undefined, + endtimetypename:undefined } } componentDidMount() { @@ -203,6 +206,9 @@ class OneSelfOrderModal extends Component{ propsSaves=(ds,endtime)=>{ debugger + this.setState({ + endtimetype:false + }) let {course_groups}=this.state; if(this.props.typs=="end"){ @@ -241,6 +247,7 @@ class OneSelfOrderModal extends Component{ this.setState({ endtimetype:true, endtimetypeid:items.id, + endtimetypename:items.name, endtimetypevalue:"截止时间不能为空" }) return @@ -248,12 +255,29 @@ class OneSelfOrderModal extends Component{ // arr.push(moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm")) }else{ if(moment(items.end_time,"YYYY-MM-DD HH:mm") <= moment(this.props.starttime,"YYYY-MM-DD HH:mm")){ + type=true this.setState({ endtimetype:true, - endtimetypevalue:"必须晚于当前时间" + endtimetypeid:items.id, + endtimetypename:items.name, + endtimetypevalue:"截止时间必须晚于当前时间" }) return } + + if(this.props.modallate_time){ + if(moment(items.end_time,"YYYY-MM-DD HH:mm") >= moment(this.props.modallate_time,"YYYY-MM-DD HH:mm")){ + type=true + this.setState({ + endtimetype:true, + endtimetypeid:items.id, + endtimetypename:items.name, + endtimetypevalue:"截止时间必须晚于补交结束时间" + }) + return + } + } + arr.push(handleDateString(items.end_time)) } } @@ -459,7 +483,7 @@ class OneSelfOrderModal extends Component{ } {this.state.endtimetype===true&&course_groupstype===true?
{this.state.endtimetypevalue}
:""} - {this.state.endtimetypeid!=undefined&&this.state.endtimetype===true?
{this.state.endtimetypevalue}
:""} + {this.state.endtimetypeid!=undefined&&this.state.endtimetype===true?
{this.state.endtimetypename}{this.state.endtimetypevalue}
:""} {course_groupstype===true?
{this.props.Cancelname} this.propsSaves(group_ids,this.state.endtime)}>{this.props.Savesname} diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 427354bae..e14ad1408 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -135,7 +135,8 @@ class Trainingjobsetting extends Component { borredszfls:'', total_scoretwo:0, total_score:0, - immediatelyopen:false + immediatelyopen:false, + modallate_time:undefined } // console.log("获取到的值") // console.log("Trainingjobsetting") @@ -1758,8 +1759,9 @@ class Trainingjobsetting extends Component { Savesname: "立即发布", Cancel: this.homeworkhide, Saves: this.homeworkstartend, - course_groups: response.data.course_groups, - immediatelyopen:true + course_groups:response.data.course_groups, + immediatelyopen:true, + modallate_time:response.data.late_time, }) } }).catch((error) => { @@ -1917,7 +1919,8 @@ class Trainingjobsetting extends Component { typs: undefined, starttimes: undefined, starttimesend: undefined, - immediatelyopen:false + immediatelyopen:false, + modallate_time:undefined, }) } cancelBox = () => { @@ -2406,6 +2409,7 @@ class Trainingjobsetting extends Component { starttimesend={this.state.starttimesend} typs={this.state.typs} immediatelyopen={this.state.immediatelyopen} + modallate_time={this.state.modallate_time} /> : ""} Date: Mon, 16 Mar 2020 18:36:01 +0800 Subject: [PATCH 03/19] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/busyWork/PublishRightnow.js | 7 +++++-- .../src/modules/courses/coursesPublic/OneSelfOrderModal.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/PublishRightnow.js b/public/react/src/modules/courses/busyWork/PublishRightnow.js index 9863a95d6..95d71cb16 100644 --- a/public/react/src/modules/courses/busyWork/PublishRightnow.js +++ b/public/react/src/modules/courses/busyWork/PublishRightnow.js @@ -24,7 +24,8 @@ class PublishRightnow extends Component{ Savesname:undefined, Cancel:undefined, Saves:undefined, - Topvalright:undefined + Topvalright:undefined, + modallate_time:undefined } } open = (usingCheckBeforePost) => { @@ -70,6 +71,7 @@ class PublishRightnow extends Component{ Cancel:this.homeworkhide, Saves:this.homeworkstartend, typs:showdatatypes ? "start" : "end", + modallate_time:showdatatypes?response.data.late_time:undefined, }) } homeworkhide=()=>{ @@ -91,7 +93,8 @@ class PublishRightnow extends Component{ StudentList_value:undefined, addname:undefined, addnametype:false, - addnametab:undefined + addnametab:undefined, + modallate_time:undefined }) } diff --git a/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js b/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js index d02b99834..60f2df553 100644 --- a/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js +++ b/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js @@ -483,7 +483,7 @@ class OneSelfOrderModal extends Component{ } {this.state.endtimetype===true&&course_groupstype===true?
{this.state.endtimetypevalue}
:""} - {this.state.endtimetypeid!=undefined&&this.state.endtimetype===true?
{this.state.endtimetypename}{this.state.endtimetypevalue}
:""} + {this.state.endtimetypeid!=undefined&&this.state.endtimetype===true?
{this.state.endtimetypevalue}
:""} {course_groupstype===true?
{this.props.Cancelname} this.propsSaves(group_ids,this.state.endtime)}>{this.props.Savesname} From 62c6a1b0f86a46a328ef371e87c485c13ed2188f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 16 Mar 2020 21:20:07 +0800 Subject: [PATCH 04/19] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E3=80=81=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E4=B8=AD=E5=BF=83=E5=8A=9F=E8=83=BD=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CommonWorkAppraiseReviseAttachments.js | 6 +- .../exercise/Studentshavecompletedthelist.js | 96 +++++++++++++++++-- .../shixunHomework/Listofworksstudentone.js | 8 +- .../src/modules/user/account/AccountImg.js | 17 +++- 4 files changed, 110 insertions(+), 17 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraiseReviseAttachments.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraiseReviseAttachments.js index 31fd4b9e6..7305591df 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkAppraiseReviseAttachments.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraiseReviseAttachments.js @@ -14,9 +14,9 @@ function CommonWorkAppraiseReviseAttachments(props) { } `}
- 补交附件 + 补交内容
- + {/* {age} */}
@@ -47,6 +47,6 @@ function CommonWorkAppraiseReviseAttachments(props) {
} ) - + } export default CommonWorkAppraiseReviseAttachments; \ No newline at end of file diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index ec59c46e3..070ceeed2 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -295,10 +295,10 @@ class Studentshavecompletedthelist extends Component { ) }, { - title:最终成绩 + title:最终成绩 鼠标停留具体分值上可查
看得分明细
- }>
, + }>
, dataIndex: 'efficiencyscore', key: 'efficiencyscore', align: 'center', @@ -340,6 +340,22 @@ class Studentshavecompletedthelist extends Component { }}>{record.efficiencyscore} : + + +
{record.objective_score===undefined?"":record.objective_score === "--" ? 客观题得分:0分 : + 客观题得分:{record.objective_score}分} +
+ +
{record.subjective_score===undefined?"":record.subjective_score === "--" ? 主观题得分:0分 : + 主观题得分:{record.subjective_score}分} +
+ +
{record.efficiencyscore === "--" ? 最终成绩:0分 : + 最终成绩:{record.efficiencyscore}分} +
+
+ + }> 90 ? { color: '#DD1717', textAlign: "center" @@ -353,6 +369,7 @@ class Studentshavecompletedthelist extends Component { color: '#747A7F', textAlign: "center" }}>{record.efficiencyscore} + } ) @@ -590,10 +607,10 @@ class Studentshavecompletedthelist extends Component { ) }, { - title:最终成绩 + title:最终成绩 鼠标停留具体分值上可查
看得分明细
- }>
, + }>
, dataIndex: 'efficiencyscore', key: 'efficiencyscore', align: 'center', @@ -637,6 +654,22 @@ class Studentshavecompletedthelist extends Component { }}>{record.efficiencyscore} : + + +
{record.objective_score===undefined?"":record.objective_score === "--" ? 客观题得分:0分 : + 客观题得分:{record.objective_score}分} +
+ +
{record.subjective_score===undefined?"":record.subjective_score === "--" ? 主观题得分:0分 : + 主观题得分:{record.subjective_score}分} +
+ +
{record.efficiencyscore === "--" ? 最终成绩:0分 : + 最终成绩:{record.efficiencyscore}分} +
+
+ + }> 90 ? { color: '#DD1717', textAlign: "center", @@ -654,6 +687,7 @@ class Studentshavecompletedthelist extends Component { textAlign: "center", width:"199px" }}>{record.efficiencyscore} + } @@ -877,10 +911,10 @@ class Studentshavecompletedthelist extends Component { ) }, { - title: 最终成绩 + title: 最终成绩 鼠标停留具体分值上可查
看得分明细
- }>
, + }>
, dataIndex: 'efficiencyscore', key: 'efficiencyscore', align: 'center', @@ -918,6 +952,22 @@ class Studentshavecompletedthelist extends Component { }}>{record.efficiencyscore} : + + +
{record.objective_score===undefined?"":record.objective_score === "--" ? 客观题得分:0分 : + 客观题得分:{record.objective_score}分} +
+ +
{record.subjective_score===undefined?"":record.subjective_score === "--" ? 主观题得分:0分 : + 主观题得分:{record.subjective_score}分} +
+ +
{record.efficiencyscore === "--" ? 最终成绩:0分 : + 最终成绩:{record.efficiencyscore}分} +
+ + + }> 90 ? { color: '#DD1717', textAlign: "center", @@ -931,6 +981,7 @@ class Studentshavecompletedthelist extends Component { color: '#747A7F', textAlign: "center", }}>{record.efficiencyscore} +
} ) @@ -1104,10 +1155,10 @@ class Studentshavecompletedthelist extends Component { ) }, { - title: 最终成绩 + title: 最终成绩 鼠标停留具体分值上可查
看得分明细
- }>
, + }>
, dataIndex: 'efficiencyscore', key: 'efficiencyscore', align: 'center', @@ -1144,6 +1195,22 @@ class Studentshavecompletedthelist extends Component { }}>{record.efficiencyscore} : + + +
{record.objective_score===undefined?"":record.objective_score === "--" ? 客观题得分:0分 : + 客观题得分:{record.objective_score}分} +
+ +
{record.subjective_score===undefined?"":record.subjective_score === "--" ? 主观题得分:0分 : + 主观题得分:{record.subjective_score}分} +
+ +
{record.efficiencyscore === "--" ? 最终成绩:0分 : + 最终成绩:{record.efficiencyscore}分} +
+ + + }> 90 ? { color: '#DD1717', textAlign: "center", @@ -1157,6 +1224,7 @@ class Studentshavecompletedthelist extends Component { color: '#747A7F', textAlign: "center", }}>{record.efficiencyscore} +
} ) @@ -1511,6 +1579,8 @@ class Studentshavecompletedthelist extends Component { completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, efficiencyscore: exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score, + objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, + subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, operating: "评阅", commit_method:exercise_users[i].commit_method, }) @@ -1527,6 +1597,8 @@ class Studentshavecompletedthelist extends Component { completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, efficiencyscore: exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score, + objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, + subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, operating: "--", commit_method:exercise_users[i].commit_method }) @@ -1552,6 +1624,8 @@ class Studentshavecompletedthelist extends Component { submitstate: current_answer_user.commit_status === 1 ? "已提交" : "未提交", updatetime: moment(current_answer_user.end_at).format('YYYY-MM-DD HH:mm') === "Invalid date" ? "--" : moment(current_answer_user.end_at).format('YYYY-MM-DD HH:mm'), efficiencyscore: current_answer_user.score === undefined ? "--" : current_answer_user.score === null ? "--" : current_answer_user.score === "" ? "--" : current_answer_user.score, + objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, + subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, review_status: current_answer_user.review_status, completion: current_answer_user.objective_score === undefined ? "--" : current_answer_user.objective_score === null ? "--" : current_answer_user.objective_score === "" ? "--" : current_answer_user.objective_score, levelscore: current_answer_user.subjective_score === undefined ? "--" : current_answer_user.subjective_score === null ? "--" : current_answer_user.subjective_score === "" ? "--" : current_answer_user.subjective_score, @@ -1594,6 +1668,8 @@ class Studentshavecompletedthelist extends Component { completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, efficiencyscore: exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score, + objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, + subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, operating: "查看", commit_method:exercise_users[i].commit_method, }) @@ -1739,6 +1815,8 @@ class Studentshavecompletedthelist extends Component { completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score, + objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, + subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, finalscore: "评阅", user_id: exercise_users[i].user_id, commit_method:exercise_users[i].commit_method @@ -1756,6 +1834,8 @@ class Studentshavecompletedthelist extends Component { completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score, + objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, + subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, finalscore: "--", user_id: exercise_users[i].user_id, commit_method:exercise_users[i].commit_method diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 3bd67f6c6..cd8061906 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -1204,10 +1204,10 @@ class Listofworksstudentone extends Component { ) }, { - title: 当前成绩 + title: 当前成绩 鼠标停留具体分值上可查
看得分明细
- }>
, + }>
, dataIndex: 'work_score', key: 'work_score', align: 'center', @@ -1572,10 +1572,10 @@ class Listofworksstudentone extends Component { ) }, { - title: 当前成绩 + title: 当前成绩 鼠标停留具体分值上可查
看得分明细
- }>
, + }>
, dataIndex: 'work_score', key: 'work_score', align: 'center', diff --git a/public/react/src/modules/user/account/AccountImg.js b/public/react/src/modules/user/account/AccountImg.js index 3202c2bf7..bc95e4259 100644 --- a/public/react/src/modules/user/account/AccountImg.js +++ b/public/react/src/modules/user/account/AccountImg.js @@ -13,6 +13,7 @@ class AccountImg extends Component { - 头像 -

修改头像

+ 头像 +
修改头像
); } From e6ba3fe70ef1faed71bb8e5dcf47e9087aa300c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 16 Mar 2020 21:33:10 +0800 Subject: [PATCH 05/19] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E3=80=81=E5=88=86=E7=BB=84=E3=80=81=E6=99=AE=E9=80=9A=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E7=AB=8B=E5=8D=B3=E5=8F=91=E5=B8=83=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/busyWork/PublishRightnow.js | 13 ++++++++++--- .../courses/coursesPublic/OneSelfOrderModal.js | 2 +- .../modules/courses/poll/PollDetailTabForthRules.js | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/PublishRightnow.js b/public/react/src/modules/courses/busyWork/PublishRightnow.js index 95d71cb16..54e87a4c5 100644 --- a/public/react/src/modules/courses/busyWork/PublishRightnow.js +++ b/public/react/src/modules/courses/busyWork/PublishRightnow.js @@ -25,7 +25,9 @@ class PublishRightnow extends Component{ Cancel:undefined, Saves:undefined, Topvalright:undefined, - modallate_time:undefined + modallate_time:undefined, + immediatelyopen:false, + starttimeslate_time:undefined } } open = (usingCheckBeforePost) => { @@ -71,7 +73,8 @@ class PublishRightnow extends Component{ Cancel:this.homeworkhide, Saves:this.homeworkstartend, typs:showdatatypes ? "start" : "end", - modallate_time:showdatatypes?response.data.late_time:undefined, + immediatelyopen:true, + modallate_time:showdatatypes?this.state.starttimeslate_time:undefined, }) } homeworkhide=()=>{ @@ -94,7 +97,8 @@ class PublishRightnow extends Component{ addname:undefined, addnametype:false, addnametab:undefined, - modallate_time:undefined + modallate_time:undefined, + immediatelyopen:false }) } @@ -190,6 +194,7 @@ class PublishRightnow extends Component{ this.setState({ course_groups: response.data.course_groups, starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time, + starttimeslate_time:response.data.late_time===undefined||response.data.late_time===null||response.data.late_time===""?undefined:response.data.late_time, }) }) .catch(function (error) { @@ -263,6 +268,8 @@ class PublishRightnow extends Component{ starttimes={this.state.starttimes} starttimesend={this.state.starttimesend} typs={this.state.typs} + immediatelyopen={this.state.immediatelyopen} + modallate_time={this.state.starttimeslate_time} />:""} { showActionButton && { showdatatypes ? "立即发布" : "立即截止" } } diff --git a/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js b/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js index 60f2df553..6776cea0f 100644 --- a/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js +++ b/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js @@ -205,7 +205,7 @@ class OneSelfOrderModal extends Component{ } propsSaves=(ds,endtime)=>{ - debugger + this.setState({ endtimetype:false }) diff --git a/public/react/src/modules/courses/poll/PollDetailTabForthRules.js b/public/react/src/modules/courses/poll/PollDetailTabForthRules.js index 707c757fd..5e912524c 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabForthRules.js +++ b/public/react/src/modules/courses/poll/PollDetailTabForthRules.js @@ -353,7 +353,7 @@ class PollDetailTabForthRules extends Component{ render(){ let {rules,course_group,flagPageEdit}=this.state let isAdmin=this.props.isAdmin(); - console.log(flagPageEdit) + // console.log(flagPageEdit) return(

From 257b7e35e9cc8e120ec120fb07dde432dd97daaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 16 Mar 2020 21:33:26 +0800 Subject: [PATCH 06/19] =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/coursesPublic/OneSelfOrderModal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js b/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js index 6776cea0f..c51b9a813 100644 --- a/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js +++ b/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js @@ -205,7 +205,7 @@ class OneSelfOrderModal extends Component{ } propsSaves=(ds,endtime)=>{ - + this.setState({ endtimetype:false }) From 833562f9ba8dade24ff25357b53a22186581cf76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 16 Mar 2020 21:51:50 +0800 Subject: [PATCH 07/19] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Video/VideoIndex.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/Video/VideoIndex.js b/public/react/src/modules/courses/Video/VideoIndex.js index fe52b17dc..f52f54859 100644 --- a/public/react/src/modules/courses/Video/VideoIndex.js +++ b/public/react/src/modules/courses/Video/VideoIndex.js @@ -243,10 +243,9 @@ class VideoIndex extends Component{ } render(){ const { videos , upload , videoData , type , liveData , lives , page , liveVisible , isSpining , liveId , otherLinkVisible,statistics } = this.state; - const { is_teacher } = this.props.user; const { coursesId , videoId }=this.props.match.params; - - const {course_identity} = this.props.coursedata; + let course_identity = this.props&&this.props.coursedata; + let is_teacher = this.props&&this.props.user; const flag = parseInt(course_identity) < 5; const newOperation = flag; const new_upload = flag && (is_teacher && this.props.checkIfProfessionalCertification()); From f949451986d2bedd6e5ab9cff816b2de888032ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 16 Mar 2020 22:09:14 +0800 Subject: [PATCH 08/19] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Video/Video.js | 14 ++++++++++---- .../react/src/modules/courses/Video/VideoIndex.js | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/Video/Video.js b/public/react/src/modules/courses/Video/Video.js index 181c082ae..56ad1a60c 100644 --- a/public/react/src/modules/courses/Video/Video.js +++ b/public/react/src/modules/courses/Video/Video.js @@ -191,15 +191,21 @@ class Video extends Component { const CourseId = this.props.match.params.coursesId; const VID = this.props.match.params.videoId; - const login = this.props.user && this.props.user.login; + let login = this.props && this.props.user&&this.props.user.login;; + const _inputValue = videoId && this.getCopyText(videoId.file_url, videoId.cover_url); - const { admin, is_teacher, business, user_id } = this.props.user; + // const { admin, is_teacher, business, user_id } = this.props && this.props.user; + let admin = this.props && this.props.user&&this.props.user.admin;; + let business = this.props && this.props.user&&this.props.user.business;; + let user_id = this.props && this.props.user&&this.props.user.user_id;; + + const { videos, upload, uploadVideo, videoData, changePage, pageSize, page } = this.props; const operation = admin || business; - const { course_identity } = this.props.coursedata; + const { course_identity } = this.props && this.props.coursedata; const flagMove = parseInt(course_identity) < 5; return ( @@ -245,7 +251,7 @@ class Video extends Component {

播放数据从2020-03-13 24:00开始统计

- +
{ videos.map((item, key) => { diff --git a/public/react/src/modules/courses/Video/VideoIndex.js b/public/react/src/modules/courses/Video/VideoIndex.js index f52f54859..7a974c582 100644 --- a/public/react/src/modules/courses/Video/VideoIndex.js +++ b/public/react/src/modules/courses/Video/VideoIndex.js @@ -245,7 +245,7 @@ class VideoIndex extends Component{ const { videos , upload , videoData , type , liveData , lives , page , liveVisible , isSpining , liveId , otherLinkVisible,statistics } = this.state; const { coursesId , videoId }=this.props.match.params; let course_identity = this.props&&this.props.coursedata; - let is_teacher = this.props&&this.props.user; + let is_teacher=this.props&&this.props.user&&this.props.user.is_teacher; const flag = parseInt(course_identity) < 5; const newOperation = flag; const new_upload = flag && (is_teacher && this.props.checkIfProfessionalCertification()); From 22e3fbc49bd9e571a2855d14bb0c3019cf8b17af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 16 Mar 2020 22:29:27 +0800 Subject: [PATCH 09/19] =?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/user/account/AccountImg.js | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/public/react/src/modules/user/account/AccountImg.js b/public/react/src/modules/user/account/AccountImg.js index bc95e4259..595ba7ba1 100644 --- a/public/react/src/modules/user/account/AccountImg.js +++ b/public/react/src/modules/user/account/AccountImg.js @@ -55,26 +55,30 @@ class AccountImg extends Component { .newheadphotoblack{ position: absolute; - top: 49px; - left: 4px; + top: 45px; + left: 0px; text-align: center; color: #fff; - width: 107px; + width: 110px; height: 23px; - line-height:23px; + line-height: 23px; background: rgba(76,172,255,0.7); } - .borderradiusbox{ - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; - } - + .relativeRadiusbox{ + overflow: hidden; + position: relative; + width: 109px; + border-radius: 50%; + height: 109px; + } + `} - 头像 -
修改头像
+
+ 头像 +
修改头像
+
+
); } From dc941a417b3306a934c139f07b4ab34d0fe10870 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 16 Mar 2020 22:30:48 +0800 Subject: [PATCH 10/19] =?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/Video/VideoIndex.js | 584 +++++++++--------- .../component/Videostatisticscomtwo.js | 2 +- .../component/Videostatisticslist.js | 4 +- 3 files changed, 300 insertions(+), 290 deletions(-) diff --git a/public/react/src/modules/courses/Video/VideoIndex.js b/public/react/src/modules/courses/Video/VideoIndex.js index 7a974c582..e4fd369ce 100644 --- a/public/react/src/modules/courses/Video/VideoIndex.js +++ b/public/react/src/modules/courses/Video/VideoIndex.js @@ -1,7 +1,7 @@ -import React,{ Component } from "react"; -import { WordsBtn,on, trigger ,publicSearchs} from 'educoder'; +import React, {Component} from "react"; +import {WordsBtn, on, trigger, publicSearchs} from 'educoder'; -import { Menu, Spin } from 'antd'; +import {Menu, Spin} from 'antd'; import axios from 'axios'; import Videos from './Video'; @@ -12,288 +12,292 @@ import Videostatistics from '../videostatistics/Videostatistics'; import './video.css'; import '../css/Courses.css'; import '../publicNav/nav.css'; + const PAGE_SIZE = 15; const LIVE_PAGE_SIZE = 10; const $ = window.$; -function getRight(){ - var right = parseInt($(".-task-sidebar").css("right")); - return right===0?0:right; +function getRight() { + var right = parseInt($(".-task-sidebar").css("right")); + return right === 0 ? 0 : right; } -class VideoIndex extends Component{ - constructor(props){ - super(props); - this.state={ - page:1, - upload:false, - videos:undefined, - videoData:undefined, - otherLinkVisible:false, - type:"video", - isSpining:false, - lives:undefined, - liveData:undefined, +class VideoIndex extends Component { + constructor(props) { + super(props); + this.state = { + page: 1, + upload: false, + videos: undefined, + videoData: undefined, + otherLinkVisible: false, + type: "video", + isSpining: false, - liveId:undefined, + lives: undefined, + liveData: undefined, - liveVisible:false, - statistics:false, + liveId: undefined, - } - } + liveVisible: false, + statistics: false, - checkType=(type,page)=>{ - this.setState({ - type, - isSpining:true - }) - if(type === "video"){ - this.getList(page); - }else{ - this.getLiveList(page); - } - } + } + } - componentDidMount=()=>{ - const { search } = this.props.location; - const { page } = this.state; - if(search && search === "?open=live"){ - this.setState({ - type:"live" - }) - this.checkType("live",page); - }else{ - if(search === "?open=new"){ - this.setState({ - upload:true - }) - } - this.checkType("video",page); - } - } - componentDidUpdate = (prevProps) => { - if(this.props.match.params.videoId !== prevProps.match.params.videoId ){ - this.setState({ - upload:false - }) - const { page } = this.state; - this.checkType("video",page); - } - } - // 获取直播列表 - getLiveList=(page)=>{ - const CourseId=this.props.match.params.coursesId; - const url = `/courses/${CourseId}/live_links.json`; - axios.get(url,{ - params:{ - page, - limit:LIVE_PAGE_SIZE - } - }).then(result=>{ - if(result){ - this.setState({ - liveData:result.data, - lives:result.data.lives, - isSpining:false, - }) - } - }).catch(error=>{ - console.log(error); - }) - } + checkType = (type, page) => { + this.setState({ + type, + isSpining: true + }) + if (type === "video") { + this.getList(page); + } else { + this.getLiveList(page); + } + } - // 获取视频列表 - getList=(page)=>{ - const { coursesId , videoId }=this.props.match.params; - const fetchUrl = `/courses/${coursesId}/course_videos.json`; - axios.get(fetchUrl, { - params: { - page, - limit: PAGE_SIZE, - category_id:videoId - } - }) - .then((response) => { - if(response){ - this.setState({ - videos:response.data.videos, - videoData:response.data, - isSpining:false - }) - } - }).catch((error) => { - console.log(error); - }) - } + componentDidMount = () => { + const {search} = this.props.location; + const {page} = this.state; + if (search && search === "?open=live") { + this.setState({ + type: "live" + }) + this.checkType("live", page); + } else { + if (search === "?open=new") { + this.setState({ + upload: true + }) + } + this.checkType("video", page); + } + } + componentDidUpdate = (prevProps) => { + if (this.props.match.params.videoId !== prevProps.match.params.videoId) { + this.setState({ + upload: false + }) + const {page} = this.state; + this.checkType("video", page); + } + } + // 获取直播列表 + getLiveList = (page) => { + const CourseId = this.props.match.params.coursesId; + const url = `/courses/${CourseId}/live_links.json`; + axios.get(url, { + params: { + page, + limit: LIVE_PAGE_SIZE + } + }).then(result => { + if (result) { + this.setState({ + liveData: result.data, + lives: result.data.lives, + isSpining: false, + }) + } + }).catch(error => { + console.log(error); + }) + } - changeType=(e)=>{ - this.setState({ - type:e.key, - upload:false, - page:1 - }) - this.checkType(e.key,1); - } + // 获取视频列表 + getList = (page) => { + const {coursesId, videoId} = this.props.match.params; + const fetchUrl = `/courses/${coursesId}/course_videos.json`; + axios.get(fetchUrl, { + params: { + page, + limit: PAGE_SIZE, + category_id: videoId + } + }) + .then((response) => { + if (response) { + this.setState({ + videos: response.data.videos, + videoData: response.data, + isSpining: false + }) + } + }).catch((error) => { + console.log(error); + }) + } - changePage=(page,type)=>{ - this.setState({ - page - }) - this.checkType(type,page); - } + changeType = (e) => { + this.setState({ + type: e.key, + upload: false, + page: 1 + }) + this.checkType(e.key, 1); + } - onEditVideo=(item)=>{ - let videoId = { - videoId: item.id, - title: item.title - } - this.setState({ - videoId, - }) - this.setVisible(true); - } - uploadVideo=(upload)=>{ + changePage = (page, type) => { + this.setState({ + page + }) + this.checkType(type, page); + } + + onEditVideo = (item) => { + let videoId = { + videoId: item.id, + title: item.title + } + this.setState({ + videoId, + }) + this.setVisible(true); + } + uploadVideo = (upload) => { - this.setState({ - upload, - isSpining:true - }) - const { page } = this.state; - setTimeout(()=>{ - this.getList(page); - },500) - } + this.setState({ + upload, + isSpining: true + }) + const {page} = this.state; + setTimeout(() => { + this.getList(page); + }, 500) + } - toUpload =()=> { - const { admin , is_teacher,business} = this.props.user; - if (admin || business || (is_teacher && this.props.checkIfProfessionalCertification())) { - this.setState({ - type:"video", - upload:true, - page:1 - }) - } else { - this.props.showProfessionalCertificationDialog(); - } - } + toUpload = () => { + const {admin, is_teacher, business} = this.props.user; + if (admin || business || (is_teacher && this.props.checkIfProfessionalCertification())) { + this.setState({ + type: "video", + upload: true, + page: 1 + }) + } else { + this.props.showProfessionalCertificationDialog(); + } + } - // 直播设置后回调的方法 - // successFunc=()=>{ - // this.setState({ - // type:"live", - // page:1 - // }) - // this.checkType("live",1); - // } - // 直播设置 - liveSetting=()=>{ - this.setState({ - liveId:undefined - }) - this.setliveVisibel(true); - } - //直播设置弹框 - setliveVisibel=(flag,changetypeFlag)=>{ - this.setState({ - liveVisible:flag - }) - if(flag === false){ - this.setState({ - liveId:undefined - }) - } - if(changetypeFlag){ - this.checkType("live",1); - } - } - // 列表-编辑(修改传到编辑的id) - setLiveId=(id)=>{ - this.setState({ - liveId:id - }) - this.setliveVisibel(true); - } + // 直播设置后回调的方法 + // successFunc=()=>{ + // this.setState({ + // type:"live", + // page:1 + // }) + // this.checkType("live",1); + // } + // 直播设置 + liveSetting = () => { + this.setState({ + liveId: undefined + }) + this.setliveVisibel(true); + } + //直播设置弹框 + setliveVisibel = (flag, changetypeFlag) => { + this.setState({ + liveVisible: flag + }) + if (flag === false) { + this.setState({ + liveId: undefined + }) + } + if (changetypeFlag) { + this.checkType("live", 1); + } + } + // 列表-编辑(修改传到编辑的id) + setLiveId = (id) => { + this.setState({ + liveId: id + }) + this.setliveVisibel(true); + } - // 新增目录 - addDir=()=>{ - let {videoData}=this.state; - trigger('videoAdd', parseInt(videoData.course_module_id)); - } - // 目录重命名 - editDir=(name,id)=>{ - let data={id,name,update:this.getList} - trigger('editVideo',data); - } - // 增加外链 - setLinkeVisible=(flag,refresh)=>{ - this.setState({ - otherLinkVisible:flag - }) - if(refresh){ - const { page } = this.state; - this.getList(page); - } - } - //统计 - statisticsy=(bool)=>{ - this.setState({ - statistics:bool + // 新增目录 + addDir = () => { + let {videoData} = this.state; + trigger('videoAdd', parseInt(videoData.course_module_id)); + } + // 目录重命名 + editDir = (name, id) => { + let data = {id, name, update: this.getList} + trigger('editVideo', data); + } + // 增加外链 + setLinkeVisible = (flag, refresh) => { + this.setState({ + otherLinkVisible: flag + }) + if (refresh) { + const {page} = this.state; + this.getList(page); + } + } + //统计 + statisticsy = (bool) => { + this.setState({ + statistics: bool }) } - render(){ - const { videos , upload , videoData , type , liveData , lives , page , liveVisible , isSpining , liveId , otherLinkVisible,statistics } = this.state; - const { coursesId , videoId }=this.props.match.params; - let course_identity = this.props&&this.props.coursedata; - let is_teacher=this.props&&this.props.user&&this.props.user.is_teacher; - const flag = parseInt(course_identity) < 5; - const newOperation = flag; - const new_upload = flag && (is_teacher && this.props.checkIfProfessionalCertification()); - return( - - - - { - liveVisible ? - : - : + - } + } { - statistics===false? -
+ statistics === false ? +
{ videoData && videoData.category_name && type === "video" ? {videoData.category_name} : -
+
视频 直播 @@ -308,27 +312,32 @@ class VideoIndex extends Component{ newOperation ? this.statisticsy(true)} + onClick={() => this.statisticsy(true)} >统计 { videoId ? - this.editDir(videoData && videoData.category_name,videoId)} className={"ml30 font-16"}>目录重命名 + this.editDir(videoData && videoData.category_name, videoId)} + className={"ml30 font-16"}>目录重命名 : 新建目录 } - this.setLinkeVisible(true)}>增加外链 - :"" + this.setLinkeVisible(true)}>增加外链 + : "" } { new_upload ? { upload ? - this.uploadVideo(false)}>取消 + this.uploadVideo(false)}>取消 : 上传视频 } - :"" + + : "" } : @@ -338,44 +347,45 @@ class VideoIndex extends Component{
: - this.statisticsy(b)}> + this.statisticsy(b)}> } { - statistics===false? - - { - type === "video" ? - - : - - } - + statistics === false ? + + { + type === "video" ? + + : + + } + : "" } - - ) - } + + ) + } } + export default VideoIndex; diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js index 764ddcb1f..ff6af4d38 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js @@ -16,7 +16,7 @@ class Videostatisticscomtwo extends Component { this.state = { data: [], page: 1, - limit: 10, + limit: 20, members_count: 0, columnsstu: [ { diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js index 637ec306c..e3f671f36 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js @@ -89,7 +89,7 @@ class Videostatisticslist extends Component { loading:false, data:[], page:1, - limit:10, + limit:20, members_count:0, order:undefined, } @@ -134,7 +134,7 @@ class Videostatisticslist extends Component { let datalists = []; for (var i = 0; i < response.data.videos.length; i++) { datalists.push({ - number: (parseInt(this.state.spage) - 1) * parseInt(this.state.limit) + (i + 1), + number: (parseInt(this.state.page) - 1) * parseInt(this.state.limit) + (i + 1), title: response.data.videos[i].title, people_num: response.data.videos[i].people_num, total_time: response.data.videos[i].total_time, From ecdb91920fe791cd394d1c1d7f381999719347ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 16 Mar 2020 22:40:41 +0800 Subject: [PATCH 11/19] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/Videostatisticscomtwo.js | 29 +++++++++++++++---- .../component/Videostatisticslist.js | 21 ++++++++++++-- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js index ff6af4d38..f6a9b51de 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js @@ -38,7 +38,12 @@ class Videostatisticscomtwo extends Component { className: 'font-14 maxnamewidth100s', width: '100px', render: (text, record) => ( - {record.user_name} + + {record.user_name} + + ), }, { @@ -63,7 +68,9 @@ class Videostatisticscomtwo extends Component { sorter: true, sortDirections: sortDirections, render: (text, record) => ( - {record.total_duration} + {record.total_duration} ), }, { @@ -76,7 +83,11 @@ class Videostatisticscomtwo extends Component { sorter: true, sortDirections: sortDirections, render: (text, record) => ( - {record.feq} + + {record.feq} + ), }, { @@ -87,7 +98,11 @@ class Videostatisticscomtwo extends Component { className: 'font-14 maxnamewidth100s', width: '100px', render: (text, record) => ( - {record.start_at} + + {record.start_at} + ), }, { @@ -98,7 +113,11 @@ class Videostatisticscomtwo extends Component { className: 'font-14 maxnamewidth100s', width: '100px', render: (text, record) => ( - {record.end_at} + + {record.end_at} + ), } ], diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js index e3f671f36..c44102e45 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js @@ -34,7 +34,12 @@ class Videostatisticslist extends Component { className: 'font-14 maxnamewidth150s', width: '150px', render: (text, record) => ( - {record.title} + + {record.title} + + ), }, { @@ -60,7 +65,12 @@ class Videostatisticslist extends Component { sorter: true, sortDirections: sortDirections, render: (text, record) => ( - {record.total_time} + + {record.total_time} + + ), }, { @@ -71,7 +81,12 @@ class Videostatisticslist extends Component { className: 'font-14 maxnamewidth100s', width: '100px', render: (text, record) => ( - {record.user_name} + + {record.user_name} + + ), }, { From b4584ab3e88d283c0d68c1686ce6de4d1b401492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 16 Mar 2020 22:57:10 +0800 Subject: [PATCH 12/19] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/signin/css/signincdi.css | 6 ++++ .../component/Videostatisticscom.js | 2 +- .../component/Videostatisticscomtwo.js | 22 ++++++--------- .../component/Videostatisticslist.js | 28 ++++++++----------- 4 files changed, 26 insertions(+), 32 deletions(-) diff --git a/public/react/src/modules/courses/signin/css/signincdi.css b/public/react/src/modules/courses/signin/css/signincdi.css index 7ad9a0d0c..bd45185b9 100644 --- a/public/react/src/modules/courses/signin/css/signincdi.css +++ b/public/react/src/modules/courses/signin/css/signincdi.css @@ -188,6 +188,12 @@ padding-top: 20px; padding-bottom: 20px; } +.teacherentrydivss{ + padding-left: 20px; + padding-right: 20px; + padding-top: 20px; + padding-bottom: 20px; +} .teachedivp{ font-size:16px; font-family:Microsoft YaHei; diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js index 457c6d1f3..1111b6509 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js @@ -33,7 +33,7 @@ class Videostatisticscom extends Component {
-
+
视频统计总览
播放数据从{this.props.watch_staticsdata&&this.props.watch_staticsdata.begin_at?this.props.watch_staticsdata.begin_at:0}开始统计
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js index f6a9b51de..ed72d6bb2 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js @@ -1,6 +1,6 @@ import React, {Component} from "react"; import '../../signin/css/signincdi.css'; -import {Pagination, Table, Menu, Dropdown} from 'antd'; +import {Pagination, Table, Menu, Dropdown,Spin} from 'antd'; import {getImageUrl, sortDirections} from 'educoder'; import axios from 'axios'; import LoadingSpin from "../../../../common/LoadingSpin"; @@ -98,7 +98,7 @@ class Videostatisticscomtwo extends Component { className: 'font-14 maxnamewidth100s', width: '100px', render: (text, record) => ( - + {record.start_at} @@ -113,7 +113,7 @@ class Videostatisticscomtwo extends Component { className: 'font-14 maxnamewidth100s', width: '100px', render: (text, record) => ( - + {record.end_at} @@ -428,7 +428,7 @@ class Videostatisticscomtwo extends Component { return (
-
+
视频名称视频名称…
- { - loading === true ? -
- -
- : -
+ +
{ data.length === 0 ?
: + + } - } diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js index c44102e45..e26e1d48b 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js @@ -1,6 +1,6 @@ import React, {Component} from "react"; import '../../signin/css/signincdi.css'; -import {Pagination,Table} from 'antd'; +import {Pagination,Table,Spin} from 'antd'; import {getImageUrl,sortDirections} from 'educoder'; import axios from 'axios'; import LoadingSpin from "../../../../common/LoadingSpin"; @@ -60,13 +60,13 @@ class Videostatisticslist extends Component { dataIndex: 'total_time', key: 'total_time', align: "center", - className: 'font-14 maxnamewidth150s', - width: '150px', + className: 'font-14 maxnamewidth100s', + width: '100px', sorter: true, sortDirections: sortDirections, render: (text, record) => ( - - + {record.total_time} @@ -95,9 +95,9 @@ class Videostatisticslist extends Component { key: 'id', align: "center", className: 'font-14', - width: '90px', + width: '50px', render: (text, record) => ( - this.props.tisticsbools(true,record.id)}>详情 + this.props.tisticsbools(true,record.id)}>详情 ), } ], @@ -250,7 +250,7 @@ class Videostatisticslist extends Component {
-
+
统计详情
@@ -265,14 +265,7 @@ class Videostatisticslist extends Component { ` } - { - loading===true? -
- -
- : +
{ data.length===0? @@ -282,6 +275,7 @@ class Videostatisticslist extends Component {
: +
+ } - } From 173a7932cdbf326f384810365c655ef0d0a5e5f0 Mon Sep 17 00:00:00 2001 From: dinglink <837816638@qq.com> Date: Mon, 16 Mar 2020 23:00:07 +0800 Subject: [PATCH 13/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/user/usersInfo/video/VideoInReviewItem.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/video/VideoInReviewItem.js b/public/react/src/modules/user/usersInfo/video/VideoInReviewItem.js index 299af0d08..71b16fab2 100644 --- a/public/react/src/modules/user/usersInfo/video/VideoInReviewItem.js +++ b/public/react/src/modules/user/usersInfo/video/VideoInReviewItem.js @@ -74,7 +74,8 @@ function VideoInReviewItem (props) {
{/*
累计学习时长:{play_duration} h
*/} {/* {moment(published_at || created_at).format('YYYY-MM-DD HH:mm:ss')}{people_num} */} - {link ? :累计学习时长:{ + + {link||total_time===undefined? :累计学习时长:{ formatSeconds(total_time)} {/* total_time<60?total_time+' s':total_time/60<60?(total_time/60).toFixed(0)+' min':(total_time/3600).toFixed(1)+ ' h' */} } @@ -82,7 +83,7 @@ function VideoInReviewItem (props) {
{/* 2019-09-01 10:00:22 */} - {!people_num || (people_num && people_num)===0 ? "" : + {total_time===undefined?'':!people_num || (people_num && people_num)===0 ? "" : {!people_num || (people_num && people_num)===0?"":people_num} } From ef115d75bb1548bf224b3730dfbb4b57598eeff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 16 Mar 2020 23:03:09 +0800 Subject: [PATCH 14/19] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/videostatistics/component/Videostatisticslist.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js index e26e1d48b..21f3ed9a0 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js @@ -1,7 +1,7 @@ import React, {Component} from "react"; import '../../signin/css/signincdi.css'; import {Pagination,Table,Spin} from 'antd'; -import {getImageUrl,sortDirections} from 'educoder'; +import {getImageUrl,sortDirections,formatSeconds} from 'educoder'; import axios from 'axios'; import LoadingSpin from "../../../../common/LoadingSpin"; import NoneDatas from "../../signin/component/NoneDatas"; @@ -152,7 +152,7 @@ class Videostatisticslist extends Component { number: (parseInt(this.state.page) - 1) * parseInt(this.state.limit) + (i + 1), title: response.data.videos[i].title, people_num: response.data.videos[i].people_num, - total_time: response.data.videos[i].total_time, + total_time: response.data.videos[i].total_time?formatSeconds(response.data.videos[i].total_time):0, user_name: response.data.videos[i].user_name, id: response.data.videos[i].id, }) From 2909a653b71e0f7fec9380dfb9d1432cd205e670 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 16 Mar 2020 23:05:05 +0800 Subject: [PATCH 15/19] =?UTF-8?q?vnc=E5=AE=9E=E8=AE=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 7015cca40..614008112 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -973,15 +973,15 @@ class GamesController < ApplicationController if res && res['code'].to_i != 0 raise("实训云平台繁忙(繁忙等级:99)") end - # @vnc_url = res['showServer'] - @vnc_url = - if request.subdomain == "pre-newweb" || request.subdomain == "test-newweb" - # 无域名版本 - "http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless" - else - # 有域名版本 - "https://#{res['port']}.#{service_host}/vnc_lite.html?password=headless" - end + @vnc_url = res['showServer'] + # @vnc_url = + # if request.subdomain == "pre-newweb" || request.subdomain == "test-newweb" + # # 无域名版本 + # "http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless" + # else + # # 有域名版本 + # "https://#{res['port']}.#{service_host}/vnc_lite.html?password=headless" + # end @vnc_evaluate = shixun.vnc_evaluate rescue Exception => e Rails.logger.error(e.message) From a5ec23163c4f08437e6fdadf4c379c6b41ba5574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 16 Mar 2020 23:07:03 +0800 Subject: [PATCH 16/19] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../videostatistics/component/Videostatisticscomtwo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js index ed72d6bb2..d7773b523 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js @@ -1,7 +1,7 @@ import React, {Component} from "react"; import '../../signin/css/signincdi.css'; import {Pagination, Table, Menu, Dropdown,Spin} from 'antd'; -import {getImageUrl, sortDirections} from 'educoder'; +import {getImageUrl, sortDirections,formatSeconds} from 'educoder'; import axios from 'axios'; import LoadingSpin from "../../../../common/LoadingSpin"; import NoneDatas from "../../signin/component/NoneDatas"; @@ -202,7 +202,7 @@ class Videostatisticscomtwo extends Component { number: (parseInt(this.state.page) - 1) * parseInt(this.state.limit) + (i + 1), user_name: response.data.data[i].user_name, is_finished: response.data.data[i].is_finished, - total_duration: response.data.data[i].total_duration, + total_duration: response.data.data[i].total_duration?formatSeconds(response.data.data[i].total_duration):0, feq: response.data.data[i].feq, start_at: response.data.data[i].start_at, end_at: response.data.data[i].end_at, From 7080485c62b962580bd92e00e0dfa1825206c45d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 17 Mar 2020 00:03:51 +0800 Subject: [PATCH 17/19] =?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/ListPageIndex.js | 40 +++- .../src/modules/courses/Video/VideoIndex.js | 28 ++- .../courses/common/CourseLayoutComponent.js | 156 ++++++------- .../courses/coursesDetail/CoursesDetail.js | 211 +++++++++--------- .../courses/coursesDetail/CoursesLeftNav.js | 26 ++- 5 files changed, 258 insertions(+), 203 deletions(-) diff --git a/public/react/src/modules/courses/ListPageIndex.js b/public/react/src/modules/courses/ListPageIndex.js index 6743cc3f7..628ee17e8 100644 --- a/public/react/src/modules/courses/ListPageIndex.js +++ b/public/react/src/modules/courses/ListPageIndex.js @@ -102,7 +102,8 @@ class ListPageIndex extends Component{ this.state={ yslGuideone:undefined, yslElearning:false, - isexcellent:false + isexcellent:false, + homedirectory:false, } } comyslElearning(bool){ @@ -183,6 +184,21 @@ class ListPageIndex extends Component{ updatabanners=()=>{ this.refs.CoursesBanner.updatabanner() } + + //是否点击了目录 + Callhomedirectoryornot=(bool)=>{ + this.setState({ + homedirectory:bool + }) + if(bool===true){ + setTimeout(() => { + this.setState({ + homedirectory:false, + }) + }, 1000); + } + + } render() { let {yslGuideone} =this.state; // console.log("98"); @@ -218,7 +234,7 @@ class ListPageIndex extends Component{ {/*left_nav*/}
- this.comyslElearning(i)}/> + this.comyslElearning(i)} myinex={true} Callhomedirectoryornot={(b)=>this.Callhomedirectoryornot(b)}/>
{/*right_concent*/} @@ -261,16 +277,16 @@ class ListPageIndex extends Component{ } > {/*视频列表*/} - () - } - > - () - } - > + () + } + > + () + } + > {/* 教师列表*/} { + if (this.props.homedirectory !== prevProps.homedirectory) { + if(this.props.homedirectory ===true){ + this.setState({ + statistics:false, + }) + } + } if (this.props.match.params.videoId !== prevProps.match.params.videoId) { this.setState({ - upload: false + upload: false, }) const {page} = this.state; this.checkType("video", page); } + + } // 获取直播列表 getLiveList = (page) => { @@ -239,9 +247,11 @@ class VideoIndex extends Component { } //统计 statisticsy = (bool) => { + this.setState({ - statistics: bool + statistics: bool, }) + } render() { @@ -311,16 +321,20 @@ class VideoIndex extends Component { { newOperation ? - this.statisticsy(true)} - >统计 { videoId ? this.editDir(videoData && videoData.category_name, videoId)} className={"ml30 font-16"}>目录重命名 : - 新建目录 + + + this.statisticsy(true)} + >统计 + 新建目录 + + } this.setLinkeVisible(true)}>增加外链 diff --git a/public/react/src/modules/courses/common/CourseLayoutComponent.js b/public/react/src/modules/courses/common/CourseLayoutComponent.js index c88bd8798..80bff60cd 100644 --- a/public/react/src/modules/courses/common/CourseLayoutComponent.js +++ b/public/react/src/modules/courses/common/CourseLayoutComponent.js @@ -1,78 +1,78 @@ -import React, { Component } from 'react'; -import axios from 'axios'; -import {Input,Pagination,Tooltip} from 'antd'; - -//业务组件 -import CoursesBanner from "../coursesDetail/CoursesBanner"; -import Coursesleftnav from "../coursesDetail/CoursesLeftNav"; - -class CourseLayoutcomponent extends Component{ - constructor(props) { - super(props) - } - - componentDidMount(){ - - } - // - // getleftNavid=(navid,newselectnavid)=>{ - // console.log(navid,newselectnavid) - // this.setState({ - // navkey:navid, - // navttype:newselectnavid - // }) - // } - - render() { - // 加 , ...this.props 样式会出现2份children - const childrenWithProps = React.Children.map(this.props.children, child => { - // debugger; - if(!child) { - return '' - } - return React.cloneElement(child, { ...this.state }) - } - - ); - // console.log("CoursesBanner") - // console.log(this.props) - - return ( -
-
- {/*头部banner*/} - - -
- -
-
-
-
-
- - {/*left_nav*/} -
- -
- - {/*right_concent*/} -
-
- {childrenWithProps} -
-
- -
-
-
-
-
- -
-
-
- ) - } -} -export default CourseLayoutcomponent; \ No newline at end of file +import React, { Component } from 'react'; +import axios from 'axios'; +import {Input,Pagination,Tooltip} from 'antd'; + +//业务组件 +import CoursesBanner from "../coursesDetail/CoursesBanner"; +import Coursesleftnav from "../coursesDetail/CoursesLeftNav"; + +class CourseLayoutcomponent extends Component{ + constructor(props) { + super(props) + } + + componentDidMount(){ + + } + // + // getleftNavid=(navid,newselectnavid)=>{ + // console.log(navid,newselectnavid) + // this.setState({ + // navkey:navid, + // navttype:newselectnavid + // }) + // } + + render() { + // 加 , ...this.props 样式会出现2份children + const childrenWithProps = React.Children.map(this.props.children, child => { + // debugger; + if(!child) { + return '' + } + return React.cloneElement(child, { ...this.state }) + } + + ); + // console.log("CoursesBanner") + // console.log(this.props) + + return ( +
+
+ {/*头部banner*/} + + +
+ +
+
+
+
+
+ + {/*left_nav*/} +
+ +
+ + {/*right_concent*/} +
+
+ {childrenWithProps} +
+
+ +
+
+
+
+
+ +
+
+
+ ) + } +} +export default CourseLayoutcomponent; diff --git a/public/react/src/modules/courses/coursesDetail/CoursesDetail.js b/public/react/src/modules/courses/coursesDetail/CoursesDetail.js index 8a5519d2e..0c7e49f00 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesDetail.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesDetail.js @@ -1,105 +1,106 @@ -import React, { Component } from 'react'; -import axios from 'axios'; -import {Input,Pagination,Tooltip} from 'antd'; - -//业务组件 -//top banner -import CoursesBanner from "./CoursesBanner"; -//Left nav -import Coursesleftnav from "./CoursesLeftNav"; - - -// 实训作业 -import ShixunHomework from '../shixunHomework/shixunHomework'; -// 问卷 -import Poll from '../poll/Poll'; -// 试卷 -import Exercise from '../exercise/Exercise'; - -//教师列表 -import TeacherList from "../members/teacherList" -//普通作业 -import CommonWork from "../busyWork/commonWork" -// 毕设选题 -import graduationTopics from '../graduation/topics/index' - -class CoursesDetail extends Component{ - constructor(props) { - super(props) - this.state = { - getleftNavid:undefined, - coursesId:"" - } - } - - componentDidMount(){ - - } - getleftNavid=(type,id)=>{ - console.log(type+" "+id) - this.setState({ - getleftNavid:type, - coursesId:id - }) - } - render() { - let{getleftNavid,coursesId}=this.state; - - // console.log(getleftNavid) - return ( -
-
- {/*头部banner*/} - - -
- -
-
-
-
-
- - {/*left_nav*/} -
- -
- - {/*right_concent*/} -
-
- {/* 毕设选题 */} - {getleftNavid==="graduation"?:""} - - {/*/!*普通作业*!/*/} - {/*{getleftNavid==="common_homework"?:""}*/} - - - {/*{getleftNavid==="shixun_homeworkchild"?:""}*/} - - - {/*/!*问卷*!/*/} - {/*{getleftNavid==="poll"?:""}*/} - {/*/!*试卷*!/*/} - {/*{getleftNavid==="exercise"?:""}*/} - - -
-
- -
-
-
-
-
- -
-
-
- ) - } -} -export default CoursesDetail; \ No newline at end of file +import React, { Component } from 'react'; +import axios from 'axios'; +import {Input,Pagination,Tooltip} from 'antd'; + +//业务组件 +//top banner +import CoursesBanner from "./CoursesBanner"; +//Left nav +import Coursesleftnav from "./CoursesLeftNav"; + + +// 实训作业 +import ShixunHomework from '../shixunHomework/shixunHomework'; +// 问卷 +import Poll from '../poll/Poll'; +// 试卷 +import Exercise from '../exercise/Exercise'; + +//教师列表 +import TeacherList from "../members/teacherList" +//普通作业 +import CommonWork from "../busyWork/commonWork" +// 毕设选题 +import graduationTopics from '../graduation/topics/index' + +class CoursesDetail extends Component{ + constructor(props) { + super(props) + this.state = { + getleftNavid:undefined, + coursesId:"" + } + } + + componentDidMount(){ + + } + getleftNavid=(type,id)=>{ + console.log(type+" "+id) + this.setState({ + getleftNavid:type, + coursesId:id + }) + } + render() { + let{getleftNavid,coursesId}=this.state; + + // console.log(getleftNavid) + return ( +
+
+ {/*头部banner*/} + + +
+ +
+
+
+
+
+ + {/*left_nav*/} +
+ +
+ + {/*right_concent*/} +
+
+ {/* 毕设选题 */} + {getleftNavid==="graduation"?:""} + + {/*/!*普通作业*!/*/} + {/*{getleftNavid==="common_homework"?:""}*/} + + + {/*{getleftNavid==="shixun_homeworkchild"?:""}*/} + + + {/*/!*问卷*!/*/} + {/*{getleftNavid==="poll"?:""}*/} + {/*/!*试卷*!/*/} + {/*{getleftNavid==="exercise"?:""}*/} + + +
+
+ +
+
+
+
+
+ +
+
+
+ ) + } +} +export default CoursesDetail; diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index 1c53a1efb..409b3bd6c 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -347,7 +347,16 @@ class Coursesleftnav extends Component{ indexs:index }) // this.props.history.replace(urls); - e.stopPropagation();//阻止冒泡 + try { + if(this.props.myinex===true){ + this.props.Callhomedirectoryornot(true); + + } + }catch (e) { + + } + + e.stopPropagation();//阻止冒泡 } selectnavids=(e,key,id,type,urls,index)=>{ @@ -359,6 +368,14 @@ class Coursesleftnav extends Component{ }) this.props.updataleftNavfun(); this.props.history.replace(urls); + try { + if(this.props.myinex===true){ + this.props.Callhomedirectoryornot(true); + + } + }catch (e) { + + } e.stopPropagation();//阻止冒泡 } @@ -885,6 +902,13 @@ class Coursesleftnav extends Component{ url:urls, indexs:index }) + try { + if(this.props.myinex===true){ + this.props.Callhomedirectoryornot(true); + } + }catch (e) { + + } this.props.history.replace(urls); e.stopPropagation();//阻止冒泡 } From bc4d06eee56ada0af80ca7fca97c4be2043f7c04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 17 Mar 2020 00:24:56 +0800 Subject: [PATCH 18/19] =?UTF-8?q?=E7=AD=BE=E5=88=B0=20=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=20=E7=82=B9=E5=87=BB=E7=9B=AE=E5=BD=95=20?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/Video/VideoIndex.js | 15 ++++++++++----- .../src/modules/courses/signin/css/signincdi.css | 11 +++++++++++ .../courses/signin/teacher/Teachers_signin.js | 12 +++++++++++- .../component/Videostatisticscomtwo.js | 6 +++--- .../component/Videostatisticslist.js | 2 +- 5 files changed, 36 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/Video/VideoIndex.js b/public/react/src/modules/courses/Video/VideoIndex.js index d1ac45fe1..d8e600f4c 100644 --- a/public/react/src/modules/courses/Video/VideoIndex.js +++ b/public/react/src/modules/courses/Video/VideoIndex.js @@ -74,13 +74,18 @@ class VideoIndex extends Component { } } componentDidUpdate = (prevProps) => { - if (this.props.homedirectory !== prevProps.homedirectory) { - if(this.props.homedirectory ===true){ - this.setState({ - statistics:false, - }) + try { + if (this.props.homedirectory !== prevProps.homedirectory) { + if(this.props.homedirectory ===true){ + this.setState({ + statistics:false, + }) + } } + }catch (e) { + } + if (this.props.match.params.videoId !== prevProps.match.params.videoId) { this.setState({ upload: false, diff --git a/public/react/src/modules/courses/signin/css/signincdi.css b/public/react/src/modules/courses/signin/css/signincdi.css index bd45185b9..a7fbbb20a 100644 --- a/public/react/src/modules/courses/signin/css/signincdi.css +++ b/public/react/src/modules/courses/signin/css/signincdi.css @@ -188,6 +188,9 @@ padding-top: 20px; padding-bottom: 20px; } +.pdinstop0{ + padding-top: 0px !important; +} .teacherentrydivss{ padding-left: 20px; padding-right: 20px; @@ -414,6 +417,14 @@ white-space:nowrap; cursor: default; } +.maxnamewidth200yss{ + text-align: center; + max-width:200px; + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap; + cursor: default; +} .maxnamewidth100s{ width: 100px; max-width: 100px; diff --git a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js index bda49fa6a..7d814ac47 100644 --- a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js +++ b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js @@ -49,6 +49,7 @@ class Students_signin extends Component{ page:1, limit:5 } + this.gogetdatas(data); // const query = this.props.location.search; @@ -58,8 +59,17 @@ class Students_signin extends Component{ } componentDidUpdate = (prevProps) => { + try { + if (this.props.homedirectory !== prevProps.homedirectory) { + if(this.props.homedirectory ===true){ + this.setState({ + switchs:false, + }) + } + } + }catch (e) { - + } } callback=(key)=> { diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js index d7773b523..637a2a0fd 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js @@ -404,7 +404,7 @@ class Videostatisticscomtwo extends Component { this.setcourse_groups(null)}> -

全部

+

全部

{ @@ -414,7 +414,7 @@ class Videostatisticscomtwo extends Component { return ( this.setcourse_groups(item.id)} key={key}> -

{item.name}

+

{item.name}

) @@ -472,7 +472,7 @@ class Videostatisticscomtwo extends Component { } -
+
{ data.length === 0 ?
-
+
{ data.length===0?
Date: Tue, 17 Mar 2020 00:51:20 +0800 Subject: [PATCH 19/19] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 2 +- .../src/modules/courses/Video/VideoIndex.js | 26 ++++++++++++++----- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 043c0f78d..fee6eb724 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -46,7 +46,7 @@ debugType="admin"; // 老师 // debugType="teacher"; // 学生 -//debugType="student"; +// debugType="student"; diff --git a/public/react/src/modules/courses/Video/VideoIndex.js b/public/react/src/modules/courses/Video/VideoIndex.js index d8e600f4c..e2b3a0841 100644 --- a/public/react/src/modules/courses/Video/VideoIndex.js +++ b/public/react/src/modules/courses/Video/VideoIndex.js @@ -268,6 +268,9 @@ class VideoIndex extends Component { const newOperation = flag; const new_upload = flag && (is_teacher && this.props.checkIfProfessionalCertification()); + const isAdmin = this.props&& this.props.isAdmin(); + + return ( + + { + videoId ? + "" + : + this.statisticsy(true)} + >统计 + } + + { newOperation ? @@ -332,13 +346,7 @@ class VideoIndex extends Component { onClick={() => this.editDir(videoData && videoData.category_name, videoId)} className={"ml30 font-16"}>目录重命名 : - - - this.statisticsy(true)} - >统计 - 新建目录 - + 新建目录 } : "" } + + + + : 添加直播