杨树明 5 years ago
commit 10fa6d9c7c

@ -6,7 +6,7 @@
"@flatten/array": "^1.1.7", "@flatten/array": "^1.1.7",
"@icedesign/base": "^0.2.5", "@icedesign/base": "^0.2.5",
"@novnc/novnc": "^1.1.0", "@novnc/novnc": "^1.1.0",
"antd": "^3.6.5", "antd": "^3.20.1",
"array-flatten": "^2.1.2", "array-flatten": "^2.1.2",
"autoprefixer": "7.1.6", "autoprefixer": "7.1.6",
"axios": "^0.18.0", "axios": "^0.18.0",

@ -1799,7 +1799,20 @@ ol.linenums{margin-top:0;margin-bottom:0}li.L1,li.L3,li.L5,li.L7,li.L9{backgroun
.page--body { .page--body {
margin-top: 54px; margin-top: 54px;
} }
#myshixun_top {
display: flex;
height: 54px;
}
.yslflexhome {
display: flex;
flex-direction: row;
}
.yslflexhomes {
display: flex;
flex-direction: row;
}
#games_repository_contents, #games_repository_contents,
.cm-s-railscasts .CodeMirror-gutters, .cm-s-railscasts .CodeMirror-gutters,
.split-panel--second { .split-panel--second {

@ -455,7 +455,7 @@ li.li-width7{width: 7%;text-align: left}
.top-black-trangle{display: block;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{display: block;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;}
.right-black-trangle{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{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;}
.activity-nav.active{color: #4CACFF!important;} .activity-nav.active{color: #4CACFF!important;}
.yslinvitetip{right: 140px;color: #fff; box-sizing: border-box;width: 170px;text-align: center;border-radius: 2px;background-color: rgba(5,16,26,0.6)}
.courseNewNum{display: block;background: #FF6800;border-radius:30px;padding:0px 2px;color: #fff!important;font-size: 11px; .courseNewNum{display: block;background: #FF6800;border-radius:30px;padding:0px 2px;color: #fff!important;font-size: 11px;
height: 16px;line-height: 15px;min-width: 12px;text-align: center;margin-top: 17px;} height: 16px;line-height: 15px;min-width: 12px;text-align: center;margin-top: 17px;}

File diff suppressed because one or more lines are too long

@ -209,7 +209,7 @@ const UsersInfo = Loadable({
// 兴趣页面 // 兴趣页面
const Interestpage = Loadable({ const Interestpage = Loadable({
loader: () => import('./modules/user/Interestpage'), loader: () => import('./modules/login/EducoderInteresse'),
loading: Loading, loading: Loading,
}) })
@ -301,7 +301,10 @@ class App extends Component {
<Route <Route
path="/changepassword" component={EducoderLogin} path="/changepassword" component={EducoderLogin}
/> />
<Route
path="/interesse" component={Interestpage}
/>
<Route path="/shixuns/new" component={Newshixuns}> <Route path="/shixuns/new" component={Newshixuns}>
</Route> </Route>

@ -21,6 +21,7 @@ function locationurl(list){
const debugType =window.location.search.indexOf('debug=t') != -1 ? 'teacher' : const debugType =window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin'
window._debugType = debugType; window._debugType = debugType;
// const debugType ="";
export function initAxiosInterceptors(props) { export function initAxiosInterceptors(props) {
// TODO 避免重复的请求 https://github.com/axios/axios#cancellation // TODO 避免重复的请求 https://github.com/axios/axios#cancellation
@ -145,7 +146,10 @@ export function initAxiosInterceptors(props) {
} }
if (response.data.status === 402) { if (response.data.status === 402) {
locationurl(response.data.url); debugger
console.log(response.data.status);
console.log(response.data);
locationurl(response.data.message);
} }

File diff suppressed because one or more lines are too long

@ -73,6 +73,10 @@ const WrappedCoursesNewApp= Loadable({
loading: Loading, loading: Loading,
}) })
const ShixunHomeworkPage =Loadable({
loader: () => import('./shixunHomework/ShixunHomeworkPage'),
loading: Loading,
})
//实训作业 //实训作业
const ShixunHomework= Loadable({ const ShixunHomework= Loadable({
loader: () => import('./shixunHomework/shixunHomework'), loader: () => import('./shixunHomework/shixunHomework'),
@ -95,7 +99,6 @@ const Listofworks= Loadable({
// loader: () => import('./shixunHomework/Listofworksstudentone'), // loader: () => import('./shixunHomework/Listofworksstudentone'),
// loading: Loading, // loading: Loading,
// }) // })
//实训作业列表完成的 //实训作业列表完成的
const Studenthascompleted= Loadable({ const Studenthascompleted= Loadable({
loader: () => import('./shixunHomework/Listofworksstudentone'), loader: () => import('./shixunHomework/Listofworksstudentone'),
@ -720,12 +723,12 @@ class CoursesIndex extends Component{
{/*实训查重列表*/} {/*实训查重列表*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/student_work" <Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/student_work"
render={ render={
(props) => (<ShixunStudentWork {...this.props} {...props} {...this.state} />) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/student_work" <Route path="/courses/:coursesId/shixun_homework/:homeworkid/student_work"
render={ render={
(props) => (<ShixunStudentWork {...this.props} {...props} {...this.state} />) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
@ -744,24 +747,29 @@ class CoursesIndex extends Component{
{/*教师列表*/} {/*教师列表*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/list" <Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/list"
render={ render={
(props) => (<Listofworks {...this.props} {...props} {...this.state} />) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/list" <Route path="/courses/:coursesId/shixun_homework/:homeworkid/list"
render={ render={
(props) => (<Listofworks {...this.props} {...props} {...this.state} />) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
{/*实训作业page*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/Page"
render={
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/*实训作业设置*/} {/*实训作业设置*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/settings" <Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/settings"
render={ render={
(props) => (<Trainingjobsetting {...this.props} {...props} {...this.state} />) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/settings" <Route path="/courses/:coursesId/shixun_homework/:homeworkid/settings"
render={ render={
(props) => (<Trainingjobsetting {...this.props} {...props} {...this.state} />) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/*/!*实训作品列表教师*!/*/} {/*/!*实训作品列表教师*!/*/}
@ -790,13 +798,13 @@ class CoursesIndex extends Component{
{/*实训学生作品列表已公布*/} {/*实训学生作品列表已公布*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/openlist" <Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/openlist"
render={ render={
(props) => (<Studenthascompleted {...this.props} {...props} {...this.state} />) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/*实训学生作品列表已公布*/} {/*实训学生作品列表已公布*/}
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/openlist" <Route path="/courses/:coursesId/shixun_homework/:homeworkid/openlist"
render={ render={
(props) => (<Studenthascompleted {...this.props} {...props} {...this.state} />) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
@ -805,14 +813,14 @@ class CoursesIndex extends Component{
{/*实训作业问答主目录*/} {/*实训作业问答主目录*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/questions" <Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/questions"
render={ render={
(props) => (<Workquestionandanswer {...this.props} {...props} {...this.state} />) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/*实训作业问答子目录*/} {/*实训作业问答子目录*/}
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/questions" <Route path="/courses/:coursesId/shixun_homework/:homeworkid/questions"
render={ render={
(props) => (<Workquestionandanswer {...this.props} {...props} {...this.state} />) (props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>

@ -150,7 +150,9 @@ class CommonWorkDetailIndex extends Component{
]}></CBreadcrumb> ]}></CBreadcrumb>
<div style={{ width:'100%',height:'52px'}} > <div style={{ width:'100%',height:'52px'}} >
<span className=" fl color-black summaryname" title={`${homework_name && homework_name.length > 36 ? homework_name : ''}`}> <span className=" fl color-black summaryname" title={`${homework_name && homework_name.length > 36 ? homework_name : ''}`}
style={{height: 'auto'}}
>
{homework_name} {homework_name}
{/* <Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link> */} {/* <Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link> */}
</span> </span>

@ -70,7 +70,7 @@ function buildColumns(that, student_works) {
render: (text, record, index) => { render: (text, record, index) => {
return ( return (
<span style={{ minWidth: '50px', display: 'inline-block', textAlign: 'center' }} > <span style={{ minWidth: '50px', display: 'inline-block', textAlign: 'center' }} >
{record.isMine == true ? '我' : (that.state.page - 1) * PAGE_SIZE + index + 1} {record.isMine == true && (student_works && student_works.length) ? '我' : (that.state.page - 1) * PAGE_SIZE + index + 1}
</span> </span>
)}, )},
}, { }, {

@ -92,8 +92,16 @@ class CommonWorkPost extends Component{
} else { } else {
axios.get(url).then((response)=>{ axios.get(url).then((response)=>{
if(response.data.course_id){ if(response.data.course_id){
const mine = {
user_id: response.data.user_id,
user_name: response.data.user_name,
student_id: response.data.user_student_id,
group_name: response.data.group_name,
}
this.setState({ this.setState({
...response.data, ...response.data,
selectmemberslist: [mine],
memberNumMin: response.data.min_num, memberNumMin: response.data.min_num,
memberNumMax: response.data.max_num, memberNumMax: response.data.max_num,
}) })
@ -102,30 +110,6 @@ class CommonWorkPost extends Component{
console.log(error) console.log(error)
}) })
} }
return
const responseData = {
"course_id": 1309,
"course_name": "计算机开发实战课-示例",
"category": {
"category_id": 11551,
"category_name": "分组作业"
},
"homework_status": [
"申诉中"
],
"homework_name": "小米便签的功能改进",
"homework_id": 7013,
"homework_type": "group",
"user_id": 15582,
"user_name": "胡莎莎",
"user_student_id": null,
"group_name": "示例A班"
}
this.setState({
...responseData
})
} }
@ -420,84 +404,6 @@ class CommonWorkPost extends Component{
}).catch((error)=>{ }).catch((error)=>{
console.log(error) console.log(error)
}) })
return
const member = {
"members": [
{
"user_id": 8686,
"user_name": "陈晓婷",
"group_name": "未分班",
"student_id": "2018201801106004",
"commit_status": false
},
{
"user_id": 46220,
"user_name": "刘恩",
"group_name": "未分班",
"student_id": "173139241573",
"commit_status": false
},
{
"user_id": 57106,
"user_name": "曾啸笛",
"group_name": "未分班",
"student_id": "184962010005",
"commit_status": false
},
{
"user_id": 57110,
"user_name": "王玉龙",
"group_name": "未分班",
"student_id": "184962710013",
"commit_status": false
},
{
"user_id": 57280,
"user_name": "陈涛",
"group_name": "未分班",
"student_id": "184962020046",
"commit_status": false
},
{
"user_id": 57341,
"user_name": "何仁杰",
"group_name": "未分班",
"student_id": "18496232002036",
"commit_status": false
},
{
"user_id": 57386,
"user_name": "王震东",
"group_name": "未分班",
"student_id": "1849620100012",
"commit_status": false
},
{
"user_id": 58337,
"user_name": "李游",
"group_name": "未分班",
"student_id": null,
"commit_status": false
},
{
"user_id": 58787,
"user_name": "彭然",
"group_name": "未分班",
"student_id": null,
"commit_status": false
},
{
"user_id": 59553,
"user_name": "李明霞",
"group_name": "未分班",
"student_id": null,
"commit_status": false
}
]
}
this.setState({
members: member.members
})
} }

@ -97,7 +97,7 @@ class WorkDetailPageHeader extends Component{
]}></CBreadcrumb> ]}></CBreadcrumb>
<div style={{ width:'100%',height:'52px'}} > <div style={{ width:'100%',height:'52px'}} >
<span className=" fl color-black summaryname" style={{}}> <span className=" fl color-black summaryname" style={{height: 'auto'}}>
{homework_name} {homework_name}
{/* <Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link> */} {/* <Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link> */}
</span> </span>

@ -553,19 +553,28 @@ class Coursesleftnav extends Component{
// notification.open({ // notification.open({
// message: "删除成功", // message: "删除成功",
// }); // });
window.location.href = url;
// this.props.history.replace(url);
window.location.href = url;
} }
deletenavchilds=(url)=>{ deletenavchilds=(url,mainurl)=>{
axios.delete(url).then((result)=>{ axios.delete(url).then((result)=>{
if(result.data.status===0){ if(result.data.status===0){
this.updatadeleteSecondary(result.data.right_url)
if(mainurl===undefined){
this.updatadeleteSecondary(result.data.right_url)
}else{
this.updatadeleteSecondary(mainurl)
}
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error) console.log(error)
}) })
} }
deleteSecondary=(e,type,id)=>{ deleteSecondary=(e,type,id,mainurl)=>{
e.stopPropagation();//阻止冒泡 e.stopPropagation();//阻止冒泡
if(type===1){ if(type===1){
let url="/course_second_categories/"+id+".json" let url="/course_second_categories/"+id+".json"
@ -593,7 +602,7 @@ class Coursesleftnav extends Component{
ModalsType:true, ModalsType:true,
Modalstopval:"该目录下的内容将被移动到父目录,", Modalstopval:"该目录下的内容将被移动到父目录,",
ModalsBottomval:"是否确认删除?", ModalsBottomval:"是否确认删除?",
ModalSave:()=>this.deletenavchilds(url), ModalSave:()=>this.deletenavchilds(url,mainurl),
}) })
} }
@ -726,7 +735,7 @@ class Coursesleftnav extends Component{
{item.type==="course_group"?<div onClick={e=>this.deleteSecondary(e,2,iem.category_id)}>删除</div>:""} {item.type==="course_group"?<div onClick={e=>this.deleteSecondary(e,2,iem.category_id)}>删除</div>:""}
{/*讨论区*/} {/*讨论区*/}
{item.type==="board"?<div onClick={e=>this.Navmodalnames(e,7,"editSecondname",iem.category_id,iem.category_name)}>重命名</div>:""} {item.type==="board"?<div onClick={e=>this.Navmodalnames(e,7,"editSecondname",iem.category_id,iem.category_name)}>重命名</div>:""}
{item.type==="board"?<div onClick={e=>this.deleteSecondary(e,3,iem.category_id)}>删除</div>:""} {item.type==="board"?<div onClick={e=>this.deleteSecondary(e,3,iem.category_id,item.category_url)}>删除</div>:""}
</div>) </div>)
} }

@ -40,7 +40,8 @@ class coursesHomeCard extends Component{
className="mt80 mb25"/> className="mt80 mb25"/>
<p className="font-14 color-white">非成员不能访问</p> <p className="font-14 color-white">非成员不能访问</p>
</div> </div>
<a href={item.first_category_url} className="square-img" > {/*<a href={item.first_category_url} className="square-img" >*/}
<a href={`/courses/${item.id}/students`} className="square-img" >
{/*target="_blank"*/} {/*target="_blank"*/}
{ {
item.is_public===1&&item.id===1309? item.is_public===1&&item.id===1309?

@ -211,15 +211,15 @@ class ShixunModal extends Component{
<a onClick={()=>this.changeTag("all")} className={ type==="all" ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部</a> <a onClick={()=>this.changeTag("all")} className={ type==="all" ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部</a>
</li> </li>
{ {/*{*/}
shixunmodallist && shixunmodallist.tags.map((item,key)=>{ {/*shixunmodallist && shixunmodallist.tags.map((item,key)=>{*/}
return( {/*return(*/}
<li className="fl mr5 mt5" key={key}> {/*<li className="fl mr5 mt5" key={key}>*/}
<a onClick={()=>this.changeTag(item.tag_id)} className={ parseInt(type) === parseInt(item.tag_id) ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>{item.tag_name}</a> {/*<a onClick={()=>this.changeTag(item.tag_id)} className={ parseInt(type) === parseInt(item.tag_id) ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>{item.tag_name}</a>*/}
</li> {/*</li>*/}
) {/*)*/}
}) {/*})*/}
} {/*}*/}
</div> </div>
<div className="clearfix mb10" id="shixun_search_form_div" style={{height:"30px"}}> <div className="clearfix mb10" id="shixun_search_form_div" style={{height:"30px"}}>
@ -251,9 +251,9 @@ class ShixunModal extends Component{
} }
<ul className="clearfix greybackHead edu-txt-center"> <ul className="clearfix greybackHead edu-txt-center">
<li className="fl with40 paddingleft22" >实训名称</li> <li className="fl with40 paddingleft22" >实训名称</li>
<li className="fl with30 edu-txt-left">使用院校</li> <li className="fl with30 edu-txt-left">院校</li>
<li className="fl with10">使用人数</li> <li className="fl with10">学习人数</li>
<li className="fl with10">评价等级</li> <li className="fl with10">难度</li>
<li className="fl with10"></li> <li className="fl with10"></li>
</ul> </ul>
@ -292,9 +292,9 @@ class ShixunModal extends Component{
<span style={{"textAlign":"left","color":"#05101A"}} className="task-hide color-grey-name">{item.shixun_name}</span> <span style={{"textAlign":"left","color":"#05101A"}} className="task-hide color-grey-name">{item.shixun_name}</span>
</Checkbox> </Checkbox>
</li> </li>
<li className="fl with30 edu-txt-left task-hide paddingl5">{item.school_users}</li> <li className="fl with30 edu-txt-left task-hide paddingl5">{item.school}</li>
<li className="fl with10 paddingl10">{item.myshixuns_count}</li> <li className="fl with10 paddingl10">{item.myshixuns_count}</li>
<li className="fl with10 color-orange-tip paddingl10">{item.preference}</li> <li className="fl with10 color-orange-tip paddingl10">{item.level}</li>
<Tooltip title="新窗口查看详情"> <Tooltip title="新窗口查看详情">
<li className="fl with10"><a className="color-blue" href={"/shixuns/"+item.identifier+"/challenges"} target="_blank">详情</a></li> <li className="fl with10"><a className="color-blue" href={"/shixuns/"+item.identifier+"/challenges"} target="_blank">详情</a></li>
</Tooltip> </Tooltip>

@ -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,
@ -622,45 +622,16 @@ class GraduationTaskssettinglist extends Component{
let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,page} =this.state; let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,page} =this.state;
axios.get(url,{ let params ={
teacher_comment:teacher_comment, teacher_comment:teacher_comment,
task_status:task_status, task_status:task_status,
course_group:course_group, course_group:course_group,
cross_comment:cross_comment, cross_comment:cross_comment,
order:order, order:order,
b_order:b_order, b_order:b_order,
search:search, search:search,
}).then((response) => { }
if(response.data.status&&response.data.status===-1){ this.refs.DownloadMessage.confirmysl(url,params);
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
} }
render(){ render(){
@ -1010,13 +981,7 @@ class GraduationTaskssettinglist extends Component{
setupdate={this.setupdate} setupdate={this.setupdate}
/>:""} />:""}
<DownloadMessage <DownloadMessage ref="DownloadMessage" {...this.props} />
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{taskslistdata&&taskslistdata? {taskslistdata&&taskslistdata?
// 教师列表 // 教师列表

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

@ -2,8 +2,16 @@ import React, { useState, useEffect } from 'react'
import { trigger } from 'educoder' import { trigger } from 'educoder'
import { Input, Checkbox } from "antd"; import { Input, Checkbox } from "antd";
function CourseGroupChooser({ course_groups, isAdminOrCreator, item, index, arg_course_groups, checkAllValue /**
, coursesids, onCheckAllChange, joinCourseGroup }) { arg_course_groups 选中的id数组
joinCourseGroup 选中时触发 joinCourseGroup(checkedValues, item, index) 传入item数据对象index 数据对象index
checkAllValue 是否全选
onCheckAllChange 全选 onCheckAllChange(e, item, index)
course_groups 所有的group
*/
function CourseGroupChooser({ course_groups, isAdminOrCreator = true, item, index, arg_course_groups, checkAllValue, alwaysShow
, onCheckAllChange, joinCourseGroup }) {
const [state, setState] = useState({counter: 0}) const [state, setState] = useState({counter: 0})
const [search, setSearch] = useState('') const [search, setSearch] = useState('')
// useEffect(() => { // useEffect(() => {
@ -30,8 +38,15 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator, item, index, arg_
that.state.checkAllArray[index] - checkAllValue that.state.checkAllArray[index] - checkAllValue
*/ */
console.log('arg_course_groups', arg_course_groups)
const urlStyle = {"lef":"tunset", minWidth: '262px'};
if (alwaysShow == true) {
urlStyle.display = 'block'
}
return ( return (
<ul className="drop_down_menu" style={{"lef":"tunset", minWidth: '262px'}}> <ul className="drop_down_menu" style={urlStyle}>
{ {
course_groups && course_groups.length > 10? course_groups && course_groups.length > 10?
(<p className="drop_down_search"> (<p className="drop_down_search">
@ -41,15 +56,15 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator, item, index, arg_
} }
<Checkbox.Group onChange={(checkedValues) => joinCourseGroup(checkedValues, item, index)} <Checkbox.Group onChange={(checkedValues) => joinCourseGroup(checkedValues, item, index)}
value={arg_course_groups.map(item => item.id)} value={arg_course_groups.length && arg_course_groups[0].id ? arg_course_groups.map(item => item.id): arg_course_groups}
disabled={!isAdminOrCreator} className="mainGroup" disabled={!isAdminOrCreator} className="mainGroup"
> >
{course_groups && course_groups.length > 1 && <li key={'_all' + index} > {course_groups && course_groups.length > 1 && <li key={'_all' + index} >
{/* 防止被外面group包裹 */} {/* 防止被外面group包裹 */}
<Checkbox.Group> <Checkbox.Group onChange={(e) => onCheckAllChange(e, item, index)} value={[checkAllValue]}>
<Checkbox <Checkbox
checked={checkAllValue} value={true}
style={{ marginRight: '6px' }} onClick={(e) => onCheckAllChange(e, item, index)} onChange={() => {}} style={{ marginRight: '6px' }} onClick={() => {}}
>全选</Checkbox> >全选</Checkbox>
</Checkbox.Group> </Checkbox.Group>
</li>} </li>}
@ -60,9 +75,10 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator, item, index, arg_
return( return(
<li key={item.id} value={item.id} > <li key={item.id} value={item.id} >
<Checkbox value={item.id} <Checkbox value={item.id}
id={`check${item.id}`}
style={{ marginRight: '6px' }} style={{ marginRight: '6px' }}
></Checkbox> ></Checkbox>
{item.name} <label for={`check${item.id}`}>{item.name}</label>
</li> </li>
) )
}) })
@ -71,7 +87,7 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator, item, index, arg_
</Checkbox.Group> </Checkbox.Group>
<p className="drop_down_btn"> <p className="drop_down_btn">
<a href="javascript:void(0)" className="color-grey-6" <a href="javascript:void(0)" className="color-grey-6"
onClick={() => trigger('groupAdd', coursesids)} onClick={() => trigger('groupAdd')}
>添加分班...</a> >添加分班...</a>
</p> </p>
</ul> </ul>

@ -0,0 +1,108 @@
import React, { useState, useEffect, useRef } from 'react'
import { trigger } from 'educoder'
import { Input, Checkbox } from "antd";
import CourseGroupChooser from '../CourseGroupChooser'
import ModalWrapper from "../../common/ModalWrapper"
import axios from 'axios'
/**
arg_course_groups 选中的id数组
joinCourseGroup 选中时触发 joinCourseGroup(checkedValues, item, index) 传入item数据对象index 数据对象index
checkAllValue 是否全选
onCheckAllChange 全选 onCheckAllChange(e, item, index)
course_groups 所有的group
*/
function CourseGroupChooserModal({ course_groups = [], isAdminOrCreator, item, index,
setVisible, visible, record = {}, props = {}, fetchAll
}) {
// , arg_course_groups, checkAllValue , onCheckAllChange, joinCourseGroup
const [checkAllValue, setCheckAllValue] = useState(true)
const [arg_course_groups, setArg_course_groups] = useState(course_groups.map(item => item.id))
const modalEl = useRef(null);
useEffect(() => {
setCheckAllValue(true)
setArg_course_groups(course_groups.map(item => item.id))
}, [course_groups, visible])
useEffect(() => {
if (visible != undefined) {
modalEl.current.setVisible(true)
}
}, [visible])
const joinCourseGroup = (checks) => {
setArg_course_groups(checks)
}
const onCheckAllChange = (e) => {
if (checkAllValue) {
setArg_course_groups([])
} else {
setArg_course_groups(course_groups.map(item => item.id))
}
setCheckAllValue(!checkAllValue)
}
const onOk = async () => {
console.log(checkAllValue, arg_course_groups)
let approval = 1
const courseId = props.match.params.coursesId
let url = `/courses/${courseId}/teacher_application_review.json`
const response = await axios.post(url, {
user_id: record.user_id,
application_id: record.application_id,
approval: approval,
group_id: arg_course_groups
})
props.showNotification(`${approval == 1? '同意' : '拒绝'}`)
fetchAll(1)
modalEl.current.setVisible(false)
}
return (
<ModalWrapper
ref={modalEl}
width="600px"
title={`同意`}
visible={visible}
onOk={onOk}
className="courseGroupChooserModal"
>
<style>{`
.courseGroupChooserModal .description {
font-size: 16px;
text-align: center;
margin-bottom: 20px;
}
.courseGroupChooserModal .drop_down_menu {
position: relative;
top: auto;
box-shadow: none;
padding: 0 20px;
background: #f2f9ff;
padding-top: 12px;
}
.courseGroupChooserModal .drop_down_menu .mainGroup.ant-checkbox-group {
width: 100%;
max-height: 300px
}
.courseGroupChooserModal .drop_down_search {
margin: 0;
margin-bottom: 10px;
}
.courseGroupChooserModal .drop_down_menu li {
padding: 0px;
}
.courseGroupChooserModal .drop_down_menu .drop_down_btn {
padding: 0px 20px;
margin: 0;
}
`}</style>
{/* <React.Fragment>
<React.Fragment> */}
<div className="description">确认同意TA的加入并设置TA的分班管理权限</div>
<CourseGroupChooser
{...{ checkAllValue, isAdminOrCreator, course_groups, arg_course_groups, item, index,
joinCourseGroup, onCheckAllChange, alwaysShow: true }}
></CourseGroupChooser>
</ModalWrapper>
)
}
export default CourseGroupChooserModal

@ -472,7 +472,7 @@ class studentsList extends Component{
const { course_group_name, invite_code } = this.state; const { course_group_name, invite_code } = this.state;
const courseId = this.props.match.params.coursesId const courseId = this.props.match.params.coursesId
let exportUrl = "/api/courses/${courseId}/export_member_scores_excel.xlsx?" let exportUrl = `/api/courses/${courseId}/export_member_scores_excel.xlsx?`
const params = {} const params = {}
if (course_group_id) { if (course_group_id) {
params.group_id = course_group_id params.group_id = course_group_id

@ -2,6 +2,7 @@ import React,{ Component } from "react";
import { Input,Checkbox,Table, Divider, Tooltip,Spin, Menu } from "antd"; import { Input,Checkbox,Table, Divider, Tooltip,Spin, Menu } from "antd";
import CourseLayoutcomponent from '../common/CourseLayoutComponent' import CourseLayoutcomponent from '../common/CourseLayoutComponent'
import NoneData from "../coursesPublic/NoneData"
import Titlesearchsection from '../common/titleSearch/TitleSearchSection' import Titlesearchsection from '../common/titleSearch/TitleSearchSection'
import ColorCountText from '../common/titleSearch/ColorCountText' import ColorCountText from '../common/titleSearch/ColorCountText'
@ -20,6 +21,7 @@ import { from } from "array-flatten";
// import AddStudentModal from './modal/AddStudentModal' // import AddStudentModal from './modal/AddStudentModal'
import AddGraduationGroupModal from './modal/AddGraduationGroupModal' import AddGraduationGroupModal from './modal/AddGraduationGroupModal'
import AddAdminModal from './modal/AddAdminModal' import AddAdminModal from './modal/AddAdminModal'
import CourseGroupChooserModal from './modal/CourseGroupChooserModal'
import { ROLE_TEACHER_NUM, ROLE_ASSISTANT_NUM } from './common' import { ROLE_TEACHER_NUM, ROLE_ASSISTANT_NUM } from './common'
import CourseGroupChooser from './CourseGroupChooser' import CourseGroupChooser from './CourseGroupChooser'
@ -100,8 +102,7 @@ function buildColumns(that) {
{...{course_groups, isAdminOrCreator, item, index, arg_course_groups, {...{course_groups, isAdminOrCreator, item, index, arg_course_groups,
checkAllValue: that.state.checkAllArray[index], checkAllValue: that.state.checkAllArray[index],
joinCourseGroup: that.joinCourseGroup, joinCourseGroup: that.joinCourseGroup,
onCheckAllChange: that.onCheckAllChange, onCheckAllChange: that.onCheckAllChange}}
coursesids: that.props.coursesids }}
></CourseGroupChooser>} ></CourseGroupChooser>}
</React.Fragment> } </React.Fragment> }
</span> </span>
@ -211,24 +212,39 @@ class studentsList extends Component{
} }
// approval 2 - 拒绝 // approval 2 - 拒绝
onAgree = (record, approval = 1) => { onAgree = (record, approval = 1) => {
const isAdminOrCreator = this.props.isAdminOrCreator()
const { course_groups } = this.state
if (approval == 1 && isAdminOrCreator && course_groups && course_groups.length) {
this.setState({ clickRecord: record}, () => {
this.setGroupChooserModalVisible(true)
})
return;
}
const courseId = this.props.match.params.coursesId const courseId = this.props.match.params.coursesId
let url = `/courses/${courseId}/teacher_application_review.json` let url = `/courses/${courseId}/teacher_application_review.json`
axios.post(url, { this.props.confirm({
user_id: record.user_id, content: `是否确认${ approval == 1 ? '同意' : '拒绝'}TA的加入`,
application_id: record.application_id, onOk: () => {
approval: approval axios.post(url, {
}) user_id: record.user_id,
.then((response) => { application_id: record.application_id,
if (response.data.status == 0) { approval: approval
this.props.showNotification(`${approval == 1? '同意' : '拒绝'}`) })
this.fetchAll(1) .then((response) => {
if (response.data.status == 0) {
this.props.showNotification(`${approval == 1? '同意' : '拒绝'}`)
this.fetchAll(1)
}
})
.catch(function (error) {
console.log(error);
});
} }
}) })
.catch(function (error) {
console.log(error);
});
} }
onRefuse = (record) => { onRefuse = (record) => {
this.onAgree(record, 2) this.onAgree(record, 2)
@ -560,11 +576,15 @@ class studentsList extends Component{
this.fetchAll(); this.fetchAll();
}) })
} }
setGroupChooserModalVisible = (visible) => {
// 这里只会调用open
this.setState({groupChooserModalVisible: !this.state.groupChooserModalVisible})
}
render(){ render(){
const isAdmin = this.props.isAdmin() const isAdmin = this.props.isAdmin()
const columns = buildColumns(this) const columns = buildColumns(this)
let { let {
searchValue, checkBoxValues, checkAllValue, searchValue, checkBoxValues, checkAllValue, course_groups,
groupList, total_count, teachers, order, page, apply_size, filterKey groupList, total_count, teachers, order, page, apply_size, filterKey
}=this.state }=this.state
@ -616,7 +636,7 @@ class studentsList extends Component{
</React.Fragment> </React.Fragment>
} }
secondRowLeft={ secondRowLeft={
isAdminOrTeacher ? <div className="fl mt6 task_menu_ul "> isAdminOrTeacher ? <div className="fl mt6 task_menu_ul " style={{ width: '600px' }}>
<Menu mode="horizontal" defaultSelectedKeys="1" onClick={this.selectedStatus}> <Menu mode="horizontal" defaultSelectedKeys="1" onClick={this.selectedStatus}>
<Menu.Item key="1">已审批({total_count})</Menu.Item> <Menu.Item key="1">已审批({total_count})</Menu.Item>
<Menu.Item key="2">待审批({apply_size})</Menu.Item> <Menu.Item key="2">待审批({apply_size})</Menu.Item>
@ -646,6 +666,15 @@ class studentsList extends Component{
} }
`}</style> `}</style>
<div className="mt20 edu-back-white padding20 teacherList"> <div className="mt20 edu-back-white padding20 teacherList">
<CourseGroupChooserModal
props={this.props}
record={this.state.clickRecord}
fetchAll={this.fetchAll}
course_groups={course_groups}
visible={this.state.groupChooserModalVisible}
setVisible={this.setGroupChooserModalVisible}
></CourseGroupChooserModal>
{filterKey == '1' && <div className="clearfix stu_head" style={{paddingLeft: '15px'}}> {filterKey == '1' && <div className="clearfix stu_head" style={{paddingLeft: '15px'}}>
{ isAdminOrTeacher && hasGraduationModule && <Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} </Checkbox> } { isAdminOrTeacher && hasGraduationModule && <Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} </Checkbox> }
{ filterKey == '1' && <div className="studentList_operation_ul"> { filterKey == '1' && <div className="studentList_operation_ul">
@ -688,6 +717,7 @@ class studentsList extends Component{
</div>} </div>}
<Spin size="large" spinning={this.state.isSpin}> <Spin size="large" spinning={this.state.isSpin}>
<div className="clearfix stu_table"> <div className="clearfix stu_table">
{combineArray.length ?
<Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}> <Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
{/* pagination={{ current: page, total: total_count, pageSize:20, onChange: this.onPageChange }} */} {/* pagination={{ current: page, total: total_count, pageSize:20, onChange: this.onPageChange }} */}
<Table columns={columns} dataSource={combineArray} <Table columns={columns} dataSource={combineArray}
@ -700,6 +730,8 @@ class studentsList extends Component{
} : false} } : false}
></Table> ></Table>
</Checkbox.Group> </Checkbox.Group>
:
<NoneData></NoneData>}
</div> </div>
</Spin> </Spin>
</div> </div>

@ -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,7 +38,21 @@
.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;}
.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;}
.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}
.edu-position-hideysl li a:hover{ background:#F1F1F1; color:#05101A;}
.to-back-left {
width: 0;
height: 0;
margin-top: 27px;
border-right: 15px solid #FAFAFA;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
}
/* 问卷详情 */ /* 问卷详情 */
/* 答题列表 */ /* 答题列表 */
.unlimit{ .unlimit{

@ -98,7 +98,7 @@ class CommitSummary extends Component{
// console.log("提交总结接口") // console.log("提交总结接口")
// console.log(JSON.stringify(result)) // console.log(JSON.stringify(result))
// message.success(result.data.message); // message.success(result.data.message);
this.props.history.push(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist`); this.props.history.push(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist?tab=0`);
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -136,7 +136,7 @@ class CommitSummary extends Component{
</div> </div>
<div> <div>
<p className="ml29 fl color-black mt10 summaryname" onClick={this.asdasdsad}>提交总结</p> <p className="ml29 fl color-black mt10 summaryname" onClick={this.asdasdsad}>提交总结</p>
<a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist`} className="color-grey-6 fr font-16 ml30 mt10">返回</a> <a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist?tab=0`} className="color-grey-6 fr font-16 ml30 mt10">返回</a>
</div> </div>
{/*educontentbox*/} {/*educontentbox*/}
<div className="stud-class-set pt40 pb40"> <div className="stud-class-set pt40 pb40">
@ -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个字符',
}], }],
@ -171,7 +171,7 @@ class CommitSummary extends Component{
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20" > <Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20" >
提交 提交
</Button> </Button>
<a className="defalutCancelbtn fl" href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist`}>取消</a> <a className="defalutCancelbtn fl" href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist?tab=0`}>取消</a>
</div> </div>
</Form.Item> </Form.Item>
</Form> </Form>

@ -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>
) )
@ -596,6 +595,8 @@ class Listofworks extends Component {
} }
componentDidMount() { componentDidMount() {
console.log("Listofworks");
console.log("componentDidMount");
var homeworkid = this.props.match.params.homeworkid; var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid) // console.log(homeworkid)
// this.Gettitleinformation(homeworkid); // this.Gettitleinformation(homeworkid);
@ -655,6 +656,7 @@ class Listofworks extends Component {
code_review: result.data.code_review, code_review: result.data.code_review,
challenges_count:result.data.challenges_count, challenges_count:result.data.challenges_count,
}) })
this.props.Getdataback(result,result.data);
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1); this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1);
} } } }
}).catch((error) => { }).catch((error) => {
@ -714,6 +716,7 @@ class Listofworks extends Component {
code_review: result.data.code_review, code_review: result.data.code_review,
challenges_count:result.data.challenges_count, challenges_count:result.data.challenges_count,
}) })
this.props.Getdataback(result,result.data);
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page); this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
} }
} }
@ -1329,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=()=>{
@ -1362,6 +1366,10 @@ class Listofworks extends Component {
DownloadMessageval:undefined DownloadMessageval:undefined
}) })
} }
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
render() { render() {
// console.log("Listofworks.js000") // console.log("Listofworks.js000")
@ -1371,7 +1379,7 @@ class Listofworks extends Component {
// console.log(course_group_info) // console.log(course_group_info)
// console.log(JSON.stringify(this.props)); // console.log(JSON.stringify(this.props));
return ( return (
<div className="newMain clearfix "> <div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{visible === true ? <ModulationModal {visible === true ? <ModulationModal
visible={visible} visible={visible}
Cancel={this.cancelModulationModel} Cancel={this.cancelModulationModel}
@ -1389,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 ?
@ -1444,99 +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="educontent mb20">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn
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>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
<div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{teacherdata === undefined ? "" : teacherdata.homework_name}
</p>
<CoursesListType
typelist={teacherdata === undefined ? [""] : teacherdata.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.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"
href={`/shixuns/${teacherdata === undefined ? "" : teacherdata.shixun_identifier}/challenges`}
target={"_blank"}>实训详情</a>
</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"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/list`}>作品列表</Link>
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin() ?
this.state.code_review === true ||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"? "" : <Link
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>
代码查重</Link> : ""}
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
{/*{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> : ""
: ""}
{/*<a className="fr color-blue font-16" href={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/commitsummary`}>提交总结</a>*/}
{this.props.isAdmin() ?
this.state.code_review === false ?
""
: <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a> : ""}
</div>
</div>
<style> <style>
{` {`
@ -1678,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">
@ -1754,4 +1681,92 @@ class Listofworks extends Component {
} }
} }
export default Listofworks; export default Listofworks;
{/*<div className="educontent mb20">*/}
{/* <p className="clearfix mb20 mt10">*/}
{/* <ActionBtn className=" btn colorgrey fl hovercolorblue "*/}
{/* to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>*/}
{/* <span className="color-grey-9 fl ml3 mr3">&gt;</span>*/}
{/* <ActionBtn*/}
{/* 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>*/}
{/* <span className="color-grey-9 fl ml3 mr3">&gt;</span>*/}
{/* <WordsBtn className="fl">作业详情</WordsBtn>*/}
{/* </p>*/}
{/*</div>*/}
{/*<div className="educontent mb20">*/}
{/* <p className=" fl color-black summaryname" style={{heigth:"33px"}}>*/}
{/*{teacherdata === undefined ? "" : teacherdata.homework_name}*/}
{/*</p>*/}
{/*<CoursesListType*/}
{/*typelist={teacherdata === undefined ? [""] : teacherdata.homework_status}*/}
{/*/>*/}
{/*<a className="color-grey-9 fr font-16 summaryname ml20 mr20"*/}
{/*href={`/courses/${this.state.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"*/}
{/*href={`/shixuns/${teacherdata === undefined ? "" : teacherdata.shixun_identifier}/challenges`}*/}
{/*target={"_blank"}>实训详情</a>*/}
{/*</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={{
@ -177,13 +176,13 @@ class Listofworksstudentone extends Component {
className:'font-14', className:'font-14',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<span style={record.submitstate === "延时提交" ? { <span style={record.submitstate === "延时提交" ? {
"color": '#DD1717', "color": '#DD1717',
"text-align": "center" "text-align": "center"
} : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : { } : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
"color": '#747A7F', "color": '#747A7F',
"text-align": "center" "text-align": "center"
}}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</span> }}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</span>
</span> </span>
), ),
@ -316,7 +315,8 @@ class Listofworksstudentone extends Component {
} }
componentDidMount() { componentDidMount() {
console.log("Listofworksstudentone");
console.log("componentDidMount");
var homeworkid = this.props.match.params.homeworkid; var homeworkid = this.props.match.params.homeworkid;
this.Getalistofworks(homeworkid); this.Getalistofworks(homeworkid);
let query = this.props.location.pathname; let query = this.props.location.pathname;
@ -347,7 +347,9 @@ class Listofworksstudentone extends Component {
course_group: "", course_group: "",
} }
axios.post(urll, data).then((result) => { axios.post(urll, data).then((result) => {
if(result === undefined){
return
}
if (result.status === 200) { if (result.status === 200) {
if(this.props.isNotMember()===false) { if(this.props.isNotMember()===false) {
this.setState({ this.setState({
@ -364,7 +366,8 @@ class Listofworksstudentone extends Component {
challenges_count: result.data.challenges_count, challenges_count: result.data.challenges_count,
view_report: result.data.view_report, view_report: result.data.view_report,
}) })
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { this.props.Getdataback(result,result.data);
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata(result.data); this.seacthdata(result.data);
} else { } else {
this.seacthdatas(result.data, result.data.student_works); this.seacthdatas(result.data, result.data.student_works);
@ -421,6 +424,7 @@ class Listofworksstudentone extends Component {
challenges_count:result.data.challenges_count, challenges_count:result.data.challenges_count,
view_report:result.data.view_report, view_report:result.data.view_report,
}) })
this.props.Getdataback(result,result.data);
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata(result.data); this.seacthdata(result.data);
} else { } else {
@ -457,7 +461,7 @@ class Listofworksstudentone extends Component {
else if(item.title==="效率分"){ else if(item.title==="效率分"){
} }
} }
else if(this.props.isNotMember()===true&&item.title==="学号") { if(this.props.isNotMember()===true&&item.title==="学号") {
}else{ }else{
arr.push(item); arr.push(item);
@ -550,6 +554,8 @@ class Listofworksstudentone extends Component {
} }
} }
// console.log("554");
// console.log(columns2);
this.setState({ this.setState({
@ -577,7 +583,7 @@ class Listofworksstudentone extends Component {
} }
} }
else if(this.props.isNotMember()===true&&item.title==="学号") { if(this.props.isNotMember()===true&&item.title==="学号") {
}else{ }else{
arr.push(item); arr.push(item);
@ -640,6 +646,8 @@ class Listofworksstudentone extends Component {
} }
// console.log("datalistdatalist文件"); // console.log("datalistdatalist文件");
// console.log(datalist); // console.log(datalist);
// console.log("645");
// console.log(columns2);
this.setState({ this.setState({
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,
@ -781,7 +789,8 @@ class Listofworksstudentone extends Component {
challenges_count:result.data.challenges_count, challenges_count:result.data.challenges_count,
view_report:result.data.view_report, view_report:result.data.view_report,
}) })
this.seacthdata(result.data); this.props.Getdataback(result,result.data);
this.seacthdata(result.data);
} }
} }
}).catch((error) => { }).catch((error) => {
@ -833,13 +842,18 @@ class Listofworksstudentone extends Component {
}); });
} }
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
render() { render() {
let {visibles, game_list,columns, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state; let {visibles, game_list,columns, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state;
// console.log(this.state.data);
// console.log("841");
// console.log(this.state.columns);
return ( return (
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ? teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
// 学生不能查看别人的 // 学生不能查看别人的
<div className="newMain clearfix "> <div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
<style> <style>
{` {`
.startbox{ .startbox{
@ -908,58 +922,9 @@ class Listofworksstudentone extends Component {
: "" : ""
} }
<div className={"educontent mb20"}> <div className={"educontent "}>
<div className="educontent mb30"> <div className="edu-back-white" style={{width: "1200"}}>
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn
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>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
<div className="educontent mb30" style={{width: "1250px"}}>
<p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{teacherdata === undefined ? "" : teacherdata.homework_name}
</p>
<CoursesListType
typelist={teacherdata === undefined ? [""] : teacherdata.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>返回</a>
<p className="color-grey-9 fr font-16"></p>
</div>
<div className="edu-back-white" style={{width: "1250px"}}>
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<Link className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</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}/${teacherdata === undefined ? "" : teacherdata.id}/shixun_work_report`}>
查看实训报告
</Link>:""}
{/*<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">
@ -974,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"
}}> }}>
@ -1018,7 +982,7 @@ class Listofworksstudentone extends Component {
} }
`}</style> `}</style>
<div className="edu-table edu-back-white "> <div className="edu-table edu-back-white ">
{data === undefined ? "" : <Table {data === undefined ? "222222" : <Table
dataSource={data} dataSource={data}
columns={columns} columns={columns}
pagination={false} pagination={false}
@ -1048,7 +1012,7 @@ class Listofworksstudentone extends Component {
</div> </div>
: :
// 学生能查看别人的 // 学生能查看别人的
<div className="newMain clearfix "> <div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{visibles === true ? {visibles === true ?
<TraineetraininginformationModal <TraineetraininginformationModal
homeworkid={this.props.match.params.homeworkid} homeworkid={this.props.match.params.homeworkid}
@ -1088,31 +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"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</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"}>
@ -1135,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">
@ -1283,4 +1222,49 @@ 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>*/}

@ -0,0 +1,264 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn} from 'educoder';
import axios from 'axios';
import '../css/members.css';
import "../common/formCommon.css";
import '../css/Courses.css';
import './style.css';
import '../css/busyWork.css'
import '../poll/pollStyle.css'
import Listofworks from "./Listofworks";
import Listofworksstudentone from './Listofworksstudentone'
import Trainingjobsetting from './Trainingjobsetting'
import Workquestionandanswer from './Workquestionandanswer'
import CoursesListType from '../coursesPublic/CoursesListType';
import ShixunStudentWork from "./ShixunStudentWork";
import Startshixuntask from "../coursesPublic/Startshixuntask";
class ShixunHomeworkPage extends Component {
constructor(props) {
super(props);
this.state = {
tab: ["0"],
jobsettingsdata: undefined,
teacherdata: undefined,
code_review: false,
view_report: false,
}
}
//切换tab
ChangeTab = (e) => {
// console.log(e);
this.setState({
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) => {
this.setState({
jobsettingsdata: jobsettingsdata,
teacherdata: teacherdata,
code_review: teacherdata.code_review,
view_report: teacherdata.view_report,
})
}
componentDidMount() {
const query = this.props.location.search;
const type = query.split('?tab=');
// let sum = []
// sum.push(type[1])
// console.log("componentDidMountcomponentDidMount");
console.log(type);
this.setState({
tab: type[1],
})
let querys = this.props.location.pathname;
const types = querys.split('/');
console.log(types);
this.setState({
shixuntypes: types[3]
})
}
render() {
let {tab, jobsettingsdata, teacherdata} = this.state;
const isAdmin = this.props.isAdmin();
return (
<div className="newMain clearfix ">
<div className={"educontent mb20"} style={{width: "1200px"}}>
<div className="educontent mb20">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn
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>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
<div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth: "33px"}}>
{teacherdata === undefined ? "" : teacherdata.homework_name}
</p>
<CoursesListType
typelist={teacherdata === undefined ? [""] : teacherdata.homework_status}
/>
<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>
<a className="color-grey-9 fr font-16 mr20"
href={`/shixuns/${teacherdata === undefined ? "" : teacherdata.shixun_identifier}/challenges`}
target={"_blank"}>实训详情</a>
</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 ?
<Listofworks {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworks>
:
<Listofworksstudentone {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>)
:
parseInt(tab) === 1 ?
<Workquestionandanswer {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Workquestionandanswer>
:
parseInt(tab) === 2 ?
<ShixunStudentWork {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>
:
<Trainingjobsetting {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>
}
</div>
</div>
)
}
}
export default ShixunHomeworkPage;
// <div className="edu-back-white mt10" >
// <div className="stud-class-set bor-bottom-greyE ">
// <div className=" clearfix edu-back-white pl30 pr30">
// <div className="fl task_menu_ul">
// {this.props.isAdmin() === true ?
//
// <Menu mode="horizontal" selectedKeys={tab} onClick={(e)=>this.changeTab(e)}>
// <Menu.Item key="0">作品列表</Menu.Item>
// <Menu.Item key="1">作业回答</Menu.Item>
// <Menu.Item key="2">代码查重</Menu.Item>
// <Menu.Item key="3">设置</Menu.Item>
// </Menu>
// :
// <Menu mode="horizontal" selectedKeys={tab} onClick={(e)=>this.changeTab(e)}>
// <Menu.Item key="0">作品列表</Menu.Item>
// <Menu.Item key="1">作业回答</Menu.Item>
// <Menu.Item key="2">代码查重</Menu.Item>
// </Menu>
// }
//
// </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;
@ -73,6 +74,8 @@ class ShixunStudentWork extends Component {
} }
componentDidMount() { componentDidMount() {
console.log("ShixunStudentWork");
console.log("componentDidMount");
this.getupdata(); this.getupdata();
this.getTrainingjobsetting(); this.getTrainingjobsetting();
} }
@ -87,6 +90,8 @@ class ShixunStudentWork extends Component {
jobsettingsdata: result, jobsettingsdata: result,
}) })
this.props.Getdataback(result,result.data);
} }
}) })
} }
@ -469,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=()=>{
@ -502,6 +508,9 @@ class ShixunStudentWork extends Component {
DownloadMessageval:undefined DownloadMessageval:undefined
}) })
} }
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
render() { render() {
let { let {
data, data,
@ -582,7 +591,7 @@ class ShixunStudentWork extends Component {
} }
return ( return (
<div className="newMain clearfix "> <div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{this.state.showmodel===true?<ShixunWorkModal {this.state.showmodel===true?<ShixunWorkModal
{...this.props} {...this.props}
visible={this.state.showmodel} visible={this.state.showmodel}
@ -594,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
@ -618,100 +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="educontent mb20">
<p className="clearfix mb20 mt5">
<ActionBtn className=" btn colorgrey fl hovercolorblue mt5"
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
{/*<ActionBtn className="btn colorgrey fl hovercolorblue" href={"/courses/"+data.course_id+"/students"}>{data.course_name}</ActionBtn>*/}
<span className="color-grey-9 fl ml3 mr3 mt5">&gt;</span>
<ActionBtn
className=" btn colorgrey fl hovercolorblue mt5"
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
{/*<ActionBtn className="btn colorgrey fl hovercolorblue" href={"/courses/"+data.course_id+"/"+this.state.shixuntypes+"/"+this.props.match.params.homeworkid}>实训作业</ActionBtn>*/}
{/*<ActionBtn className="btn colorgrey fl hovercolorblue" href={"/courses/"+data.course_id+"/"+this.state.shixuntypes+"/"+data.category.category_id}>{data.category.category_name}</ActionBtn>*/}
<span className="color-grey-9 fl ml3 mr3 mt5">&gt;</span>
<ActionBtn className="fl">作业详情</ActionBtn>
</p>
</div>
<div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
</p>
<CoursesListType
typelist={jobsettingsdata === undefined ? [] : jobsettingsdata.data.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}`}>返回</a>
<a className={"color-grey-9 fr font-16 mr20"} href={`/shixuns/${jobsettingsdata===undefined?"":jobsettingsdata.data.shixun_identifier}/challenges`} target={"_blank"}>实训详情</a>
</div>
<div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
{/*<Link*/} <div className="edu-back-white">
{/* to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/listofworks`}>作品列表(教师)</Link>*/}
{this.props.isAdmin() === true?
<Link to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/list`}>作品列表</Link>:
<Link to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
}
{/*<Link*/}
{/*to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/Listofworksstudentone`}>作品列表(学生未完成)</Link>*/}
{/*<Link*/}
{/*to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/Listofworksstudenttwo`}>作品列表(学生完成)</Link>*/}
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin()?<Link className="active"
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>
代码查重</Link>:""}
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
<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> : "" : ""}
{/*{this.props.isAdmin()?*/}
{/*jobsettingsdata&&jobsettingsdata.data.code_review===true?*/}
{/*<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>*/}
{/*:"":""}*/}
</div>
</div>
<style> <style>
{` {`
.startbox{ .startbox{
@ -874,4 +791,58 @@ 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 ),建议: // axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
this.setState({ // }else if(response.data.status&&response.data.status===-2){
DownloadType:true, // if(response.data.messages === "100"){
DownloadMessageval:100 // // 已超出文件导出的上限数量100 ),建议:
})
}else { // this.setState({
//因附件资料超过500M // DownloadType:true,
this.setState({ // DownloadMessageval:100
DownloadType:true, // })
DownloadMessageval:500 // }else {
}) // //因附件资料超过500M
} // this.setState({
}else { // DownloadType:true,
this.props.showNotification(`正在下载中`); // DownloadMessageval:500
window.open("/api"+url, '_blank'); // })
} // }
}).catch((error) => { // }else {
console.log(error) // this.props.showNotification(`正在下载中`);
}); // window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
} }
@ -117,16 +120,14 @@ class ShixunWorkReport extends Component {
<span className={"color-grey-9"}>{data&&data.category.category_name}</span> <span className={"color-grey-9"}>{data&&data.category.category_name}</span>
</WordsBtn> </WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+homework_common_id+"/list"} className="fl color-grey-9">作业详情</WordsBtn> <WordsBtn to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+homework_common_id+"/list?tab=0"} className="fl color-grey-9">作业详情</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">{data&&data.username}</WordsBtn> <WordsBtn className="fl">{data&&data.username}</WordsBtn>
</p> </p>
</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>

@ -294,19 +294,19 @@ class ShixunhomeWorkItem extends Component{
{/*/courses/1309/9373/listofworks*/} {/*/courses/1309/9373/listofworks*/}
{/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/} {/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/}
{ {
this.props.isAdmin?<Link to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list"} this.props.isAdmin?<Link to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0"}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
} }
{ {
this.props.isStudent? <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist`} this.props.isStudent? <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist?tab=0`}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
} }
{ {
this.props.isNotMember===true? this.props.discussMessage.private_icon===true? this.props.isNotMember===true? this.props.discussMessage.private_icon===true?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</span> <span className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</span>
: <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist`} : <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist?tab=0`}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
} }
@ -360,7 +360,7 @@ class ShixunhomeWorkItem extends Component{
{this.props.isAdmin?<div className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"44px","display":"block"}}> {this.props.isAdmin?<div className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"44px","display":"block"}}>
<a className="btn colorblue font-16" href={"/shixuns/"+discussMessage.shixun_identifier+"/challenges"} target={"_blank"}>实训详情</a> <a className="btn colorblue font-16" href={"/shixuns/"+discussMessage.shixun_identifier+"/challenges"} target={"_blank"}>实训详情</a>
{this.props.isAdminOrCreator()?<a onClick={()=>this.editname(discussMessage.name,discussMessage.homework_id)} className={"btn colorblue ml20 font-16"}>重命名</a>:""} {this.props.isAdminOrCreator()?<a onClick={()=>this.editname(discussMessage.name,discussMessage.homework_id)} className={"btn colorblue ml20 font-16"}>重命名</a>:""}
<WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings`} > 设置</WordsBtn> <WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>
</div>:""} </div>:""}

@ -188,7 +188,7 @@ class ShixunWorkModal extends Component{
// message:"提示", // message:"提示",
// description: response.data.message // description: response.data.message
// }); // });
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work`); this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work?tab=2`);
}else if(response.data.status === -1){ }else if(response.data.status === -1){
notification.open({ notification.open({
message:"提示", message:"提示",

@ -1,7 +1,7 @@
import React, {Component} from "react"; import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import HomeworkModal from "../coursesPublic/HomeworkModal"; import HomeworkModal from "../coursesPublic/HomeworkModal";
import {WordsBtn, ActionBtn, handleDateString} from 'educoder'; import {WordsBtn, ActionBtn, handleDateString,getImageUrl} from 'educoder';
import PollDetailTabForthRules from '../poll/PollDetailTabForthRules'; import PollDetailTabForthRules from '../poll/PollDetailTabForthRules';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal'; import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import { import {
@ -12,7 +12,7 @@ import {
DatePicker, DatePicker,
Radio, Radio,
Tooltip, Tooltip,
notification notification,
} from "antd"; } from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';
@ -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
@ -112,7 +113,8 @@ class Trainingjobsetting extends Component {
group_settings:undefined, group_settings:undefined,
rulesdata:[], rulesdata:[],
showmodel:false, showmodel:false,
code_review:false code_review:false,
testscripttiptype:false,
} }
// console.log("获取到的值") // console.log("获取到的值")
// console.log("Trainingjobsetting") // console.log("Trainingjobsetting")
@ -124,6 +126,8 @@ class Trainingjobsetting extends Component {
} }
componentDidMount() { componentDidMount() {
console.log("Trainingjobsetting");
console.log("componentDidMount");
this.getTrainingjobsetting(); this.getTrainingjobsetting();
let query = this.props.location.pathname; let query = this.props.location.pathname;
const type = query.split('/'); const type = query.split('/');
@ -142,46 +146,52 @@ class Trainingjobsetting extends Component {
// console.log(homeworkid) // console.log(homeworkid)
let url = `/homework_commons/${homeworkid}/settings.json`; let url = `/homework_commons/${homeworkid}/settings.json`;
axios.get(url).then((result) => { axios.get(url).then((result) => {
console.log(url);
console.log(result);
if (result!=undefined) { if (result!=undefined) {
// console.log(result.data.code_review) this.props.Getdataback(result,result.data);
// console.log(result.data.code_review)
// console.log("设置页") // console.log("设置页")
// console.log(JSON.stringify(result)) // console.log(JSON.stringify(result))
let array=[]; let array=[];
let arrays=[]; let arrays=[];
var rulesdatas=[]; var rulesdatas=[];
if(result.data.group_settings.length === 0){ if(result.data.group_settings !== undefined){
array.push({ if(result.data.group_settings.length === 0){
course_group_id:[], array.push({
course_group_name:[], course_group_id:[],
publish_time:undefined, course_group_name:[],
end_time:undefined, publish_time:undefined,
publish_flag:"", end_time:undefined,
end_flag:"", publish_flag:"",
class_flag:"", end_flag:"",
course_search:"", class_flag:"",
open:false course_search:"",
}) open:false
}else { })
for(var i=0;i<result.data.group_settings.length;i++) { }else {
if(result.data.group_settings[i].publish_time === null &&result.data.group_settings[i].end_time === null){ for(var i=0;i<result.data.group_settings.length;i++) {
if(result.data.group_settings[i].publish_time === null &&result.data.group_settings[i].end_time === null){
}else {
array.push({ }else {
course_group_id: result.data.group_settings[i].group_id, array.push({
course_group_name: result.data.group_settings[i].group_name, course_group_id: result.data.group_settings[i].group_id,
publish_time: result.data.group_settings[i].publish_time, course_group_name: result.data.group_settings[i].group_name,
end_time: result.data.group_settings[i].end_time, publish_time: result.data.group_settings[i].publish_time,
publish_flag: "", end_time: result.data.group_settings[i].end_time,
end_flag: "", publish_flag: "",
class_flag: "", end_flag: "",
course_search: "", class_flag: "",
open: false course_search: "",
}) open: false
})
}
} }
} }
} }
for(var i=0;i<result.data.group_settings.length;i++){ if(result.data.group_settings!== undefined){
for(var i=0;i<result.data.group_settings.length;i++){
arrays.push({ arrays.push({
course_group_id:result.data.group_settings[i].group_id, course_group_id:result.data.group_settings[i].group_id,
@ -191,20 +201,22 @@ class Trainingjobsetting extends Component {
course_choosed:0, course_choosed:0,
}) })
if(result.data.group_settings[i].group_id instanceof Array ) { if(result.data.group_settings[i].group_id instanceof Array ) {
rulesdatas.push({ rulesdatas.push({
group_id:result.data.group_settings[i].group_id, group_id:result.data.group_settings[i].group_id,
publish_time: moment( result.data.group_settings[i].publish_time).format('YYYY-MM-DD HH:mm') , publish_time: moment( result.data.group_settings[i].publish_time).format('YYYY-MM-DD HH:mm') ,
end_time: moment(result.data.group_settings[i].end_time ).format('YYYY-MM-DD HH:mm'), end_time: moment(result.data.group_settings[i].end_time ).format('YYYY-MM-DD HH:mm'),
}) })
}else { }else {
rulesdatas.push({ rulesdatas.push({
group_id:[result.data.group_settings[i].group_id], group_id:[result.data.group_settings[i].group_id],
publish_time: moment( result.data.group_settings[i].publish_time).format('YYYY-MM-DD HH:mm') , publish_time: moment( result.data.group_settings[i].publish_time).format('YYYY-MM-DD HH:mm') ,
end_time: moment(result.data.group_settings[i].end_time ).format('YYYY-MM-DD HH:mm'), end_time: moment(result.data.group_settings[i].end_time ).format('YYYY-MM-DD HH:mm'),
}) })
}
} }
} }
this.setState({ this.setState({
rules:array, rules:array,
rulest:arrays, rulest:arrays,
@ -221,7 +233,7 @@ class Trainingjobsetting extends Component {
deadline: result.data.end_time === undefined ? undefined : result.data.end_time === null ? undefined : result.data.end_time, deadline: result.data.end_time === undefined ? undefined : result.data.end_time === null ? undefined : result.data.end_time,
late_time: result.data.late_time === undefined ? undefined : result.data.late_time === null ? undefined : result.data.late_time, late_time: result.data.late_time === undefined ? undefined : result.data.late_time === null ? undefined : result.data.late_time,
late_times: result.data.late_time === undefined ? undefined : result.data.late_time === null ? undefined : result.data.late_time, late_times: result.data.late_time === undefined ? undefined : result.data.late_time === null ? undefined : result.data.late_time,
allowreplenishment: result.data.allow_late === true ? "允许补交" : "禁止补交", allowreplenishment: result.data.allow_late,
latededuction: result.data.late_penalty, latededuction: result.data.late_penalty,
level: result.data.answer_open_evaluation === true ? "满分" : "扣分", level: result.data.answer_open_evaluation === true ? "满分" : "扣分",
completionefficiencyscore: result.data.work_efficiency, completionefficiencyscore: result.data.work_efficiency,
@ -231,10 +243,6 @@ class Trainingjobsetting extends Component {
challenge_settings: result.data.challenge_settings, challenge_settings: result.data.challenge_settings,
code_review:result.data.code_review code_review:result.data.code_review
}) })
} }
}) })
@ -262,7 +270,7 @@ class Trainingjobsetting extends Component {
if (datas[i].checked === true) { if (datas[i].checked === true) {
var object = { var object = {
challenge_id: datas[i].challenge_id, challenge_id: datas[i].challenge_id,
challenge_score: parseInt(datas[i].challenge_score), challenge_score: datas[i].challenge_score,
}; };
challenge_scoredata.push(datas[i].challenge_score); challenge_scoredata.push(datas[i].challenge_score);
array.push(object) array.push(object)
@ -337,7 +345,7 @@ class Trainingjobsetting extends Component {
} }
} }
} }
if (this.state.allowreplenishment === "允许补交") { if (this.state.allowreplenishment === true) {
if (this.state.late_times === undefined || this.state.late_times === null || this.state.late_times === "") { if (this.state.late_times === undefined || this.state.late_times === null || this.state.late_times === "") {
@ -409,7 +417,7 @@ class Trainingjobsetting extends Component {
if (this.state.allowreplenishment === "允许补交") { if (this.state.allowreplenishment === true) {
if (this.state.latededuction === undefined) { if (this.state.latededuction === undefined) {
this.props.showNotification(`请输入迟交扣分数`); this.props.showNotification(`请输入迟交扣分数`);
@ -530,7 +538,7 @@ class Trainingjobsetting extends Component {
unified_setting: this.state.unifiedsetting, //统一配置 unified_setting: this.state.unifiedsetting, //统一配置
publish_time: moment(this.state.publish_time).format('YYYY-MM-DD HH:mm'), //发布时间 publish_time: moment(this.state.publish_time).format('YYYY-MM-DD HH:mm'), //发布时间
end_time: moment(this.state.end_time).format('YYYY-MM-DD HH:mm'), //截止时间 end_time: moment(this.state.end_time).format('YYYY-MM-DD HH:mm'), //截止时间
allow_late: this.state.allowreplenishment === "允许补交" ? true : false, //补交 allow_late: this.state.allowreplenishment, //补交
late_penalty: parseInt(this.state.latededuction), //迟交扣分 late_penalty: parseInt(this.state.latededuction), //迟交扣分
late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间 late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间
answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项 answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项
@ -546,7 +554,7 @@ class Trainingjobsetting extends Component {
data = { data = {
unified_setting: this.state.unifiedsetting, //非统一配置 unified_setting: this.state.unifiedsetting, //非统一配置
group_settings: this.state.rulesdata, group_settings: this.state.rulesdata,
allow_late: this.state.allowreplenishment === "允许补交" ? true : false, //补交 allow_late: this.state.allowreplenishment, //补交
late_penalty: parseInt(this.state.latededuction), //迟交扣分 late_penalty: parseInt(this.state.latededuction), //迟交扣分
late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间 late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间
answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项 answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项
@ -651,9 +659,8 @@ class Trainingjobsetting extends Component {
//允许补交 //允许补交
onChanges = (e) => { onChanges = (e) => {
// console.log("640");
// console.log(this.state.end_time); // console.log(this.state.end_time);
if(e.target.value ==="允许补交"){ if(e.target.checked ===true){
if(this.state.end_time !== null && this.state.end_time!== undefined){ if(this.state.end_time !== null && this.state.end_time!== undefined){
// console.log(this.state.end_time); // console.log(this.state.end_time);
// var times = this.state.deadline.format('YYYY-MM-DD HH:mm'); // var times = this.state.deadline.format('YYYY-MM-DD HH:mm');
@ -665,16 +672,19 @@ class Trainingjobsetting extends Component {
this.setState({ this.setState({
allowreplenishment: e.target.value, allowreplenishment: e.target.checked,
latededuction:5, latededuction:5,
whethertopay:true, whethertopay:true,
}) })
}else { }else {
this.setState({ this.setState({
allowreplenishment: e.target.value, allowreplenishment: e.target.checked,
latededuction:0, latededuction:0,
whethertopay:false, whethertopay:false,
hand__e_tip: "",
hand_flags: false,
handclass:"",
}) })
} }
@ -1049,7 +1059,7 @@ class Trainingjobsetting extends Component {
var challenge_settings = this.state.challenge_settings; var challenge_settings = this.state.challenge_settings;
for (var i = 0; i < challenge_settings.length; i++) { for (var i = 0; i < challenge_settings.length; i++) {
if (i === index) { if (i === index) {
challenge_settings[i].challenge_score = parseInt(value); challenge_settings[i].challenge_score = value;
} }
} }
@ -1239,13 +1249,22 @@ class Trainingjobsetting extends Component {
this.setState({ this.setState({
publish_time:moment(handleDateString(dateString)) publish_time:moment(handleDateString(dateString))
}) })
if(this.state.allowreplenishment === "允许补交") { if(this.state.allowreplenishment === true) {
this.setState({ this.setState({
end_time:moment(handleDateString(dateString)).add(1, 'months'), end_time:moment(handleDateString(dateString)).add(1, 'months'),
deadline:moment(handleDateString(dateString)).add(1, 'months').format('YYYY-MM-DD HH:mm'), deadline:moment(handleDateString(dateString)).add(1, 'months').format('YYYY-MM-DD HH:mm'),
late_time:moment(handleDateString(dateString)).add(2, 'months'), late_time:moment(handleDateString(dateString)).add(2, 'months'),
late_times:moment(handleDateString(dateString)).add(2, 'months').format('YYYY-MM-DD HH:mm'), late_times:moment(handleDateString(dateString)).add(2, 'months').format('YYYY-MM-DD HH:mm'),
}); });
try {
this.setState({
unit_e_tip: "",
p_flag: false,
borredss:undefined,
})
} catch (e) {
}
}else{ }else{
this.setState({ this.setState({
end_time:moment(handleDateString(dateString)).add(1, 'months'), end_time:moment(handleDateString(dateString)).add(1, 'months'),
@ -1303,7 +1322,7 @@ class Trainingjobsetting extends Component {
end_time:moment(handleDateString(dateString)) end_time:moment(handleDateString(dateString))
}) })
// this.onChangedata('end_time', value, dateString); // this.onChangedata('end_time', value, dateString);
if(this.state.allowreplenishment === "允许补交"){ if(this.state.allowreplenishment === true){
this.setState({ this.setState({
deadline:moment(handleDateString(dateString)).format('YYYY-MM-DD HH:mm'), deadline:moment(handleDateString(dateString)).format('YYYY-MM-DD HH:mm'),
late_time:moment(handleDateString(dateString)).add(2, 'months'), late_time:moment(handleDateString(dateString)).add(2, 'months'),
@ -1580,7 +1599,7 @@ class Trainingjobsetting extends Component {
if(moment(this.state.late_time,"YYYY-MM-DD HH:mm")<=moment()){ if(moment(this.state.late_time,"YYYY-MM-DD HH:mm")<=moment()){
endtime=false; endtime=false;
} }
if(this.state.allowreplenishment === "禁止补交"){ if(this.state.allowreplenishment === false){
whethertopays=false; whethertopays=false;
} }
this.setState({ this.setState({
@ -1668,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=()=>{
@ -1700,18 +1720,40 @@ class Trainingjobsetting extends Component {
DownloadMessageval:undefined DownloadMessageval:undefined
}) })
} }
testscripttip =(e)=>{
if(e === 0){
this.setState({
testscripttiptype:true,
})
}else {
this.setState({
testscripttiptype:false,
})
}
}
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
render() { render() {
const dataformat = 'YYYY-MM-DD HH:mm'; const dataformat = 'YYYY-MM-DD HH:mm';
let {flagPageEdit,flagPageEdits,flagPageEditstwo,flagPageEditsbox,whethertopay,handclass,flagPageEditsthrees, flagPageEditsfor,rules,rulest,unifiedsetting,group_settings, course_group,unit_e_tip, borreds,borredss,unit_p_tip, end_time, late_time, score_open, publish_time, starttimetype, modalsType, modalsTopval, loadtype, modalSave, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata, endOpen, mystyle, mystyles} = this.state; let {flagPageEdit,testscripttiptype,flagPageEdits,flagPageEditstwo,flagPageEditsbox,whethertopay,handclass,flagPageEditsthrees, flagPageEditsfor,rules,rulest,unifiedsetting,group_settings, course_group,unit_e_tip, borreds,borredss,unit_p_tip, end_time, late_time, score_open, publish_time, starttimetype, modalsType, modalsTopval, loadtype, modalSave, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata, endOpen, mystyle, mystyles} = this.state;
const radioStyle = { const radioStyle = {
display: 'block', display: 'block',
height: '30px', height: '30px',
lineHeight: '30px', lineHeight: '30px',
color:"#666666" color:"#666666"
}; };
const radioStyles = {
display: 'block',
height: '30px',
lineHeight: '30px',
color:"#666666",
marginLeft:'38px',
};
// const startDate=moment(this.state.publish_time).format('YYYY-MM-DD HH:mm'); // const startDate=moment(this.state.publish_time).format('YYYY-MM-DD HH:mm');
// const endDate =moment(this.state.publish_time).add('months',1).format('YYYY-MM-DD HH:mm'); // const endDate =moment(this.state.publish_time).add('months',1).format('YYYY-MM-DD HH:mm');
@ -1725,7 +1767,7 @@ class Trainingjobsetting extends Component {
// console.log(this.props.isAdmin()) // console.log(this.props.isAdmin())
// console.log(this.state.code_review===false) // console.log(this.state.code_review===false)
return ( return (
<div className="newMain clearfix " ref='targetElementTrainingjobsetting'> <div className=" clearfix " ref='targetElementTrainingjobsetting' style={{margin: "auto", minWidth:"1200px"}}>
{this.state.showmodel===true?<ShixunWorkModal {this.state.showmodel===true?<ShixunWorkModal
{...this.props} {...this.props}
visible={this.state.showmodel} visible={this.state.showmodel}
@ -1736,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}
/> />
{/*立即发布*/} {/*立即发布*/}
@ -1767,111 +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="educontent mb20"> <div className="edu-back-white" style={{paddingTop: "20px"}}>
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn
className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
<div className="educontent mb20">
<p className=" fl color-black summaryname mt5" style={{heigth:"33px"}}>
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
</p>
<CoursesListType
typelist={jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20" href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}`}>返回</a>
<a className="color-grey-9 fr font-16 mr20" href={`/shixuns/${jobsettingsdata===undefined?"":jobsettingsdata.data.shixun_identifier}/challenges`} target={"_blank"}>实训详情</a>
</div>
<div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
{this.props.isAdmin() === true ? <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/list`}>作品列表</Link> : <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
}
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin()?this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"": <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>代码查重</Link> : ""}
<style>{
`
.poll_list a.active:after {
content: '';
width: 57px;
left: 10px;
bottom: 0px;
height: 2px;
background-color: #4CACFF;
position: absolute;
}
`
}</style>
<Link className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
{/*<Link className="ml30" to={`/courses/${this.state.props.match.params.coursesId}/shixun_homeworks/${this.state.props.match.params.homeworkid}/shixun_work_report`}>*/}
{/*<a className="color-blue">查看实训报告</a>*/}
{/*</Link>*/}
<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()?
this.state.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}><Tooltip title="编辑"><i <a className="fr" onClick={this.editSetting}><Tooltip title="编辑"><i
className="iconfont icon-bianjidaibeijing font-20 color-green pr20 "></i></Tooltip></a> className="iconfont icon-bianjidaibeijing font-20 color-green pr20 "></i></Tooltip></a>
: "" : ""
} }
</p> </p>
@ -1881,7 +1827,7 @@ class Trainingjobsetting extends Component {
<Checkbox className="ml15 font-16" style={{"color":"#666666"}} onChange={this.onChange} <Checkbox className="ml15 font-16" style={{"color":"#666666"}} onChange={this.onChange}
checked={this.state.unifiedsetting} checked={this.state.unifiedsetting}
defaultChecked={this.state.boolUnite} disabled={!flagPageEdit}>统一设置<span defaultChecked={this.state.boolUnite} disabled={!flagPageEdit}>统一设置<span
className={"font-14 ml15"} style={{"color":"#999999","text-align":"left"}}>(选中则所有分班使用相同的发布设置否则各个分班单独设置)</span></Checkbox> className={"font-14 ml15 color-grey-c"} style={{"text-align":"left"}}>(选中则所有分班使用相同的发布设置否则各个分班单独设置)</span></Checkbox>
</div> </div>
:<div></div> :<div></div>
} }
@ -1897,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
@ -1921,16 +1867,16 @@ class Trainingjobsetting extends Component {
/> />
</div> </div>
</Tooltip> </Tooltip>
<span className="ml20 fl mt10" style={{"color":"#999999","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"}}>
{ {
unit_p_tip && unit_p_tip != "" ? <span className="fl">{ unit_p_tip }</span> unit_p_tip && unit_p_tip != "" ? <span className="fl" style={{marginLeft: "94px"}}>{ unit_p_tip }</span>
: "" : ""
} }
</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
@ -1955,11 +1901,11 @@ class Trainingjobsetting extends Component {
</div> </div>
</Tooltip> </Tooltip>
<span className=" ml20 fl mt10 color-grey-9" 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"}}>
{ {
unit_e_tip && unit_e_tip != "" ? <span className="fl">{ unit_e_tip }</span> :"" unit_e_tip && unit_e_tip != "" ? <span className="fl" style={{marginLeft: "94px"}}>{ unit_e_tip }</span> :""
} }
</p> </p>
</div> </div>
@ -1985,13 +1931,13 @@ class Trainingjobsetting extends Component {
<div className=" clearfix edu-back-white poll_list mt10"> <div className=" clearfix edu-back-white poll_list mt10">
<div className={"font-16 color-dark fl pl20 mt10 "} style={{"color":"#05101A"}}>补交设置</div> <div className={"font-16 color-dark fl pl20 mt10 "} style={{"color":"#05101A"}}>补交设置</div>
</div> </div>
{/*value={this.state.allowreplenishment}*/}
<div className="ml40 mt10"
>
<Checkbox style={radioStyle} value={"允许补交"} checked={this.state.allowreplenishment} onChange={this.onChanges} disabled={!flagPageEdit}>开启补交 <span
className={"font-14 ml10 color-grey-c"} style={{"text-align":"left","font-size":"14px"}} >(选中则允许学生延时提交作品)</span></Checkbox>
<RadioGroup className="ml40 mt10" onChange={this.onChanges} <div className={"h21 mb30 mt20"}>
value={this.state.allowreplenishment}>
<Radio style={radioStyle} value={"允许补交"} disabled={!flagPageEdit}>允许补交 <span
className={"font-14 ml10 color-grey-9"} style={{"text-align":"left","font-size":"14px"}} >(选中则允许学生延时提交作品)</span></Radio>
<div className={"h21 mb30 ml30 mt20"}>
<span style={{"width": "100px","color":"#999999"}}>迟交扣分</span> <span style={{"width": "100px","color":"#999999"}}>迟交扣分</span>
<style> <style>
{ {
@ -2009,11 +1955,11 @@ class Trainingjobsetting extends Component {
style={{"color":"#999999","height": "40px"}} style={{"color":"#999999","height": "40px"}}
value={this.state.latededuction}/> value={this.state.latededuction}/>
<span className="ml10 color-grey-9" ></span> <span className="ml10 color-grey-9" ></span>
<span className="ml15 color-grey-9" style={{"text-align":"left","font-size":"14px"}}>(延时提交作品时学生成绩将被扣减的分值)</span> <span className="ml15 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(延时提交作品时学生成绩将被扣减的分值)</span>
{/*{latepenaltytype===true?<div className={"color-red ml40"}></div>:""}*/} {/*{latepenaltytype===true?<div className={"color-red ml40"}></div>:""}*/}
</div> </div>
<div className={"h20 mb50 ml30"}> <div className={"h20 mb20 "}>
<span style={{"width": "100px","color":"#999999"}}>结束时间</span> <span style={{"width": "100px","color":"#999999"}}>结束时间</span>
<DatePicker <DatePicker
showToday={false} showToday={false}
@ -2032,7 +1978,7 @@ class Trainingjobsetting extends Component {
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
className={handclass} className={handclass}
/> />
<span className="ml15 color-grey-9" style={{"text-align":"left","font-size":"14px"}}>(学生延时提交作品的时间截点)</span> <span className="ml15 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(学生延时提交作品的时间截点)</span>
{/*{latetimetype===true?<div className={"color-red "}>结束时间不能小于截止时间</div>:""}*/} {/*{latetimetype===true?<div className={"color-red "}>结束时间不能小于截止时间</div>:""}*/}
<style> <style>
{ {
@ -2049,8 +1995,8 @@ class Trainingjobsetting extends Component {
} }
</p> </p>
</div> </div>
<Radio style={radioStyle} value={"禁止补交"} disabled={!flagPageEdit}>禁止补交</Radio> {/*<Radio style={radioStyle} value={"禁止补交"} disabled={!flagPageEdit}>禁止补交</Radio>*/}
</RadioGroup> </div>
<div className="h20 mb10 "></div> <div className="h20 mb10 "></div>
</div> </div>
{/*评分设置*/} {/*评分设置*/}
@ -2058,26 +2004,23 @@ class Trainingjobsetting extends Component {
<div className=" clearfix edu-back-white poll_list mt20"> <div className=" clearfix edu-back-white poll_list mt20">
<div className={"font-16 color-dark fl pl20 "} style={{"color":"#05101A"}}>评分设置</div> <div className={"font-16 color-dark fl pl20 "} style={{"color":"#05101A"}}>评分设置</div>
</div> </div>
<p className="ml40 mt20 c_grey font-13 " style={{"color":"#666666"}}> 查看参考答案才通过评测的关卡扣分规则<span <div className="yslflexhomes">
className=" font-14 color-grey-9 ml15" style={{"text-align":"left"}}>(学生通过评测后再查看参考答案不对成绩产生影响)</span></p> <div style={{width:"700px"}}>
<div className="ml20 mt10 mt20">
<RadioGroup className="ml60 mt20" onChange={this.onChangeslevel} value={this.state.level}> <span className="c_grey font-13" style={{"color":"#333333"}}> 关卡任务的选择和分值设置 </span><span className="ml15 font-14 color-grey-c" style={{"text-align":"left"}}>( = + )</span>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey" value={"扣分"}>按查看答案级别扣分<span
className="color-grey-9 font-14 ml15" style={{"text-align":"left"}}>根据学员选择查看的实训答案级别(解题思路完整答案)扣减相应的分值</span></Radio>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt15"
value={"满分"}>不扣分 </Radio>
</RadioGroup>
<div className="ml40 mt10 mt20">
<span className="c_grey font-13" style={{"color":"#333333"}}> 关卡任务的选择和分值设置 </span><span className="ml15 font-14 color-grey-9" style={{"text-align":"left"}}>( = + )</span>
</div> </div>
<div className=" clearfix edu-back-white poll_list mt10" style={{marginLeft:" 40px"}}>
<Checkbox disabled={!flagPageEdit} className=" font-13 mt10"
onChange={this.onChangeeffectiveness}
checked={this.state.completionefficiencyscore} style={{"color":"#666666"}}>效率分<span
className={"font-14 color-grey-c font-14 ml15"} style={{"text-align":"left"}}>(选中则学生最终成绩包含效率分)</span>
</Checkbox>
<div>
</div>
<div className=" clearfix edu-back-white poll_list mt10">
<Checkbox disabled={!flagPageEdit} className="ml60 font-13 mt20"
onChange={this.onChangeeffectiveness}
checked={this.state.completionefficiencyscore} style={{"color":"#666666"}}>效率分<span
className={"font-14 color-grey-9 font-14 ml15"} style={{"text-align":"left"}}>(选中则学生最终成绩包含效率分)</span></Checkbox>
</div> </div>
<div className="ml85 mt30"> <div className=" mt20" style={{marginLeft:"75px"}}>
<span className="c_grey mr10" style={{"color":"#999999"}}>分值</span> <span className="c_grey mr10" style={{"color":"#999999"}}>分值</span>
<InputNumber min={0} disabled={!flagPageEdit} max={100} className="ml10 h40 mr10 color-grey-9" <InputNumber min={0} disabled={!flagPageEdit} max={100} className="ml10 h40 mr10 color-grey-9"
style={{width: "100px","color":"#999999"}} style={{width: "100px","color":"#999999"}}
@ -2086,29 +2029,76 @@ class Trainingjobsetting extends Component {
<span className="ml10" style={{"color":"#999999"}}></span> <span className="ml10" style={{"color":"#999999"}}></span>
<span className={"font-14 color-grey-9 "} style={{"color":"#999999"}}></span> <span className={"font-14 color-grey-9 "} style={{"color":"#999999"}}></span>
</div> </div>
<RadioGroup className="ml60 mt10" onChange={this.onChangeslevelproportion} </div>
value={this.state.proportion}> <div>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt20" <div className="yslflexhomes invite-tipysl" style={{marginTop: "45px"}} >
value={"均分比例"} style={{"color":"#666666"}}>均分比例<span <span className="to-back-left"></span>
className="color-grey-9 font-10 ml15" style={{"color":"#999999"}}>(根据任务数平均分配) 例如实训任务5关每一关分值为 1 / 5 * 100 = 20</span></Radio> <div className="padding20 invitecontent clearfix" style={{backgroundColor:" #FAFAFA"}}>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt20" <p className="font-12 edu-txt-left">
value={"经验值比例"} style={{"color":"#666666"}}>经验值比例 <span 学生工作效率= log(实训总得分/实训总耗时)<br/>
className="color-grey-9 font-10 ml15" style={{"color":"#999999"}}>(根据任务经验值在实训总经验值的比例进行分配) 例如实训总经验值1500某一关经验值为600则这一关的分值为600 / 1500 * 100 = 40 学生效率分 = 学生工作效率 / 课堂学生最高工作效率 * 分值<br/>
</span></Radio> </p>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt20" </div>
value={"自定义分值"} style={{"color":"#666666"}}>自定义分值 <span </div>
className="color-grey-9 font-10 ml15" style={{"color":"#999999"}}>(手动设置关卡分值)</span></Radio> </div>
</div>
<div className="yslflexhome">
<div >
<div className="ml20 mt40 mt20" >
<span className="c_grey font-13" style={{"color":"#333333"}}> 关卡任务分值设置规则 </span> <span> <RadioGroup className="ml50" onChange={this.onChangeslevelproportion} value={this.state.proportion}>
<Radio style={{ display: 'block',
height: '30px',
lineHeight: '30px',
color:"#666666",
}} disabled={!flagPageEdit} className="c_grey mt20 "
value={"均分比例"} style={{"color":"#666666"}}>均分比例</Radio>
<Radio style={{ display: 'block',
height: '30px',
lineHeight: '30px',
color:"#666666",
}} disabled={!flagPageEdit} className="c_grey ml30"
value={"经验值比例"} style={{"color":"#666666"}}>难易度</Radio>
<Radio style={{ display: 'block',
height: '30px',
lineHeight: '30px',
color:"#666666",
}} disabled={!flagPageEdit} className="c_grey mt20 ml30"
value={"自定义分值"} style={{"color":"#666666"}}>自定义分值
{testscripttiptype===true?
<div className="invite-tipysls clearfix " id="test_script_tip" style={{left: '148px',width: '322px',zIndex: '10'}}>
<span className="right-black-trangles"></span>
<div className="padding20 invitecontent clearfix">
<p className="font-12 edu-txt-left">
若完成效率分值 = 10, <br/>
均分比例: 根据任务数平均分配<br/>
: 实训任务3关, 每关分值: 1/3*(100-10)=30<br/>
<br/>
难易度: 根据关卡经验值的高低确定关卡分值<br/>
: 实训总经验值1200, 某关经验值200,<br/>
则其分值:200/1200*(100-10)=15<br/>
<br/>
自定义分值: 手动设置关卡分值<br/>
</p>
</div>
<p className="inviteTipbtn with100 fl">
<a onClick={()=>this.testscripttip(1)}>知道了</a>
</p>
</div>
:""}
</Radio>
</RadioGroup> </RadioGroup>
<p className="ml95 mt15 c_grey font-13 " style={{"color":"#666666"}}> 关卡名称<span <a onClick={()=>this.testscripttip(0)}><img style={{marginBottom:"3px",marginLeft:"20px"}} src={getImageUrl("images/educoder/problem.png") }/></a>
className="color-grey-9 font-10 ml30s" style={{"color":"#999999"}}>(选中的关卡将计入评分计算范围暂时不支持跳关选择)</span><span </span>
className="color-grey-9 ml90" style={{"color":"#666666"}}>分值</span></p> </div>
<div className="ml95 mt15"> <p className="ml20 mt15 c_grey font-13 " style={{"color":"#666666"}}> 关卡名称<span
className="color-grey-c font-10 ml10">(需要学生完成的任务请选中)</span></p>
<div className="ml40 mt15" >
{this.state.challenge_settings === undefined ? "" : this.state.challenge_settings.map((object, index) => { {this.state.challenge_settings === undefined ? "" : this.state.challenge_settings.map((object, index) => {
return ( return (
<li> <li>
<Checkbox className="ml110 mt20 " <Checkbox className="ml110 mt20 "
disabled={!flagPageEditsbox} disabled={!flagPageEditsbox}
style={{"width": "400px","color":"#05101A"}} style={{"width": "480px","color":"#05101A"}}
checked={object.checked} checked={object.checked}
onChange={(value) => this.onChangedatasheet(value, index)} onChange={(value) => this.onChangedatasheet(value, index)}
>{object.challenge_name}</Checkbox> >{object.challenge_name}</Checkbox>
@ -2117,11 +2107,24 @@ class Trainingjobsetting extends Component {
onChange={(value) => this.hangeTopicNametwodatasheet(value, index)} onChange={(value) => this.hangeTopicNametwodatasheet(value, index)}
value={object.challenge_score} value={object.challenge_score}
/> />
<span className="ml10" style={{"color":"#999999"}}></span>
</li> </li>
) )
})} })}
</div> </div>
</div>
</div>
<p className="ml20 mt40 c_grey font-13 " style={{"color":"#333333"}}> 查看参考答案才通过评测的关卡扣分规则<span
className=" font-14 color-grey-c ml15" style={{textAlign:"left",marginLeft:"40px"}}>(学生通过评测后再查看参考答案不对成绩产生影响)</span></p>
<RadioGroup className="ml40 mt20" onChange={this.onChangeslevel} value={this.state.level}>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey" value={"扣分"}>按查看答案级别扣分<span
className="color-grey-c font-14 ml15" style={{"text-align":"left"}}>根据学员选择查看的实训答案级别(解题思路完整答案)扣减相应的分值</span></Radio>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt15"
value={"满分"}>不扣分 </Radio>
</RadioGroup>
</div> </div>
{/*公开设置*/} {/*公开设置*/}
<div className="stud-class-set bor-top-greyE edu-back-white mt35 pb5 "> <div className="stud-class-set bor-top-greyE edu-back-white mt35 pb5 ">
@ -2131,7 +2134,7 @@ class Trainingjobsetting extends Component {
<div className={"mb20 mt15"}> <div className={"mb20 mt15"}>
<Checkbox disabled={!flagPageEdit} className="ml40" onChange={this.onChangepublicwork} <Checkbox disabled={!flagPageEdit} className="ml40" onChange={this.onChangepublicwork}
checked={this.state.publicwork} style={{"color":"#666666"}}>公开成绩</Checkbox> checked={this.state.publicwork} style={{"color":"#666666"}}>公开成绩</Checkbox>
<span className={"font-14 color-grey-9 font-14 "} style={{"text-align":"left"}}>(选中则在作业截止/补交结束时间之后已提交作品的学生可以查看其它学生的成绩否则只能查看自己的成绩)</span> <span className="font-14 color-grey-c font-14 " style={{"text-align":"left"}}>(选中则在作业截止/补交结束时间之后已提交作品的学生可以查看其它学生的成绩否则只能查看自己的成绩)</span>
</div> </div>
</div> </div>
@ -2161,4 +2164,74 @@ 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
//作业问答页面 //作业问答页面
@ -81,6 +82,8 @@ class Workquestionandanswer extends Component {
} }
componentDidMount() { componentDidMount() {
console.log("Workquestionandanswer");
console.log("componentDidMount");
var homeworkid = this.props.match.params.homeworkid; var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid) // console.log(homeworkid)
this.Gettitleinformation(homeworkid) this.Gettitleinformation(homeworkid)
@ -108,6 +111,7 @@ class Workquestionandanswer extends Component {
jobsettingsdata: result, jobsettingsdata: result,
...result.data ...result.data
}) })
this.props.Getdataback(result,result.data);
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -314,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({
@ -345,6 +350,9 @@ class Workquestionandanswer extends Component {
DownloadMessageval:undefined DownloadMessageval:undefined
}) })
} }
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
render() { render() {
const dateFormat = 'YYYY-MM-DD HH:mm:ss'; const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let { let {
@ -364,7 +372,7 @@ class Workquestionandanswer extends Component {
return ( return (
<div className="newMain clearfix "> <div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{this.state.showmodel === true ? <ShixunWorkModal {this.state.showmodel === true ? <ShixunWorkModal
{...this.props} {...this.props}
visible={this.state.showmodel} visible={this.state.showmodel}
@ -375,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
@ -399,105 +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="educontent mb20"> <div className="edu-back-white" >
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={"/courses/" + this.props.match.params.coursesId + "/students"}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn
className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
<div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
</p>
<CoursesListType
typelist={jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>返回</a>
<a className="color-grey-9 fr font-16 mr20"
href={`/shixuns/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.shixun_identifier}/challenges`}
target={"_blank"}>实训详情</a>
</div>
<div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
{this.props.isAdmin() === true ? <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/list`}>作品列表</Link> :
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
// :<Link
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/noopenlist`}>作品列表(学生完成)</Link>
}
<Link
className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin() ?
this.state.code_review === true || jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0] === "未发布" ? "" :
<Link
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>
代码查重</Link> : ""}
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
{/*<a className="fr color-blue font-16" href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`}>导出成绩</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() ?
this.state.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>
{ {
@ -508,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>
@ -605,4 +518,76 @@ 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>*/}

@ -0,0 +1,86 @@
import React, {Component} from "react";
import '../courses/css/members.css';
import "../courses/common/formCommon.css"
import '../courses/css/Courses.css';
import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png';
import educodernet from '../../../src/images/login/educodernet.png';
import InterestpageComponent from '../user/Interestpage'
//educoder登入页面
var newContainer={
background: `url(${beijintulogontwo})`,
backgroundPosition: "center" ,
backgroundRepeat: "no-repeat",
backgroundAttachment: "fixed",
backgroundSize: "100% 100%",
height:" 100%",
width:" 100%",
position: "absolute",
top: "0px",
bottom: "0px",
minHeight: "100%",
overflow:"hidden",
paddingTop: "40px",
}
class EducoderInteresse extends Component {
constructor(props) {
super(props);
}
componentDidMount() {
}
render() {
return (
<div style={newContainer} className=" clearfix" >
<div >
<div style={{
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%"
}}>
<div >
<img src={educodernet}/>
</div>
</div>
<div style={{
display: "flex",
justifyContent: "center",
width: "100%",
height: "630px",
marginTop: "44px",
}}>
<InterestpageComponent {...this.props} {...this.state}>
</InterestpageComponent>
</div>
<div style={{
display: "flex",
justifyContent: "center",
width: "100%",
bottom:"0",
position: "fixed"
}}>
<div className="font-14 color-grey-9 " style={{ bottom:"0",position: "absolute",marginBottom: "20px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div>
</div>
</div>
)
}
}
export default EducoderInteresse;

@ -43,17 +43,27 @@ var imgback = {
backgroundImage: `url(${beijintulogontwo})`, backgroundImage: `url(${beijintulogontwo})`,
} }
var imgmian ={ var imgmian ={
"width": "100%", width: "100%",
"background": `url(${beijintulogontwo})`, background: `url(${beijintulogontwo})`,
"height": "100%", position: "relative",
"position": "relative",
} }
var newContainer={ var newContainer={
"min-height": "100%", background: `url(${beijintulogontwo})`,
"background": `url(${beijintulogontwo})`, backgroundPosition: "center" ,
"height": "auto !important", backgroundRepeat: "no-repeat",
"position": "relative", backgroundAttachment: "fixed",
backgroundSize: "100% 100%",
height:" 100%",
width:" 100%",
position: "absolute",
top: "0px",
bottom: "0px",
minHeight: "100%",
overflow:"hidden",
paddingTop: "40px",
} }
class EducoderLogin extends Component { class EducoderLogin extends Component {
constructor(props) { constructor(props) {
@ -76,7 +86,8 @@ class EducoderLogin extends Component {
} }
}else if(props.match.url === "/register"){ }else if(props.match.url === "/register"){
this.state = { // showbool: 1,
this.state = {
showbool: 1, showbool: 1,
loginstatus:false, loginstatus:false,
logini:2, logini:2,
@ -114,13 +125,7 @@ class EducoderLogin extends Component {
this.setState({ this.setState({
showbool: 1 showbool: 1
}) })
} else if(e===2) { } else if(e===3){
this.setState({
namezh:name,
passmm:pass,
showbool: 2,
})
}else if(e===3){
this.setState({ this.setState({
showbool: 3 showbool: 3
}) })
@ -131,24 +136,16 @@ class EducoderLogin extends Component {
render() { render() {
let {showbool,loginstatus,logini} = this.state; let {showbool,loginstatus,logini} = this.state;
return ( return (
<div style={newContainer} > <div style={newContainer} className=" clearfix" >
<style>
{ <div >
`
html, body, {
height: 100%;
}
`
}
</style>
<div style={imgmian}>
<div style={{ <div style={{
"display": "flex", "display": "flex",
"justify-content": "center", "justify-content": "center",
"align-items": "center", "align-items": "center",
"width": "100%" "width": "100%"
}}> }}>
<div style={{"margin-top": "20px"}}> <div >
<img src={educodernet}/> <img src={educodernet}/>
</div> </div>
@ -157,12 +154,13 @@ class EducoderLogin extends Component {
{ {
showbool === 1 ? showbool === 1 ?
<div style={{ <div style={{
"display": "flex", display: "flex",
"justify-content": "center", justifyContent: "center",
"align-items": "center", width: "100%",
"width": "100%", height: "550px",
marginTop: "44px",
}}> }}>
<div style={{"margin-top": "40px","height":"580px"}}> <div>
<LoginRegisterComponent {...this.props} {...this.state} <LoginRegisterComponent {...this.props} {...this.state}
Setshowbool={(e,name,pass)=>this.Setshowbool(e,name,pass)} ></LoginRegisterComponent> Setshowbool={(e,name,pass)=>this.Setshowbool(e,name,pass)} ></LoginRegisterComponent>
@ -170,39 +168,31 @@ class EducoderLogin extends Component {
</div> </div>
</div> </div>
:showbool === 2 ?
<div style={{
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%",
}}>
<InterestpageComponent {...this.props} {...this.state}>
</InterestpageComponent>
</div>
: :
<div style={{ <div style={{
"display": "flex", display: "flex",
"justify-content": "center", justifyContent: "center",
"align-items": "center", width: "100%",
"width": "100%", height: "550px",
marginTop: "44px",
}}> }}>
<div style={{"margin-top": "40px","height":"580px"}}> <div >
<FindPasswordComponent {...this.props} {...this.state} <FindPasswordComponent {...this.props} {...this.state}
Setshowbool={(e)=>this.Setshowbool(e)}></FindPasswordComponent> Setshowbool={(e)=>this.Setshowbool(e)}></FindPasswordComponent>
</div> </div>
</div> </div>
} }
<div style={{"height":"125px", <div style={{
"display": "flex", display: "flex",
"justify-content": "center", justifyContent: "center",
"align-items": "center", width: "100%",
"width": "100%", bottom:"0",
position: "fixed"
}}> }}>
<div className="font-14 color-grey-9 " style={{marginTop:"15px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div> <div className="font-14 color-grey-9 " style={{ bottom:"0",position: "absolute",marginBottom: "20px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div> </div>
<div style={{"height":"100px"}}></div>
</div> </div>
</div> </div>
) )
@ -210,4 +200,16 @@ class EducoderLogin extends Component {
} }
export default EducoderLogin; export default EducoderLogin;
// showbool === 2 ?
// <div style={{
// display: "flex",
// justifyContent: "center",
// width: "100%",
// height: "630px",
// marginTop: "44px",
// }}>
// <InterestpageComponent {...this.props} {...this.state}>
// </InterestpageComponent>
// </div>
// :

@ -1,19 +1,62 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {getImageUrl} from 'educoder'; import {getImageUrl} from 'educoder';
import { Modal} from 'antd'; import { Modal} from 'antd';
import axios from 'axios';
class DownloadMessage extends Component { class DownloadMessage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
funmodalsType:false, funmodalsType:false,
istype:false istype:false,
DownloadMessageval:undefined,
DownloadType:false
} }
} }
setDownload=()=>{ setDownload=()=>{
this.props.modalCancel(); this.modalCancel();
window.open(`/users/${this.props.user.login}/private_messages`) window.open(`/users/${this.props.user.login}/private_messages`)
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
} }
/// 确认是否下载
confirmysl(url,params){
axios.get(url,{
params
}).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
render() { render() {
return( return(
@ -39,7 +82,7 @@ render() {
</p> </p>
:""} :""}
<div className="clearfix mt30 edu-txt-center"> <div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={this.props.modalCancel}>取消</a> <a className="task-btn mr30" onClick={this.modalCancel}>取消</a>
<a className="task-btn task-btn-orange" onClick={this.setDownload}>立即联系</a> <a className="task-btn task-btn-orange" onClick={this.setDownload}>立即联系</a>
</div> </div>
</div> </div>

@ -96,13 +96,13 @@ class Header extends Component {
*/} */}
</div> </div>
<div className="-header-right clearfix"> {(grade || grade == 0) && <div className="-header-right clearfix">
{/*<img src="/images/task/coin.png" className="fl" width="30" height="30" alt=""/>*/} {/*<img src="/images/task/coin.png" className="fl" width="30" height="30" alt=""/>*/}
<span style={{width:'20px', height:'20px', background:'#FFD633', borderRadius: '10px', marginTop: '3px' }} className="fl"></span> <span style={{width:'20px', height:'20px', background:'#FFD633', borderRadius: '10px', marginTop: '3px' }} className="fl"></span>
<span className="ml5 color-white fl" id="user_grade"> <span className="ml5 color-white fl" id="user_grade">
<a href={`${user.user_url}/user_grade`} target="_blank">{ grade === 0 ? grade : (grade || '')}</a> <a href={`${user.user_url}/user_grade`} target="_blank">{ grade === 0 ? grade : (grade || '')}</a>
</span> </span>
</div> </div>}

@ -75,7 +75,7 @@ class MainContent extends Component {
{/* 左侧任务说明等功能的区域 */} {/* 左侧任务说明等功能的区域 */}
<LeftViewContainer {...newProps}></LeftViewContainer> <LeftViewContainer {...newProps}></LeftViewContainer>
</div> </div>
<div id="can-drag" className="can-drag" style={{display: 'none'}}></div> {showIframeContent && vnc_url && <div id="can-drag" className="can-drag" style={{display: 'none'}}></div>}
<div className="b-label -layout" style={{left: '687px'}}> <div className="b-label -layout" style={{left: '687px'}}>
<div className="resize-helper "> <div className="resize-helper ">
<Button variant="fab" aria-label="Swap" mini onClick={this.onResizeButtonClick}> <Button variant="fab" aria-label="Swap" mini onClick={this.onResizeButtonClick}>

@ -13,6 +13,7 @@ class VNCDisplay extends Component {
// When this function is called we have // When this function is called we have
// successfully connected to a server // successfully connected to a server
function connectedToServer(e) { function connectedToServer(e) {
$('#top_bar').hide()
status("Connected to " + desktopName); status("Connected to " + desktopName);
} }
// This function is called when we are disconnected // This function is called when we are disconnected
@ -120,6 +121,9 @@ class VNCDisplay extends Component {
canvas canvas
*/ */
rfb.scaleViewport = readQueryVariable('scale', false); rfb.scaleViewport = readQueryVariable('scale', false);
rfb.resizeSession = true
window.__rfb == rfb;
} }
render() { render() {
@ -127,7 +131,7 @@ class VNCDisplay extends Component {
return ( return (
<div className=""> <div className="" style={{height: '100%'}}>
<style>{` <style>{`
#top_bar { #top_bar {
background-color: #6e84a3; background-color: #6e84a3;
@ -148,6 +152,7 @@ class VNCDisplay extends Component {
cursor: pointer; cursor: pointer;
} }
#screen { #screen {
height: 100%;
flex: 1; /* fill remaining space */ flex: 1; /* fill remaining space */
overflow: hidden; overflow: hidden;
} }

@ -1,134 +1,138 @@
.taskResultLayer { .taskResultLayer {
color: #666666; color: #666666;
z-index: 99999999999999; z-index: 99999999999999;
width: 100%; width: 100%;
height: 100%; height: 100%;
position: fixed; position: fixed;
background:rgba(0,0,0,0.8); background:rgba(0,0,0,0.8);
top: 0px; top: 0px;
overflow: hidden; overflow: hidden;
} }
.taskResultLayer .closeIcon{ .taskResultLayer .closeIcon{
position: absolute; position: absolute;
right: 100px; right: 100px;
top: 46px; top: 46px;
font-size: 28px; font-size: 28px;
z-index: 999999; z-index: 999999;
color: rgb(255,255,255,0.7); color: rgb(255,255,255,0.7);
cursor: pointer; cursor: pointer;
} }
.taskResultLayer .closeIcon:hover { .taskResultLayer .closeIcon:hover {
color: #4CACFF; color: #4CACFF;
} }
.taskResultLayer .expGold { .taskResultLayer .expGold {
color: #b27919 ; color: #b27919 ;
} }
.taskResultLayer .rateLabel { .taskResultLayer .rateLabel {
color: #fff ; color: #fff ;
font-size: 14px; font-size: 14px;
} }
.taskResultLayer .rc-rate-star { .taskResultLayer .rc-rate-star {
font-size: 24px; font-size: 24px;
color: rgb(192, 192, 192); color: rgb(192, 192, 192);
} }
.taskResultLayer .rc-rate-star:nth-child(5) { .taskResultLayer .rc-rate-star:nth-child(5) {
margin-right: 0px; margin-right: 0px;
} }
/* ImageLayer ----------------- Start */ /* ImageLayer ----------------- Start */
.passContent{ .passContent{
justify-content: center; justify-content: center;
align-items: center; align-items: center;
display: -webkit-flex; display: -webkit-flex;
height: 100%; height: 100%;
text-align: center; text-align: center;
} }
.passImg{ .passImg{
max-width: 86%; max-width: 86%;
max-height: 100%; max-height: 100%;
} }
/* ImageLayer ----------------- End */ /* ImageLayer ----------------- End */
.passTaskContent{ .passTaskContent{
width: 652px; width: 652px;
height:100%; height:100%;
margin:0px auto; margin:0px auto;
margin-top: 4%; margin-top: 4%;
} }
.passTaskImg{ .passTaskImg{
position: absolute; position: absolute;
z-index: 2; z-index: 2;
user-select: none; user-select: none;
} }
.winpPerson{ .winpPerson{
position: absolute; position: absolute;
width: 100%; width: 100%;
z-index: 3; z-index: 3;
color: #D1A448; color: #D1A448;
text-align: center; text-align: center;
margin-top:304px; margin-top:304px;
font-size: 18px; font-size: 18px;
} }
.winPanel{ .winPanel{
position: absolute; position: absolute;
width: 308px; width: 308px;
z-index: 5; z-index: 5;
height: 356px; height: 356px;
border-radius: 10px; border-radius: 10px;
margin:0px auto; margin:0px auto;
top:435px; top:435px;
left: 50%; left: 50%;
margin-left: -154px; margin-left: -154px;
text-align: center; text-align: center;
} }
.inline{ .inline{
display: inline-block; display: inline-block;
width: auto; width: auto;
line-height: 26px; line-height: 26px;
font-size: 16px; font-size: 16px;
} }
.inline.exp { .inline.exp {
margin-left: 18px; margin-left: 18px;
} }
.inline img{ /*.inline img{*/
margin-right: 8px; /*margin-right: 8px;*/
} /*}*/
.goldring{ .goldring{
margin-right: 8px; margin-right: 8px;
width: 17px; width: 17px;
height: 17px; height: 17px;
border-radius: 50%; border-radius: 50%;
background-color: #FFD633; background-color: #FFD633;
display: block; display: block;
float: left; float: left;
margin-top: 5px; margin-top: 5px;
} }
.passNext{ .passNext{
width:120px; width:120px;
height:30px; height:30px;
line-height:30px; line-height:30px;
border-radius: 2px; border-radius: 2px;
display: block; display: block;
background-color:#CCC; background-color:#CCC;
color:#fff!important; color:#fff!important;
margin: 0px auto; margin: 0px auto;
} }
.passed{ .passed{
width:120px; width:120px;
height:30px; height:30px;
line-height:30px; line-height:30px;
border-radius: 2px; border-radius: 2px;
display: block; display: block;
color:#fff!important; color:#fff!important;
margin: 0px auto; margin: 0px auto;
margin-top: 12px; margin-top: 12px;
background-color: #CCCCCC; background-color: #CCCCCC;
} }
.passed.stared { .passed.stared {
background-color:#4CACFF; background-color:#4CACFF;
opacity: 0.8; opacity: 0.8;
} }
.passed.stared:hover { .passed.stared:hover {
opacity: 1; opacity: 1;
}
.vertical4{
vertical-align: -4px;
} }

@ -476,7 +476,7 @@ class DetailCardsEditAndEdit extends Component{
footer={null} footer={null}
width="840px" width="840px"
destroyOnClose={true} destroyOnClose={true}
>Z >
<Spin spinning={hometypepvisible} size="large" style={{marginTop:'15%'}}> <Spin spinning={hometypepvisible} size="large" style={{marginTop:'15%'}}>
<div className="newupload_conbox"> <div className="newupload_conbox">
<div className="clearfix mb20 shixun_work_div newshixun_tab_div cdefault" style={{"marginRight":"4px"}} id="shixun_tab_div"> <div className="clearfix mb20 shixun_work_div newshixun_tab_div cdefault" style={{"marginRight":"4px"}} id="shixun_tab_div">

@ -37,7 +37,16 @@ class NewFooter extends Component {
</ul> </ul>
</div> </div>
<div> <div>
<p className="footer_con-p inline lineh-30 font-14"><span className="font-18 fl">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</p> <p className="footer_con-p inline lineh-30 font-14">
<span className="font-18 fl">©</span>&nbsp;2019&nbsp;EduCoder
<a style={{"color":"#888"}} target="_blank" href="http://beian.miit.gov.cn/" className="ml15 mr15">湘ICP备17009477号</a>
<a style={{"color":"#888"}} target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=43019002000962" className="mr15">
<img className="vertical4" src={require('./beian.png')}/>湘公网安备43019002000962号
</a>
<a href="https://team.trustie.net" style={{"color":"#888"}}
target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside. <span
className="mr15">版权所有 湖南智擎科技有限公司</span>
</p>
</div> </div>
<div className="cl"></div> <div className="cl"></div>
</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={`/account/profile`}>账号管理</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>*/}

@ -1316,13 +1316,19 @@ export default class TPMsettings extends Component {
// onMouseEnter={operateauthority?this.bigopen:""} // onMouseEnter={operateauthority?this.bigopen:""}
onSelect={operateauthority?this.bigopens:""} onSelect={operateauthority?this.bigopens:""}
// open={opers} // open={opers}
showSearch
optionFilterProp="children"
filterOption={(input, option) =>
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
> >
{ {
settingsData === undefined ? "" : settingsData.shixun.main_type.map((item, key) => { settingsData === undefined ? "" : settingsData.shixun.main_type.map((item, key) => {
return( return(
<Option value={item.id} key={key} title={item.description}>{item.type_name}</Option> <Option value={item.id} key={key} title={item.description} >{item.type_name}</Option>
) )
}) })
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@ -174,6 +174,9 @@ export default class TPManswer extends Component {
if (response.data.message) { if (response.data.message) {
this.props.showSnackbar(response.data.message); this.props.showSnackbar(response.data.message);
} }
if (response.data.status == 1) {
$("html").animate({ scrollTop: 0 })
}
} }
}).catch((error) => { }).catch((error) => {

@ -58,7 +58,7 @@ export default class TPMchallengesnew extends Component {
marktype:false, marktype:false,
editPracticesendtype:false, editPracticesendtype:false,
CreatePracticesendtype:false, CreatePracticesendtype:false,
exec_time:undefined exec_time:20
} }
} }
@ -230,6 +230,8 @@ export default class TPMchallengesnew extends Component {
}).then((response) => { }).then((response) => {
this.props.showSnackbar(response.data.messages); this.props.showSnackbar(response.data.messages);
if (response.data.status === 1) { if (response.data.status === 1) {
$("html").animate({ scrollTop: 0 })
this.setState({ this.setState({
setopen: true, setopen: true,
tab2url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=2", tab2url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=2",

@ -930,7 +930,7 @@ export default class TPMevaluation extends Component {
<span className="top-black-trangleft"></span> <span className="top-black-trangleft"></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">
图片处理或输出图片类型的任务请选此项<br/> 图片处理或输出图片类型的任务请选此项<br/>
可以通过设置图片路径和学员答案文件路径展示代码对应的图片效果<br/><br/> 可以通过设置图片路径和学员答案文件路径展示代码对应的图片效果<br/><br/>
apk/exe写可执行文件的任务请选填此项<br/> apk/exe写可执行文件的任务请选填此项<br/>
可以通过设置学员答案文件路径展示二维码以供扫码下载<br/><br/> 可以通过设置学员答案文件路径展示二维码以供扫码下载<br/><br/>

@ -1,118 +1,118 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import {CNotificationHOC} from '../courses/common/CNotificationHOC' import {CNotificationHOC} from '../courses/common/CNotificationHOC'
import Loading from '../../Loading'; import Loading from '../../Loading';
import Loadable from 'react-loadable'; import Loadable from 'react-loadable';
import { TPMIndexHOC } from '../tpm/TPMIndexHOC'; import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
import { SnackbarHOC, getImageUrl } from 'educoder'; import { SnackbarHOC, getImageUrl } from 'educoder';
import AccountNav from './account/AccountNav' import AccountNav from './account/AccountNav'
import axios from 'axios' import axios from 'axios'
const AccountBasic= Loadable({ const AccountBasic= Loadable({
loader: () => import('./account/AccountBasic'), loader: () => import('./account/AccountBasic'),
loading: Loading, loading: Loading,
}) })
const AccountBasicEdit= Loadable({ const AccountBasicEdit= Loadable({
loader: () => import('./account/AccountBasicEdit'), loader: () => import('./account/AccountBasicEdit'),
loading: Loading, loading: Loading,
}) })
const AccountCertification= Loadable({ const AccountCertification= Loadable({
loader: () => import('./account/AccountCertification'), loader: () => import('./account/AccountCertification'),
loading: Loading, loading: Loading,
}) })
const AccountSecure= Loadable({ const AccountSecure= Loadable({
loader: () => import('./account/AccountSecure'), loader: () => import('./account/AccountSecure'),
loading: Loading, loading: Loading,
}) })
class AccountPage extends Component { class AccountPage extends Component {
constructor (props) { constructor (props) {
super(props) super(props)
this.state = { this.state = {
basicInfo:undefined basicInfo:undefined
} }
} }
componentDidUpdate =(prevState)=>{ componentDidUpdate =(prevState)=>{
if(this.props.current_user && this.props.current_user != prevState.current_user){ if(this.props.current_user && this.props.current_user != prevState.current_user){
this.getBasicInfo(this.props.current_user.login); this.getBasicInfo(this.props.current_user.login);
} }
} }
componentDidMount = () =>{ componentDidMount = () =>{
if(this.props.current_user){ if(this.props.current_user){
this.getBasicInfo(this.props.current_user.login); this.getBasicInfo(this.props.current_user.login);
} }
} }
getBasicInfo=(login)=>{ getBasicInfo=(login)=>{
let url=`/users/accounts/${login || this.props.current_user.login}.json`; let url=`/users/accounts/${login || this.props.current_user.login}.json`;
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(`/account/profile/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()}`})
}) })
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
} }
render() { render() {
let { basicInfo }=this.state; let { basicInfo }=this.state;
const common = { basicInfo, getBasicInfo : this.getBasicInfo } const common = { basicInfo, getBasicInfo : this.getBasicInfo }
return ( return (
<div className="newMain clearfix"> <div className="newMain clearfix">
<div className="educontent df pt20"> <div className="educontent df pt20">
<style>{` <style>{`
.accountPage { .accountPage {
display: flex; display: flex;
} }
`}</style> `}</style>
<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="/account/profile"
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="/account/profile/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="/account/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="/account/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="/account"
render={ render={
(props) => (<AccountBasic {...this.props} {...props} {...this.state} {...common} />) (props) => (<AccountBasic {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
</Switch> </Switch>
</div> </div>
</div> </div>
</div> </div>
); );
} }
} }
export default CNotificationHOC()(SnackbarHOC() ( TPMIndexHOC ( AccountPage ))); export default CNotificationHOC()(SnackbarHOC() ( TPMIndexHOC ( AccountPage )));

@ -116,23 +116,6 @@ class LoginRegisterComponent extends Component {
console.log('Notification Clicked!'); console.log('Notification Clicked!');
}, },
}); });
// if(type === 1){
// notification['success']({
// message: "提示",
// description: messge,
// });
// }else if(type === 2){
// notification['warning']({
// message: "提示",
// description: messge,
// });
//
// }else{
// notification['error']({
// message: "提示",
// description: messge,
// });
// }
} }
@ -344,8 +327,8 @@ class LoginRegisterComponent extends Component {
passwords: "", passwords: "",
Agreetotheterms: "", Agreetotheterms: "",
}) })
// this.props.history.push(result.data.redirect_uri); this.props.history.push("/interesse");
this.props.Setshowbool(2,this.state.logins,this.state.passwords); // this.props.Setshowbool(2,this.state.logins,this.state.passwords);
} catch (e) { } catch (e) {
} }
@ -464,6 +447,8 @@ class LoginRegisterComponent extends Component {
this.SMSverification(); this.SMSverification();
} }
} }
//滑动验证手机号
//获取登入 //获取登入
loginInputonChange = (e) => { loginInputonChange = (e) => {
// console.log(e.target.value); // console.log(e.target.value);
@ -593,8 +578,8 @@ class LoginRegisterComponent extends Component {
<div> <div>
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}> <Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}>
<Menu.Item key="0" className="font-18" style={{color:"#05101A"}}> 登录</Menu.Item> <Menu.Item key="0" className={tab===0?"active font-18":"font-18"} > 登录</Menu.Item>
<Menu.Item key="1" className="font-18" style={{color:"#05101A"}}>注册</Menu.Item> <Menu.Item key="1" className={tab===1?"active font-18":"font-18"} >注册</Menu.Item>
</Menu> </Menu>
{ {

@ -1,119 +1,119 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { SnackbarHOC, getImageUrl, City } from 'educoder'; import { SnackbarHOC, getImageUrl, City } from 'educoder';
import { Form, Button, Input, Radio, Select, Tooltip, Icon } from 'antd' import { Form, Button, Input, Radio, Select, Tooltip, Icon } from 'antd'
import './common.css' import './common.css'
const RadioGroup = Radio.Group; const RadioGroup = Radio.Group;
const Option = Select.Option const Option = Select.Option
const radioOptions = [ const radioOptions = [
{ label: '男', value: 'boy' }, { label: '男', value: 'boy' },
{ label: '女', value: 'girl' }, { label: '女', value: 'girl' },
]; ];
class AccountBasicEdit extends Component { class AccountBasicEdit extends Component {
constructor(props){ constructor(props){
super(props); super(props);
} }
render() { render() {
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
const {basicInfo} =this.props const {basicInfo} =this.props
const showRealName = false; const showRealName = false;
return ( return (
<div> <div>
<div className="basicForm"> <div className="basicForm">
<style>{` <style>{`
.formItemInline { .formItemInline {
display: flex; display: flex;
} }
.formItemInline .ant-form-item-control-wrapper { .formItemInline .ant-form-item-control-wrapper {
display: inline-block; display: inline-block;
} }
.basicForm .title { .basicForm .title {
font-size: 16px; font-size: 16px;
padding-left: 30px; padding-left: 30px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.basicForm .ant-form-item-label { .basicForm .ant-form-item-label {
width: 100px; width: 100px;
padding-right: 10px; padding-right: 10px;
} }
.basicForm .ant-form-item-label label { .basicForm .ant-form-item-label label {
color: #979797 color: #979797
} }
.basicForm .display { .basicForm .display {
margin: 0 margin: 0
} }
.titleWrap { .titleWrap {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
`}</style> `}</style>
<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('/account/profile/edit')}>修改</Button>
</div> </div>
<Form onSubmit={this.handleSubmit}> <Form onSubmit={this.handleSubmit}>
<Form.Item <Form.Item
label="昵称" label="昵称"
className="display formItemInline" className="display formItemInline"
> >
{basicInfo && basicInfo.nickname} {basicInfo && basicInfo.nickname}
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="姓名" label="姓名"
className="display formItemInline" className="display formItemInline"
> >
{basicInfo && basicInfo.name} {basicInfo && basicInfo.name}
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="性别" label="性别"
className="display formItemInline" className="display formItemInline"
> >
{basicInfo && basicInfo.gender == 0?"男":"女"} {basicInfo && basicInfo.gender == 0?"男":"女"}
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="所在地" label="所在地"
className="display formItemInline" className="display formItemInline"
> >
{basicInfo && basicInfo.location} {basicInfo && basicInfo.location_city} {basicInfo && basicInfo.location} {basicInfo && basicInfo.location_city}
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="职业" label="职业"
className="display formItemInline" className="display formItemInline"
> >
{basicInfo && basicInfo.technical_title} {basicInfo && basicInfo.technical_title}
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="学校/单位" label="学校/单位"
className="display formItemInline mb0" className="display formItemInline mb0"
> >
{basicInfo && basicInfo.school_name} {basicInfo && basicInfo.school_name}
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="院系/部门" label="院系/部门"
className="display formItemInline mb0" className="display formItemInline mb0"
> >
{basicInfo && basicInfo.department_name} {basicInfo && basicInfo.department_name}
</Form.Item> </Form.Item>
</Form> </Form>
</div> </div>
<diV style={{color: '#989898', marginLeft: '20px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</diV> <diV style={{color: '#989898', marginLeft: '20px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</diV>
</div> </div>
); );
} }
} }
const WrappedAccountBasicEdit = Form.create({ name: 'AccountBasicEdit' })(AccountBasicEdit); const WrappedAccountBasicEdit = Form.create({ name: 'AccountBasicEdit' })(AccountBasicEdit);
export default WrappedAccountBasicEdit; export default WrappedAccountBasicEdit;

File diff suppressed because it is too large Load Diff

@ -1,68 +1,68 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { SnackbarHOC, getImageUrl } from 'educoder'; 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(`/account/profile`)
} }
toCertification = () => { toCertification = () => {
this.props.history.push(`/account/certification`) this.props.history.push(`/account/certification`)
} }
toSecure = () => { toSecure = () => {
this.props.history.push(`/account/secure`) this.props.history.push(`/account/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 == "/account"
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 (
<div className="accountNav fl"> <div className="accountNav fl">
{ {
basicInfo && basicInfo &&
<React.Fragment> <React.Fragment>
<div className="accountInfo"> <div className="accountInfo">
<AccountImg src={basicInfo.avatar_url} {...this.props}></AccountImg> <AccountImg src={basicInfo.avatar_url} {...this.props}></AccountImg>
<span className="name">{basicInfo.name}</span> <span className="name">{basicInfo.name}</span>
<span className="role">{basicInfo.technical_title}</span> <span className="role">{basicInfo.technical_title}</span>
</div> </div>
<div className="accountManagement"> <div className="accountManagement">
<div className="title">账号管理</div> <div className="title">账号管理</div>
<ul> <ul>
<li className={`navItem ${isBasic ? 'active' : ''}`} onClick={this.toBasic}> <li className={`navItem ${isBasic ? 'active' : ''}`} onClick={this.toBasic}>
<i className="iconfont icon-jibenxinxi color-grey-9 font-16"></i> <i className="iconfont icon-jibenxinxi color-grey-9 font-16"></i>
基本信息 基本信息
{ {
(basicInfo.authentication == 'uncertified' || basicInfo.authentication == 'applying') && (basicInfo.authentication == 'uncertified' || basicInfo.authentication == 'applying') &&
<i className="status fr iconfont icon-tishi color-red font-16"></i> <i className="status fr iconfont icon-tishi color-red font-16"></i>
} }
{ {
basicInfo.authentication == 'certified' && basicInfo.authentication == 'certified' &&
<i className="status fr iconfont icon-wancheng color-green-light font-16"></i> <i className="status fr iconfont icon-wancheng color-green-light font-16"></i>
} }
</li> </li>
<li className={`navItem ${isCertification ? 'active' : ''}`} onClick={this.toCertification}> <li className={`navItem ${isCertification ? 'active' : ''}`} onClick={this.toCertification}>
<i className="iconfont icon-renzhengxinxi color-grey-9 font-16"></i> <i className="iconfont icon-renzhengxinxi color-grey-9 font-16"></i>
{ {
basicInfo.professional_certification == 'certified' && basicInfo.authentication == 'certified' ? basicInfo.professional_certification == 'certified' && basicInfo.authentication == 'certified' ?
<i className="status fr iconfont icon-wancheng color-green-light font-16"></i>: <i className="status fr iconfont icon-wancheng color-green-light font-16"></i>:
<i className="status fr iconfont icon-tishi color-red font-16"></i> <i className="status fr iconfont icon-tishi color-red font-16"></i>
} }
</li> </li>
<li className={`navItem ${isSecure ? 'active' : ''}`} onClick={this.toSecure}> <li className={`navItem ${isSecure ? 'active' : ''}`} onClick={this.toSecure}>
<i className="iconfont icon-anquanshezhi color-grey-9 font-16"></i> <i className="iconfont icon-anquanshezhi color-grey-9 font-16"></i>
</li> </li>
</ul> </ul>
</div> </div>
</React.Fragment> </React.Fragment>
} }
</div> </div>
); );
} }
} }
export default AccountNav ; export default AccountNav ;

@ -2,7 +2,7 @@ import React, { Component } from "react";
import { Modal } from "antd"; import { Modal } from "antd";
import axios from 'axios' import axios from 'axios'
import ModalWrapper from "../../courses/common/ModalWrapper" import ModalWrapper from "../../courses/common/ModalWrapper"
import { Cropper } from 'educoder' import { Cropper, getUrl } from 'educoder'
const imageId = 'changeHeaderPic' const imageId = 'changeHeaderPic'
const previewId = 'changeHeader_imagePreview' const previewId = 'changeHeader_imagePreview'
@ -39,11 +39,27 @@ class ChangeHeaderPicModal extends Component{
URL.revokeObjectURL(uploadedImageURL); URL.revokeObjectURL(uploadedImageURL);
} }
const image = document.getElementById( imageId ); const image = document.getElementById( imageId );
image.src = uploadedImageURL = URL.createObjectURL(file);
that.refs['cropper'].renew(image) // base64
// cropper.destroy(); var reader = new FileReader();
// cropper = new Cropper(image, options); reader.readAsBinaryString(file);
inputImage.value = null;
reader.onload = () => {
let base64_content = btoa(reader.result);
console.log();
image.src = `data:${file.type};base64,${base64_content}` // uploadedImageURL = URL.createObjectURL(file);
that.fileUploaded = true;
that.refs['cropper'].renew(image)
// cropper.destroy();
// cropper = new Cropper(image, options);
inputImage.value = null;
};
reader.onerror = function() {
console.log('there are some problems');
};
} else { } else {
this.props.showNotification && this.props.showNotification("请选择一个图片格式的文件") this.props.showNotification && this.props.showNotification("请选择一个图片格式的文件")
// window.alert('Please choose an image file.'); // window.alert('Please choose an image file.');
@ -57,6 +73,8 @@ class ChangeHeaderPicModal extends Component{
this.refs['modalWrapper'].setVisible(visible) this.refs['modalWrapper'].setVisible(visible)
if (visible) { if (visible) {
this.fileUploaded = false;
setTimeout(() => { setTimeout(() => {
this.init() this.init()
}, 500) }, 500)
@ -69,7 +87,12 @@ class ChangeHeaderPicModal extends Component{
} }
onOk = () => { onOk = () => {
var img_lg = document.getElementById(previewId); if (this.fileUploaded != true) {
this.props.showNotification("请先上传图片")
return;
}
var img_lg = document.getElementById(previewId);
// https://github.com/niklasvh/html2canvas/issues/1908
// 截图小的显示框内的内容 // 截图小的显示框内的内容
window.html2canvas(img_lg).then((canvas) => { window.html2canvas(img_lg).then((canvas) => {
var dataUrl = canvas.toDataURL("image/jpeg"); var dataUrl = canvas.toDataURL("image/jpeg");
@ -97,7 +120,8 @@ class ChangeHeaderPicModal extends Component{
render(){ render(){
const { course_lists } = this.state const { course_lists } = this.state
const { moduleName } = this.props const { moduleName, current_user } = this.props
const userHeaderImgUrl = `${getUrl()}/images/${current_user.image_url}`
return( return(
<ModalWrapper <ModalWrapper
ref="modalWrapper" ref="modalWrapper"
@ -147,6 +171,7 @@ class ChangeHeaderPicModal extends Component{
<div className="cropperWrap"> <div className="cropperWrap">
<Cropper <Cropper
imageSrc={''} imageSrc={''}
initPreviewUrl={userHeaderImgUrl}
ref="cropper" ref="cropper"
imageId={imageId} imageId={imageId}
previewId="changeHeader_imagePreview" previewId="changeHeader_imagePreview"
@ -158,7 +183,9 @@ class ChangeHeaderPicModal extends Component{
className="df previewWrap" style ={{flexDirection: 'column'}} className="df previewWrap" style ={{flexDirection: 'column'}}
> >
<div> <div>
<div id="changeHeader_imagePreview"></div> <div id="changeHeader_imagePreview">
{userHeaderImgUrl && <img src={userHeaderImgUrl}></img>}
</div>
<div className="tip">头像预览</div> <div className="tip">头像预览</div>
</div> </div>
<label id="uploadBtn" for="inputImage"> <label id="uploadBtn" for="inputImage">

@ -101,7 +101,6 @@
} }
.ysllogin_register_contents{ .ysllogin_register_contents{
display: flex; display: flex;
margin-top: 30px;
justify-content: center; justify-content: center;
box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15); box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15);
border-radius:6px; border-radius:6px;

@ -1,167 +1,168 @@
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;} body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;}
body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.9; background:#fff;} body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.9; background:#fff;}
div,img,tr,td,table{ border:0;} div,img,tr,td,table{ border:0;}
table,tr,td{border:0;cellspacing:0; cellpadding:0;} table,tr,td{border:0;cellspacing:0; cellpadding:0;}
ol,ul,li{ list-style-type:none} ol,ul,li{ list-style-type:none}
a:link,a:visited{color:#333;text-decoration:none;} a:link,a:visited{color:#333;text-decoration:none;}
a:hover,a:active{color:#026434;} a:hover,a:active{color:#026434;}
/* 公共 */ /* 公共 */
.clear:after {content:".";height:0;visibility:hidden;display:block;clear:both;} .clear:after {content:".";height:0;visibility:hidden;display:block;clear:both;}
.f12{font-size: 12px;} .f12{font-size: 12px;}
.fl{ float:left;} .fl{ float:left;}
.fr{ float:right;} .fr{ float:right;}
.cl{ clear:both; overflow:hidden;} .cl{ clear:both; overflow:hidden;}
.fb{ font-weight: bold;} .fb{ font-weight: bold;}
.mt5{ margin-top:5px;} .mt5{ margin-top:5px;}
.mt10{ margin-top:10px;} .mt10{ margin-top:10px;}
.mt20{ margin-top:20px;} .mt20{ margin-top:20px;}
.mt30{ margin-top:30px;} .mt30{ margin-top:30px;}
.mt50{ margin-top:50px;} .mt50{ margin-top:50px;}
.mb5{ margin-bottom:5px;} .mb5{ margin-bottom:5px;}
.mb10{ margin-bottom:10px;} .mb10{ margin-bottom:10px;}
.mb20{ margin-bottom:20px;} .mb20{ margin-bottom:20px;}
.mb30{ margin-bottom:30px;} .mb30{ margin-bottom:30px;}
.mb50{ margin-bottom:50px;} .mb50{ margin-bottom:50px;}
.ml5{ margin-left:5px;} .ml5{ margin-left:5px;}
.ml10{ margin-left:10px;} .ml10{ margin-left:10px;}
.ml15{ margin-left:15px;} .ml15{ margin-left:15px;}
.ml30{margin-left: 30px;} .ml30{margin-left: 30px;}
.ml50{margin-left: 50px;} .ml38{margin-left: 38px;}
.mr5{ margin-right:5px;} .ml50{margin-left: 50px;}
.mr10{ margin-right:15px;} .mr5{ margin-right:5px;}
.mr15{ margin-right:10px;} .mr10{ margin-right:15px;}
.mr45{ margin-right:45px;} .mr15{ margin-right:10px;}
.mr30{ margin-right:30px;} .mr45{ margin-right:45px;}
.mr50{ margin-right:50px;} .mr30{ margin-right:30px;}
.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden} .mr50{ margin-right:50px;}
.clearfix{clear:both;zoom:1} .clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
a.new-btn{display: inline-block;border:none; padding:0 10px;color: #666;background: #e1e1e1; text-align:center;font-size: 12px; height: 30px;border-radius: 3px; line-height: 30px;} .clearfix{clear:both;zoom:1}
a.new-btn:hover{background: #c3c3c3; color: #333;} a.new-btn{display: inline-block;border:none; padding:0 10px;color: #666;background: #e1e1e1; text-align:center;font-size: 12px; height: 30px;border-radius: 3px; line-height: 30px;}
a.new-btn-green{background: #3b94d6; color: #fff;} a.new-btn:hover{background: #c3c3c3; color: #333;}
a.new-btn-green:hover{background: #2384cd; color: #fff;} a.new-btn-green{background: #3b94d6; color: #fff;}
a.new-btn-blue{background: #6a8abe; color: #fff;} a.new-btn-green:hover{background: #2384cd; color: #fff;}
a.new-btn-blue:hover{background:#5f7cab; } a.new-btn-blue{background: #6a8abe; color: #fff;}
a.new-bigbtn{display: inline-block;border:none; padding:2px 30px;color: #666;background: #e1e1e1; text-align:center;font-size: 14px; height: 30px;line-height: 30px; border-radius: 3px;} a.new-btn-blue:hover{background:#5f7cab; }
a:hover.new-bigbtn{background: #c3c3c3; color: #333;} a.new-bigbtn{display: inline-block;border:none; padding:2px 30px;color: #666;background: #e1e1e1; text-align:center;font-size: 14px; height: 30px;line-height: 30px; border-radius: 3px;}
a.new-bigbtn-green{display: block; background:#60B25E; color:#fff; border-radius:5px; text-align:center; font-size:18px; padding: 5px 20px; width: 220px;} a:hover.new-bigbtn{background: #c3c3c3; color: #333;}
a.new-bigbtn-green:hover{background: #51a74f; color: #fff;} a.new-bigbtn-green{display: block; background:#60B25E; color:#fff; border-radius:5px; text-align:center; font-size:18px; padding: 5px 20px; width: 220px;}
/* 头部 */ a.new-bigbtn-green:hover{background: #51a74f; color: #fff;}
.header{ width:100%; min-width: 1200px; height:51px;background:#46484c; } /* 头部 */
.header_con{ width:1200px; height:50px; margin:0 auto; } .header{ width:100%; min-width: 1200px; height:51px;background:#46484c; }
.new-logo img{ width: 32px; height:32px; margin-top:10px;} .header_con{ width:1200px; height:50px; margin:0 auto; }
.new-logo p{ font-size: 18px; color:#fff; line-height: 50px; } .new-logo img{ width: 32px; height:32px; margin-top:10px;}
a.new-nav-a{ display: block; font-size: 14px; line-height: 50px; color:#fff;} .new-logo p{ font-size: 18px; color:#fff; line-height: 50px; }
a:hover.new-nav-a{ color:#ff7500;} a.new-nav-a{ display: block; font-size: 14px; line-height: 50px; color:#fff;}
input.new-search{border-radius:3px; width:300px; height:30px; margin-top: 10px; padding:0 5px; border-style: none; border: solid 1px #ccc;} a:hover.new-nav-a{ color:#ff7500;}
/* 登录注册 */ input.new-search{border-radius:3px; width:300px; height:30px; margin-top: 10px; padding:0 5px; border-style: none; border: solid 1px #ccc;}
.new_login{ width:100%; height:450px;background:url(../images/bigdata/slider-bg-1.jpg) 0 0 no-repeat;} /* 登录注册 */
.new_login_con{ width:1200px; height:450px; margin:0 auto; } .new_login{ width:100%; height:450px;background:url(../images/bigdata/slider-bg-1.jpg) 0 0 no-repeat;}
.new_login_box{width:320px; padding:10px 30px; border-radius:5px; margin:0 auto; border:solid 1px #fff;} .new_login_con{ width:1200px; height:450px; margin:0 auto; }
.new_login_h2{ font-size:18px; color:#fff; border-bottom:1px solid #fff; font-weight:normal; padding-bottom:5px; margin-bottom:30px;} .new_login_box{width:320px; padding:10px 30px; border-radius:5px; margin:0 auto; border:solid 1px #fff;}
.new_login_h2 a{font-size:12px; color:#fff;background:url(images/icons_login.png) 0 -69px no-repeat; padding-left:10px;} .new_login_h2{ font-size:18px; color:#fff; border-bottom:1px solid #fff; font-weight:normal; padding-bottom:5px; margin-bottom:30px;}
input.new_register_input{ -webkit-box-shadow: 0 0 0px 1000px white inset; margin-left:5px; width:305px; height:45px; border:none;outline: none;} .new_login_h2 a{font-size:12px; color:#fff;background:url(images/icons_login.png) 0 -69px no-repeat; padding-left:10px;}
input.new_loggin_input{ -webkit-box-shadow: 0 0 0px 1000px white inset; margin-left:5px; width:305px; height:45px; border:none;outline: none;} input.new_register_input{ -webkit-box-shadow: 0 0 0px 1000px white inset; margin-left:5px; width:305px; height:45px; border:none;outline: none;}
.new_loggin_users{width:320px;height:45px;border-radius:5px; border:none; background:#fff url(images/icons_login.png) 8px 9px no-repeat;} input.new_loggin_input{ -webkit-box-shadow: 0 0 0px 1000px white inset; margin-left:5px; width:305px; height:45px; border:none;outline: none;}
.new_login_lock{background:#fff url(images/icons_login.png) 8px -28px no-repeat; width:320px; height:45px; border-radius:5px; border:none;} .new_loggin_users{width:320px;height:45px;border-radius:5px; border:none; background:#fff url(images/icons_login.png) 8px 9px no-repeat;}
.new_register_li{background:#fff; width:320px; height:45px; border-radius:5px; border:none;} .new_login_lock{background:#fff url(images/icons_login.png) 8px -28px no-repeat; width:320px; height:45px; border-radius:5px; border:none;}
.new_login_form ul li{ margin-bottom:30px;} .new_register_li{background:#fff; width:320px; height:45px; border-radius:5px; border:none;}
.new_login_error{ color:#3b94d6;} .new_login_form ul li{ margin-bottom:30px;}
.new_login_submit_disable{ width:265px; height:40px; line-height: 40px; background:#ccc; color:#fff; font-size:14px; border-radius:5px; border:none; text-align:center; cursor:pointer; vertical-align: middle;} .new_login_error{ color:#3b94d6;}
a.new_login_submit{ width:320px; height:40px; display:block;line-height: 40px; background:#3b94d6; color:#fff; font-size:14px; border-radius:5px; border:none; text-align:center; cursor:pointer; vertical-align: middle;} .new_login_submit_disable{ width:265px; height:40px; line-height: 40px; background:#ccc; color:#fff; font-size:14px; border-radius:5px; border:none; text-align:center; cursor:pointer; vertical-align: middle;}
a.new_login_submit:hover{background: #2384cd;} a.new_login_submit{ width:320px; height:40px; display:block;line-height: 40px; background:#3b94d6; color:#fff; font-size:14px; border-radius:5px; border:none; text-align:center; cursor:pointer; vertical-align: middle;}
.new_login_check{ width:15px; height:15px; border:1px solid #fff; border-style:none; margin-right:5px; vertical-align: -2px;} a.new_login_submit:hover{background: #2384cd;}
.new_login_form label{ color:#fff;} .new_login_check{ width:15px; height:15px; border:1px solid #fff; border-style:none; margin-right:5px; vertical-align: -2px;}
.new_login_form a{ color:#fff; text-decoration:underline;} .new_login_form label{ color:#fff;}
.new_register{ width:100%; min-width:1200px; height:550px; background:#46484c; padding-top:80px;} .new_login_form a{ color:#fff; text-decoration:underline;}
.new_register_con{width:1200px; height:550px; margin:0 auto; } .new_register{ width:100%; min-width:1200px; height:550px; background:#46484c; padding-top:80px;}
.new_login_txt{width:450px; height:140px; padding:30px 12px 0; color:#fff; margin:100px 0 0 100px;} .new_register_con{width:1200px; height:550px; margin:0 auto; }
.new_login_txt h3{ font-size:24px; text-align:center; margin-bottom:20px;} .new_login_txt{width:450px; height:140px; padding:30px 12px 0; color:#fff; margin:100px 0 0 100px;}
.new_login_txt p{ line-height:2.0; font-size: 16px;} .new_login_txt h3{ font-size:24px; text-align:center; margin-bottom:20px;}
.new_register_left{ margin-top:150px;} .new_login_txt p{ line-height:2.0; font-size: 16px;}
.new_login_tishi{ color: #fff; } .new_register_left{ margin-top:150px;}
/* 展示内容 */ .new_login_tishi{ color: #fff; }
.new-container{ width: 100%; min-width:1200px;} /* 展示内容 */
.new-container-inner{width:1200px; margin:0px auto; padding:100px 0;} .new-container{ width: 100%; min-width:1200px;}
.inner-txt{ width:300px;} .new-container-inner{width:1200px; margin:0px auto; padding:100px 0;}
.inner-txt-h3{ font-size: 18px; color: #333; margin-bottom:20px;} .inner-txt{ width:300px;}
.inner-txt-p{font-size: 14px; color: #666; margin-bottom:20px;} .inner-txt-h3{ font-size: 18px; color: #333; margin-bottom:20px;}
.back-color-grey{ background:#f5f5f5;} .inner-txt-p{font-size: 14px; color: #666; margin-bottom:20px;}
.guanzhu-box{ position: relative;} .back-color-grey{ background:#f5f5f5;}
.img-guanzhu{ position: absolute; top:0; left: 0;} .guanzhu-box{ position: relative;}
.guanzhu-img-box{ display: none;} .img-guanzhu{ position: absolute; top:0; left: 0;}
.guanzhu-box li:hover ul{display:block; } .guanzhu-img-box{ display: none;}
/* 底部 */ .guanzhu-box li:hover ul{display:block; }
.footer{width:100%; height:100px; background-color:#fff; } /* 底部 */
.footer_con{ width:1200px; height:100px; margin:0 auto; text-align: center; padding:20px 0; } .footer{width:100%; height:100px; background-color:#fff; }
.footer_con-inner{ width: 300px; margin:0px auto;} .footer_con{ width:1200px; height:100px; margin:0 auto; text-align: center; padding:20px 0; }
.footer_con-inner li{ } .footer_con-inner{ width: 300px; margin:0px auto;}
.footer_con-inner li a{ font-size: 14px; color: #888;display: block;padding:0 15px; border-right: solid 1px #888;} .footer_con-inner li{ }
.footer_con-inner li a:hover{text-decoration: underline;} .footer_con-inner li a{ font-size: 14px; color: #888;display: block;padding:0 15px; border-right: solid 1px #888;}
.footer_con-p{ color: #888; margin-top:10px;} .footer_con-inner li a:hover{text-decoration: underline;}
/* 新版内页 */ .footer_con-p{ color: #888; margin-top:10px;}
.innner-nav li{ float: left; margin-right: 25px;} /* 新版内页 */
.inner-banner{ background:url(/images/inner/banner-inner.jpg) 0px 0px repeat-x; width: 100%; min-width:1200px; height: 550px; padding-top:50px; position:relative;} .innner-nav li{ float: left; margin-right: 25px;}
.inner-banner-con{ width: 1200px; margin: 0px auto; color:#fff; text-align: center;} .inner-banner{ background:url(/images/inner/banner-inner.jpg) 0px 0px repeat-x; width: 100%; min-width:1200px; height: 550px; padding-top:50px; position:relative;}
.inner-man{ position: absolute; right:100px; top:115px;} .inner-banner-con{ width: 1200px; margin: 0px auto; color:#fff; text-align: center;}
.inner-man img{width:200px; } .inner-man{ position: absolute; right:100px; top:115px;}
.inner-banner-con h2{ font-size: 60px; font-weight: normal;} .inner-man img{width:200px; }
.inner-banner-con-h3{font-size: 24px; font-weight: normal; color: #fff;} .inner-banner-con h2{ font-size: 60px; font-weight: normal;}
.inner-banner-con-h3 a{color: #fff;} .inner-banner-con-h3{font-size: 24px; font-weight: normal; color: #fff;}
.inner-c_blue{ color:#3b94d6;} .inner-banner-con-h3 a{color: #fff;}
a.btn-blue{ display: block; background:#3b94d6; color:#fff; border-radius:5px; text-align:center;border: 3px solid #3b94d6; font-size:18px; padding: 5px 20px; width: 220px; } .inner-c_blue{ color:#3b94d6;}
a:hover.btn-blue{background: #2384cd; border: 3px solid #2384cd;} a.btn-blue{ display: block; background:#3b94d6; color:#fff; border-radius:5px; text-align:center;border: 3px solid #3b94d6; font-size:18px; padding: 5px 20px; width: 220px; }
a.btn-blue-line{ display: block; border: 3px solid #3b94d6; color:#3b94d6; border-radius:5px; text-align:center; font-size:18px; padding: 5px 20px; width: 220px; } a:hover.btn-blue{background: #2384cd; border: 3px solid #2384cd;}
a:hover.btn-blue-line{background: #3b94d6; color:#fff;} a.btn-blue-line{ display: block; border: 3px solid #3b94d6; color:#3b94d6; border-radius:5px; text-align:center; font-size:18px; padding: 5px 20px; width: 220px; }
.inner-btnbox{ width: 580px; margin: 30px auto;} a:hover.btn-blue-line{background: #3b94d6; color:#fff;}
.innner-banner-bottom{ width: 300px; text-align: left; float: left; margin-top: 50px; font-size: 14px;} .inner-btnbox{ width: 580px; margin: 30px auto;}
.inner-border{ display: block; width: 50px; border-top:3px solid #fff; margin-bottom: 15px;} .innner-banner-bottom{ width: 300px; text-align: left; float: left; margin-top: 50px; font-size: 14px;}
.new-container-inner-h3{ font-size:40px; font-weight: normal; color: #333; text-align: center; margin-bottom: 20px;} .inner-border{ display: block; width: 50px; border-top:3px solid #fff; margin-bottom: 15px;}
.innerbox-txt{ width:300px;} .new-container-inner-h3{ font-size:40px; font-weight: normal; color: #333; text-align: center; margin-bottom: 20px;}
.back-color-black{ background:#47494d;} .innerbox-txt{ width:300px;}
.inner-t-c{ text-align: center;} .back-color-black{ background:#47494d;}
.inner-footer{ width: 100%; min-width:1200px; background:#323232; height:155px;} .inner-t-c{ text-align: center;}
.inner-footer_con{ width: 1200px; margin: 0 auto;} .inner-footer{ width: 100%; min-width:1200px; background:#323232; height:155px;}
.inner-footer-nav{ height: 50px; border-bottom:1px solid #47494d;} .inner-footer_con{ width: 1200px; margin: 0 auto;}
.inner-footer-nav li a{ float: left; margin-right:15px; font-size: 14px; color: #888; line-height: 50px;} .inner-footer-nav{ height: 50px; border-bottom:1px solid #47494d;}
.saoma-box{ position: relative;} .inner-footer-nav li a{ float: left; margin-right:15px; font-size: 14px; color: #888; line-height: 50px;}
.saoma-img-box{ position: absolute; top:-300px; left: -95px; border-radius:3px; background:#fff; padding:15px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); display: none;} .saoma-box{ position: relative;}
.saoma-box li:hover ul{display:block; } .saoma-img-box{ position: absolute; top:-300px; left: -95px; border-radius:3px; background:#fff; padding:15px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); display: none;}
.img-show{ width:50px; height:50px; border-radius:50px; } .saoma-box li:hover ul{display:block; }
.saoma-img-box font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top:289px;left: 110px; border-style:solid; border-color:#fff transparent transparent transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); } .img-show{ width:50px; height:50px; border-radius:50px; }
.inner-footer-p-big{ display: block; height: 50px; line-height: 50px; color:#888; font-size: 16px; border-left:2px solid #888; padding-left:15px;} .saoma-img-box font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top:289px;left: 110px; border-style:solid; border-color:#fff transparent transparent transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); }
.inner-btnbox02{ width:270px; margin: 30px auto 0;} .inner-footer-p-big{ display: block; height: 50px; line-height: 50px; color:#888; font-size: 16px; border-left:2px solid #888; padding-left:15px;}
.new-container-inner02{width:1200px; margin:0px auto; padding:50px 0;} .inner-btnbox02{ width:270px; margin: 30px auto 0;}
.inner-nav-mes{ font-size:28px; color: #fff; position: relative; margin-top:3px; margin-right:35px;} .new-container-inner02{width:1200px; margin:0px auto; padding:50px 0;}
.inner-nav-cir{ position: absolute; top:0px; left:15px; background:#3b94d6; color:#fff; border-radius:15px;padding:0 5px; display: inline-block; font-size: 10px;} .inner-nav-mes{ font-size:28px; color: #fff; position: relative; margin-top:3px; margin-right:35px;}
.inner-nav-user{ width: 55px; height: 40px; margin-top:5px; position: relative;} .inner-nav-cir{ position: absolute; top:0px; left:15px; background:#3b94d6; color:#fff; border-radius:15px;padding:0 5px; display: inline-block; font-size: 10px;}
.inner-nav-user-img{ width: 40px; height: 40px; border-radius:50px;} .inner-nav-user{ width: 55px; height: 40px; margin-top:5px; position: relative;}
.inner-nav-user font{border: 1px solid #dddddd; display: block; border-width: 6px; position: absolute; top:18px;left:45px; border-style:solid; border-color:#fff transparent transparent transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5);} .inner-nav-user-img{ width: 40px; height: 40px; border-radius:50px;}
/*消息弹框*/ .inner-nav-user font{border: 1px solid #dddddd; display: block; border-width: 6px; position: absolute; top:18px;left:45px; border-style:solid; border-color:#fff transparent transparent transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5);}
.shadowbox_news{ width:305px; background-color:#fff; border-radius: 3px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position:absolute; font-size: 12px; top:50px; left:-135px;display: none; z-index:999;} /*消息弹框*/
.shadowbox_news_title{ height:40px; line-height:40px;padding-left:10px; font-size:12px; color:#333;border-bottom:1px solid #eee;} .shadowbox_news{ width:305px; background-color:#fff; border-radius: 3px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position:absolute; font-size: 12px; top:50px; left:-135px;display: none; z-index:999;}
.shadowbox_news font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left: 140px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); } .shadowbox_news_title{ height:40px; line-height:40px;padding-left:10px; font-size:12px; color:#333;border-bottom:1px solid #eee;}
.shadowbox_news_list{ max-height:200px; overflow:hidden;} .shadowbox_news font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left: 140px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); }
.shadowbox_news_list a{ color:#999;} .shadowbox_news_list{ max-height:200px; overflow:hidden;}
.shadowbox_news_list li{ height:40px; border-bottom:1px dashed #ebebeb; line-height:40px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis; padding:0 10px;} .shadowbox_news_list a{ color:#999;}
.shadowbox_news_list li:hover{ background-color:#eee;} .shadowbox_news_list li{ height:40px; border-bottom:1px dashed #ebebeb; line-height:40px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis; padding:0 10px;}
span.shadowbox_news_user{ color:#3b94d6;} .shadowbox_news_list li:hover{ background-color:#eee;}
a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px; color:#3b94d6; text-align:center;border-top:1px solid #eee;} span.shadowbox_news_user{ color:#3b94d6;}
.inner-nav-mes li:hover ul{ display: block;} a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px; color:#3b94d6; text-align:center;border-top:1px solid #eee;}
a.menuGreyNew {color:#808080;} .inner-nav-mes li:hover ul{ display: block;}
a.menuGreyNew:hover {color:#297fb8;} a.menuGreyNew {color:#808080;}
/*头像下拉弹框*/ a.menuGreyNew:hover {color:#297fb8;}
.my_account_info{ width:160px; background-color:#fff; border-radius: 3px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position:absolute; font-size: 14px; top:46px; left:-97px;display: none; z-index:999;} /*头像下拉弹框*/
.my_account_info li a{ color: #888;} .my_account_info{ width:160px; background-color:#fff; border-radius: 3px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position:absolute; font-size: 14px; top:46px; left:-97px;display: none; z-index:999;}
.my_account_info font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left: 140px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); } .my_account_info li a{ color: #888;}
.my_account_info li{ padding-left: 5px; line-height: 1.5;} .my_account_info font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left: 140px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); }
.li_bottom_border{ border-bottom:1px solid #eee;} .my_account_info li{ padding-left: 5px; line-height: 1.5;}
.li_bottom_border{ border-bottom:1px solid #eee;}
.inner-user-info{ border-radius:3px; background:#fff; padding:15px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); width:305px; display:block; width:300px; display: none;}
.inner-user-info font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top:289px;left: 110px; border-style:solid; border-color:transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); } .inner-user-info{ border-radius:3px; background:#fff; padding:15px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); width:305px; display:block; width:300px; display: none;}
.inner-user-info li a{ display: block; height: 30px; line-height: 30px; color: #fff; width: 200px; } .inner-user-info font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top:289px;left: 110px; border-style:solid; border-color:transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); }
.inner-user-info li a{ display: block; height: 30px; line-height: 30px; color: #fff; width: 200px; }
.inner-img02{ width: 1000px; margin:0 auto;}
.inner-txtbox02{width: 800px; margin:0 auto;} .inner-img02{ width: 1000px; margin:0 auto;}
.inner-txtbox02 p{ display: block; width: 200px; font-size: 20px; float: left; margin-top:30px; text-align: center; color:#666;} .inner-txtbox02{width: 800px; margin:0 auto;}
.innerbox-txt-h3{ font-size:28px; color: #333; margin-bottom:20px;} .inner-txtbox02 p{ display: block; width: 200px; font-size: 20px; float: left; margin-top:30px; text-align: center; color:#666;}
.innerbox-txt-p{font-size: 20px; color: #666;} .innerbox-txt-h3{ font-size:28px; color: #333; margin-bottom:20px;}
.innerbox-txt-p{font-size: 20px; color: #666;}

@ -455,6 +455,7 @@ li.li-width7{width: 7%;text-align: left}
.top-black-trangle{display: block;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{display: block;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;}
.right-black-trangle{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{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;}
.activity-nav.active{color: #4CACFF!important;} .activity-nav.active{color: #4CACFF!important;}
.yslinvitetip{right: 140px;color: #fff; box-sizing: border-box;width: 170px;text-align: center;border-radius: 2px;background-color: rgba(5,16,26,0.6)}
.courseNewNum{display: block;background: #FF6800;border-radius:30px;padding:0px 2px;color: #fff!important;font-size: 11px; .courseNewNum{display: block;background: #FF6800;border-radius:30px;padding:0px 2px;color: #fff!important;font-size: 11px;

Loading…
Cancel
Save