hjm 5 years ago
commit 4a63b7da23

@ -274,7 +274,7 @@ class App extends Component {
<Switch> <Switch>
{/*<Route path="/login" component={LoginRegisterPage}/>*/} {/*<Route path="/login" component={LoginRegisterPage}/>*/}
{/*认证*/} {/*认证*/}
<Route path="/account" component={AccountPage}/> <Route path="/profile" component={AccountPage}/>
{/*403*/} {/*403*/}
<Route path="/403" component={Shixunauthority}/> <Route path="/403" component={Shixunauthority}/>

@ -159,8 +159,8 @@ class Startshixuntask extends Component{
{this.props.isStudent? {this.props.isStudent?
<span> <span>
{this.props.data.task_operation&&this.props.data.task_operation?startbtn===false?<span onClick={()=>this.taskoperationId( this.props.data.task_operation[1])}> {this.props.data&&this.props.data.task_operation&&this.props.data.task_operation?startbtn===false?<span onClick={()=>this.taskoperationId( this.props.data&&this.props.data.task_operation[1])}>
{this.props.data.task_operation[0]} {this.props.data&&this.props.data.task_operation[0]}
</span>:"":""} </span>:"":""}
</span>:"" </span>:""
} }

@ -891,37 +891,34 @@ class GraduationTaskssettingapp extends Component{
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){ this.refs.DownloadMessage.confirmysl(url);
}else if(response.data.status&&response.data.status===-2){ // axios.get(url).then((response) => {
if(response.data.messages === "100"){ // if(response.data.status&&response.data.status===-1){
// 已超出文件导出的上限数量100 ),建议:
// }else if(response.data.status&&response.data.status===-2){
this.setState({ // if(response.data.messages === "100"){
DownloadType:true, // // 已超出文件导出的上限数量100 ),建议:
DownloadMessageval:100
}) // this.setState({
}else { // DownloadType:true,
//因附件资料超过500M // DownloadMessageval:100
this.setState({ // })
DownloadType:true, // }else {
DownloadMessageval:500 // //因附件资料超过500M
}) // this.setState({
} // DownloadType:true,
}else { // DownloadMessageval:500
this.props.showNotification(`正在下载中`); // })
window.open("/api"+url, '_blank'); // }
} // }else {
}).catch((error) => { // this.props.showNotification(`正在下载中`);
console.log(error) // window.open("/api"+url, '_blank');
}); // }
} // }).catch((error) => {
Downloadcal=()=>{ // console.log(error)
this.setState({ // });
DownloadType:false,
DownloadMessageval:undefined
})
} }
render(){ render(){
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
@ -998,10 +995,8 @@ class GraduationTaskssettingapp extends Component{
{/*skipTop={this.skipTop}*/} {/*skipTop={this.skipTop}*/}
{/*/>*/} {/*/>*/}
<DownloadMessage <DownloadMessage
{...this.props} {...this.props}
value={this.state.DownloadMessageval} ref="DownloadMessage"
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/> />
<HomeworkModal <HomeworkModal
starttimes={this.state.starttimes} starttimes={this.state.starttimes}

@ -41,7 +41,7 @@ class GraduationTaskssettinglist extends Component{
cross_comment:null, cross_comment:null,
search:null, search:null,
order:"updated_at", order:"updated_at",
b_order:"asc", b_order:"desc",
course_group:undefined, course_group:undefined,
loadingstate:true, loadingstate:true,
operationId:null, operationId:null,

@ -191,31 +191,32 @@ class GraduationTasksquestions extends Component{
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
axios.get(url).then((response) => { this.refs.DownloadMessage.confirmysl(url);
if(response.data.status&&response.data.status===-1){ // axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){ // }else if(response.data.status&&response.data.status===-2){
// 已超出文件导出的上限数量100 ),建议: // if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true, // this.setState({
DownloadMessageval:100 // DownloadType:true,
}) // DownloadMessageval:100
}else { // })
//因附件资料超过500M // }else {
this.setState({ // //因附件资料超过500M
DownloadType:true, // this.setState({
DownloadMessageval:500 // DownloadType:true,
}) // DownloadMessageval:500
} // })
}else { // }
this.props.showNotification(`正在下载中`); // }else {
window.open("/api"+url, '_blank'); // this.props.showNotification(`正在下载中`);
} // window.open("/api"+url, '_blank');
}).catch((error) => { // }
console.log(error) // }).catch((error) => {
}); // console.log(error)
// });
} }
Downloadcal=()=>{ Downloadcal=()=>{
this.setState({ this.setState({
@ -256,9 +257,7 @@ class GraduationTasksquestions extends Component{
{/*/>*/} {/*/>*/}
<DownloadMessage <DownloadMessage
{...this.props} {...this.props}
value={this.state.DownloadMessageval} ref="DownloadMessage"
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/> />
<HomeworkModal <HomeworkModal
starttimes={this.state.starttimes} starttimes={this.state.starttimes}

@ -9,6 +9,8 @@ import PollTabSecond from './PollDetailTabSecond'
import PollTabThird from './PollDetailTabThird' import PollTabThird from './PollDetailTabThird'
import PollTabForth from './PollDetailTabForth' import PollTabForth from './PollDetailTabForth'
import DownloadMessage from '../../modals/DownloadMessage';
import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish' import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish'
import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd' import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd'
import CancelPublish from './pollPublicBtn/CancelPublish' import CancelPublish from './pollPublicBtn/CancelPublish'
@ -69,6 +71,10 @@ class PollDetailIndex extends Component{
}) })
} }
confirmysl(url){
this.refs.DownloadMessage.confirmysl(url);
}
render(){ render(){
let {tab,pollDetail,user_permission}=this.state; let {tab,pollDetail,user_permission}=this.state;
@ -76,6 +82,7 @@ class PollDetailIndex extends Component{
const isStudent = this.props.isStudent(); const isStudent = this.props.isStudent();
return( return(
<div className="newMain"> <div className="newMain">
<DownloadMessage {...this.props} ref="DownloadMessage" />
<div className="educontent mt10 mb50"> <div className="educontent mt10 mb50">
<p className="clearfix mb20"> <p className="clearfix mb20">
<WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/students`}>{this.props.coursedata.name}</WordsBtn> <WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/students`}>{this.props.coursedata.name}</WordsBtn>
@ -152,7 +159,7 @@ class PollDetailIndex extends Component{
</li> </li>
:"" :""
} */} } */}
<a className="fl color-blue font-16" href={`/api/polls/${this.props.match.params.pollId}/commit_result.xlsx`}>导出统计</a> <a className="fl color-blue font-16" onClick={()=>this.confirmysl("/polls/"+this.props.match.params.pollId+"/commit_result.xlsx")} href="javascript:void(0);">导出统计</a>
</span> </span>
} }
{ {

@ -38,11 +38,13 @@
.problemShow:last-child{ .problemShow:last-child{
border-bottom: none; border-bottom: none;
} }
.invite-tipysls{position: absolute;top: -8px;right: 140px;color: #fff; box-sizing: border-box;width: 170px;text-align: center;border-radius: 2px;background-color: rgba(5,16,26,0.6)}
.yslinvitetip{display: block;border-width: 8px;position: absolute;top: 10px;right: -16px;border-style: dashed solid dashed dashed;border-color: transparent transparent transparent rgba(5,16,26,0.6);font-size: 0;line-height: 0;} .yslinvitetip{display: block;border-width: 8px;position: absolute;top: 10px;right: -16px;border-style: dashed solid dashed dashed;border-color: transparent transparent transparent rgba(5,16,26,0.6);font-size: 0;line-height: 0;}
.right-black-trangle{border-width: 8px;position: absolute;top: 10px;left: -16px;border-style: dashed solid dashed dashed;border-color: transparent transparent transparent rgba(5,16,26,0.6);font-size: 0;line-height: 0;} .right-black-trangle{border-width: 8px;position: absolute;top: 10px;left: -16px;border-style: dashed solid dashed dashed;border-color: transparent transparent transparent rgba(5,16,26,0.6);font-size: 0;line-height: 0;}
.right-black-trangles{border-width: 8px;position: absolute;top: 10px;left: -16px;border-style: dashed solid dashed dashed;border-color: transparent rgba(5,16,26,0.6) transparent transparent;font-size: 0;line-height: 0;} .right-black-trangles{border-width: 8px;position: absolute;top: 10px;left: -16px;border-style: dashed solid dashed dashed;border-color: transparent rgba(5,16,26,0.6) transparent transparent;font-size: 0;line-height: 0;}
.top-black-trangle{border-width: 8px;position: absolute;top: -16px;right: 4px;border-style: dashed solid dashed dashed;border-color: transparent transparent rgba(5,16,26,0.6) transparent;font-size: 0;line-height: 0;} .top-black-trangle{border-width: 8px;position: absolute;top: -16px;right: 4px;border-style: dashed solid dashed dashed;border-color: transparent transparent rgba(5,16,26,0.6) transparent;font-size: 0;line-height: 0;}
.invite-tipysl{color: #999999; box-sizing: border-box;text-align: center;border-radius: 2px;font-size: 14px} .invite-tipysl{color: #999999; box-sizing: border-box;text-align: center;border-radius: 2px;font-size: 14px}
.edu-position-hideysl li a:hover{ background:#F1F1F1; color:#05101A;}
.to-back-left { .to-back-left {
width: 0; width: 0;
height: 0; height: 0;

@ -155,7 +155,7 @@ class CommitSummary extends Component{
className="mdInForm"> className="mdInForm">
{getFieldDecorator('description', { {getFieldDecorator('description', {
rules: [{ rules: [{
required: true, message: '请输入帖子内容', required: true, message: '请在此输入总结内容,最多5000个字符',
}, { }, {
max: 5000, message: '最大限制为5000个字符', max: 5000, message: '最大限制为5000个字符',
}], }],

@ -89,7 +89,7 @@ class Homeworddescription extends Component {
{/*<TextArea placeholder="作业说明..." value={this.state.description} onInput={this.settextarea} style={{"height": "120px"}}/>*/} {/*<TextArea placeholder="作业说明..." value={this.state.description} onInput={this.settextarea} style={{"height": "120px"}}/>*/}
{/*<TextArea style={{"height": "120px"}}*/} {/*<TextArea style={{"height": "120px"}}*/}
{/* autoComplete="off" ></TextArea>*/} {/* autoComplete="off" ></TextArea>*/}
<TPMMDEditor ref={this.mdRef} placeholder={'作业说明'} <TPMMDEditor ref={this.mdRef} placeholder={'请输入作业说明'}
mdID={'courseMessageMD'} initValue={this.state.description} className="courseMessageMD" onChange={this.settextarea} style={{"height": "120px"}}></TPMMDEditor> mdID={'courseMessageMD'} initValue={this.state.description} className="courseMessageMD" onChange={this.settextarea} style={{"height": "120px"}}></TPMMDEditor>
</Form.Item> </Form.Item>
<div className="clearfix mt10"> <div className="clearfix mt10">

@ -29,6 +29,7 @@ import Associationmodel from '../coursesPublic/Associationmodel';
import '../css/members.css' import '../css/members.css'
import '../css/busyWork.css' import '../css/busyWork.css'
import '../poll/pollStyle.css' import '../poll/pollStyle.css'
import './style.css';
import moment from 'moment'; import moment from 'moment';
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
import {getImageUrl, toPath} from 'educoder'; import {getImageUrl, toPath} from 'educoder';
@ -140,7 +141,6 @@ class Listofworks extends Component {
dataIndex: 'classroom', dataIndex: 'classroom',
align: 'center', align: 'center',
className:'font-14', className:'font-14',
width:"260px",
render: (text, record) => ( render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span> <span style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>
) )
@ -386,7 +386,6 @@ class Listofworks extends Component {
dataIndex: 'classroom', dataIndex: 'classroom',
align: 'center', align: 'center',
className:'font-14', className:'font-14',
width:"260px",
render: (text, record) => ( render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span> <span style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>
) )
@ -1333,31 +1332,32 @@ class Listofworks extends Component {
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
axios.get(url).then((response) => { this.refs.DownloadMessage.confirmysl(url);
if(response.data.status&&response.data.status===-1){ // axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){ // }else if(response.data.status&&response.data.status===-2){
// 已超出文件导出的上限数量100 ),建议: // if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true, // this.setState({
DownloadMessageval:100 // DownloadType:true,
}) // DownloadMessageval:100
}else { // })
//因附件资料超过500M // }else {
this.setState({ // //因附件资料超过500M
DownloadType:true, // this.setState({
DownloadMessageval:500 // DownloadType:true,
}) // DownloadMessageval:500
} // })
}else { // }
this.props.showNotification(`正在下载中`); // }else {
window.open("/api"+url, '_blank'); // this.props.showNotification(`正在下载中`);
} // window.open("/api"+url, '_blank');
}).catch((error) => { // }
console.log(error) // }).catch((error) => {
}); // console.log(error)
// });
} }
Downloadcal=()=>{ Downloadcal=()=>{
@ -1397,9 +1397,7 @@ class Listofworks extends Component {
<DownloadMessage <DownloadMessage
{...this.props} {...this.props}
value={this.state.DownloadMessageval} ref="DownloadMessage"
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/> />
{visibles === true ? {visibles === true ?
@ -1452,70 +1450,11 @@ class Listofworks extends Component {
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
typs={this.state.typs} typs={this.state.typs}
/> />
<div className={"educontent mb20"}> <div className={"educontent "}>
<div className="edu-back-white"> <div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<a className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
<a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
{this.props.isAdmin() ?
this.state.code_review === true ||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"? "" : <a
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
onClick={(e)=>this.ChangeTab(2)}>
代码查重</a> : ""}
<a
onClick={(e)=>this.ChangeTab(3)}
>设置</a>
{/*{this.props.isAdmin() ? <a*/}
{/* className="fr color-blue font-16"*/}
{/* href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}*/}
{/*>导出</a> : ""}*/}
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-0px","left":"unset","height":"auto"}}>
<li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>实训报告</a></li>
<li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)} >学生成绩</a></li>
</ul>
</li>:""}
{this.props.isAdmin() ?
teacherdata && teacherdata.end_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
: ""
: ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.publish_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>
: ""
: ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.code_review === true ?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "": ""}
</div>
</div>
<style> <style>
{` {`
@ -1657,6 +1596,15 @@ class Listofworks extends Component {
<div className="clearfix"> <div className="clearfix">
<span className="fl color-grey-6 font-12"><span <span className="fl color-grey-6 font-12"><span
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.student_works.length}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count} </span> className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.student_works.length}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count} </span>
<style>
{
`
.edu-position-hide li a:hover {
background: #F0F0F0;
}
`
}
</style>
<div className="fr edu-menu-panel"> <div className="fr edu-menu-panel">
<ul> <ul>
<li className="edu-position edu-position-hidebox"> <li className="edu-position edu-position-hidebox">
@ -1762,3 +1710,63 @@ export default Listofworks;
{/*</div>*/} {/*</div>*/}
// <div className="stud-class-set bor-bottom-greyE ">
// <div className=" clearfix edu-back-white poll_list">
// <a className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
// <a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
// {this.props.isAdmin() ?
// this.state.code_review === true ||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"? "" : <a
// // to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
// onClick={(e)=>this.ChangeTab(2)}>
// 代码查重</a> : ""}
// <a
// onClick={(e)=>this.ChangeTab(3)}
// >设置</a>
// {/*{this.props.isAdmin() ? <a*/}
// {/* className="fr color-blue font-16"*/}
// {/* href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}*/}
// {/*>导出</a> : ""}*/}
// <style>{`
// .drop_down_menu li a {
// padding: 0px;
// font-size: 14px;
// }
// .drop_down_menu {
// width: 93px;
// }
// .drop_down_menu li {
// overflow: visible;
// width: 93px;
// }
// .drop_down_menu, .drop_down_normal {
// padding-top: 10px;
// padding-bottom: 8px;
// }
// a:hover {
// color:#1A0B00 !important;
// }
// `}</style>
// {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
// 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
// <ul className="drop_down_menu" style={{"right":"-0px","left":"unset","height":"auto"}}>
// <li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>实训报告</a></li>
// <li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)} >学生成绩</a></li>
//
// </ul>
// </li>:""}
// {this.props.isAdmin() ?
// teacherdata && teacherdata.end_immediately === true ?
// <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
// : ""
// : ""}
// {this.props.isAdmin() ?
// teacherdata && teacherdata.publish_immediately === true ?
// <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>
// : ""
// : ""}
// {this.props.isAdmin() ?
// teacherdata && teacherdata.code_review === true ?
// <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
// : "": ""}
{/* </div>*/}
{/*</div>*/}

@ -159,7 +159,6 @@ class Listofworksstudentone extends Component {
dataIndex: 'classroom', dataIndex: 'classroom',
align: "center", align: "center",
className:'font-14', className:'font-14',
width:'260px',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<span style={{ <span style={{
@ -923,32 +922,9 @@ class Listofworksstudentone extends Component {
: "" : ""
} }
<div className={"educontent mb20"}> <div className={"educontent "}>
<div className="edu-back-white" style={{width: "1250px"}}> <div className="edu-back-white" style={{width: "1200"}}>
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<a className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
<a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
<a
onClick={(e)=>this.ChangeTab(3)}
>设置</a>
{this.state.view_report===true?<a className="fr color-blue font-16" target={"_blank"}
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/shixun_work_report`}>
查看实训报告
</a>:""}
{/*<a className="fr color-blue font-16">查看实训报告</a>*/}
{
teacherdata === undefined ? ""
: teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :
<a className="fr color-blue font-16"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>
}
{teacherdata === undefined ? "" : <Startshixuntask
{...this.props}
data={teacherdata}
/>}
</div>
</div>
{computeTimetype===false?<li className="clearfix startbox mb20"> {computeTimetype===false?<li className="clearfix startbox mb20">
@ -963,8 +939,7 @@ class Listofworksstudentone extends Component {
<div> <div>
<div id="graduation_work_list" <div id="graduation_work_list"
style={{ style={{
"padding": '0px 20px 10px 20px', "padding": '20px 20px 10px 20px',
"margin-top": "20px",
"margin-bottom": "10px" "margin-bottom": "10px"
}}> }}>
@ -1077,27 +1052,7 @@ class Listofworksstudentone extends Component {
</div> </div>
<div className="edu-back-white"> <div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<Link className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</Link>
<Link onClick={(e)=>this.ChangeTab(1)}>作业问答</Link>
<Link onClick={(e)=>this.ChangeTab(3)}>设置</Link>
{this.state.view_report===true?<Link className="fr color-blue font-16" target={"_blank"}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/shixun_work_report`}>
查看实训报告
</Link>:""}
{
teacherdata === undefined ? ""
: teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :
<a className="fr color-blue font-16"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>
}
{teacherdata === undefined ? "" : <Startshixuntask
{...this.props}
data={teacherdata}
/>}
</div>
</div>
{computeTimetype===false?<li className="clearfix startbox mb20"> {computeTimetype===false?<li className="clearfix startbox mb20">
<span className={"startfont"}> <span className={"startfont"}>
@ -1120,8 +1075,7 @@ class Listofworksstudentone extends Component {
{JSON.stringify(datas) !== "[]" ? {JSON.stringify(datas) !== "[]" ?
<div> <div>
<div id="graduation_work_list" style={{ <div id="graduation_work_list" style={{
"padding": '0px 20px 10px 20px', "padding": '20px 20px 10px 20px',
"margin-top": "20px",
"margin-bottom": "10px" "margin-bottom": "10px"
}}> }}>
<div className="clearfix"> <div className="clearfix">
@ -1269,3 +1223,48 @@ class Listofworksstudentone extends Component {
} }
export default Listofworksstudentone; export default Listofworksstudentone;
{/*<div className="stud-class-set bor-bottom-greyE ">*/}
{/* <div className=" clearfix edu-back-white poll_list">*/}
{/* <a className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</a>*/}
{/* <a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>*/}
{/* <a*/}
{/* onClick={(e)=>this.ChangeTab(3)}*/}
{/* >设置</a>*/}
{/* {this.state.view_report===true?<a className="fr color-blue font-16" target={"_blank"}*/}
{/* href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/shixun_work_report`}>*/}
{/* 查看实训报告*/}
{/* </a>:""}*/}
{/* /!*<a className="fr color-blue font-16">查看实训报告</a>*!/*/}
{/* {*/}
{/* teacherdata === undefined ? ""*/}
{/* : teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :*/}
{/* <a className="fr color-blue font-16"*/}
{/* href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>*/}
{/* }*/}
{/* {teacherdata === undefined ? "" : <Startshixuntask*/}
{/* {...this.props}*/}
{/* data={teacherdata}*/}
{/* />}*/}
{/* </div>*/}
{/*</div>*/}
{/*<div className="stud-class-set bor-bottom-greyE ">*/}
{/* <div className=" clearfix edu-back-white poll_list">*/}
{/* <Link className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</Link>*/}
{/* <Link onClick={(e)=>this.ChangeTab(1)}>作业问答</Link>*/}
{/* <Link onClick={(e)=>this.ChangeTab(3)}>设置</Link>*/}
{/* {this.state.view_report===true?<Link className="fr color-blue font-16" target={"_blank"}*/}
{/* to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/shixun_work_report`}>*/}
{/* 查看实训报告*/}
{/* </Link>:""}*/}
{/* {*/}
{/* teacherdata === undefined ? ""*/}
{/* : teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :*/}
{/* <a className="fr color-blue font-16"*/}
{/* href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>*/}
{/* }*/}
{/* {teacherdata === undefined ? "" : <Startshixuntask*/}
{/* {...this.props}*/}
{/* data={teacherdata}*/}
{/* />}*/}
{/* </div>*/}
{/*</div>*/}

@ -1,6 +1,6 @@
import React,{ Component } from "react"; import React, {Component} from "react";
import {Link,NavLink} from 'react-router-dom'; import {Link, NavLink} from 'react-router-dom';
import { WordsBtn ,ActionBtn} from 'educoder'; import {WordsBtn, ActionBtn} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import '../css/members.css'; import '../css/members.css';
import "../common/formCommon.css"; import "../common/formCommon.css";
@ -14,53 +14,70 @@ import Trainingjobsetting from './Trainingjobsetting'
import Workquestionandanswer from './Workquestionandanswer' import Workquestionandanswer from './Workquestionandanswer'
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import ShixunStudentWork from "./ShixunStudentWork"; import ShixunStudentWork from "./ShixunStudentWork";
import Startshixuntask from "../coursesPublic/Startshixuntask";
class ShixunHomeworkPage extends Component { class ShixunHomeworkPage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state={ this.state = {
tab:["0"], tab: ["0"],
jobsettingsdata:undefined, jobsettingsdata: undefined,
teacherdata:undefined, teacherdata: undefined,
code_review: false,
view_report: false,
} }
} }
//切换tab //切换tab
ChangeTab=(e)=>{ ChangeTab = (e) => {
console.log(e); // console.log(e);
this.setState({ this.setState({
tab:e tab: e
}) })
try {
var currenturl = window.location.href;
var newUrl = (currenturl.split("?"))[0];
window.history.pushState('','',newUrl+'?tab='+e);
}catch (e) {
console.log(e);
console.log("44");
}
} }
Getdataback = (jobsettingsdata,teacherdata)=>{ Getdataback = (jobsettingsdata, teacherdata) => {
this.setState({ this.setState({
jobsettingsdata:jobsettingsdata, jobsettingsdata: jobsettingsdata,
teacherdata:teacherdata, teacherdata: teacherdata,
}) code_review: teacherdata.code_review,
view_report: teacherdata.view_report,
})
} }
componentDidMount() { componentDidMount() {
const query =this.props.location.search; const query = this.props.location.search;
const type = query.split('?tab='); const type = query.split('?tab=');
// let sum = [] // let sum = []
// sum.push(type[1]) // sum.push(type[1])
// console.log("componentDidMountcomponentDidMount"); // console.log("componentDidMountcomponentDidMount");
// console.log(sum); console.log(type);
this.setState({ this.setState({
tab:type, tab: type[1],
}) })
let querys = this.props.location.pathname; let querys = this.props.location.pathname;
const types = querys.split('/'); const types = querys.split('/');
console.log(types);
this.setState({ this.setState({
shixuntypes: types[3] shixuntypes: types[3]
}) })
} }
render() { render() {
let {tab,jobsettingsdata,teacherdata}=this.state; let {tab, jobsettingsdata, teacherdata} = this.state;
const isAdmin =this.props.isAdmin(); const isAdmin = this.props.isAdmin();
return ( return (
<div className="newMain clearfix " > <div className="newMain clearfix ">
<div className={"educontent mb20"} style={{width:"1200px"}}> <div className={"educontent mb20"} style={{width: "1200px"}}>
<div className="educontent mb20"> <div className="educontent mb20">
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
@ -69,20 +86,20 @@ class ShixunHomeworkPage extends Component {
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn <ActionBtn
className=" btn colorgrey fl hovercolorblue " className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id===undefined?"":jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn> to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn> <WordsBtn className="fl">作业详情</WordsBtn>
</p> </p>
</div> </div>
<div className="educontent mb20"> <div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}> <p className=" fl color-black summaryname" style={{heigth: "33px"}}>
{teacherdata === undefined ? "" : teacherdata.homework_name} {teacherdata === undefined ? "" : teacherdata.homework_name}
</p> </p>
<CoursesListType <CoursesListType
typelist={teacherdata === undefined ? [""] : teacherdata.homework_status} typelist={teacherdata === undefined ? [""] : teacherdata.homework_status}
/> />
<a className="color-grey-9 fr font-16 summaryname ml20 mr20" <a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id===undefined?"": jobsettingsdata.data.category.category_id}`}>返回</a> href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>返回</a>
<a className="color-grey-9 fr font-16 mr20" <a className="color-grey-9 fr font-16 mr20"
href={`/shixuns/${teacherdata === undefined ? "" : teacherdata.shixun_identifier}/challenges`} href={`/shixuns/${teacherdata === undefined ? "" : teacherdata.shixun_identifier}/challenges`}
target={"_blank"}>实训详情</a> target={"_blank"}>实训详情</a>
@ -90,21 +107,126 @@ class ShixunHomeworkPage extends Component {
</div> </div>
<div className="edu-back-white ">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<a className={parseInt(tab) === 0 ? "active" : ""} onClick={(e) => this.ChangeTab(0)}>作品列表</a>
<a className={parseInt(tab) === 1 ? "active" : ""} onClick={(e) => this.ChangeTab(1)}>作业问答</a>
{this.props.isAdmin() ?
this.state.code_review === true || jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0] === "未发布" ? "" :
<a
className={parseInt(tab) === 2 ? "active" : ""}
onClick={(e) => this.ChangeTab(2)}>
代码查重</a> : ""}
{parseInt(tab) === 3?
<style>{
`
.poll_list a.active:after {
content: '';
width: 57px;
left: 10px;
bottom: 0px;
height: 2px;
background-color: #4CACFF;
position: absolute;
}
`
}</style>
:""}
<a className={parseInt(tab) === 3 ? "active" : ""}
onClick={(e) => this.ChangeTab(3)}
>设置</a>
{/*{this.props.isAdmin() ? <a*/}
{/* className="fr color-blue font-16"*/}
{/* href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}*/}
{/*>导出</a> : ""}*/}
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</style>
{this.props.isAdmin() ?
<li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<li><a
onClick={() => this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>实训报告</a>
</li>
<li><a
onClick={() => this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>学生成绩</a>
</li>
</ul>
</li> : ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.end_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
: ""
: ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.publish_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>
: ""
: ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.code_review === true ?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "" : ""}
{this.state.view_report === true ? <Link className="fr color-blue font-16" target={"_blank"}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/shixun_work_report`}>
查看实训报告
</Link> : ""}
{
teacherdata === undefined ? ""
: teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :
<a className="fr color-blue font-16"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>
}
{teacherdata === undefined ? "" : <Startshixuntask
{...this.props}
data={teacherdata}
/>}
</div>
</div>
</div>
{ {
// 教师列表 // 教师列表
parseInt(tab)===0 ? (isAdmin===true ? parseInt(tab) === 0 ? (isAdmin === true ?
<Listofworks {...this.props} {...this.state} ChangeTab={(e)=>this.ChangeTab(e)} Getdataback={(jobsettingsdata,teacherdata)=>this.Getdataback(jobsettingsdata,teacherdata)} ></Listofworks> <Listofworks {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworks>
: :
<Listofworksstudentone {...this.props} {...this.state} ChangeTab={(e)=>this.ChangeTab(e)} Getdataback={(jobsettingsdata,teacherdata)=>this.Getdataback(jobsettingsdata,teacherdata)} ></Listofworksstudentone>) <Listofworksstudentone {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>)
: :
parseInt(tab)===1 ?<Workquestionandanswer {...this.props} {...this.state} ChangeTab={(e)=>this.ChangeTab(e)} Getdataback={(jobsettingsdata,teacherdata)=>this.Getdataback(jobsettingsdata,teacherdata)} ></Workquestionandanswer> parseInt(tab) === 1 ?
<Workquestionandanswer {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Workquestionandanswer>
: :
parseInt(tab)===2? <ShixunStudentWork {...this.props} {...this.state} ChangeTab={(e)=>this.ChangeTab(e)} Getdataback={(jobsettingsdata,teacherdata)=>this.Getdataback(jobsettingsdata,teacherdata)} ></ShixunStudentWork> parseInt(tab) === 2 ?
<ShixunStudentWork {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>
: :
<Trainingjobsetting {...this.props} {...this.state} ChangeTab={(e)=>this.ChangeTab(e)} Getdataback={(jobsettingsdata,teacherdata)=>this.Getdataback(jobsettingsdata,teacherdata)} ></Trainingjobsetting> <Trainingjobsetting {...this.props} {...this.state}
} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>
</div> }
</div>
</div> </div>
) )
} }
@ -134,9 +256,9 @@ export default ShixunHomeworkPage;
// //
// </div> // </div>
// </div> // </div>
{/* </div>*/} {/* </div>*/
}
{/*</div>*/} {/*</div>*/
}

@ -33,6 +33,7 @@ import '../css/Courses.css'
import './style.css' import './style.css'
import moment from 'moment'; import moment from 'moment';
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
import Startshixuntask from "../coursesPublic/Startshixuntask";
const Search = Input.Search; const Search = Input.Search;
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;
@ -473,31 +474,32 @@ class ShixunStudentWork extends Component {
// 导出实习报告批量 // 导出实习报告批量
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
axios.get(url).then((response) => { this.refs.DownloadMessage.confirmysl(url);
if(response.data.status&&response.data.status===-1){ // axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){ // }else if(response.data.status&&response.data.status===-2){
// 已超出文件导出的上限数量100 ),建议: // if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true, // this.setState({
DownloadMessageval:100 // DownloadType:true,
}) // DownloadMessageval:100
}else { // })
//因附件资料超过500M // }else {
this.setState({ // //因附件资料超过500M
DownloadType:true, // this.setState({
DownloadMessageval:500 // DownloadType:true,
}) // DownloadMessageval:500
} // })
}else { // }
this.props.showNotification(`正在下载中`); // }else {
window.open("/api"+url, '_blank'); // this.props.showNotification(`正在下载中`);
} // window.open("/api"+url, '_blank');
}).catch((error) => { // }
console.log(error) // }).catch((error) => {
}); // console.log(error)
// });
} }
Downloadcal=()=>{ Downloadcal=()=>{
@ -601,9 +603,7 @@ class ShixunStudentWork extends Component {
<DownloadMessage <DownloadMessage
{...this.props} {...this.props}
value={this.state.DownloadMessageval} refs="DownloadMessage"
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/> />
{/*立即发布*/} {/*立即发布*/}
<HomeworkModal <HomeworkModal
@ -625,53 +625,10 @@ class ShixunStudentWork extends Component {
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
typs={this.state.typs} typs={this.state.typs}
/> />
<div className={"educontent mb20"}> <div className={"educontent "}>
<div className="edu-back-white"> <div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>:
<a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
{this.props.isAdmin()?<a className="active" onClick={(e)=>this.ChangeTab(2)}>代码查重</a>:""}
<a onClick={(e)=>this.ChangeTab(3)}>设置</a>
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</style>
{this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
</li>
<li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
</li>
</ul>
</li> : ""}
{this.props.isAdmin()?
data&&data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
:"": ""}
{this.props.isAdmin()?
data&&data.publish_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "": ""}
</div>
</div>
<style> <style>
{` {`
.startbox{ .startbox{
@ -835,3 +792,57 @@ class ShixunStudentWork extends Component {
} }
export default ShixunStudentWork; export default ShixunStudentWork;
// <div className="stud-class-set bor-bottom-greyE ">
// <div className=" clearfix edu-back-white poll_list">
// <a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
// <a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
// {this.props.isAdmin()?<a className="active" onClick={(e)=>this.ChangeTab(2)}>代码查重</a>:""}
// <a onClick={(e)=>this.ChangeTab(3)}>设置</a>
// <style>{`
// .drop_down_menu li a {
// padding: 0px;
// font-size: 14px;
// }
// .drop_down_menu {
// width: 93px;
// }
// .drop_down_menu li {
// overflow: visible;
// width: 93px;
// }
// .drop_down_menu, .drop_down_normal {
// padding-top: 10px;
// padding-bottom: 8px;
// }
// a:hover {
// color:#1A0B00 !important;
// }
// `}</style>
// {this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
// 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
// <ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
// <li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
// </li>
// <li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
// </li>
// </ul>
// </li> : ""}
// {this.props.isAdmin()?
// data&&data.end_immediately===true?
// <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
// :"": ""}
// {this.props.isAdmin()?
// data&&data.publish_immediately===true?
// <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "": ""}
// {
// jobsettingsdata&& jobsettingsdata.data === undefined ? ""
// : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :
// <a className="fr color-blue font-16"
// href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>
// }
// { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask
// {...this.props}
// data={ jobsettingsdata&& jobsettingsdata.data}
// />}
{/* </div>*/}
{/*</div>*/}

@ -30,31 +30,34 @@ class ShixunWorkReport extends Component {
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){ this.refs.DownloadMessage.confirmysl(url);
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({ // axios.get(url).then((response) => {
DownloadType:true, // if(response.data.status&&response.data.status===-1){
DownloadMessageval:100
}) // }else if(response.data.status&&response.data.status===-2){
}else { // if(response.data.messages === "100"){
//因附件资料超过500M // // 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true, // this.setState({
DownloadMessageval:500 // DownloadType:true,
}) // DownloadMessageval:100
} // })
}else { // }else {
this.props.showNotification(`正在下载中`); // //因附件资料超过500M
window.open("/api"+url, '_blank'); // this.setState({
} // DownloadType:true,
}).catch((error) => { // DownloadMessageval:500
console.log(error) // })
}); // }
// }else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
} }
@ -124,9 +127,7 @@ class ShixunWorkReport extends Component {
</div> </div>
<DownloadMessage <DownloadMessage
{...this.props} {...this.props}
value={this.state.DownloadMessageval} ref="DownloadMessage"
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/> />
<div style={{ width:'100%',height:'75px'}} > <div style={{ width:'100%',height:'75px'}} >
<p className=" fl color-black mt25 summaryname">{data&&data.shixun_name}</p> <p className=" fl color-black mt25 summaryname">{data&&data.shixun_name}</p>

@ -27,6 +27,7 @@ import moment from 'moment';
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
import Modals from "../../modals/Modals"; import Modals from "../../modals/Modals";
import DownloadMessage from '../../modals/DownloadMessage'; import DownloadMessage from '../../modals/DownloadMessage';
import Startshixuntask from "../coursesPublic/Startshixuntask";
const RadioGroup = Radio.Group; const RadioGroup = Radio.Group;
//GraduationTaskssetting.js //GraduationTaskssetting.js
@ -1686,30 +1687,31 @@ class Trainingjobsetting extends Component {
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
axios.get(url).then((response) => { this.refs.DownloadMessage.confirmysl(url);
if(response.data.status&&response.data.status===-1){ // axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){ // }else if(response.data.status&&response.data.status===-2){
// 已超出文件导出的上限数量100 ),建议: // if(response.data.messages === "100"){
this.setState({ // // 已超出文件导出的上限数量100 ),建议:
DownloadType:true, // this.setState({
DownloadMessageval:100 // DownloadType:true,
}) // DownloadMessageval:100
}else { // })
//因附件资料超过500M // }else {
this.setState({ // //因附件资料超过500M
DownloadType:true, // this.setState({
DownloadMessageval:500 // DownloadType:true,
}) // DownloadMessageval:500
} // })
}else { // }
this.props.showNotification(`正在下载中`); // }else {
window.open("/api"+url, '_blank'); // this.props.showNotification(`正在下载中`);
} // window.open("/api"+url, '_blank');
}).catch((error) => { // }
console.log(error) // }).catch((error) => {
}); // console.log(error)
// });
} }
Downloadcal=()=>{ Downloadcal=()=>{
@ -1776,9 +1778,7 @@ class Trainingjobsetting extends Component {
<DownloadMessage <DownloadMessage
{...this.props} {...this.props}
value={this.state.DownloadMessageval} ref="DownloadMessage"
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/> />
{/*立即发布*/} {/*立即发布*/}
@ -1807,77 +1807,17 @@ class Trainingjobsetting extends Component {
loadtype={loadtype} loadtype={loadtype}
modalSave={modalSave} modalSave={modalSave}
></Modals> ></Modals>
<div className={"educontent mb20"}> <div className={"educontent "}>
<div className="edu-back-white"> <div className="edu-back-white" style={{paddingTop: "20px"}}>
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
<a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
{this.props.isAdmin()?this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"": <a onClick={(e)=>this.ChangeTab(2)}>代码查重</a> : ""}
<style>{
`
.poll_list a.active:after {
content: '';
width: 57px;
left: 10px;
bottom: 0px;
height: 2px;
background-color: #4CACFF;
position: absolute;
}
`
}</style>
<a className="active"
onClick={(e)=>this.ChangeTab(3)}
>设置</a>
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</style>
{this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
</li>
<li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
</li>
</ul>
</li>: ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
: "": ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>: "" : ""}
{this.props.isAdmin()?
jobsettingsdata&&jobsettingsdata.data.code_review===true?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>: "":""}
</div>
</div>
{/*发布设置*/} {/*发布设置*/}
<div className="stud-class-set bor-bottom-greyE edu-back-white"> <div className="stud-class-set bor-bottom-greyE edu-back-white">
<div className=" mt20 pl20"> <div className=" pl20">
<p className=" clearfix " style={{height:"41px"}}> <p className=" clearfix " style={{height:"41px"}}>
<span className="font-16 fl "style={{"color":"#05101A"}}>发布设置 <span className="ml15 color-grey-9" style={{"font-size":"14px","text-align":"left"}}></span></span> <span className="font-16 fl "style={{"color":"#05101A"}}>发布设置 <span className="ml15 color-grey-9" style={{"font-size":"14px","text-align":"left"}}></span></span>
{ {
!flagPageEdit && this.props.isAdmin() === true ? !flagPageEdit && this.props.isAdmin() === true ?
<a className="fr" onClick={this.editSetting}><i <a className="fr" onClick={this.editSetting}><Tooltip title="编辑"><i
className="iconfont font-16 pr20 " style={{color:"#333333"}}>编辑</i></a> className="iconfont icon-bianjidaibeijing font-20 color-green pr20 "></i></Tooltip></a>
: "" : ""
} }
</p> </p>
@ -1903,7 +1843,7 @@ class Trainingjobsetting extends Component {
unifiedsetting === undefined ? "" : unifiedsetting=== true ? unifiedsetting === undefined ? "" : unifiedsetting=== true ?
<div> <div>
<div className="clearfix mb5 ml15"> <div className="clearfix mb5 ml15">
<span className="font-16 fl mt6" style={{"color":"#999999"}}>发布时间</span> <span className="font-16 fl mt3" style={{"color":"#999999"}}>发布时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditstwo === true ? "发布时间已过,则不能修改" : ""}> <Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditstwo === true ? "发布时间已过,则不能修改" : ""}>
<div className="fl"> <div className="fl">
<DatePicker <DatePicker
@ -1927,7 +1867,7 @@ class Trainingjobsetting extends Component {
/> />
</div> </div>
</Tooltip> </Tooltip>
<span className="ml20 fl mt10 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(学生收到作业的时间)</span> <span className="ml20 fl mt5 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(学生收到作业的时间)</span>
</div> </div>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}> <p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{ {
@ -1936,7 +1876,7 @@ class Trainingjobsetting extends Component {
} }
</p> </p>
<div className="clearfix ml15 mb5"> <div className="clearfix ml15 mb5">
<span className=" fl mt10 font-16" style={{"color":"#999999"}}>截止时间</span> <span className=" fl mt3 font-16" style={{"color":"#999999"}}>截止时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditsthrees === true ? "截止时间已过,则不能修改" : ""}> <Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditsthrees === true ? "截止时间已过,则不能修改" : ""}>
<div className="fl"> <div className="fl">
<DatePicker <DatePicker
@ -1961,7 +1901,7 @@ class Trainingjobsetting extends Component {
</div> </div>
</Tooltip> </Tooltip>
<span className=" ml20 fl mt10 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(学生按时提交作品的时间截点)</span> <span className=" ml20 fl mt5 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(学生按时提交作品的时间截点)</span>
</div> </div>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}> <p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{ {
@ -2124,9 +2064,8 @@ class Trainingjobsetting extends Component {
color:"#666666", color:"#666666",
}} disabled={!flagPageEdit} className="c_grey mt20 ml30" }} disabled={!flagPageEdit} className="c_grey mt20 ml30"
value={"自定义分值"} style={{"color":"#666666"}}>自定义分值 value={"自定义分值"} style={{"color":"#666666"}}>自定义分值
<a onClick={()=>this.testscripttip(0)}><img style={{marginBottom:"3px",marginLeft:"10px"}} src={getImageUrl("images/educoder/problem.png") }/></a>
{testscripttiptype===true? {testscripttiptype===true?
<div className="invite-tip clearfix " id="test_script_tip" style={{left: '140px',width: '322px',zIndex: '10'}}> <div className="invite-tipysls clearfix " id="test_script_tip" style={{left: '148px',width: '322px',zIndex: '10'}}>
<span className="right-black-trangles"></span> <span className="right-black-trangles"></span>
<div className="padding20 invitecontent clearfix"> <div className="padding20 invitecontent clearfix">
<p className="font-12 edu-txt-left"> <p className="font-12 edu-txt-left">
@ -2147,7 +2086,9 @@ class Trainingjobsetting extends Component {
</div> </div>
:""} :""}
</Radio> </Radio>
</RadioGroup></span> </RadioGroup>
<a onClick={()=>this.testscripttip(0)}><img style={{marginBottom:"3px",marginLeft:"20px"}} src={getImageUrl("images/educoder/problem.png") }/></a>
</span>
</div> </div>
<p className="ml20 mt15 c_grey font-13 " style={{"color":"#666666"}}> 关卡名称<span <p className="ml20 mt15 c_grey font-13 " style={{"color":"#666666"}}> 关卡名称<span
className="color-grey-c font-10 ml10">(需要学生完成的任务请选中)</span></p> className="color-grey-c font-10 ml10">(需要学生完成的任务请选中)</span></p>
@ -2224,3 +2165,73 @@ class Trainingjobsetting extends Component {
} }
export default Trainingjobsetting; export default Trainingjobsetting;
// <div className="stud-class-set bor-bottom-greyE ">
// <div className=" clearfix edu-back-white poll_list">
// <a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
// <a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
// {this.props.isAdmin()?this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"": <a onClick={(e)=>this.ChangeTab(2)}>代码查重</a> : ""}
// <style>{
// `
// .poll_list a.active:after {
// content: '';
// width: 57px;
// left: 10px;
// bottom: 0px;
// height: 2px;
// background-color: #4CACFF;
// position: absolute;
// }
// `
// }</style>
// <a className="active"
// onClick={(e)=>this.ChangeTab(3)}
// >设置</a>
// <style>{`
// .drop_down_menu li a {
// padding: 0px;
// font-size: 14px;
// }
// .drop_down_menu {
// width: 93px;
// }
// .drop_down_menu li {
// overflow: visible;
// width: 93px;
// }
// .drop_down_menu, .drop_down_normal {
// padding-top: 10px;
// padding-bottom: 8px;
// }
// a:hover {
// color:#1A0B00 !important;
// }
// `}</style>
// {this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
// 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
// <ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
// <li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
// </li>
// <li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
// </li>
// </ul>
// </li>: ""}
// {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
// <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
// : "": ""}
// {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true?
// <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>: "" : ""}
// {this.props.isAdmin()?
// jobsettingsdata&&jobsettingsdata.data.code_review===true?
// <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>: "":""}
// {
// jobsettingsdata&& jobsettingsdata&&jobsettingsdata.data === undefined ? ""
// : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :
// <a className="fr color-blue font-16"
// href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>
// }
// { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask
// {...this.props}
// data={ jobsettingsdata&& jobsettingsdata.data}
// />}
{/* </div>*/}
{/*</div>*/}

@ -35,6 +35,7 @@ import Homeworddescription from "../shixunHomework/Homeworddescription";
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal'; import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal"; import HomeworkModal from "../coursesPublic/HomeworkModal";
import DownloadMessage from '../../modals/DownloadMessage'; import DownloadMessage from '../../modals/DownloadMessage';
import Startshixuntask from "../coursesPublic/Startshixuntask";
const TextArea = Input.TextArea const TextArea = Input.TextArea
//作业问答页面 //作业问答页面
@ -317,30 +318,31 @@ class Workquestionandanswer extends Component {
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
axios.get(url).then((response) => { this.refs.DownloadMessage.confirmysl(url);
if(response.data.status&&response.data.status===-1){ // axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){ // }else if(response.data.status&&response.data.status===-2){
// 已超出文件导出的上限数量100 ),建议: // if(response.data.messages === "100"){
this.setState({ // // 已超出文件导出的上限数量100 ),建议:
DownloadType:true, // this.setState({
DownloadMessageval:100 // DownloadType:true,
}) // DownloadMessageval:100
}else { // })
//因附件资料超过500M // }else {
this.setState({ // //因附件资料超过500M
DownloadType:true, // this.setState({
DownloadMessageval:500 // DownloadType:true,
}) // DownloadMessageval:500
} // })
}else { // }
this.props.showNotification(`正在下载中`); // }else {
window.open("/api"+url, '_blank'); // this.props.showNotification(`正在下载中`);
} // window.open("/api"+url, '_blank');
}).catch((error) => { // }
console.log(error) // }).catch((error) => {
}); // console.log(error)
// });
} }
Downloadcal=()=>{ Downloadcal=()=>{
this.setState({ this.setState({
@ -381,9 +383,7 @@ class Workquestionandanswer extends Component {
/> : ""} /> : ""}
<DownloadMessage <DownloadMessage
{...this.props} {...this.props}
value={this.state.DownloadMessageval} ref="DownloadMessage"
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/> />
{/*立即发布*/} {/*立即发布*/}
<HomeworkModal <HomeworkModal
@ -405,73 +405,12 @@ class Workquestionandanswer extends Component {
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
typs={this.state.typs} typs={this.state.typs}
/> />
<div className={"educontent mb20"}> <div className={"educontent "}>
<div className="edu-back-white"> <div className="edu-back-white" >
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
<a className="active" onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
{this.props.isAdmin() ?
this.state.code_review === true || jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0] === "未发布" ? "" :
<a
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
onClick={(e)=>this.ChangeTab(2)}>
代码查重</a> : ""}
<a
onClick={(e)=>this.ChangeTab(3)}
>设置</a>
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</style>
{this.props.isAdmin() ?
<li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
</li>
<li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
</li>
</ul>
</li> : ""}
{this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.end_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
:""
: ""}
{this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.publish_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>
: ""
: ""}
{this.props.isAdmin() ?
jobsettingsdata && jobsettingsdata.data.code_review === true ?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "" : ""}
</div>
</div>
{jobsettingsdata === undefined || jobsettingsdata.data.description === null ? "无" : {jobsettingsdata === undefined || jobsettingsdata.data.description === null ? <div className="ml20" style={{paddingTop: "20px"}}></div> :
<div className=" clearfix edu-back-white poll_list mt20 mr20 "> <div className=" clearfix edu-back-white poll_list mr20 " style={{paddingTop: "20px"}}>
<span> <span>
<style> <style>
{ {
@ -482,7 +421,7 @@ class Workquestionandanswer extends Component {
` `
} }
</style> </style>
<div className={"font-16 color-dark fl pl20 "}> <div className={"font-16 color-dark fl pl20 "} >
<div className={"markdown-body"} <div className={"markdown-body"}
dangerouslySetInnerHTML={{__html: markdownToHTML(jobsettingsdata.data.description).replace(/▁/g, "▁▁▁")}}></div> dangerouslySetInnerHTML={{__html: markdownToHTML(jobsettingsdata.data.description).replace(/▁/g, "▁▁▁")}}></div>
{/* /!*{}}></div> {/* /!*{}}></div>
@ -580,3 +519,75 @@ class Workquestionandanswer extends Component {
} }
export default Workquestionandanswer; export default Workquestionandanswer;
{/*<div className="stud-class-set bor-bottom-greyE ">*/}
{/* <div className=" clearfix edu-back-white poll_list">*/}
{/* <a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>*/}
{/* <a className="active" onClick={(e)=>this.ChangeTab(1)}>作业问答</a>*/}
{/* {this.props.isAdmin() ?*/}
{/* this.state.code_review === true || jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0] === "未发布" ? "" :*/}
{/* <a*/}
{/* // to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}*/}
{/* onClick={(e)=>this.ChangeTab(2)}>*/}
{/* 代码查重</a> : ""}*/}
{/* <a*/}
{/* onClick={(e)=>this.ChangeTab(3)}*/}
{/* >设置</a>*/}
{/* <style>{`*/}
{/* .drop_down_menu li a {*/}
{/* padding: 0px;*/}
{/* font-size: 14px;*/}
{/* }*/}
{/* .drop_down_menu {*/}
{/* width: 93px;*/}
{/* }*/}
{/* .drop_down_menu li {*/}
{/* overflow: visible;*/}
{/* width: 93px;*/}
{/* }*/}
{/* .drop_down_menu, .drop_down_normal {*/}
{/* padding-top: 10px;*/}
{/* padding-bottom: 8px;*/}
{/* }*/}
{/* a:hover {*/}
{/* color:#1A0B00 !important;*/}
{/* }*/}
{/* `}</style>*/}
{/* {this.props.isAdmin() ?*/}
{/* <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>*/}
{/* 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>*/}
{/* <ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>*/}
{/* <li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>*/}
{/* </li>*/}
{/* <li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>*/}
{/* </li>*/}
{/* </ul>*/}
{/* </li> : ""}*/}
{/* {this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.end_immediately === true ?*/}
{/* <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>*/}
{/* :""*/}
{/* : ""}*/}
{/* {this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.publish_immediately === true ?*/}
{/* <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>*/}
{/* : ""*/}
{/* : ""}*/}
{/* {this.props.isAdmin() ?*/}
{/* jobsettingsdata && jobsettingsdata.data.code_review === true ?*/}
{/* <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>*/}
{/* : "" : ""}*/}
{/* {*/}
{/* jobsettingsdata&& jobsettingsdata.data === undefined ? ""*/}
{/* : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :*/}
{/* <a className="fr color-blue font-16"*/}
{/* href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>*/}
{/* }*/}
{/* { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask*/}
{/* {...this.props}*/}
{/* data={ jobsettingsdata&& jobsettingsdata.data}*/}
{/* />}*/}
{/* </div>*/}
{/*</div>*/}

@ -754,7 +754,7 @@ submittojoinclass=(value)=>{
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>我的实践课程</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>我的实践课程</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/projects`}>我的项目</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/projects`}>我的项目</Link></li>
<li><a href={`/account/basic`}>账号管理</a></li> <li><a href={`/profile/basic`}>账号管理</a></li>
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/} {/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
{/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/} {/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/}
{/*<li><Link to={`/interest`}>兴趣页</Link></li>*/} {/*<li><Link to={`/interest`}>兴趣页</Link></li>*/}

@ -55,7 +55,7 @@ class AccountPage extends Component {
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
if(result.data){ if(result.data){
if(result.data && result.data.base_info_completed == false){ if(result.data && result.data.base_info_completed == false){
this.props.history.push(`/account/basic/edit`); this.props.history.push(`/profile/basic/edit`);
} }
this.setState({ this.setState({
basicInfo: Object.assign({}, {...result.data}, { avatar_url: `${result.data.avatar_url}?t=${new Date().getTime()}`}) basicInfo: Object.assign({}, {...result.data}, { avatar_url: `${result.data.avatar_url}?t=${new Date().getTime()}`})
@ -79,30 +79,30 @@ class AccountPage extends Component {
<AccountNav {...this.props} {...common}></AccountNav> <AccountNav {...this.props} {...common}></AccountNav>
<div className="basicFormWrap"> <div className="basicFormWrap">
<Switch {...this.props}> <Switch {...this.props}>
<Route exact path="/account/basic" <Route exact path="/profile/basic"
render={ render={
(props) => (<AccountBasic {...this.props} {...props} {...this.state} {...common} />) (props) => (<AccountBasic {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
<Route exact path="/account/basic/edit" <Route exact path="/profile/basic/edit"
render={ render={
(props) => (<AccountBasicEdit {...this.props} {...props} {...this.state} {...common} />) (props) => (<AccountBasicEdit {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
<Route exact path="/account/certification" <Route exact path="/profile/certification"
render={ render={
(props) => (<AccountCertification {...this.props} {...props} {...this.state} {...common} />) (props) => (<AccountCertification {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
<Route exact path="/account/secure" <Route exact path="/profile/secure"
render={ render={
(props) => (<AccountSecure {...this.props} {...props} {...this.state} {...common} />) (props) => (<AccountSecure {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
<Route exact path="/account" <Route exact path="/profile"
render={ render={
(props) => (<AccountBasic {...this.props} {...props} {...this.state} {...common} />) (props) => (<AccountBasic {...this.props} {...props} {...this.state} {...common} />)
} }

@ -54,7 +54,7 @@ class AccountBasicEdit extends Component {
<div className="titleWrap"> <div className="titleWrap">
<div className="title">基本信息</div> <div className="title">基本信息</div>
<Button type="primary" style={{ marginRight: '16px'}} <Button type="primary" style={{ marginRight: '16px'}}
ghost onClick={() => this.props.history.push('/account/basic/edit')}>修改</Button> ghost onClick={() => this.props.history.push('/profile/basic/edit')}>修改</Button>
</div> </div>
<Form onSubmit={this.handleSubmit}> <Form onSubmit={this.handleSubmit}>

@ -4,19 +4,19 @@ import { SnackbarHOC, getImageUrl } from 'educoder';
import AccountImg from './AccountImg' import AccountImg from './AccountImg'
class AccountNav extends Component { class AccountNav extends Component {
toBasic = () => { toBasic = () => {
this.props.history.push(`/account/basic`) this.props.history.push(`/profile/basic`)
} }
toCertification = () => { toCertification = () => {
this.props.history.push(`/account/certification`) this.props.history.push(`/profile/certification`)
} }
toSecure = () => { toSecure = () => {
this.props.history.push(`/account/secure`) this.props.history.push(`/profile/secure`)
} }
render() { render() {
let { basicInfo } = this.props let { basicInfo } = this.props
console.log(this.props); console.log(this.props);
const path = window.location.pathname const path = window.location.pathname
const isBasic = path.indexOf('basic') != -1 || path == "/account" const isBasic = path.indexOf('basic') != -1 || path == "/profile"
const isCertification = path.indexOf('certification') != -1 const isCertification = path.indexOf('certification') != -1
const isSecure = path.indexOf('secure') != -1 const isSecure = path.indexOf('secure') != -1
return ( return (

Loading…
Cancel
Save