Merge branch 'master' of https://bdgit.educoder.net/Hjqreturn/educoder
commit
10fa6d9c7c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -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">></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">></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>*/
|
||||
}
|
@ -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> 2019 EduCoder<span className="ml15 mr15">湘ICP备17009477号</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a> & IntelliDE inside.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default EducoderInteresse;
|
After Width: | Height: | Size: 19 KiB |
Loading…
Reference in new issue