Merge remote-tracking branch 'origin/master'

# Conflicts:
#	public/react/src/modules/courses/coursesDetail/CoursesBanner.js
#	public/react/src/modules/user/LoginRegisterComponent.js
dev_forum
杨树明 6 years ago
commit a3466058c7

@ -3,6 +3,8 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@novnc/novnc": "^1.1.0",
"@flatten/array": "^1.1.7", "@flatten/array": "^1.1.7",
"@icedesign/base": "^0.2.5", "@icedesign/base": "^0.2.5",
"antd": "^3.6.5", "antd": "^3.6.5",

@ -417,7 +417,7 @@ pop_box_new(htmlvalue, 480, 182);
*/ */
let user = resData.user; let user = resData.user;
user.username = resData.user.name; user.username = resData.user.name;
// user.user_url = resData.user_url; user.user_url = `/user/${resData.user.login}`;
// user.image_url = resData.image_url; // user.image_url = resData.image_url;
user.is_teacher = resData.is_teacher; user.is_teacher = resData.is_teacher;
resData.user = user; resData.user = user;

@ -442,14 +442,19 @@ class CoursesIndex extends Component{
<Switch {...this.props}> <Switch {...this.props}>
{/* 资源列表页 */} {/* 资源列表页 */}
<Route path="/courses/:coursesId/file/:Id" <Route path="/courses/:coursesId/file/:Id" exact
render={ render={
(props) => (<Resourcelist {...this.props} {...props} {...this.state} />) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/courses/:coursesId/files/:main_id" <Route path="/courses/:coursesId/files/:main_id"
render={ render={
(props) => (<Resourcelist {...this.props} {...props} {...this.state} />) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
}
></Route>
<Route exact path="/courses/:coursesId/boards/:boardId"
render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/*课堂讨论*/} {/*课堂讨论*/}
@ -486,9 +491,9 @@ class CoursesIndex extends Component{
></Route> ></Route>
{/* 毕设选题列表 */} {/* 毕设选题列表 */}
<Route path="/courses/:coursesId/graduation_topics/:Id" <Route path="/courses/:coursesId/graduation_topics/:Id" exact
render={ render={
(props) => (<GraduationTopics {...this.props} {...props} {...this.state} />) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
}></Route> }></Route>
@ -554,9 +559,9 @@ class CoursesIndex extends Component{
{/* 毕设任务列表 https://www.trustie.net/issues/19981 */} {/* 毕设任务列表 https://www.trustie.net/issues/19981 */}
<Route path="/courses/:coursesId/graduation_tasks/:Id" <Route path="/courses/:coursesId/graduation_tasks/:Id" exact
render={ render={
(props) => (<GraduationTasks {...this.props} {...props} {...this.state} />) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
@ -593,14 +598,27 @@ class CoursesIndex extends Component{
></Route> ></Route>
{/* 普通作业 */} {/* 普通作业 */}
<Route path="/courses/:coursesId/common_homeworks" <Route path="/courses/:coursesId/common_homeworks/:category_id" exact
render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 分组作业 */}
<Route path="/courses/:coursesId/group_homeworks/:category_id" exact
render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 普通作业 */}
<Route path="/courses/:coursesId/common_homeworks/" strict
render={ render={
(props) => (<CommonWork {...this.props} {...props} {...this.state} />) (props) => (<CommonWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 分组作业 */} {/* 分组作业 */}
<Route path="/courses/:coursesId/group_homeworks" <Route path="/courses/:coursesId/group_homeworks/" strict
render={ render={
(props) => (<GroupWork {...this.props} {...props} {...this.state} />) (props) => (<GroupWork {...this.props} {...props} {...this.state} />)
} }

@ -56,6 +56,14 @@ const ShixunHomework= Loadable({
loading: Loading, loading: Loading,
}) })
const GraduationTopics= Loadable({
loader: () => import('./graduation/topics'),
loading: Loading,
})
const GraduationTasks= Loadable({
loader: () => import('./graduation/tasks'),
loading: Loading,
})
class ListPageIndex extends Component{ class ListPageIndex extends Component{
constructor(props) { constructor(props) {
super(props) super(props)
@ -169,6 +177,28 @@ class ListPageIndex extends Component{
} }
></Route> ></Route>
<Route path="/courses/:coursesId/files/:main_id"
render={
(props) => (<Resourcelist {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/file/:Id"
render={
(props) => (<Resourcelist {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/graduation_topics/:Id"
render={
(props) => (<GraduationTopics {...this.props} {...props} {...this.state} />)
}></Route>
<Route path="/courses/:coursesId/graduation_tasks/:Id"
render={
(props) => (<GraduationTasks {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 默认 */}
<Route path="/courses/:coursesId" <Route path="/courses/:coursesId"
render={ render={
(props) => (<StudentsList {...this.props} {...props} {...this.state} />) (props) => (<StudentsList {...this.props} {...props} {...this.state} />)

@ -573,7 +573,7 @@ class Fileslists extends Component{
return( return(
<div> <React.Fragment >
{/*发送*/} {/*发送*/}
@ -647,7 +647,6 @@ class Fileslists extends Component{
has_course_groups={this.state.has_course_groups} has_course_groups={this.state.has_course_groups}
/>:""} />:""}
<CourseLayoutcomponent {...this.props}>
<Titlesearchsection <Titlesearchsection
title={name} title={name}
searchValue={ searchValue } searchValue={ searchValue }
@ -840,8 +839,7 @@ class Fileslists extends Component{
</div> </div>
</CourseLayoutcomponent> </React.Fragment>
</div>
) )
} }
} }

@ -14,7 +14,7 @@ import { WordsBtn } from 'educoder'
import Modals from '../../modals/Modals' import Modals from '../../modals/Modals'
import NoneData from "../coursesPublic/NoneData" import NoneData from "../coursesPublic/NoneData"
import Titlesearchsection from '../common/titleSearch/TitleSearchSection'; import Titlesearchsection from '../common/titleSearch/TitleSearchSection';
import { RouteHOC } from './common'
import axios from 'axios'; import axios from 'axios';
import _ from 'lodash' import _ from 'lodash'
@ -71,6 +71,13 @@ class commonWork extends Component{
sureDelClasses(){ sureDelClasses(){
} }
componentDidUpdate(prevProps, prevState) {
debugger;
if (prevProps.match.path != this.props.match.path) {
this.componentDidMount()
}
}
componentDidMount(){ componentDidMount(){
this.setState({ this.setState({
@ -429,4 +436,4 @@ class commonWork extends Component{
) )
} }
} }
export default commonWork; export default RouteHOC() (commonWork);

@ -9,7 +9,7 @@ import '../css/Courses.css';
import Modals from "../../modals/Modals"; import Modals from "../../modals/Modals";
import AddStudentModal from '../members/modal/AddStudentModal' import AddStudentModal from '../members/modal/AddStudentModal'
import AddTeacherModal from '../members/modal/AddTeacherModal' import AddTeacherModal from '../members/modal/AddTeacherModal'
import Trialapplication from "../../login/Trialapplication";
// 点击按钮复制功能 // 点击按钮复制功能
// function jsCopy(){ // function jsCopy(){
@ -43,34 +43,46 @@ class CoursesBanner extends Component {
metype: 0, metype: 0,
modalsBottomval: "", modalsBottomval: "",
antIcon:false, antIcon:false,
coursedata:undefined coursedata:undefined,
user_phone_binded:false,
isRenders:false,
showTrial:false,
} }
} }
componentDidMount() { componentDidMount() {
this.onloadupdatabanner() this.onloadupdatabanner()
this.setState({
user_phone_binded :this.props.user_phone_binded,
})
} }
onloadupdatabanner=()=>{ onloadupdatabanner=()=>{
this.updatabanner() this.updatabanner()
} }
updatabanner=()=>{ updatabanner=()=>{
let courseId = this.props.match.params.coursesId; let courseId = this.props.match.params.coursesId;
let url = "/courses/" + courseId + "/top_banner.json" let url = "/courses/" + courseId + "/top_banner.json"
axios.get(url).then((result) => { axios.get(url).then((result) => {
if( result!=undefined){ if( result!=undefined){
let data = result.data; let data = result.data;
if(result.data.status === 407){
this.setState({ this.setState({
coursedata: data isRenders:true,
coursedata: data,
showTrial:false,
}) })
}else{
this.setState({
coursedata: data,
showTrial:true,
})
}
}else{ }else{
this.onloadupdatabanner() this.onloadupdatabanner()
} }
}) })
} }
showeditmenu = () => { showeditmenu = () => {
this.setState({ this.setState({
show: true, show: true,
@ -323,10 +335,13 @@ class CoursesBanner extends Component {
} }
render() { render() {
let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon} = this.state; let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state;
return ( return (
<div>
<Trialapplication {...this.state} user_phone_binded={user_phone_binded} ></Trialapplication>
{
coursedata === undefined || coursedata.status===401? <div id="course_info_1309" className="courseHead" style={{height: '206px'}}></div>:<div id="course_info_1309" className="courseHead" style={{height: '206px'}}> coursedata === undefined || coursedata.status===401? <div id="course_info_1309" className="courseHead" style={{height: '206px'}}></div>:<div id="course_info_1309" className="courseHead" style={{height: '206px'}}>
{Addcoursestypes === true ? <Addcourses {Addcoursestypes === true ? <Addcourses
@ -582,6 +597,9 @@ class CoursesBanner extends Component {
</div> </div>
</div> </div>
</div> </div>
}
</div>
) )
} }
} }

@ -240,11 +240,15 @@ class ExerciseReviewAndAnswer extends Component{
) )
} }
// 调分 // 调分
showSetScore=(key,flag)=>{ showSetScore=(key,flag,setId)=>{
this.setState( this.setState(
(prevState) => ({ (prevState) => ({
exercise_questions : update(prevState.exercise_questions, {[key]: { setScore: {$set: flag == undefined || flag==false ? true : false}}}) exercise_questions : update(prevState.exercise_questions, {[key]: { setScore: {$set: flag == undefined || flag==false ? true : false}}})
}) }),()=>{
if (setId && (flag == undefined || flag==false)) {
$("html").animate({ scrollTop: $("#Anchor_"+setId).offset().top - 150 })
}
}
) )
this.setState({ this.setState({
score:undefined score:undefined
@ -502,6 +506,18 @@ class ExerciseReviewAndAnswer extends Component{
console.log(data&&data.exercise.user_name) console.log(data&&data.exercise.user_name)
return( return(
<div className="newMain" style={{paddingTop:"0px"}}> <div className="newMain" style={{paddingTop:"0px"}}>
<style>{`
.inputNumber30{
height:30px;
width:115px;
}
.inputNumber30 .ant-input-number-input-wrap{
line-height: 28px;
}
.inputNumber30 .ant-input-number-input-wrap .ant-input-number-input{
height: 28px;
}
`}</style>
<p style={{height:"60px"}}></p> <p style={{height:"60px"}}></p>
<Modals <Modals
modalsType={Modalstype} modalsType={Modalstype}
@ -665,7 +681,7 @@ class ExerciseReviewAndAnswer extends Component{
{ {
// 填空(一直都有调分),和简答题调分:老师身份 已经评分的才能出现调分按钮 // 填空(一直都有调分),和简答题调分:老师身份 已经评分的才能出现调分按钮
isAdmin && ((parseInt(item.answer_status) == 1 && item.question_type == 4) || item.question_type == 3) ? isAdmin && ((parseInt(item.answer_status) == 1 && item.question_type == 4) || item.question_type == 3) ?
<WordsBtn style="blue" className="mr20 font-16 fl" onClick={()=>this.showSetScore(key,item.setScore)}>调分</WordsBtn>:"" <WordsBtn style="blue" className="mr20 font-16 fl" onClick={()=>this.showSetScore(key,item.setScore,item.q_position+"_"+item.question_type)}>调分</WordsBtn>:""
} }
{ {
// 简答题,未评分的显示未批 // 简答题,未评分的显示未批
@ -767,11 +783,10 @@ class ExerciseReviewAndAnswer extends Component{
</div> </div>
</div> </div>
} }
{ {
// 调分输入部分 // 调分输入部分
isAdmin && ((item.setScore && item.question_type == 3) || ((item.setScore || parseInt(item.answer_status) == 0) && item.question_type == 4))? isAdmin && ((item.setScore && item.question_type == 3) || ((item.setScore || parseInt(item.answer_status) == 0) && item.question_type == 4))?
<div className="ml30 mr30 bor-top-greyE pt20 mt20"> <div className="ml30 mr30 bor-top-greyE pt20 mt20" id={`${"Anchor_"+item.q_position+"_"+item.question_type}`}>
<div className="edu-txt-right"> <div className="edu-txt-right">
<span><span className="color-red">*</span></span> <span><span className="color-red">*</span></span>
<li className="fr"> <li className="fr">
@ -783,8 +798,7 @@ class ExerciseReviewAndAnswer extends Component{
value={score} value={score}
step={0.1} step={0.1}
precision={1} precision={1}
className={ setTip !="" ? "edu-txt-center winput-115-40 fl mt3 noticeTip" : "edu-txt-center winput-115-40 fl mt3"} className={ setTip !="" ? "edu-txt-center winput-115-40 fl mt3 noticeTip inputNumber30" : "edu-txt-center winput-115-40 fl mt3 inputNumber30"}
style={{height:"30px",width:"115px"}}
onChange={this.inputScore} onChange={this.inputScore}
></InputNumber> ></InputNumber>
<span className="ml5"></span> <span className="ml5"></span>

@ -2030,7 +2030,7 @@ class Studentshavecompletedthelist extends Component {
//===0 不包括主观题 //===0 不包括主观题
if (indexi === exercise_users.length) { if (indexi === exercise_users.length) {
//都没评论 不显示评论 //都没评论 不显示评论
if (response.data.course_groups.length > 0) { if (response.data.poll_types.groups_count > 0) {
// console.log("77771111111"); // console.log("77771111111");
//分班大于0显示分班 //分班大于0显示分班
//7ge //7ge
@ -2272,7 +2272,8 @@ class Studentshavecompletedthelist extends Component {
} else { } else {
//已经评论 //已经评论
if (response.data.course_groups.length > 0) { // response.data.course_groups.length
if (response.data.poll_types.groups_count > 0) {
//显示分班 //显示分班
//8ge //8ge
this.setState({ this.setState({
@ -2545,7 +2546,7 @@ class Studentshavecompletedthelist extends Component {
//包括主观题 //包括主观题
if (indexi === exercise_users.length) { if (indexi === exercise_users.length) {
console.log("2548包含主观题不包含分班"); console.log("2548包含主观题不包含分班");
if (response.data.course_groups.length > 0){ if (response.data.poll_types.groups_count> 0){
this.setState({ this.setState({
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,
@ -2836,7 +2837,7 @@ class Studentshavecompletedthelist extends Component {
} }
} else { } else {
console.log("2699包含主观题包含分班"); console.log("2699包含主观题包含分班");
if (response.data.course_groups.length > 0) { if (response.data.poll_types.groups_count> 0) {
this.setState({ this.setState({
data: datalist, data: datalist,
teacherlist: teacherlist, teacherlist: teacherlist,

@ -86,6 +86,19 @@ class GraduationTasksSubmitnew extends Component{
let {fileList,selectmemberslist,workslist}=this.state; let {fileList,selectmemberslist,workslist}=this.state;
if(fileList.length === 0){
this.setState({
Modalstype:true,
Modalstopval:'请上传附件!',
Loadtype:true,
ModalCancel:this.cancelAttachment
})
return
}
let userids=[]; let userids=[];
for(var list of selectmemberslist){ for(var list of selectmemberslist){
@ -433,6 +446,8 @@ render(){
let graduation_id=workslist===undefined?"":workslist.graduation_id; let graduation_id=workslist===undefined?"":workslist.graduation_id;
let task_id=workslist===undefined?"":workslist.task_id; let task_id=workslist===undefined?"":workslist.task_id;
return( return(
<React.Fragment> <React.Fragment>

@ -163,8 +163,8 @@ class GraduationTasksappraise extends Component{
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<p className="clearfix mt10"> <p className="clearfix mt10">
{/*<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id} className="color-grey-6">{datalist&&datalist.course_name}</Link></WordsBtn>*/} <WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId} className="color-grey-6">{datalist&&datalist.course_name}</Link></WordsBtn>
{/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/} <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id} className="color-grey-6">{datalist&&datalist.graduation_name}</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id} className="color-grey-6">{datalist&&datalist.graduation_name}</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id+"/"+task_id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn> <WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id+"/"+task_id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn>
@ -182,23 +182,22 @@ class GraduationTasksappraise extends Component{
` `
} }
</style> </style>
<div style={{ width:'100%',height:'75px'}} > <div className="mt20 mb20 clearfix lineh-25">
<p className=" fl color-black mt25 summaryname">{datalist&&datalist.task_name}</p> <p className="fl color-black summaryname lineh-25">{datalist&&datalist.task_name}</p>
<CoursesListType <CoursesListType
typelist={datalist&&datalist.status} typelist={datalist&&datalist.status}
typesylename={"mt23"}
/> />
<a className="color-grey-6 fr font-16 mt10 mr20" onClick={this.goback}>返回</a> <a className="color-grey-6 fr font-16 mr20" onClick={this.goback}>返回</a>
{this.props.isStudent()? {this.props.isStudent()?
datalist&&datalist.task_status===2? datalist&&datalist.task_status===2?
<a className={"fr color-blue font-16 mt10 mr20"} onClick={this.addAccessory}>补交附件</a>:"" <a className={"fr color-blue font-16 mr20"} onClick={this.addAccessory}>补交附件</a>:""
:""} :""}
</div> </div>
<div className=" edu-back-white " style={{"padding": "20px 15px 20px 15px","box-sizing": "border-box"}}> <div className=" edu-back-white " style={{"padding": "20px 15px 20px 15px","box-sizing": "border-box"}}>
<div className={"stud-class-set bor-bottom-greyE edu-back-white"} style={{ padding: '0px 10px 20px 10px'}}> <div className={"stud-class-set edu-back-white"} style={{ padding: '0px 10px 20px 10px'}}>
<div className={"color-grey-6 h20 mb20"}> <div className={"color-grey-6 h20 mb20"}>
内容 内容
@ -251,7 +250,7 @@ class GraduationTasksappraise extends Component{
{firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.length===0?"":<div className={"stud-class-set bor-bottom-greyE pd20 edu-back-white"}> {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.length===0?"":<div className={"stud-class-set bor-bottom-greyE pd20 edu-back-white"}>
<div className={"color-grey-6 mb10"}> <div className={"color-grey-6 mb10 bor-top-greyE"}>
补交附件 补交附件
</div> </div>

@ -619,17 +619,17 @@ class GraduationTaskssettinglist extends Component{
title: '序号', title: '序号',
dataIndex: 'number', dataIndex: 'number',
key: 'number', key: 'number',
className:'edu-txt-center'
}, { }, {
title: '姓名', title: '姓名',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
className:'edu-txt-center'
}, { }, {
title: '学号', title: '学号',
dataIndex: 'stduynumber', dataIndex: 'stduynumber',
key: 'stduynumber', key: 'stduynumber',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:'#9A9A9A'}}>{record.stduynumber}</a> <a style={{color:'#9A9A9A'}}>{record.stduynumber}</a>
@ -639,7 +639,7 @@ class GraduationTaskssettinglist extends Component{
title: '分班', title: '分班',
key: 'classroom', key: 'classroom',
dataIndex: 'classroom', dataIndex: 'classroom',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:'#9A9A9A'}}>{record.classroom==="未分班"?"--":record.classroom}</a> <a style={{color:'#9A9A9A'}}>{record.classroom==="未分班"?"--":record.classroom}</a>
@ -649,6 +649,7 @@ class GraduationTaskssettinglist extends Component{
title: '分组', title: '分组',
key: 'grouping', key: 'grouping',
dataIndex: 'grouping', dataIndex: 'grouping',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:'#676767'}}>{record.grouping}</a> <a style={{color:'#676767'}}>{record.grouping}</a>
@ -657,7 +658,7 @@ class GraduationTaskssettinglist extends Component{
title: '关联项目', title: '关联项目',
dataIndex: 'associationitems', dataIndex: 'associationitems',
key: 'associationitems', key: 'associationitems',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<div> <div>
<a style={{color:'#4CACFF'}} href={"/projects/"+record.associationitems.id} target={"_blank"}> <a style={{color:'#4CACFF'}} href={"/projects/"+record.associationitems.id} target={"_blank"}>
@ -669,7 +670,7 @@ class GraduationTaskssettinglist extends Component{
title: '提交状态', title: '提交状态',
dataIndex: 'submitstate', dataIndex: 'submitstate',
key: 'submitstate', key: 'submitstate',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:record.submitstate==="按时提交"?'#29BD8B':record.submitstate==="未提交"?"#9A9A9A":"#DD1717"}}>{record.submitstate}</a> <a style={{color:record.submitstate==="按时提交"?'#29BD8B':record.submitstate==="未提交"?"#9A9A9A":"#DD1717"}}>{record.submitstate}</a>
@ -679,7 +680,7 @@ class GraduationTaskssettinglist extends Component{
title: '更新时间', title: '更新时间',
dataIndex: 'turnovertime', dataIndex: 'turnovertime',
key: 'turnovertime', key: 'turnovertime',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:'#989898'}}> <a style={{color:'#989898'}}>
@ -691,11 +692,11 @@ class GraduationTaskssettinglist extends Component{
title: '教师评分', title: '教师评分',
key: 'teacherrating', key: 'teacherrating',
dataIndex: 'teacherrating', dataIndex: 'teacherrating',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Tooltip placement="bottom" title={record.teacherrating==="--"||record.teacherrating==="未批阅"?"未评阅":""}> <Tooltip placement="bottom" title={record.teacherrating==="--"||record.teacherrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.teacherrating)>90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)}</a> <a style={{color:parseInt(record.teacherrating)>90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating}</a>
</Tooltip> </Tooltip>
</span> </span>
), ),
@ -703,11 +704,11 @@ class GraduationTaskssettinglist extends Component{
title: '交叉评分', title: '交叉评分',
key: 'crossrating', key: 'crossrating',
dataIndex: 'crossrating', dataIndex: 'crossrating',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Tooltip placement="bottom" title={record.crossrating==="--"||record.crossrating==="未批阅"?"未评阅":""}> <Tooltip placement="bottom" title={record.crossrating==="--"||record.crossrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.crossrating)>90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)}</a> <a style={{color:parseInt(record.crossrating)>90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating}</a>
</Tooltip> </Tooltip>
</span> </span>
), ),
@ -715,11 +716,11 @@ class GraduationTaskssettinglist extends Component{
title: '最终成绩', title: '最终成绩',
key: 'finalscore', key: 'finalscore',
dataIndex: 'finalscore', dataIndex: 'finalscore',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅":""}> <Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅":""}>
<a style={{color:parseInt(record.finalscore)>90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)}</a> <a style={{color:parseInt(record.finalscore)>90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore}</a>
</Tooltip> </Tooltip>
</span> </span>
), ),
@ -727,6 +728,7 @@ class GraduationTaskssettinglist extends Component{
title: '操作', title: '操作',
key: 'operation', key: 'operation',
dataIndex: 'operation', dataIndex: 'operation',
className:'edu-txt-center',
render: operation => ( render: operation => (
<div> <div>
{this.props.isAdmin()?operation.map((tag,key) => { {this.props.isAdmin()?operation.map((tag,key) => {
@ -770,17 +772,17 @@ class GraduationTaskssettinglist extends Component{
title: '序号', title: '序号',
dataIndex: 'number', dataIndex: 'number',
key: 'number', key: 'number',
className:'edu-txt-center',
}, { }, {
title: '姓名', title: '姓名',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
className:'edu-txt-center',
}, { }, {
title: '学号', title: '学号',
dataIndex: 'stduynumber', dataIndex: 'stduynumber',
key: 'stduynumber', key: 'stduynumber',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:'#9A9A9A'}}>{record.stduynumber}</a> <a style={{color:'#9A9A9A'}}>{record.stduynumber}</a>
@ -790,6 +792,7 @@ class GraduationTaskssettinglist extends Component{
title: '分组', title: '分组',
key: 'grouping', key: 'grouping',
dataIndex: 'grouping', dataIndex: 'grouping',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:'#676767'}}>{record.grouping}</a> <a style={{color:'#676767'}}>{record.grouping}</a>
@ -798,7 +801,7 @@ class GraduationTaskssettinglist extends Component{
title: '关联项目', title: '关联项目',
dataIndex: 'associationitems', dataIndex: 'associationitems',
key: 'associationitems', key: 'associationitems',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<div> <div>
<a style={{color:'#4CACFF'}} href={"/projects/"+record.associationitems.id} target={"_blank"}> <a style={{color:'#4CACFF'}} href={"/projects/"+record.associationitems.id} target={"_blank"}>
@ -810,7 +813,7 @@ class GraduationTaskssettinglist extends Component{
title: '提交状态', title: '提交状态',
dataIndex: 'submitstate', dataIndex: 'submitstate',
key: 'submitstate', key: 'submitstate',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:record.submitstate==="按时提交"?'#29BD8B':record.submitstate==="未提交"?"#9A9A9A":"#DD1717"}}>{record.submitstate}</a> <a style={{color:record.submitstate==="按时提交"?'#29BD8B':record.submitstate==="未提交"?"#9A9A9A":"#DD1717"}}>{record.submitstate}</a>
@ -820,7 +823,7 @@ class GraduationTaskssettinglist extends Component{
title: '更新时间', title: '更新时间',
dataIndex: 'turnovertime', dataIndex: 'turnovertime',
key: 'turnovertime', key: 'turnovertime',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:'#989898'}}> <a style={{color:'#989898'}}>
@ -832,11 +835,11 @@ class GraduationTaskssettinglist extends Component{
title: '教师评分', title: '教师评分',
key: 'teacherrating', key: 'teacherrating',
dataIndex: 'teacherrating', dataIndex: 'teacherrating',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Tooltip placement="bottom" title={record.teacherrating==="--"||record.teacherrating==="未批阅"?"未评阅":""}> <Tooltip placement="bottom" title={record.teacherrating==="--"||record.teacherrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.teacherrating)>90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)}</a> <a style={{color:parseInt(record.teacherrating)>90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating}</a>
</Tooltip> </Tooltip>
</span> </span>
), ),
@ -844,11 +847,11 @@ class GraduationTaskssettinglist extends Component{
title: '交叉评分', title: '交叉评分',
key: 'crossrating', key: 'crossrating',
dataIndex: 'crossrating', dataIndex: 'crossrating',
className:'none', className:'none edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Tooltip placement="bottom" title={record.crossrating==="--"||record.crossrating==="未批阅"?"未评阅":""}> <Tooltip placement="bottom" title={record.crossrating==="--"||record.crossrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.crossrating)>90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)}</a> <a style={{color:parseInt(record.crossrating)>90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating}</a>
</Tooltip> </Tooltip>
</span> </span>
), ),
@ -856,11 +859,11 @@ class GraduationTaskssettinglist extends Component{
title: '最终成绩', title: '最终成绩',
key: 'finalscore', key: 'finalscore',
dataIndex: 'finalscore', dataIndex: 'finalscore',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅":""}> <Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅":""}>
<a style={{color:parseInt(record.finalscore)>90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)}</a> <a style={{color:parseInt(record.finalscore)>90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore}</a>
</Tooltip> </Tooltip>
</span> </span>
), ),
@ -868,6 +871,7 @@ class GraduationTaskssettinglist extends Component{
title: '操作', title: '操作',
key: 'operation', key: 'operation',
dataIndex: 'operation', dataIndex: 'operation',
className:'edu-txt-center',
render: operation => ( render: operation => (
<div> <div>
{this.props.isAdmin()?operation.map((tag,key) => { {this.props.isAdmin()?operation.map((tag,key) => {
@ -916,17 +920,17 @@ class GraduationTaskssettinglist extends Component{
title: '序号', title: '序号',
dataIndex: 'number', dataIndex: 'number',
key: 'number', key: 'number',
className:'edu-txt-center',
}, { }, {
title: '姓名', title: '姓名',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
className:'edu-txt-center',
}, { }, {
title: '学号', title: '学号',
dataIndex: 'stduynumber', dataIndex: 'stduynumber',
key: 'stduynumber', key: 'stduynumber',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a href="javascript:;" style={{color:'#9A9A9A'}}>{record.stduynumber}</a> <a href="javascript:;" style={{color:'#9A9A9A'}}>{record.stduynumber}</a>
@ -936,7 +940,7 @@ class GraduationTaskssettinglist extends Component{
title: '分班', title: '分班',
key: 'classroom', key: 'classroom',
dataIndex: 'classroom', dataIndex: 'classroom',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a href="javascript:;" style={{color:'#9A9A9A'}}>{record.classroom==="未分班"?"--":record.classroom}</a> <a href="javascript:;" style={{color:'#9A9A9A'}}>{record.classroom==="未分班"?"--":record.classroom}</a>
@ -946,6 +950,7 @@ class GraduationTaskssettinglist extends Component{
title: '分组', title: '分组',
key: 'grouping', key: 'grouping',
dataIndex: 'grouping', dataIndex: 'grouping',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:'#676767'}}>{record.grouping}</a> <a style={{color:'#676767'}}>{record.grouping}</a>
@ -954,7 +959,7 @@ class GraduationTaskssettinglist extends Component{
title: '关联项目', title: '关联项目',
dataIndex: 'associationitems', dataIndex: 'associationitems',
key: 'associationitems', key: 'associationitems',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<div> <div>
<a style={{color:'#4CACFF'}} href={"/projects/"+record.associationitems.id} target={"_blank"}> <a style={{color:'#4CACFF'}} href={"/projects/"+record.associationitems.id} target={"_blank"}>
@ -967,7 +972,7 @@ class GraduationTaskssettinglist extends Component{
title: '提交状态', title: '提交状态',
dataIndex: 'submitstate', dataIndex: 'submitstate',
key: 'submitstate', key: 'submitstate',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:record.submitstate==="按时提交"?'#29BD8B':record.submitstate==="未提交"?"#9A9A9A":"#DD1717"}}>{record.submitstate}</a> <a style={{color:record.submitstate==="按时提交"?'#29BD8B':record.submitstate==="未提交"?"#9A9A9A":"#DD1717"}}>{record.submitstate}</a>
@ -977,7 +982,7 @@ class GraduationTaskssettinglist extends Component{
title: '更新时间', title: '更新时间',
dataIndex: 'turnovertime', dataIndex: 'turnovertime',
key: 'turnovertime', key: 'turnovertime',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a href="javascript:;" style={{color:'#989898'}}> <a href="javascript:;" style={{color:'#989898'}}>
@ -989,11 +994,11 @@ class GraduationTaskssettinglist extends Component{
title: '教师评分', title: '教师评分',
key: 'teacherrating', key: 'teacherrating',
dataIndex: 'teacherrating', dataIndex: 'teacherrating',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Tooltip placement="bottom" title={record.teacherrating==="--"||record.teacherrating==="未批阅"?"未评阅":""}> <Tooltip placement="bottom" title={record.teacherrating==="--"||record.teacherrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.teacherrating)>90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)}</a> <a style={{color:parseInt(record.teacherrating)>90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating}</a>
</Tooltip> </Tooltip>
</span> </span>
), ),
@ -1001,11 +1006,11 @@ class GraduationTaskssettinglist extends Component{
title: '交叉评分', title: '交叉评分',
key: 'crossrating', key: 'crossrating',
dataIndex: 'crossrating', dataIndex: 'crossrating',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Tooltip placement="bottom" title={record.crossrating==="--"||record.crossrating==="未批阅"?"未评阅":""}> <Tooltip placement="bottom" title={record.crossrating==="--"||record.crossrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.crossrating)>90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)}</a> <a style={{color:parseInt(record.crossrating)>90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating}</a>
</Tooltip> </Tooltip>
</span> </span>
), ),
@ -1013,11 +1018,11 @@ class GraduationTaskssettinglist extends Component{
title: '最终成绩', title: '最终成绩',
key: 'finalscore', key: 'finalscore',
dataIndex: 'finalscore', dataIndex: 'finalscore',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅":""}> <Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅":""}>
<a style={{color:parseInt(record.finalscore)>90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)}</a> <a style={{color:parseInt(record.finalscore)>90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore}</a>
</Tooltip> </Tooltip>
</span> </span>
), ),
@ -1025,6 +1030,7 @@ class GraduationTaskssettinglist extends Component{
title: '操作', title: '操作',
key: 'operation', key: 'operation',
dataIndex: 'operation', dataIndex: 'operation',
className:'edu-txt-center',
render: operation => ( render: operation => (
<div> <div>
{this.props.isAdmin()?operation.map((tag,key) => { {this.props.isAdmin()?operation.map((tag,key) => {
@ -1068,17 +1074,17 @@ class GraduationTaskssettinglist extends Component{
title: '序号', title: '序号',
dataIndex: 'number', dataIndex: 'number',
key: 'number', key: 'number',
className:'edu-txt-center',
}, { }, {
title: '姓名', title: '姓名',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
className:'edu-txt-center',
}, { }, {
title: '学号', title: '学号',
dataIndex: 'stduynumber', dataIndex: 'stduynumber',
key: 'stduynumber', key: 'stduynumber',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a href="javascript:;" style={{color:'#9A9A9A'}}>{record.stduynumber}</a> <a href="javascript:;" style={{color:'#9A9A9A'}}>{record.stduynumber}</a>
@ -1088,6 +1094,7 @@ class GraduationTaskssettinglist extends Component{
title: '分组', title: '分组',
key: 'grouping', key: 'grouping',
dataIndex: 'grouping', dataIndex: 'grouping',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:'#676767'}}>{record.grouping}</a> <a style={{color:'#676767'}}>{record.grouping}</a>
@ -1096,7 +1103,7 @@ class GraduationTaskssettinglist extends Component{
title: '关联项目', title: '关联项目',
dataIndex: 'associationitems', dataIndex: 'associationitems',
key: 'associationitems', key: 'associationitems',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<div className={"projectsdiv"} > <div className={"projectsdiv"} >
<a style={{color:'#4CACFF'}} href={"/projects/"+record.associationitems.id} target={"_blank"}> <a style={{color:'#4CACFF'}} href={"/projects/"+record.associationitems.id} target={"_blank"}>
@ -1110,7 +1117,7 @@ class GraduationTaskssettinglist extends Component{
title: '提交状态', title: '提交状态',
dataIndex: 'submitstate', dataIndex: 'submitstate',
key: 'submitstate', key: 'submitstate',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{color:record.submitstate==="按时提交"?'#29BD8B':record.submitstate==="未提交"?"#9A9A9A":"#DD1717"}}>{record.submitstate}</a> <a style={{color:record.submitstate==="按时提交"?'#29BD8B':record.submitstate==="未提交"?"#9A9A9A":"#DD1717"}}>{record.submitstate}</a>
@ -1120,7 +1127,7 @@ class GraduationTaskssettinglist extends Component{
title: '更新时间', title: '更新时间',
dataIndex: 'turnovertime', dataIndex: 'turnovertime',
key: 'turnovertime', key: 'turnovertime',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a href="javascript:;" style={{color:'#989898'}}> <a href="javascript:;" style={{color:'#989898'}}>
@ -1132,11 +1139,11 @@ class GraduationTaskssettinglist extends Component{
title: '教师评分', title: '教师评分',
key: 'teacherrating', key: 'teacherrating',
dataIndex: 'teacherrating', dataIndex: 'teacherrating',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Tooltip placement="bottom" title={record.teacherrating==="--"||record.teacherrating==="未批阅"?"未评阅":""}> <Tooltip placement="bottom" title={record.teacherrating==="--"||record.teacherrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.teacherrating)>90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)}</a> <a style={{color:parseInt(record.teacherrating)>90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating}</a>
</Tooltip> </Tooltip>
</span> </span>
), ),
@ -1144,11 +1151,11 @@ class GraduationTaskssettinglist extends Component{
title: '交叉评分', title: '交叉评分',
key: 'crossrating', key: 'crossrating',
dataIndex: 'crossrating', dataIndex: 'crossrating',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Tooltip placement="bottom" title={record.crossrating==="--"||record.crossrating==="未批阅"?"未评阅":""}> <Tooltip placement="bottom" title={record.crossrating==="--"||record.crossrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.crossrating)>90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)}</a> <a style={{color:parseInt(record.crossrating)>90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating}</a>
</Tooltip> </Tooltip>
</span> </span>
), ),
@ -1156,11 +1163,11 @@ class GraduationTaskssettinglist extends Component{
title: '最终成绩', title: '最终成绩',
key: 'finalscore', key: 'finalscore',
dataIndex: 'finalscore', dataIndex: 'finalscore',
className:'edu-txt-center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅":""}> <Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅":""}>
<a style={{color:parseInt(record.finalscore)>90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)}</a> <a style={{color:parseInt(record.finalscore)>90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore}</a>
</Tooltip> </Tooltip>
</span> </span>
), ),
@ -1168,6 +1175,7 @@ class GraduationTaskssettinglist extends Component{
title: '操作', title: '操作',
key: 'operation', key: 'operation',
dataIndex: 'operation', dataIndex: 'operation',
className:'edu-txt-center',
render: operation => ( render: operation => (
<div> <div>
{this.props.isAdmin()?operation.map((tag,key) => { {this.props.isAdmin()?operation.map((tag,key) => {
@ -1357,13 +1365,12 @@ class GraduationTaskssettinglist extends Component{
<span>任务详情</span> <span>任务详情</span>
</p> </p>
<div style={{ width:'100%',height:'75px'}} > <div className="clearfix lineh-25 mt20 mb20">
<p className=" fl color-black mt25 summaryname"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id} className="color-grey-6">{taskslistdata.task_name}</Link></p> <p className=" fl color-black summaryname lineh-25"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id} className="color-grey-6">{taskslistdata.task_name}</Link></p>
<CoursesListType <CoursesListType
typelist={taskslistdata.task_status} typelist={taskslistdata.task_status}
typesylename={"mt22"}
/> />
<a className="color-grey-6 fr font-16 ml30 mt10 mr20" onClick={this.goback}>返回</a> <a className="color-grey-6 fr font-16 ml30 mr20" onClick={this.goback}>返回</a>
</div> </div>
@ -1446,7 +1453,7 @@ class GraduationTaskssettinglist extends Component{
{taskslistdata.search_assistants && taskslistdata.search_assistants.teacher_comment && taskslistdata.search_assistants.teacher_comment.map((item,key)=>{ {taskslistdata.search_assistants && taskslistdata.search_assistants.teacher_comment && taskslistdata.search_assistants.teacher_comment.map((item,key)=>{
return( return(
<span key={key}> <span key={key}>
<Checkbox value={item.id} onClick={this.funteachercomment} className="fl ">{item.name} <Checkbox value={item.id} key={item.id} onClick={this.funteachercomment} className="fl ">{item.name}
<span>({item.count})</span> <span>({item.count})</span>
</Checkbox> </Checkbox>
</span> </span>

@ -591,7 +591,7 @@ class GraduationTasks extends Component{
// console.log(this.props.isCourseidentity()===isNotMember) // console.log(this.props.isCourseidentity()===isNotMember)
// console.log(category_id) // console.log(category_id)
return( return(
<CourseLayoutcomponent {...this.props}> <React.Fragment>
{/*提示*/} {/*提示*/}
<Modals <Modals
modalsType={Modalstype} modalsType={Modalstype}
@ -775,7 +775,7 @@ class GraduationTasks extends Component{
</div> </div>
</CourseLayoutcomponent> </React.Fragment>
) )
} }
} }

@ -341,7 +341,7 @@ onBoardsNew=()=>{
// let {course_identity}=this.props.coursedata // let {course_identity}=this.props.coursedata
const isAdmin =this.props.isAdmin(); const isAdmin =this.props.isAdmin();
return( return(
<CourseLayoutcomponent {...this.props}> <React.Fragment >
<ChooseGraduateTopicModal ref="chooseGraduateTopicModal"></ChooseGraduateTopicModal> <ChooseGraduateTopicModal ref="chooseGraduateTopicModal"></ChooseGraduateTopicModal>
<Titlesearchsection <Titlesearchsection
title="毕设选题" title="毕设选题"
@ -446,7 +446,7 @@ onBoardsNew=()=>{
<div> <div>
</div> </div>
</CourseLayoutcomponent> </React.Fragment>
) )
} }
} }

@ -5,6 +5,7 @@ import CourseLayoutcomponent from '../common/CourseLayoutComponent'
import Titlesearchsection from '../common/titleSearch/TitleSearchSection' import Titlesearchsection from '../common/titleSearch/TitleSearchSection'
import ColorCountText from '../common/titleSearch/ColorCountText' import ColorCountText from '../common/titleSearch/ColorCountText'
import update from 'immutability-helper'
import { WordsBtn, ConditionToolTip, on, off } from 'educoder' import { WordsBtn, ConditionToolTip, on, off } from 'educoder'
import axios from 'axios' import axios from 'axios'
@ -28,6 +29,7 @@ const pageSize = 20;
function buildColumns(that) { function buildColumns(that) {
const isAdmin = that.props.isAdmin() const isAdmin = that.props.isAdmin()
const isAdminOrCreator = that.props.isAdminOrCreator(); const isAdminOrCreator = that.props.isAdminOrCreator();
const isAdminOrTeacher = that.props.isAdminOrTeacher()
const { course_groups } = that.state const { course_groups } = that.state
const columns = [{ const columns = [{
title: '', title: '',
@ -55,7 +57,8 @@ function buildColumns(that) {
title: '角色', title: '角色',
dataIndex: 'role', dataIndex: 'role',
key: 'role', key: 'role',
}, { }]
that.course_groups && that.course_groups.length && columns.push({
title: <Tooltip title="仅能批阅指定分班的作品">管理权限</Tooltip>, title: <Tooltip title="仅能批阅指定分班的作品">管理权限</Tooltip>,
width: 230, width: 230,
key: 'course_groups', key: 'course_groups',
@ -70,7 +73,7 @@ function buildColumns(that) {
const noGroups = (!course_groups || course_groups.length == 0); const noGroups = (!course_groups || course_groups.length == 0);
return ( return (
<ConditionToolTip title={`暂未有分班信息,不能操作`} condition={noGroups}> <ConditionToolTip title={`暂未有分班信息,不能操作`} condition={noGroups}>
<span className="drop_down" style={{color: '#29BD8B'}}> <span className="drop_down" style={{color: '#29BD8B', display: 'inline-block'}}>
{ arg_course_groups.length == 0 ? '不限' : arg_course_groups.map(item => item.name).join(', ') } { arg_course_groups.length == 0 ? '不限' : arg_course_groups.map(item => item.name).join(', ') }
{ isAdmin && { isAdmin &&
<React.Fragment> <React.Fragment>
@ -83,7 +86,7 @@ function buildColumns(that) {
</p>): </p>):
'' ''
} }
<Checkbox.Group onChange={(checkedValues) => that.joinCourseGroup(checkedValues, item)} <Checkbox.Group onChange={(checkedValues) => that.joinCourseGroup(checkedValues, item, index)}
value={arg_course_groups.map(item => item.id)} value={arg_course_groups.map(item => item.id)}
disabled={!isAdminOrCreator} disabled={!isAdminOrCreator}
> >
@ -108,7 +111,7 @@ function buildColumns(that) {
</ConditionToolTip>) </ConditionToolTip>)
} }
, ,
}]; });
if (that.hasGraduationModule()) { if (that.hasGraduationModule()) {
columns.push({ columns.push({
title: '答辩组', title: '答辩组',
@ -121,7 +124,7 @@ function buildColumns(that) {
), ),
}) })
} }
if (isAdminOrCreator) { if (isAdminOrTeacher) {
columns.push({ columns.push({
title: '操作', title: '操作',
key: 'action', key: 'action',
@ -136,11 +139,12 @@ function buildColumns(that) {
} else { } else {
return ( return (
<span> <span>
<WordsBtn onClick={() => that.onDelete(record)} style={'grey'}>删除</WordsBtn> {record.role != ROLE_ADMIN && <WordsBtn onClick={() => that.onDelete(record)} style={'grey'}>删除</WordsBtn>}
<Divider type="vertical" /> {(record.role == ROLE_TEACHER || record.role == ROLE_TEACHER_ASSISTANT || isAdminOrCreator) && record.role != ROLE_ADMIN
&& <Divider type="vertical" />}
{ record.role == ROLE_TEACHER ? <a style={{color: '#4CACFF'}} onClick={() => that.changeToAssistant(record)}>变更为助教</a> : '' } { record.role == ROLE_TEACHER ? <a style={{color: '#4CACFF'}} onClick={() => that.changeToAssistant(record)}>变更为助教</a> : '' }
{ record.role == ROLE_TEACHER_ASSISTANT ? <a style={{color: '#4CACFF'}} onClick={() => that.changeToTeacher(record)}>变更为教师</a> : '' } { record.role == ROLE_TEACHER_ASSISTANT ? <a style={{color: '#4CACFF'}} onClick={() => that.changeToTeacher(record)}>变更为教师</a> : '' }
{ record.role == ROLE_ADMIN ? <a style={{color: '#4CACFF'}} onClick={() => that.showChangeAdminModal(record)}>更换管理员</a> : '' } { record.role == ROLE_ADMIN && isAdminOrCreator ? <a style={{color: '#4CACFF', marginLeft: '44px'}} onClick={() => that.showChangeAdminModal(record)}>更换管理员</a> : '' }
</span> ) </span> )
} }
@ -237,8 +241,13 @@ class studentsList extends Component{
}) })
.then((response) => { .then((response) => {
if (response.data.course_groups && response.data.course_groups.length) { if (response.data.course_groups && response.data.course_groups.length) {
let course_groups_map = {}
response.data.course_groups.forEach(item => {
course_groups_map[item.id] = item.name
})
this.setState({ this.setState({
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
course_groups_map
}) })
} else { } else {
} }
@ -247,7 +256,7 @@ class studentsList extends Component{
console.log(error); console.log(error);
}); });
} }
joinCourseGroup = (ids, item) => { joinCourseGroup = (ids, item, index) => {
console.log('join ', ids, item) console.log('join ', ids, item)
const courseId = this.props.match.params.coursesId const courseId = this.props.match.params.coursesId
@ -262,7 +271,12 @@ class studentsList extends Component{
.then((response) => { .then((response) => {
if (response.data.status == 0) { if (response.data.status == 0) {
this.props.showNotification('修改成功') this.props.showNotification('修改成功')
this.fetchAll() const newArray = ids.map((item) => {return {id: item, name: this.state.course_groups_map[item]}});
this.setState(
(prevState) => ({
teachers : update(prevState.teachers, {[ this.state.page == 1 ? index - this.state.application_list.length : index]: { course_groups: {$set: newArray }}})
}))
// this.fetchAll()
} else { } else {
} }
}) })
@ -560,7 +574,7 @@ class studentsList extends Component{
<ul className="drop_down_normal"> <ul className="drop_down_normal">
<li onClick={() => this.onSortTypeChange(ORDER_BY_NAME)} >姓名排序</li> <li onClick={() => this.onSortTypeChange(ORDER_BY_NAME)} >姓名排序</li>
<li onClick={() => this.onSortTypeChange(ORDER_BY_DATE)} style={{width: '125px'}}>加入时间排序</li> <li onClick={() => this.onSortTypeChange(ORDER_BY_DATE)} style={{width: '125px'}}>加入时间排序</li>
<li onClick={() => this.onSortTypeChange(ORDER_BY_GRADUATION_GROUP)} >答辩组排序</li> {this.hasGraduationModule() && <li onClick={() => this.onSortTypeChange(ORDER_BY_GRADUATION_GROUP)} >答辩组排序</li>}
</ul> </ul>
</li> </li>
</div> } </div> }

@ -13,6 +13,7 @@ import '../css/members.css';
import '../css/busyWork.css'; import '../css/busyWork.css';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
import axios from 'axios'; import axios from 'axios';
import moment from 'moment';
const Search = Input.Search; const Search = Input.Search;

@ -181,7 +181,12 @@ class PollDetailTabFirst extends Component{
title: '学号', title: '学号',
dataIndex: 'StudentNo', dataIndex: 'StudentNo',
key: 'StudentNo', key: 'StudentNo',
className:"edu-txt-center" className:"edu-txt-center",
render:(StudentNo,item,index)=>{
return(
item.StudentNo ? <span>{item.StudentNo}</span> : "--"
)
}
}, { }, {
title: '分班', title: '分班',
key: 'classes', key: 'classes',

@ -60,21 +60,27 @@ class EducoderLogin extends Component {
if( props.match.url === "/changepassword" ){ if( props.match.url === "/changepassword" ){
this.state = { this.state = {
showbool: false, showbool: false,
logini:3,
} }
}else { }else {
if(props.match.url === "/login"){ if(props.match.url === "/login"){
this.state = { this.state = {
showbool: true, showbool: true,
loginstatus:true loginstatus:true,
logini:1,
} }
}else if(props.match.url === "/register"){ }else if(props.match.url === "/register"){
this.state = { this.state = {
showbool: true, showbool: true,
loginstatus:false, loginstatus:false,
logini:2,
} }
}else{ }else{
this.state = { this.state = {
showbool: true, showbool: true,
logini:1,
} }
} }
@ -86,6 +92,14 @@ class EducoderLogin extends Component {
} }
Setlogins=(i)=>{
console.log("96ye");
console.log(i)
this.setState({
logini:i
})
}
Setshowbool = () => { Setshowbool = () => {
if (this.state.showbool === true) { if (this.state.showbool === true) {
@ -102,7 +116,7 @@ class EducoderLogin extends Component {
render() { render() {
let {showbool} = this.state; let {showbool,loginstatus,logini} = this.state;
return ( return (
<div style={newContainer} > <div style={newContainer} >
<style> <style>
@ -135,14 +149,12 @@ class EducoderLogin extends Component {
"align-items": "center", "align-items": "center",
"width": "100%", "width": "100%",
}}> }}>
<div style={{"margin-top": "40px"}}> <div style={{"margin-top": "40px","height":"500px"}}>
<LoginRegisterComponent {...this.props} {...this.state} <LoginRegisterComponent {...this.props} {...this.state}
Setshowbool={this.Setshowbool}></LoginRegisterComponent> Setshowbool={this.Setshowbool} ></LoginRegisterComponent>
<div style={{"width":"100%","height":"350px"}}>
</div> </div>
</div>
</div> </div>
: :
<div style={{ <div style={{
@ -151,17 +163,23 @@ class EducoderLogin extends Component {
"align-items": "center", "align-items": "center",
"width": "100%", "width": "100%",
}}> }}>
<div style={{"margin-top": "40px"}}> <div style={{"margin-top": "40px","height":"500px"}}>
<FindPasswordComponent {...this.props} {...this.state} <FindPasswordComponent {...this.props} {...this.state}
Setshowbool={this.Setshowbool}></FindPasswordComponent> Setshowbool={this.Setshowbool}></FindPasswordComponent>
<div style={{"width":"100%","height":"250px"}}>
</div>
</div> </div>
</div> </div>
} }
<div style={{"height":"250px",
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%",
}}>
<div className="font-14 color-grey-9 " style={{marginTop:"15px"}}>© 2019 EduCoder湘ICP备17009477号Trustie & IntelliDE inside.</div>
</div>
</div> </div>
</div> </div>
) )

@ -77,7 +77,9 @@ class Trialapplication extends Component {
//TODO 这里如果样式变了会出现css不加载的情况 //TODO 这里如果样式变了会出现css不加载的情况
}); });
console.log(this.props.isRenders);
console.log("89"); console.log("89");
console.log(this.state.props.user_phone_binded );
try { try {
if (this.state.props.user_phone_binded !== undefined) { if (this.state.props.user_phone_binded !== undefined) {
console.log(this.state.props.user_phone_binded); console.log(this.state.props.user_phone_binded);

@ -223,6 +223,10 @@ class Index extends Component {
challenge={context.challenge} challenge={context.challenge}
myshixun={context.myshixun} myshixun={context.myshixun}
shixun={context.shixun} shixun={context.shixun}
vnc_url={context.vnc_url}
zip_path={context.zip_path}
loading={context.loading} loading={context.loading}
discusses_count={context.discusses_count} discusses_count={context.discusses_count}
hide_code={context.hide_code} hide_code={context.hide_code}

@ -13,6 +13,7 @@ import ChooseEvaluateView from './main/ChooseEvaluateView'
import { CircularProgress } from 'material-ui/Progress'; import { CircularProgress } from 'material-ui/Progress';
import Button from 'material-ui/Button'; import Button from 'material-ui/Button';
import VNCDisplay from './VNCDisplay'
import './tpiPage.css'; import './tpiPage.css';
import './tpiPageForMobile.css'; import './tpiPageForMobile.css';
@ -32,7 +33,7 @@ class MainContent extends Component {
} }
render() { render() {
const { challenge, output_sets, onRunCodeTest, latest_output, record, st, readRepoTimeout, const { challenge, output_sets, onRunCodeTest, latest_output, record, st, readRepoTimeout,
onTestSetHeaderClick, loading, codeLoading } = this.props onTestSetHeaderClick, loading, codeLoading, shixun} = this.props
// if (output_sets && output_sets.test_sets) { // if (output_sets && output_sets.test_sets) {
// const test_sets_array = JSON.parse("[" + output_sets.test_sets + "]"); // const test_sets_array = JSON.parse("[" + output_sets.test_sets + "]");
@ -47,6 +48,9 @@ class MainContent extends Component {
} }
const newProps = Object.assign({}, this.props); const newProps = Object.assign({}, this.props);
delete newProps.testSetsExpandedArray delete newProps.testSetsExpandedArray
const showIframeContent = shixun && shixun.vnc == true
return ( return (
<div className="page--body -margin-t-64 -flex tpi_content"> <div className="page--body -margin-t-64 -flex tpi_content">
<style>{` <style>{`
@ -57,7 +61,7 @@ class MainContent extends Component {
`}</style> `}</style>
<div className="-layout -stretch -fit labelN" id="game_show_content"> <div className="-layout -stretch -fit labelN" id="game_show_content">
<div className="split-panel--first -layout -vertical -flex -relative -flex-basic40" <div className="split-panel--first -layout -vertical -flex -relative -flex-basic40"
id="game_left_contents" style={{ width: '28%'}}> id="game_left_contents" style={{ width: '40%'}}>
{/* style={{width: '694px'}} */} {/* style={{width: '694px'}} */}
{/* 左侧任务说明等功能的区域 */} {/* 左侧任务说明等功能的区域 */}
@ -82,6 +86,10 @@ class MainContent extends Component {
<div className="fl pr tip-right-con" id="update_game_tip"></div> <div className="fl pr tip-right-con" id="update_game_tip"></div>
</div>*/} </div>*/}
{/* { showIframeContent && vnc_url ? <VNCDisplay
vnc_url={vnc_url}
></VNCDisplay> */}
<div className="-layout-v -flex"> <div className="-layout-v -flex">
<div className="-flex -relative"> <div className="-flex -relative">
<div className="split-panel -fit -vertical" id="games_repository_valuation"> <div className="split-panel -fit -vertical" id="games_repository_valuation">

@ -237,6 +237,10 @@ class MainContentContainer extends Component {
// arg_path 点击文件目录树时传入的点击节点对应的path // arg_path 点击文件目录树时传入的点击节点对应的path
fetchRepositoryCode( props, arg_path, type, isRetry) { fetchRepositoryCode( props, arg_path, type, isRetry) {
const { challenge, showSnackbar, game, shixun, myshixun, hide_code } = props ? props : this.props; const { challenge, showSnackbar, game, shixun, myshixun, hide_code } = props ? props : this.props;
if (shixun.vnc == true) {
// vnc模式下不需要加载代码
return true;
}
if ( if (
// true || // true ||
hide_code) { // 隐藏code的实训 hide_code) { // 隐藏code的实训

@ -0,0 +1,154 @@
// import React, { Component } from 'react';
// import RFB from '@novnc/novnc/lib/rfb.js';
// const $ = window.$;
// // const showIframeContent = window.location.search.indexOf('vnc=1') != -1;
// class VNCDisplay extends Component {
// componentDidMount() {
// console.log(RFB)
// let rfb;
// let desktopName;
// // When this function is called we have
// // successfully connected to a server
// function connectedToServer(e) {
// status("Connected to " + desktopName);
// }
// // This function is called when we are disconnected
// function disconnectedFromServer(e) {
// if (e.detail.clean) {
// status("Disconnected");
// } else {
// status("Something went wrong, connection is closed");
// }
// }
// // When this function is called, the server requires
// // credentials to authenticate
// function credentialsAreRequired(e) {
// const password = prompt("Password Required:");
// rfb.sendCredentials({ password: password });
// }
// // When this function is called we have received
// // a desktop name from the server
// function updateDesktopName(e) {
// desktopName = e.detail.name;
// }
// // Since most operating systems will catch Ctrl+Alt+Del
// // before they get a chance to be intercepted by the browser,
// // we provide a way to emulate this key sequence.
// function sendCtrlAltDel() {
// rfb.sendCtrlAltDel();
// return false;
// }
// // Show a status text in the top bar
// function status(text) {
// document.getElementById('status').textContent = text;
// }
// // This function extracts the value of one variable from the
// // query string. If the variable isn't defined in the URL
// // it returns the default value instead.
// function readQueryVariable(name, defaultValue) {
// // A URL with a query parameter can look like this:
// // https://www.example.com?myqueryparam=myvalue
// //
// // Note that we use location.href instead of location.search
// // because Firefox < 53 has a bug w.r.t location.search
// const re = new RegExp('.*[?&]' + name + '=([^&#]*)'),
// match = document.location.href.match(re);
// if (typeof defaultValue === 'undefined') { defaultValue = null; }
// if (match) {
// // We have to decode the URL since want the cleartext value
// return decodeURIComponent(match[1]);
// }
// return defaultValue;
// }
// document.getElementById('sendCtrlAltDelButton')
// .onclick = sendCtrlAltDel;
// // Read parameters specified in the URL query string
// // By default, use the host and port of server that served this file
// // const host = readQueryVariable('host', window.location.hostname);
// // let port = readQueryVariable('port', window.location.port);
// // const password = readQueryVariable('password', '');
// const { vnc_url } = this.props;
// // http://117.50.12.63:43149/vnc_lite.html?password=headless
// let _ar1 = vnc_url.split('/');
// let ipAndPort = _ar1[2].split(':')
// let passwordAr = _ar1[3].split('password=')
// const host = ipAndPort[0]
// let port = ipAndPort[1]
// const password = passwordAr[1].split('&')[0]
// const path = readQueryVariable('path', 'websockify');
// // | | | | | |
// // | | | Connect | | |
// // v v v v v v
// status("Connecting");
// // Build the websocket URL used to connect
// let url;
// if (vnc_url.indexOf("https:") != -1) {
// url = 'wss';
// } else {
// url = 'ws';
// }
// url += '://' + host;
// if(port) {
// url += ':' + port;
// }
// url += '/' + path;
// // Creating a new RFB object will start a new connection
// rfb = new RFB(document.getElementById('screen'), url,
// { credentials: { password: password } });
// // Add listeners to important events from the RFB module
// rfb.addEventListener("connect", connectedToServer);
// rfb.addEventListener("disconnect", disconnectedFromServer);
// rfb.addEventListener("credentialsrequired", credentialsAreRequired);
// rfb.addEventListener("desktopname", updateDesktopName);
// // Set parameters that can be changed on an active connection
// rfb.viewOnly = readQueryVariable('view_only', false);
// rfb.scaleViewport = readQueryVariable('scale', false);
// }
// render() {
// const { challenge, vnc_url } = this.props
// return (
// <div className="">
// <style>{`
// #top_bar {
// background-color: #6e84a3;
// color: white;
// font: bold 12px Helvetica;
// padding: 6px 5px 4px 5px;
// border-bottom: 1px outset;
// }
// #status {
// text-align: center;
// }
// #sendCtrlAltDelButton {
// position: fixed;
// top: 0px;
// right: 0px;
// border: 1px outset;
// padding: 5px 5px 4px 5px;
// cursor: pointer;
// }
// #screen {
// flex: 1; /* fill remaining space */
// overflow: hidden;
// }
// `}</style>
// <div id="top_bar">
// <div id="status">Loading</div>
// <div id="sendCtrlAltDelButton">Send CtrlAltDel</div>
// </div>
// <div id="screen"></div>
// </div>
// );
// }
// }
// export default VNCDisplay;

@ -330,14 +330,15 @@ class NewHeader extends Component {
}) })
} }
educoderlogin=()=>{ educoderlogin=()=>{
//出账号 //退出账号
var url = `/accounts/logout.json`; var url = `/accounts/logout.json`;
axios.get((url)).then((result) => { axios.get((url)).then((result) => {
if(result!==undefined){ if(result!==undefined){
this.setState({ // this.setState({
isRender:true // isRender:true
}) // })
window.location.href = "/";
} }
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);

@ -213,6 +213,13 @@ export function TPMIndexHOC(WrappedComponent) {
return this.state.coursedata&&this.state.coursedata.course_identity === 6 return this.state.coursedata&&this.state.coursedata.course_identity === 6
} }
// setTrialapplication = ()=>{
// this.setState({
// isRenders:true
// })
//
// }
/** /**
课堂权限相关方法暂时写这里了 ----------------------------------------END 课堂权限相关方法暂时写这里了 ----------------------------------------END
@ -281,13 +288,13 @@ export function TPMIndexHOC(WrappedComponent) {
} }
return ( return (
<div> <div>
{ {/*{*/}
user_phone_binded === undefined? {/* user_phone_binded === undefined?*/}
"" {/* ""*/}
: {/* :*/}
<Trialapplication {...this.state} user_phone_binded={user_phone_binded}></Trialapplication> {/* <Trialapplication {...this.state} user_phone_binded={user_phone_binded} setTrialapplication = {this.setTrialapplication} ></Trialapplication>*/}
} {/*}*/}
<SiderBar <SiderBar
Headertop={Headertop} Headertop={Headertop}

@ -57,8 +57,8 @@ class LoginRegisterComponent extends Component {
} }
//倒计时 //倒计时
getverificationcode = () => { getverificationcode = () => {
if (this.state.Phonenumberisnotcobool === false) { if (this.state.Phonenumberisnotcobool === false ||this.state.Phonenumberisnotcobool === undefined) {
if (this.state.login.length === 0) { if (this.state.login&&this.state.login.length === 0) {
this.openNotification("请输入手机号或邮箱"); this.openNotification("请输入手机号或邮箱");
return return
} else { } else {
@ -279,7 +279,8 @@ class LoginRegisterComponent extends Component {
} }
}).then((result) => { }).then((result) => {
//验证有问题{"status":1,"message":"success"} //验证有问题{"status":1,"message":"success"}
console.log(result); // console.log(result);
this.openNotification("验证码已发送,请注意查收!",2);
}).catch((error) => { }).catch((error) => {
@ -311,7 +312,7 @@ class LoginRegisterComponent extends Component {
// height: 346px; // height: 346px;
return ( return (
<div className="login_register_content"> <div className="login_register_content" style={{height: "482px"}}>
<Input type="text" name="username" value={"namename"} <Input type="text" name="username" value={"namename"}
style={{height: '0', width: '0', border: 'none', display: "none"}}/> style={{height: '0', width: '0', border: 'none', display: "none"}}/>
<Input type="password" name="password" id="password" value={"123123123"} <Input type="password" name="password" id="password" value={"123123123"}
@ -324,9 +325,9 @@ class LoginRegisterComponent extends Component {
width: 100%; width: 100%;
text-align: center; text-align: center;
border-bottom: 1px solid rgb(234, 234, 234); border-bottom: 1px solid rgb(234, 234, 234);
height: 72px; height: 69px;
color: #05101A; color: #05101A;
line-height: 73px; line-height: 69px;
} }
`}</style> `}</style>
@ -366,31 +367,32 @@ class LoginRegisterComponent extends Component {
</style> </style>
<Input style={loginInputsyl} type="text" autoComplete="off" onClick={this.changeTypey} <Input style={loginInputsyl} type="text" autoComplete="off" onClick={this.changeTypey}
placeholder="输入注册手机号或邮箱" value={this.state.login} onBlur={(e) => this.inputOnBlur(e)} placeholder="输入注册手机号或邮箱" value={this.state.login} onBlur={(e) => this.inputOnBlur(e)}
onChange={this.loginInputonChange} style={{marginTop: '10px'}}></Input> onChange={this.loginInputonChange} style={{marginTop: '10px',height: "38px"}}></Input>
{ {
Phonenumberisnotco && Phonenumberisnotco != "" ? Phonenumberisnotco && Phonenumberisnotco != "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}> <p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span>{Phonenumberisnotco}</span> <span className="fl" style={{textAlign:"center",width: " 100%"}}>{Phonenumberisnotco}</span>
</p> </p>
: <div className="mt10 mb10"></div> : <div style={{height: "25px"}}></div>
} }
<DragValidator <DragValidator
height={38} className="loginInput" successGreenColor="#45E15F" height={38} successGreenColor="#45E15F"
style={{height:"38px",width:"100%"}}
dragOkCallback={this.dragOkCallback} dragOkCallback={this.dragOkCallback}
></DragValidator> ></DragValidator>
<Input className="loginInput mb20" type={classpass} <Input type={classpass}
onClick={this.changeType} autoComplete="new-password" onChange={this.loginInputonChanges} onClick={this.changeType} autoComplete="new-password" onChange={this.loginInputonChanges}
value={this.state.password} placeholder="输入8~16位密码区分大小写"></Input> value={this.state.password} style={{width:"100%",height:"38px",marginTop:'25px'}} placeholder="输入8~16位密码区分大小写"></Input>
<Input className="loginInput mb20" type={classpass} <Input type={classpass}
onClick={this.changeType} autoComplete="new-password" onClick={this.changeType} autoComplete="new-password"
onChange={this.loginInputonChangess} value={this.state.passwords} onChange={this.loginInputonChangess} value={this.state.passwords}
style={{height:"38px",marginTop:'25px',width:"100%"}}
placeholder="再次输入新密码"></Input> placeholder="再次输入新密码"></Input>
<div> <div className={"mt25"}>
<Input className="fl mr5" type="text" autoComplete="off" style={{ <Input className="fl mr5" type="text" autoComplete="off" style={{
"width": "210px", width: "210px",
"margin-bottom": "16px", height: "38px",
"height": "38px",
}} placeholder="请输入验证码" }} placeholder="请输入验证码"
onChange={this.codesonChange} onChange={this.codesonChange}
value={codes} value={codes}
@ -405,7 +407,7 @@ class LoginRegisterComponent extends Component {
<Button className="fl ml5 " <Button className="fl ml5 "
style={{"width": "120px", "text-align": "center", "height": "38px"}} style={{"width": "120px", "text-align": "center", "height": "38px"}}
type="primary" type="primary"
onClick={() => this.getverificationcode()} size={"large"}>验证码</Button> onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button>
: :
<Button className="fl ml5 " <Button className="fl ml5 "
style={{"width": "120px", "text-align": "center", "height": "38px"}} style={{"width": "120px", "text-align": "center", "height": "38px"}}
@ -417,6 +419,7 @@ class LoginRegisterComponent extends Component {
</div> </div>
<Button className="login_btn" size={"large"} type="primary" <Button className="login_btn" size={"large"} type="primary"
style={{height:"46px"}}
onClick={this.Retrievepassword}>完成</Button> onClick={this.Retrievepassword}>完成</Button>
</div> </div>
</div> </div>

@ -10,8 +10,12 @@ import axios from 'axios';
import './common.css' import './common.css'
const { TabPane } = Tabs; const { TabPane } = Tabs;
const loginInputsyl = { const loginInputsyl = {
"width": " 100%", "width":"434px",
"height": "40px", "height": "462px",
"-webkit-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",
"background": "#fff"
} }
//父组件EducoderLogin.js //父组件EducoderLogin.js
@ -135,6 +139,7 @@ class LoginRegisterComponent extends Component {
; ;
StudyMakeMoney = () => { // 调用父组件方法 StudyMakeMoney = () => { // 调用父组件方法
this.props.Setshowbool(); this.props.Setshowbool();
// this.props.Setlogins(3);
this.setState({ this.setState({
login: "", login: "",
password: "", password: "",
@ -356,11 +361,11 @@ class LoginRegisterComponent extends Component {
} }
}).then((result) => { }).then((result) => {
//验证有问题{"status":1,"message":"success"} //验证有问题{"status":1,"message":"success"}
console.log(result); // console.log(result);
}).catch((error) => { }).catch((error) => {
console.log(error); // console.log(error);
// this.setState({ // this.setState({
// login:"", // login:"",
// logins:"", // logins:"",
@ -369,7 +374,6 @@ class LoginRegisterComponent extends Component {
} }
//短信验证 //短信验证
SMSverification = () => { SMSverification = () => {
var url = `/accounts/get_verification_code.json`; var url = `/accounts/get_verification_code.json`;
axios.get((url), { axios.get((url), {
params: { params: {
@ -378,7 +382,8 @@ class LoginRegisterComponent extends Component {
} }
}).then((result) => { }).then((result) => {
//验证有问题{"status":1,"message":"success"} //验证有问题{"status":1,"message":"success"}
console.log(result); // console.log(result);
this.openNotification("验证码已发送,请注意查收!",2);
}).catch((error) => { }).catch((error) => {
@ -407,8 +412,8 @@ class LoginRegisterComponent extends Component {
//倒计时 //倒计时
getverificationcode = () => { getverificationcode = () => {
if (this.state.Phonenumberisnotcobool === false) { if (this.state.Phonenumberisnotcobool === false ||this.state.Phonenumberisnotcobool === undefined) {
if (this.state.logins.length === 0) { if (this.state.logins&&this.state.logins.length === 0) {
this.openNotification("请输入手机号或邮箱",2); this.openNotification("请输入手机号或邮箱",2);
return return
}else { }else {
@ -503,6 +508,17 @@ class LoginRegisterComponent extends Component {
this.setState({ this.setState({
tab:e.key tab:e.key
}) })
console.log(e.key);
if(e.key === 0){
this.setState({
Phonenumberisnotcos:undefined
})
}else{
this.setState({
Phonenumberisnotco:undefined
})
}
// this.props.history.push(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key) // this.props.history.push(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key)
@ -532,7 +548,7 @@ class LoginRegisterComponent extends Component {
// console.log(activeKey); // console.log(activeKey);
return ( return (
<div className="login_register_content"> <div className="login_register_content" style={ parseInt(tab[0])==0?{height: "346px"} :{height: "462px"}}>
<div> <div>
@ -576,63 +592,64 @@ class LoginRegisterComponent extends Component {
<Input placeholder="请输入登录手机号码或邮箱" value={this.state.login} <Input placeholder="请输入登录手机号码或邮箱" value={this.state.login}
onChange={this.loginInputonChange} onChange={this.loginInputonChange}
name="username" name="username"
className="loginInput" className="font-14 color-grey-9 loginInput"
style={{marginTop: '30px'}}></Input> onBlur={(e) => this.inputOnBlur(e, 1)}
style={{marginTop: '30px', height: '38px'}}></Input>
{ {
Phonenumberisnotco && Phonenumberisnotco != "" ? Phonenumberisnotco && Phonenumberisnotco != "" ?
<p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}> <p className="color-red mt5 mb5" style={{width: " 100%", height: "20px"}}>
<span>{Phonenumberisnotco}</span> <span className="fl" style={{textAlign:"center",width: " 100%"}}>{Phonenumberisnotco}</span>
</p> </p>
: <div className="mt15 mb15"></div> : <div style={{height:"25px"}}></div>
} }
<Input type="password" name="password" id="password" className="loginInput" value={this.state.password} <Input type="password" name="password" id="password" value={this.state.password}
onChange={this.passwordonChange} onChange={this.passwordonChange}
className="font-14 color-grey-9 loginInput"
placeholder="密码"></Input> placeholder="密码"></Input>
<div className="left_right mt20"> <div className="left_right mt25 font-12 " style={{color: '#676767'}}>
<Checkbox onChange={this.onAutoLoginChange} checked={autoLogin}>下次自动登录</Checkbox> <Checkbox onChange={this.onAutoLoginChange} checked={autoLogin}>下次自动登录</Checkbox>
<a <a onClick={this.StudyMakeMoney}
onClick={this.StudyMakeMoney} className="mr3 color-grey-9 mt3 font-12">找回密码</a>
className="mr3 color-grey-9">找回密码</a>
</div> </div>
<Button className="login_btn" type="primary" onClick={() => this.postLogin()} <Button className="login_btn font-16" type="primary" style={{height:"46px"}} onClick={() => this.postLogin()}
size={"large"}>登录</Button> size={"large"}>登录</Button>
</div> </div>
} }
{ {
parseInt(tab[0])==1 && parseInt(tab[0])==1 &&
<div style={{width: '340px'}}> <div style={{width: '340px'}}>
<Input className={loginInputsyl+" loginInput"} placeholder="请使用手机号/邮箱账号进行注册" <Input className="loginInputsyl color-grey-9 loginInput" placeholder="请使用手机号/邮箱账号进行注册"
value={this.state.logins} value={this.state.logins}
type="text" autoComplete="off" type="text" autoComplete="off"
onChange={this.loginInputonChanges} onChange={this.loginInputonChanges}
onBlur={(e) => this.inputOnBlur(e, 2)} onBlur={(e) => this.inputOnBlur(e, 2)}
style={{marginTop: '30px'}}></Input> style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}></Input>
{ {
Phonenumberisnotcos && Phonenumberisnotcos != "" ? Phonenumberisnotcos && Phonenumberisnotcos != "" ?
<p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}> <p className="color-red mt5 mb5 " style={{width: " 100%", height: "20px"}}>
<span className="fl" style={{textAlign:"center",width: " 100%"}}>{Phonenumberisnotcos}</span>
<span className="fl">{Phonenumberisnotcos}</span>
</p> </p>
: <div className=" mt15 mb15"></div> : <div style={{height:"25px"}}></div>
} }
<DragValidator <DragValidator
height={38} className="loginInput" successGreenColor="#45E15F" height={38} className="loginInput" successGreenColor="#45E15F"
style={{ height: '38px'}}
dragOkCallback={this.dragOkCallback} dragOkCallback={this.dragOkCallback}
></DragValidator> ></DragValidator>
<div> <div className="mt25">
<Input className="fl mr5" name="codes" type="text" autoComplete="off" readonly <Input className="fl mr5 font-14 color-grey-9" name="codes" type="text" autoComplete="off" readonly
onfocus="this.removeAttribute('readonly')" style={{ onfocus="this.removeAttribute('readonly')" style={{
"width": "210px", width:'210px',
"margin-bottom": "16px", height:'38px',
"height": "38px",
}} placeholder="请输入验证码" }} placeholder="请输入验证码"
onChange={this.codesonChange} onChange={this.codesonChange}
value={codes} value={codes}
@ -640,13 +657,13 @@ class LoginRegisterComponent extends Component {
</Input> </Input>
{ {
getverificationcodes === undefined ? getverificationcodes === undefined ?
<Button className="fl ml5 " disabled style={{"width": "120px","text-align":"center", "height": "38px",}} <Button className="fl ml5 font-14" disabled style={{"width": "120px","text-align":"center", "height": "38px",}}
size={"large"}>重新发送{seconds}s</Button> size={"large"}>重新发送{seconds}s</Button>
: getverificationcodes === true ? : getverificationcodes === true ?
<Button className="fl ml5 " type="primary" style={{"width": "120px","text-align":"center", "height": "38px",}} <Button className="fl ml5 font-14" type="primary" style={{"width": "120px","text-align":"center", "height": "38px",}}
onClick={() => this.getverificationcode()} size={"large"}>验证码</Button> onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button>
: :
<Button className="fl ml5 " type="primary" style={{"width": "120px","text-align":"center", "height": "38px",}} <Button className="fl ml5 font-14 " type="primary" style={{"width": "120px","text-align":"center", "height": "38px",}}
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button> onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>
} }
@ -656,8 +673,9 @@ class LoginRegisterComponent extends Component {
{/* style={{height: '0', width: '0', border: 'none', display: "none"}}/>*/} {/* style={{height: '0', width: '0', border: 'none', display: "none"}}/>*/}
{/*<Input type="password" name="password" id="password" autoComplete="new-password"*/} {/*<Input type="password" name="password" id="password" autoComplete="new-password"*/}
{/* style={{height: '0', width: '0', border: 'none', display: "none"}}/>*/} {/* style={{height: '0', width: '0', border: 'none', display: "none"}}/>*/}
<Input className="loginInput" placeholder="输入8~16位密码区分大小写" <Input className="loginInput font-14 mt25 color-grey-9" placeholder="输入8~16位密码区分大小写"
type={classpass} type={classpass}
autoComplete="new-password" autoComplete="new-password"
onClick={this.changeType} onClick={this.changeType}
value={this.state.passwords} onChange={this.passwordonChanges} suffix={ value={this.state.passwords} onChange={this.passwordonChanges} suffix={
@ -666,9 +684,11 @@ class LoginRegisterComponent extends Component {
}></Input> }></Input>
<Checkbox onChange={this.onChange} <Checkbox onChange={this.onChange}
value={Agreetotheterms} value={Agreetotheterms}
>我已阅读并同意服务协议条款</Checkbox> ><span className="font-14 " style={{
<Button className="login_btn" type="primary" onClick={() => this.postregistered()} color: '#676767',
size={"large"}>完成</Button> }}>我已阅读并同意服务协议条款</span></Checkbox>
<Button className="login_btn font-16" type="primary" style={{height:"46px"}} onClick={() => this.postregistered()}
size={"large"}>注册</Button>
</div> </div>

@ -130,14 +130,15 @@ class Infos extends Component{
let url=`/users/attendance.json` let url=`/users/attendance.json`
axios.post(url).then((result)=>{ axios.post(url).then((result)=>{
if(result){ if(result){
this.setState( // this.setState(
(prevState) => ({ // (prevState) => ({
data : update(prevState.data, {attendance_signed: {$set: true} }) // data : update(prevState.data, {attendance_signed: {$set: true} })
}) // })
) // )
this.setState({ // this.setState({
next_gold:result.data.next_gold // next_gold:result.data.next_gold
}) // })
this.getInfo(this.props.match.params.username);
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
@ -245,6 +246,9 @@ class Infos extends Component{
</div> </div>
<div className="educontent mt10 clearfix edu-txt-center"> <div className="educontent mt10 clearfix edu-txt-center">
<div className="inline"> <div className="inline">
{
data && is_current == false && data.identity =="学生" ?"" : <span className="mypost fl mr10">{data && data.identity}</span>
}
<span className="mypost fl mr10">{data && data.identity}</span> <span className="mypost fl mr10">{data && data.identity}</span>
<a href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/authentication` :"javascript:void(0)"} target="_blank" className={is_current ? "ringauto fl" :"ringauto fl cdefault"}> <a href={is_current ? `${this.props.Headertop && this.props.Headertop.old_url}/account/authentication` :"javascript:void(0)"} target="_blank" className={is_current ? "ringauto fl" :"ringauto fl cdefault"}>
<Tooltip placement='bottom' title={ data && data.authentication ?"已实名认证":"未实名认证"}> <Tooltip placement='bottom' title={ data && data.authentication ?"已实名认证":"未实名认证"}>
@ -314,7 +318,7 @@ class Infos extends Component{
</div> </div>
<div className="edu-txt-center navInfo"> <div className="edu-txt-center navInfo">
<div className="inline"> <div className="inline">
<li className={`${moduleName == 'courses' ? 'active' : '' }`}> <li className={`${moduleName == 'courses' ||moduleName == undefined ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'courses'})} onClick={() => this.setState({moduleName: 'courses'})}
to={`/users/${username}/courses`}>课堂</Link> to={`/users/${username}/courses`}>课堂</Link>
@ -374,6 +378,11 @@ class Infos extends Component{
(props) => (<InfosProject {...this.props} {...props} {...this.state} />) (props) => (<InfosProject {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/users/:username"
render={
(props) => (<InfosCourse {...this.props} {...props} {...this.state} />)
}
></Route>
</Switch> </Switch>
</div> </div>

Loading…
Cancel
Save