From 75fa868214ec3156ed21619e878caeaaaea38a87 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 10:43:16 +0800 Subject: [PATCH 01/23] route --- public/react/src/modules/courses/Index.js | 17 +++++++++++++++-- .../src/modules/courses/busyWork/commonWork.js | 4 ++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index c33b6a5ce..553db6090 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -591,16 +591,29 @@ class CoursesIndex extends Component{ (props) => () } > + + {/* 普通作业 */} + () + } + > + {/* 分组作业 */} + () + } + > {/* 普通作业 */} - () } > {/* 分组作业 */} - () } diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js index e8afa5329..5ba97b03a 100644 --- a/public/react/src/modules/courses/busyWork/commonWork.js +++ b/public/react/src/modules/courses/busyWork/commonWork.js @@ -14,7 +14,7 @@ import { WordsBtn } from 'educoder' import Modals from '../../modals/Modals' import NoneData from "../coursesPublic/NoneData" import Titlesearchsection from '../common/titleSearch/TitleSearchSection'; - +import { RouteHOC } from './common' import axios from 'axios'; import _ from 'lodash' @@ -429,4 +429,4 @@ class commonWork extends Component{ ) } } -export default commonWork; \ No newline at end of file +export default RouteHOC() (commonWork); \ No newline at end of file From 4dff0a03cec2c0b6b35437ad883c3c80b1bb0f15 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 11:22:40 +0800 Subject: [PATCH 02/23] route --- public/react/src/modules/courses/Index.js | 9 +++++++-- public/react/src/modules/courses/busyWork/commonWork.js | 7 +++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index 553db6090..c385af3b7 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -452,6 +452,11 @@ class CoursesIndex extends Component{ (props) => () } > + () + } + > {/*课堂讨论*/} {/* 普通作业 */} - () } > {/* 分组作业 */} - () } diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js index 5ba97b03a..9f3d8dda0 100644 --- a/public/react/src/modules/courses/busyWork/commonWork.js +++ b/public/react/src/modules/courses/busyWork/commonWork.js @@ -71,6 +71,13 @@ class commonWork extends Component{ sureDelClasses(){ } + componentDidUpdate(prevProps, prevState) { + debugger; + if (prevProps.match.path != this.props.match.path) { + this.componentDidMount() + } + } + componentDidMount(){ this.setState({ From c73857c4a9fd6034e559ad809490ba6a99be97ff Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 12:44:10 +0800 Subject: [PATCH 03/23] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTasksSubmitnew.js | 3 + .../react/src/modules/login/EducoderLogin.js | 40 +- .../src/modules/user/FindPasswordComponent.js | 860 +++++++++--------- .../modules/user/LoginRegisterComponent.js | 81 +- 4 files changed, 513 insertions(+), 471 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index e1284832c..fd383eabf 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -84,6 +84,7 @@ class GraduationTasksSubmitnew extends Component{ handleSubmit=(e) => { + let {fileList,selectmemberslist,workslist}=this.state; let userids=[]; @@ -432,6 +433,8 @@ render(){ let graduation_id=workslist===undefined?"":workslist.graduation_id; let task_id=workslist===undefined?"":workslist.task_id; + + return( diff --git a/public/react/src/modules/login/EducoderLogin.js b/public/react/src/modules/login/EducoderLogin.js index 94341d7e2..6df53d63e 100644 --- a/public/react/src/modules/login/EducoderLogin.js +++ b/public/react/src/modules/login/EducoderLogin.js @@ -60,21 +60,27 @@ class EducoderLogin extends Component { if( props.match.url === "/changepassword" ){ this.state = { showbool: false, + logini:3, } }else { if(props.match.url === "/login"){ this.state = { showbool: true, - loginstatus:true + loginstatus:true, + logini:1, + } }else if(props.match.url === "/register"){ this.state = { showbool: true, loginstatus:false, + logini:2, } }else{ this.state = { 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 = () => { if (this.state.showbool === true) { @@ -102,7 +116,7 @@ class EducoderLogin extends Component { render() { - let {showbool} = this.state; + let {showbool,loginstatus,logini} = this.state; return (
- -
-
- 找回密码 -
-
- - this.inputOnBlur(e)} - onChange={this.loginInputonChange} style={{marginTop: '10px'}}> - { - Phonenumberisnotco && Phonenumberisnotco != "" ? -

- {Phonenumberisnotco} -

- :
- } - - - - -
- - - { - getverificationcodes === undefined ? - - : getverificationcodes === true ? - - : - - } - - -
- - -
-
- -
- ); - } -} - -export default (LoginRegisterComponent); +import React, {Component} from 'react'; + +import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; + +import {getImageUrl, DragValidator} from 'educoder'; +import {Tabs, Input, Checkbox, Button, notification} from 'antd'; +import axios from 'axios'; +import './common.css' + +const TabPane = Tabs.TabPane +const loginInputsyl = { + "width": " 100%", + "height": "40px", +} + +//父组件 EducoderLogin.js +class LoginRegisterComponent extends Component { + constructor(props) { + super(props) + this.state = { + login: "", + password: "", + passwords: "", + seconds: 60, + codes: "", + getverificationcodes: true, + Phonenumberisnotco: undefined, + Phonenumberisnotcobool: false, + s: 'text', + classpass: "text", + readonlyInput: true, + } + } + + + openNotification = (messge) => { + notification.open({ + message: "提示", + description: + messge, + onClick: () => { + console.log('Notification Clicked!'); + }, + }); + }; + StudyMakeMoney = () => { // 调用父组件方法 + this.props.Setshowbool(); + + } + + // 点击表单后,改变type + changeType = () => { + this.setState({classpass: 'password'}); + } + changeTypey = () => { + + } + //倒计时 + getverificationcode = () => { + if (this.state.Phonenumberisnotcobool === false ||this.state.Phonenumberisnotcobool === undefined) { + if (this.state.login&&this.state.login.length === 0) { + this.openNotification("请输入手机号或邮箱"); + return + } else { + this.openNotification("请输入正确的手机号或邮箱"); + } + return; + } + if (this.state.getverificationcodes === true) { + this.setState({ + getverificationcodes: undefined, + }) + let timer = setInterval(() => { + this.setState((preState) => ({ + seconds: preState.seconds - 1, + }), () => { + if (this.state.seconds == 0) { + clearInterval(timer); + this.setState({ + getverificationcodes: false, + seconds: 60, + }) + } + }); + }, 1000) + this.SMSverification(); + } else { + this.setState({ + getverificationcodes: undefined, + }) + let timer = setInterval(() => { + this.setState((preState) => ({ + seconds: preState.seconds - 1, + }), () => { + if (this.state.seconds == 0) { + clearInterval(timer); + this.setState({ + getverificationcodes: false, + seconds: 60, + + }) + } + }); + }, 1000) + this.SMSverification(); + } + } + //短信验证 + SMSverification = () => { + var url = `/accounts/get_verification_code.json`; + axios.get((url), { + params: { + login: this.state.login, + type: 2, + } + }).then((result) => { + //验证有问题{"status":1,"message":"success"} + console.log(result); + + + }).catch((error) => { + console.log(error); + + }) + } + + cancelReadOnly = () => { + this.setState({ + readonlyInput: false, + }) + } + //找回密码 + Retrievepassword = () => { + if (this.state.Phonenumberisnotcobool === false) { + if (this.state.login.length === 0) { + this.openNotification("请输入手机号或邮箱"); + return + } + this.openNotification("请输入正确的手机号或邮箱"); + return; + } + + if (this.state.login === undefined || this.state.login == "") { + this.openNotification(`请输入登录手机号码或邮箱`); + return + } else if (this.state.password === undefined || this.state.password == "") { + this.openNotification(`请输入密码`); + return + } else if (this.state.passwords === undefined || this.state.passwords == "") { + this.openNotification(`请输入密码`); + return + } else if (this.state.password !== this.state.passwords) { + this.openNotification(`两次密码不相同`); + return + } else if (this.state.codes === undefined || this.state.codes == "") { + this.openNotification(`请输入验证码`); + return + } + var url = "/accounts/reset_password.json"; + axios.post(url, { + login: this.state.login, + code: this.state.codes, + new_password: this.state.password, + new_password_confirmation: this.state.passwords, + }).then((result) => { + // console.log(result); + //登录成功,会生成session + this.openNotification("找回密码成功,请重新登入。"); + window.location.href = "/login" + }).catch((error) => { + + }) + + + } + openNotification = (messge) => { + notification.open({ + message: "提示", + description: + messge, + onClick: () => { + console.log('Notification Clicked!'); + }, + }); + }; + loginInputonChange = (e) => { + // console.log(e.target.value); + this.setState({ + login: e.target.value, + }) + + + } + loginInputonChanges = (e) => { + // console.log(e.target.value); + this.setState({ + password: e.target.value, + }) + + + } + loginInputonChangess = (e) => { + // console.log(e.target.value); + this.setState({ + passwords: e.target.value, + }) + + + } + //获取code + codesonChange = (e) => { + this.setState({ + codes: e.target.value + }) + } + inputOnBlur = (e) => { + this.isCorrectname(e.target.value); + // this.Emailphonenumberverification(e.target.value, id); + } + isCorrectname = (value) => { + console.log(value.length); + if (value.length === 0) { + this.setState({ + Phonenumberisnotco: undefined, + Phonenumberisnotcobool: false, + }) + return; + } + // var telephone = $("#telephoneAdd.tianjia_phone").val(); + var regph = /^[1][3,4,5,6,7,8][0-9]{9}$/; + // var email = $("#add_email.tianjia_email").val(); + var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/; + + // [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。 + var stringdata = undefined; + if (!regph.test(value)) { + stringdata = "手机号格式不正确"; + this.setState({ + Phonenumberisnotco: stringdata, + Phonenumberisnotcobool: false, + }) + } else { + this.setState({ + Phonenumberisnotco: undefined, + Phonenumberisnotcobool: true, + }) + return + } + + if (!regemail.test(value)) { + if ((value.indexOf("@") != -1) === true) { + stringdata = "邮箱格式不正确"; + } else { + stringdata = "手机号格式不正确"; + + } + this.setState({ + Phonenumberisnotco: stringdata, + Phonenumberisnotcobool: false, + }) + + this.Emailphonenumberverification(value) + return + } else { + this.setState({ + Phonenumberisnotco: undefined, + Phonenumberisnotcobool: true, + }) + return + } + } + //邮箱手机号验证 + Emailphonenumberverification = (value) => { + var url = `/accounts/valid_email_and_phone.json`; + axios.get((url), { + params: { + login: value, + type: 2, + } + }).then((result) => { + //验证有问题{"status":1,"message":"success"} + console.log(result); + + + }).catch((error) => { + console.log(error); + // this.setState({ + // login:"", + // logins:"", + // }) + }) + } + + render() { + const { + activeKey, + // 登录 + autoLogin, + // 注册 + readAgreement, dragOk, + login, + password, + passwords, + classpass, + seconds, + getverificationcodes, + Phonenumberisnotco, + readonlyInput, + codes, + } = this.state + // height: 346px; + return ( + +
+ + + + +
+
+ 找回密码 +
+
+ + this.inputOnBlur(e)} + onChange={this.loginInputonChange} style={{marginTop: '10px',height: "38px"}}> + { + Phonenumberisnotco && Phonenumberisnotco != "" ? +

+ {Phonenumberisnotco} +

+ :
+ } + + + + +
+ + + { + getverificationcodes === undefined ? + + : getverificationcodes === true ? + + : + + } + + +
+ + +
+
+ +
+ ); + } +} + +export default (LoginRegisterComponent); diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 846000984..d314effca 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -10,8 +10,12 @@ import axios from 'axios'; import './common.css' const { TabPane } = Tabs; const loginInputsyl = { - "width": " 100%", - "height": "40px", +"width":"434px", +"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 @@ -135,6 +139,7 @@ class LoginRegisterComponent extends Component { ; StudyMakeMoney = () => { // 调用父组件方法 this.props.Setshowbool(); + // this.props.Setlogins(3); this.setState({ login: "", password: "", @@ -407,8 +412,9 @@ class LoginRegisterComponent extends Component { //倒计时 getverificationcode = () => { - if (this.state.Phonenumberisnotcobool === false) { - if (this.state.logins.length === 0) { + debugger + if (this.state.Phonenumberisnotcobool === false ||this.state.Phonenumberisnotcobool === undefined) { + if (this.state.logins&&this.state.logins.length === 0) { this.openNotification("请输入手机号或邮箱",2); return }else { @@ -503,6 +509,13 @@ class LoginRegisterComponent extends Component { this.setState({ tab:e.key }) + // console.log(e.key); + // if(e.key === 0){ + // this.props.Setlogins(1); + // }else{ + // this.props.Setlogins(2); + // + // } // this.props.history.push(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key) @@ -532,7 +545,7 @@ class LoginRegisterComponent extends Component { // console.log(activeKey); return ( -
+
@@ -576,62 +589,65 @@ class LoginRegisterComponent extends Component { + className="font-14 color-grey-9" + style={{marginTop: '30px', height: '38px'}}> { Phonenumberisnotco && Phonenumberisnotco != "" ?

{Phonenumberisnotco}

- :
+ :
} - -
+
下次自动登录 - 找回密码 + 找回密码
-
} { parseInt(tab[0])==1 &&
- this.inputOnBlur(e, 2)} - style={{marginTop: '30px'}}> + style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}> { Phonenumberisnotcos && Phonenumberisnotcos != "" ? -

+

+ {/*{Phonenumberisnotcos}*/} - {Phonenumberisnotcos} + 请输入手机号码

- :
+ :
} -
- + { getverificationcodes === undefined ? - : getverificationcodes === true ? - + : - } @@ -655,8 +671,9 @@ class LoginRegisterComponent extends Component { {/* style={{height: '0', width: '0', border: 'none', display: "none"}}/>*/} {/**/} - 我已阅读并同意服务协议条款 - + >我已阅读并同意服务协议条款 +
From cfb6a0d16a366b20d0b02ca48c7d8c09beed7477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 22 Jun 2019 13:56:36 +0800 Subject: [PATCH 04/23] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTaskssettinglist.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index c842d02f2..b681388f8 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -697,7 +697,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)} + 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating} ), @@ -709,7 +709,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)} + 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating} ), @@ -721,7 +721,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)} + 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore} ), @@ -838,7 +838,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)} + 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating} ), @@ -850,7 +850,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)} + 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating} ), @@ -862,7 +862,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)} + 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore} ), @@ -995,7 +995,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)} + 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating} ), @@ -1007,7 +1007,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)} + 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating} ), @@ -1019,7 +1019,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)} + 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore} ), @@ -1138,7 +1138,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)} + 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating} ), @@ -1150,7 +1150,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)} + 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating} ), @@ -1162,7 +1162,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)} + 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore} ), From 7aa347713674e43270c70286ce61353af38ef2dd Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 13:57:21 +0800 Subject: [PATCH 05/23] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/login/EducoderLogin.js | 2 +- public/react/src/modules/login/Trialapplication.js | 5 +++++ public/react/src/modules/tpm/TPMIndexHOC.js | 9 ++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/login/EducoderLogin.js b/public/react/src/modules/login/EducoderLogin.js index 6df53d63e..3c3f47c87 100644 --- a/public/react/src/modules/login/EducoderLogin.js +++ b/public/react/src/modules/login/EducoderLogin.js @@ -151,7 +151,7 @@ class EducoderLogin extends Component { }}>
+ Setshowbool={this.Setshowbool} >
diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index d2b942ce7..aa3a942dd 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -77,13 +77,18 @@ class Trialapplication extends Component { //TODO 这里如果样式变了会出现css不加载的情况 }); + console.log(this.props.isRenders); console.log("89"); + console.log(this.state.props.user_phone_binded ); try { if (this.state.props.user_phone_binded !== undefined) { console.log(this.state.props.user_phone_binded); this.setState({ user_phone_binded: this.state.props.user_phone_binded, }) + if(this.state.props.user_phone_binded === true){ + this.props.setTrialapplication(); + } } } catch (e) { diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 7723af4fc..9d8adb920 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -213,6 +213,13 @@ export function TPMIndexHOC(WrappedComponent) { return this.state.coursedata&&this.state.coursedata.course_identity === 6 } + setTrialapplication = ()=>{ + this.setState({ + isRenders:true + }) + + } + /** 课堂权限相关方法,暂时写这里了 ----------------------------------------END @@ -285,7 +292,7 @@ export function TPMIndexHOC(WrappedComponent) { user_phone_binded === undefined? "" : - + } From 1ee43431d0418018cbc07a2369c56c3999de5e18 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 14:04:54 +0800 Subject: [PATCH 06/23] =?UTF-8?q?=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Index.js | 6 +++--- .../react/src/modules/courses/ListPageIndex.js | 16 +++++++++++++++- .../react/src/modules/courses/Resource/index.js | 6 ++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index c385af3b7..840d1d617 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -442,14 +442,14 @@ class CoursesIndex extends Component{ {/* 资源列表页 */} - () + (props) => () } > () + (props) => () } > + + () + } + > + () + } + > + + + {/* 默认 */} () } > - +
diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index 1cae3d559..6476ef2bb 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -573,7 +573,7 @@ class Fileslists extends Component{ return( -
+ {/*发送*/} @@ -647,7 +647,6 @@ class Fileslists extends Component{ has_course_groups={this.state.has_course_groups} />:""} - - -
+ ) } } From 12a0bcaf4555a8322adb3a88943ad9a0231a74eb Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 14:13:05 +0800 Subject: [PATCH 07/23] =?UTF-8?q?=E6=AF=95=E8=AE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Index.js | 8 ++++---- .../react/src/modules/courses/ListPageIndex.js | 18 +++++++++++++++++- .../modules/courses/graduation/tasks/index.js | 4 ++-- .../modules/courses/graduation/topics/index.js | 4 ++-- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index 840d1d617..3dcdb1c18 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -491,9 +491,9 @@ class CoursesIndex extends Component{ > {/* 毕设选题列表 */} - () + (props) => () }> @@ -559,9 +559,9 @@ class CoursesIndex extends Component{ {/* 毕设任务列表 https://www.trustie.net/issues/19981 */} - () + (props) => () } > diff --git a/public/react/src/modules/courses/ListPageIndex.js b/public/react/src/modules/courses/ListPageIndex.js index abb8a8528..1f8bf6b29 100644 --- a/public/react/src/modules/courses/ListPageIndex.js +++ b/public/react/src/modules/courses/ListPageIndex.js @@ -56,6 +56,14 @@ const ShixunHomework= Loadable({ loading: Loading, }) +const GraduationTopics= Loadable({ + loader: () => import('./graduation/topics'), + loading: Loading, +}) +const GraduationTasks= Loadable({ + loader: () => import('./graduation/tasks'), + loading: Loading, +}) class ListPageIndex extends Component{ constructor(props) { super(props) @@ -181,7 +189,15 @@ class ListPageIndex extends Component{ } > - + () + }> + () + } + > {/* 默认 */} + {/*提示*/} - + ) } } diff --git a/public/react/src/modules/courses/graduation/topics/index.js b/public/react/src/modules/courses/graduation/topics/index.js index aaba86e9e..391bcac18 100644 --- a/public/react/src/modules/courses/graduation/topics/index.js +++ b/public/react/src/modules/courses/graduation/topics/index.js @@ -341,7 +341,7 @@ onBoardsNew=()=>{ // let {course_identity}=this.props.coursedata const isAdmin =this.props.isAdmin(); return( - + {
-
+ ) } } From 710ef90cd12b601d208bdd19df97e5af89c14675 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 14:14:21 +0800 Subject: [PATCH 08/23] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/login/Trialapplication.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index aa3a942dd..e9a801f74 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -71,6 +71,7 @@ class Trialapplication extends Component { this.setState({ isRenders: true }) + this.props.setTrialapplication(); } return response; }, (error) => { @@ -86,9 +87,6 @@ class Trialapplication extends Component { this.setState({ user_phone_binded: this.state.props.user_phone_binded, }) - if(this.state.props.user_phone_binded === true){ - this.props.setTrialapplication(); - } } } catch (e) { From cc290824bd4e438adbe4f6a1ddc11341677e1854 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 14:29:20 +0800 Subject: [PATCH 09/23] =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B8=8A=E4=BC=A0=20?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E6=A1=86=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../graduation/tasks/GraduationTasksSubmitnew.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index fd383eabf..1f49804e5 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -84,8 +84,20 @@ class GraduationTasksSubmitnew extends Component{ handleSubmit=(e) => { - let {fileList,selectmemberslist,workslist}=this.state; + + if(fileList.length === 0){ + this.setState({ + Modalstype:true, + Modalstopval:'请上传附件!', + Loadtype:true, + ModalCancel:this.cancelAttachment + }) + + + return + } + let userids=[]; From df009248ea2b92c067c350f9012207ff291297e6 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 14:47:15 +0800 Subject: [PATCH 10/23] =?UTF-8?q?=E6=AF=94=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/page/MainContent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/MainContent.js b/public/react/src/modules/page/MainContent.js index bfe53f0ac..2aef78e1b 100644 --- a/public/react/src/modules/page/MainContent.js +++ b/public/react/src/modules/page/MainContent.js @@ -57,7 +57,7 @@ class MainContent extends Component { `}
+ id="game_left_contents" style={{ width: '35%'}}> {/* style={{width: '694px'}} */} {/* 左侧任务说明等功能的区域 */} From c3ca98a64422b990f7e29a2240a9a0fb42a4d276 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 14:51:20 +0800 Subject: [PATCH 11/23] "@novnc/novnc": "^1.1.0", --- public/react/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/react/package.json b/public/react/package.json index 7b00881d5..19b8286d9 100644 --- a/public/react/package.json +++ b/public/react/package.json @@ -3,6 +3,8 @@ "version": "0.1.0", "private": true, "dependencies": { + "@novnc/novnc": "^1.1.0", + "@flatten/array": "^1.1.7", "@icedesign/base": "^0.2.5", "antd": "^3.6.5", From e196f5b066d54f32c90c4f9b667d29c8c84fd60b Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 15:02:37 +0800 Subject: [PATCH 12/23] VNCDisplay --- public/react/src/modules/page/Index.js | 4 + public/react/src/modules/page/MainContent.js | 10 +- .../src/modules/page/MainContentContainer.js | 4 + public/react/src/modules/page/VNCDisplay.js | 154 ++++++++++++++++++ 4 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 public/react/src/modules/page/VNCDisplay.js diff --git a/public/react/src/modules/page/Index.js b/public/react/src/modules/page/Index.js index 7d89462b9..5a37c8c66 100644 --- a/public/react/src/modules/page/Index.js +++ b/public/react/src/modules/page/Index.js @@ -223,6 +223,10 @@ class Index extends Component { challenge={context.challenge} myshixun={context.myshixun} shixun={context.shixun} + + vnc_url={context.vnc_url} + zip_path={context.zip_path} + loading={context.loading} discusses_count={context.discusses_count} hide_code={context.hide_code} diff --git a/public/react/src/modules/page/MainContent.js b/public/react/src/modules/page/MainContent.js index 2aef78e1b..c49b037f9 100644 --- a/public/react/src/modules/page/MainContent.js +++ b/public/react/src/modules/page/MainContent.js @@ -13,6 +13,7 @@ import ChooseEvaluateView from './main/ChooseEvaluateView' import { CircularProgress } from 'material-ui/Progress'; import Button from 'material-ui/Button'; +import VNCDisplay from './VNCDisplay' import './tpiPage.css'; import './tpiPageForMobile.css'; @@ -32,7 +33,7 @@ class MainContent extends Component { } render() { 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) { // const test_sets_array = JSON.parse("[" + output_sets.test_sets + "]"); @@ -47,6 +48,9 @@ class MainContent extends Component { } const newProps = Object.assign({}, this.props); delete newProps.testSetsExpandedArray + + const showIframeContent = shixun && shixun.vnc == true + return (
+//
+//
Loading
+//
Send CtrlAltDel
+//
+//
+//
+// ); +// } +// } + +// export default VNCDisplay; From b6e36fd02ef40f0b609fbefa361e325a8bb45e53 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 22 Jun 2019 15:05:31 +0800 Subject: [PATCH 13/23] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=EF=BC=9Afix=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/ExerciseReviewAndAnswer.js | 28 +++++++++++++----- public/react/src/modules/courses/poll/Poll.js | 1 + .../courses/poll/PollDetailTabFirst.js | 7 ++++- .../react/src/modules/user/usersInfo/Infos.js | 29 ++++++++++++------- 4 files changed, 47 insertions(+), 18 deletions(-) diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js index 0893a5e23..ce9c00a21 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -240,11 +240,15 @@ class ExerciseReviewAndAnswer extends Component{ ) } // 调分 - showSetScore=(key,flag)=>{ + showSetScore=(key,flag,setId)=>{ this.setState( (prevState) => ({ 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({ score:undefined @@ -502,6 +506,18 @@ class ExerciseReviewAndAnswer extends Component{ console.log(data&&data.exercise.user_name) return(
+

this.showSetScore(key,item.setScore)}>调分:"" + this.showSetScore(key,item.setScore,item.q_position+"_"+item.question_type)}>调分:"" } { // 简答题,未评分的显示未批 @@ -767,11 +783,10 @@ class ExerciseReviewAndAnswer extends Component{
} - { // 调分输入部分 isAdmin && ((item.setScore && item.question_type == 3) || ((item.setScore || parseInt(item.answer_status) == 0) && item.question_type == 4))? -
+
*调分:
  • @@ -783,8 +798,7 @@ class ExerciseReviewAndAnswer extends Component{ value={score} step={0.1} precision={1} - className={ setTip !="" ? "edu-txt-center winput-115-40 fl mt3 noticeTip" : "edu-txt-center winput-115-40 fl mt3"} - style={{height:"30px",width:"115px"}} + className={ setTip !="" ? "edu-txt-center winput-115-40 fl mt3 noticeTip inputNumber30" : "edu-txt-center winput-115-40 fl mt3 inputNumber30"} onChange={this.inputScore} > diff --git a/public/react/src/modules/courses/poll/Poll.js b/public/react/src/modules/courses/poll/Poll.js index 9f9291b61..3a7cd6aec 100644 --- a/public/react/src/modules/courses/poll/Poll.js +++ b/public/react/src/modules/courses/poll/Poll.js @@ -13,6 +13,7 @@ import '../css/members.css'; import '../css/busyWork.css'; import Modals from '../../modals/Modals'; import axios from 'axios'; +import moment from 'moment'; const Search = Input.Search; diff --git a/public/react/src/modules/courses/poll/PollDetailTabFirst.js b/public/react/src/modules/courses/poll/PollDetailTabFirst.js index 6a5be2e8d..ceca9b291 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabFirst.js +++ b/public/react/src/modules/courses/poll/PollDetailTabFirst.js @@ -181,7 +181,12 @@ class PollDetailTabFirst extends Component{ title: '学号', dataIndex: 'StudentNo', key: 'StudentNo', - className:"edu-txt-center" + className:"edu-txt-center", + render:(StudentNo,item,index)=>{ + return( + item.StudentNo ? {item.StudentNo} : "--" + ) + } }, { title: '分班', key: 'classes', diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index 81198b45c..941217750 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -130,14 +130,15 @@ class Infos extends Component{ let url=`/users/attendance.json` axios.post(url).then((result)=>{ if(result){ - this.setState( - (prevState) => ({ - data : update(prevState.data, {attendance_signed: {$set: true} }) - }) - ) - this.setState({ - next_gold:result.data.next_gold - }) + // this.setState( + // (prevState) => ({ + // data : update(prevState.data, {attendance_signed: {$set: true} }) + // }) + // ) + // this.setState({ + // next_gold:result.data.next_gold + // }) + this.getInfo(this.props.match.params.username); } }).catch((error)=>{ console.log(error); @@ -245,6 +246,9 @@ class Infos extends Component{
  • + { + data && is_current == false && data.identity =="学生" ?"" : {data && data.identity} + } {data && data.identity} @@ -314,7 +318,7 @@ class Infos extends Component{
    -
  • +
  • this.setState({moduleName: 'courses'})} to={`/users/${username}/courses`}>课堂 @@ -348,7 +352,7 @@ class Infos extends Component{ {/* 课堂 */} {/* http://localhost:3007/courses/1309/homework/9300/setting */} - () } @@ -374,6 +378,11 @@ class Infos extends Component{ (props) => () } > + () + } + >
  • From 0f1211f555a0cb5b481d977a1e8f0946f30fe15a Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 15:06:34 +0800 Subject: [PATCH 14/23] =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B8=8A=E4=BC=A0=20?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E6=A1=86=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesDetail/CoursesBanner.js | 477 +++++++++--------- .../src/modules/login/Trialapplication.js | 1 - public/react/src/modules/tpm/TPMIndexHOC.js | 24 +- 3 files changed, 262 insertions(+), 240 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 43e44c500..e0333c333 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -9,7 +9,7 @@ import '../css/Courses.css'; import Modals from "../../modals/Modals"; import AddStudentModal from '../members/modal/AddStudentModal' import AddTeacherModal from '../members/modal/AddTeacherModal' - +import Trialapplication from "../../login/Trialapplication"; // 点击按钮复制功能 // function jsCopy(){ @@ -43,13 +43,20 @@ class CoursesBanner extends Component { metype: 0, modalsBottomval: "", antIcon:false, - coursedata:undefined + coursedata:undefined, + user_phone_binded:false, + isRenders:false, + showTrial:false, } + console.log("CoursesBanner"); + console.log("48"); + console.log(props); } - - componentDidMount() { this.updatabanner() + this.setState({ + user_phone_binded :this.props.user_phone_binded, + }) } updatabanner=()=>{ let courseId = this.props.match.params.coursesId; @@ -57,9 +64,19 @@ class CoursesBanner extends Component { axios.get(url).then((result) => { if( result!=undefined){ let data = result.data; - this.setState({ - coursedata: data - }) + if(result.data.status === 407){ + this.setState({ + isRenders:true, + coursedata: data, + showTrial:false, + }) + }else{ + this.setState({ + coursedata: data, + showTrial:true, + + }) + } } }) } @@ -315,265 +332,271 @@ class CoursesBanner extends Component { } 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 ( +
    + - coursedata === undefined || coursedata.status===401?
    :
    + { + coursedata === undefined || coursedata.status===401?
    :
    {Addcoursestypes === true ? this.tojoinclass(2)} + Addcoursestype={Addcoursestypes} + hideAddcoursestype={() => this.tojoinclass(2)} /> : ""} - -
    -
    +
    - { - coursedata===undefined || coursedata.status===401 || coursedata.status===407?"": - - {coursedata.name} - + { + coursedata===undefined || coursedata.status===401 || coursedata.status===407?"": + + {coursedata.name} + - } - {/*私有:私有课堂,非课堂成员不能访问 + } + {/*私有:私有课堂,非课堂成员不能访问 公开:公开课堂,非课堂成员可以访问*/} - + + typelist={coursedata.course_end === true ? ["已结束"] : coursedata.is_public === true ? ["公开"] : ["私有"]} + typesylename={"mt10"} tipval={coursedata.is_public === true?"":"私有课堂,非课堂成员不能访问"}/> +
    + +
    +
    + + + 头像 + + + + +
    +

    {coursedata.teacher_school}

    +
    +
    -
    -
    - - - 头像 - - - - -
    -

    {coursedata.teacher_school}

    -
    - -
    - - -
    - {coursedata.switch_to_student === true ? - - this.switchidentity(1)} - > 切换为学生 - - :""} - - {coursedata.switch_to_teacher === true ? - - this.switchidentity(2)} - > 切换为老师 - :""} - - - {coursedata.switch_to_assistant === true ? - - this.switchidentity(3)} - > 切换为助教 - :""} - - - {coursedata.course_identity === 6&&coursedata.educoder_teacher===false? - this.tojoinclass(1)}>加入课堂: ""} - - {coursedata.course_identity === 6&&coursedata.educoder_teacher===true? - this.tojoinclass(1)}>加入课堂: ""} - - {coursedata.course_identity === 6&&coursedata.educoder_teacher===true? - this.ActionPoll(5)}> 复制课堂 : ""} - - {this.props.isStudent()? this.exitclass()} - > 退出课堂 :""} - -
    - - -
    - +
    + {coursedata.switch_to_student === true ? + + this.switchidentity(1)} + > 切换为学生 + + :""} + + {coursedata.switch_to_teacher === true ? + + this.switchidentity(2)} + > 切换为老师 + :""} + + + {coursedata.switch_to_assistant === true ? + + this.switchidentity(3)} + > 切换为助教 + :""} - {this.props.isAdmin()?
    + + +
    + + + + {this.props.isAdmin()? - } trigger="hover"> - - + } + + + {coursedata.is_public === true?coursedata.course_identity <3? +
    this.ActionPoll(2)}>设为私有
    : "" : ""} + + {coursedata.is_public === false?coursedata.course_identity <3? +
    this.ActionPoll(3)}>设为公开
    : "": ""} + + {coursedata.course_identity <3?
    this.ActionPoll(4)}> + {coursedata.code_halt === true ?"启用邀请码":"停用邀请码"} +
    :""} + +
    设置
    + +
    this.ActionPoll(5)}>复制 +
    + + {coursedata.is_admin===true?coursedata.course_identity <3?
    this.ActionPoll(1)}>删除
    + :"":""} + + } trigger="hover"> + +
    - + - :""} + :""} -
    +
    -
    +
    -
    +
    + } +
    + ) } } diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index e9a801f74..9285bd1f0 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -71,7 +71,6 @@ class Trialapplication extends Component { this.setState({ isRenders: true }) - this.props.setTrialapplication(); } return response; }, (error) => { diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 9d8adb920..77d2e13bb 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -213,12 +213,12 @@ export function TPMIndexHOC(WrappedComponent) { return this.state.coursedata&&this.state.coursedata.course_identity === 6 } - setTrialapplication = ()=>{ - this.setState({ - isRenders:true - }) - - } + // setTrialapplication = ()=>{ + // this.setState({ + // isRenders:true + // }) + // + // } /** @@ -288,13 +288,13 @@ export function TPMIndexHOC(WrappedComponent) { } return (
    - { - user_phone_binded === undefined? - "" - : - + {/*{*/} + {/* user_phone_binded === undefined?*/} + {/* ""*/} + {/* :*/} + {/* */} - } + {/*}*/} Date: Sat, 22 Jun 2019 15:11:10 +0800 Subject: [PATCH 15/23] isAdminOrTeacher --- public/react/src/modules/courses/members/teacherList.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 509bf56c1..478a94ec2 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -28,6 +28,7 @@ const pageSize = 20; function buildColumns(that) { const isAdmin = that.props.isAdmin() const isAdminOrCreator = that.props.isAdminOrCreator(); + const isAdminOrTeacher = that.props.isAdminOrTeacher() const { course_groups } = that.state const columns = [{ title: '', @@ -121,7 +122,7 @@ function buildColumns(that) { ), }) } - if (isAdminOrCreator) { + if (isAdminOrTeacher) { columns.push({ title: '操作', key: 'action', From b8fab1e9a004db5721a59c2956f237c410120930 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 15:53:07 +0800 Subject: [PATCH 16/23] =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B8=8A=E4=BC=A0=20?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E6=A1=86=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/exercise/Studentshavecompletedthelist.js | 9 +++++---- .../courses/graduation/tasks/GraduationTasksSubmitnew.js | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index 4317950f2..64cfaee64 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -2030,7 +2030,7 @@ class Studentshavecompletedthelist extends Component { //===0 不包括主观题 if (indexi === exercise_users.length) { //都没评论 不显示评论 - if (response.data.course_groups.length > 0) { + if (response.data.poll_types.groups_count > 0) { // console.log("77771111111"); //分班大于0显示分班 //7ge @@ -2272,7 +2272,8 @@ class Studentshavecompletedthelist extends Component { } else { //已经评论 - if (response.data.course_groups.length > 0) { + // response.data.course_groups.length + if (response.data.poll_types.groups_count > 0) { //显示分班 //8ge this.setState({ @@ -2545,7 +2546,7 @@ class Studentshavecompletedthelist extends Component { //包括主观题 if (indexi === exercise_users.length) { console.log("2548包含主观题不包含分班"); - if (response.data.course_groups.length > 0){ + if (response.data.poll_types.groups_count> 0){ this.setState({ data: datalist, teacherlist: teacherlist, @@ -2836,7 +2837,7 @@ class Studentshavecompletedthelist extends Component { } } else { console.log("2699包含主观题包含分班"); - if (response.data.course_groups.length > 0) { + if (response.data.poll_types.groups_count> 0) { this.setState({ data: datalist, teacherlist: teacherlist, diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index 1f49804e5..a9ea6d002 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -85,7 +85,7 @@ class GraduationTasksSubmitnew extends Component{ handleSubmit=(e) => { let {fileList,selectmemberslist,workslist}=this.state; - + if(fileList.length === 0){ this.setState({ Modalstype:true, From 8eee96f7c2ed07b82f9346d1bf8205d8785f81b9 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 16:13:41 +0800 Subject: [PATCH 17/23] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/members/teacherList.js | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 478a94ec2..261bfab85 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -5,6 +5,7 @@ import CourseLayoutcomponent from '../common/CourseLayoutComponent' import Titlesearchsection from '../common/titleSearch/TitleSearchSection' import ColorCountText from '../common/titleSearch/ColorCountText' +import update from 'immutability-helper' import { WordsBtn, ConditionToolTip, on, off } from 'educoder' import axios from 'axios' @@ -71,7 +72,7 @@ function buildColumns(that) { const noGroups = (!course_groups || course_groups.length == 0); return ( - + { arg_course_groups.length == 0 ? '不限' : arg_course_groups.map(item => item.name).join(', ') } { isAdmin && @@ -84,7 +85,7 @@ function buildColumns(that) {

    ): '' } - that.joinCourseGroup(checkedValues, item)} + that.joinCourseGroup(checkedValues, item, index)} value={arg_course_groups.map(item => item.id)} disabled={!isAdminOrCreator} > @@ -137,11 +138,12 @@ function buildColumns(that) { } else { return ( - that.onDelete(record)} style={'grey'}>删除 - + {record.role != ROLE_ADMIN && that.onDelete(record)} style={'grey'}>删除} + {(record.role == ROLE_TEACHER || record.role == ROLE_TEACHER_ASSISTANT || isAdminOrCreator) && record.role != ROLE_ADMIN + && } { record.role == ROLE_TEACHER ? that.changeToAssistant(record)}>变更为助教 : '' } { record.role == ROLE_TEACHER_ASSISTANT ? that.changeToTeacher(record)}>变更为教师 : '' } - { record.role == ROLE_ADMIN ? that.showChangeAdminModal(record)}>更换管理员 : '' } + { record.role == ROLE_ADMIN && isAdminOrCreator ? that.showChangeAdminModal(record)}>更换管理员 : '' } ) } @@ -238,8 +240,13 @@ class studentsList extends Component{ }) .then((response) => { 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({ course_groups: response.data.course_groups, + course_groups_map }) } else { } @@ -248,7 +255,7 @@ class studentsList extends Component{ console.log(error); }); } - joinCourseGroup = (ids, item) => { + joinCourseGroup = (ids, item, index) => { console.log('join ', ids, item) const courseId = this.props.match.params.coursesId @@ -263,7 +270,12 @@ class studentsList extends Component{ .then((response) => { if (response.data.status == 0) { 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 { } }) From 71ccf425b68d776e2e5134abc64cd1b0b9847ae5 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 16:17:31 +0800 Subject: [PATCH 18/23] hasGraduationModule --- public/react/src/modules/courses/members/teacherList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 261bfab85..4432ecc60 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -573,7 +573,7 @@ class studentsList extends Component{
    • this.onSortTypeChange(ORDER_BY_NAME)} >姓名排序
    • this.onSortTypeChange(ORDER_BY_DATE)} style={{width: '125px'}}>加入时间排序
    • -
    • this.onSortTypeChange(ORDER_BY_GRADUATION_GROUP)} >答辩组排序
    • + {this.hasGraduationModule() &&
    • this.onSortTypeChange(ORDER_BY_GRADUATION_GROUP)} >答辩组排序
    • }
    } From 9011592e755394a40605dba1ce6defb7052a8967 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 16:22:46 +0800 Subject: [PATCH 19/23] 0 --- public/react/src/modules/courses/members/teacherList.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 4432ecc60..ac9d22119 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -57,7 +57,8 @@ function buildColumns(that) { title: '角色', dataIndex: 'role', key: 'role', - }, { + }] + that.course_groups && that.course_groups.length && columns.push({ title: 管理权限, width: 230, key: 'course_groups', @@ -110,7 +111,7 @@ function buildColumns(that) { ) } , - }]; + }); if (that.hasGraduationModule()) { columns.push({ title: '答辩组', From 425c19f3ea1ae9841b0055ff737996c2f4dbbf99 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 16:30:22 +0800 Subject: [PATCH 20/23] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/user/FindPasswordComponent.js | 5 +-- .../modules/user/LoginRegisterComponent.js | 34 ++++++++++--------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index 41b8ec464..8dea3e521 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -279,7 +279,8 @@ class LoginRegisterComponent extends Component { } }).then((result) => { //验证有问题{"status":1,"message":"success"} - console.log(result); + // console.log(result); + this.openNotification("验证码已发送,请注意查收!",2); }).catch((error) => { @@ -370,7 +371,7 @@ class LoginRegisterComponent extends Component { { Phonenumberisnotco && Phonenumberisnotco != "" ?

    - {Phonenumberisnotco} + {Phonenumberisnotco}

    :
    } diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index d314effca..38ecbac45 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -361,11 +361,11 @@ class LoginRegisterComponent extends Component { } }).then((result) => { //验证有问题{"status":1,"message":"success"} - console.log(result); + // console.log(result); }).catch((error) => { - console.log(error); + // console.log(error); // this.setState({ // login:"", // logins:"", @@ -374,7 +374,6 @@ class LoginRegisterComponent extends Component { } //短信验证 SMSverification = () => { - var url = `/accounts/get_verification_code.json`; axios.get((url), { params: { @@ -383,7 +382,8 @@ class LoginRegisterComponent extends Component { } }).then((result) => { //验证有问题{"status":1,"message":"success"} - console.log(result); + // console.log(result); + this.openNotification("验证码已发送,请注意查收!",2); }).catch((error) => { @@ -412,7 +412,6 @@ class LoginRegisterComponent extends Component { //倒计时 getverificationcode = () => { - debugger if (this.state.Phonenumberisnotcobool === false ||this.state.Phonenumberisnotcobool === undefined) { if (this.state.logins&&this.state.logins.length === 0) { this.openNotification("请输入手机号或邮箱",2); @@ -509,13 +508,17 @@ class LoginRegisterComponent extends Component { this.setState({ tab:e.key }) - // console.log(e.key); - // if(e.key === 0){ - // this.props.Setlogins(1); - // }else{ - // this.props.Setlogins(2); - // - // } + 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) @@ -590,12 +593,13 @@ class LoginRegisterComponent extends Component { onChange={this.loginInputonChange} name="username" className="font-14 color-grey-9" + onBlur={(e) => this.inputOnBlur(e, 1)} style={{marginTop: '30px', height: '38px'}}> { Phonenumberisnotco && Phonenumberisnotco != "" ?

    - {Phonenumberisnotco} + {Phonenumberisnotco}

    :
    } @@ -629,9 +633,7 @@ class LoginRegisterComponent extends Component { { Phonenumberisnotcos && Phonenumberisnotcos != "" ?

    - {/*{Phonenumberisnotcos}*/} - - 请输入手机号码 + {Phonenumberisnotcos}

    :
    From 7dcf103598c8eff8e7074626df030844ed488220 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 22 Jun 2019 16:52:34 +0800 Subject: [PATCH 21/23] fix --- .../tasks/GraduationTasksappraise.js | 17 ++-- .../tasks/GraduationTaskssettinglist.js | 99 ++++++++++--------- 2 files changed, 61 insertions(+), 55 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js index 7807e7265..47f38746c 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js @@ -163,8 +163,8 @@ class GraduationTasksappraise extends Component{

    - {/* {datalist&&datalist.course_name}*/} - {/*>*/} + {datalist&&datalist.course_name} + > {datalist&&datalist.graduation_name} > 任务详情 @@ -182,23 +182,22 @@ class GraduationTasksappraise extends Component{ ` } -

    -

    {datalist&&datalist.task_name}

    +
    +

    {datalist&&datalist.task_name}

    - 返回 + 返回 {this.props.isStudent()? datalist&&datalist.task_status===2? - 补交附件:"" + 补交附件:"" :""}
    -
    +
    内容 @@ -251,7 +250,7 @@ class GraduationTasksappraise extends Component{ {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.length===0?"":
    -
    +
    补交附件
    diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index b681388f8..752d61d33 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -621,17 +621,17 @@ class GraduationTaskssettinglist extends Component{ title: '序号', dataIndex: 'number', key: 'number', - + className:'edu-txt-center' }, { title: '姓名', dataIndex: 'name', key: 'name', - + className:'edu-txt-center' }, { title: '学号', dataIndex: 'stduynumber', key: 'stduynumber', - + className:'edu-txt-center', render: (text, record) => ( {record.stduynumber} @@ -641,7 +641,7 @@ class GraduationTaskssettinglist extends Component{ title: '分班', key: 'classroom', dataIndex: 'classroom', - + className:'edu-txt-center', render: (text, record) => ( {record.classroom==="未分班"?"--":record.classroom} @@ -650,7 +650,8 @@ class GraduationTaskssettinglist extends Component{ }, { title: '分组', key: 'grouping', - dataIndex: 'grouping', + dataIndex: 'grouping', + className:'edu-txt-center', render: (text, record) => ( {record.grouping} @@ -659,7 +660,7 @@ class GraduationTaskssettinglist extends Component{ title: '关联项目', dataIndex: 'associationitems', key: 'associationitems', - + className:'edu-txt-center', render: (text, record) => (
    @@ -671,7 +672,7 @@ class GraduationTaskssettinglist extends Component{ title: '提交状态', dataIndex: 'submitstate', key: 'submitstate', - + className:'edu-txt-center', render: (text, record) => ( {record.submitstate} @@ -681,7 +682,7 @@ class GraduationTaskssettinglist extends Component{ title: '更新时间', dataIndex: 'turnovertime', key: 'turnovertime', - + className:'edu-txt-center', render: (text, record) => ( @@ -693,7 +694,7 @@ class GraduationTaskssettinglist extends Component{ title: '教师评分', key: 'teacherrating', dataIndex: 'teacherrating', - + className:'edu-txt-center', render: (text, record) => ( @@ -705,7 +706,7 @@ class GraduationTaskssettinglist extends Component{ title: '交叉评分', key: 'crossrating', dataIndex: 'crossrating', - + className:'edu-txt-center', render: (text, record) => ( @@ -717,7 +718,7 @@ class GraduationTaskssettinglist extends Component{ title: '最终成绩', key: 'finalscore', dataIndex: 'finalscore', - + className:'edu-txt-center', render: (text, record) => ( @@ -728,7 +729,8 @@ class GraduationTaskssettinglist extends Component{ }, { title: '操作', key: 'operation', - dataIndex: 'operation', + dataIndex: 'operation', + className:'edu-txt-center', render: operation => (
    {this.props.isAdmin()?operation.map((tag,key) => { @@ -772,17 +774,17 @@ class GraduationTaskssettinglist extends Component{ title: '序号', dataIndex: 'number', key: 'number', - + className:'edu-txt-center', }, { title: '姓名', dataIndex: 'name', key: 'name', - + className:'edu-txt-center', }, { title: '学号', dataIndex: 'stduynumber', key: 'stduynumber', - + className:'edu-txt-center', render: (text, record) => ( {record.stduynumber} @@ -791,7 +793,8 @@ class GraduationTaskssettinglist extends Component{ },{ title: '分组', key: 'grouping', - dataIndex: 'grouping', + dataIndex: 'grouping', + className:'edu-txt-center', render: (text, record) => ( {record.grouping} @@ -800,7 +803,7 @@ class GraduationTaskssettinglist extends Component{ title: '关联项目', dataIndex: 'associationitems', key: 'associationitems', - + className:'edu-txt-center', render: (text, record) => (
    @@ -812,7 +815,7 @@ class GraduationTaskssettinglist extends Component{ title: '提交状态', dataIndex: 'submitstate', key: 'submitstate', - + className:'edu-txt-center', render: (text, record) => ( {record.submitstate} @@ -822,7 +825,7 @@ class GraduationTaskssettinglist extends Component{ title: '更新时间', dataIndex: 'turnovertime', key: 'turnovertime', - + className:'edu-txt-center', render: (text, record) => ( @@ -834,7 +837,7 @@ class GraduationTaskssettinglist extends Component{ title: '教师评分', key: 'teacherrating', dataIndex: 'teacherrating', - + className:'edu-txt-center', render: (text, record) => ( @@ -846,7 +849,7 @@ class GraduationTaskssettinglist extends Component{ title: '交叉评分', key: 'crossrating', dataIndex: 'crossrating', - className:'none', + className:'none edu-txt-center', render: (text, record) => ( @@ -858,7 +861,7 @@ class GraduationTaskssettinglist extends Component{ title: '最终成绩', key: 'finalscore', dataIndex: 'finalscore', - + className:'edu-txt-center', render: (text, record) => ( @@ -870,6 +873,7 @@ class GraduationTaskssettinglist extends Component{ title: '操作', key: 'operation', dataIndex: 'operation', + className:'edu-txt-center', render: operation => (
    {this.props.isAdmin()?operation.map((tag,key) => { @@ -918,17 +922,17 @@ class GraduationTaskssettinglist extends Component{ title: '序号', dataIndex: 'number', key: 'number', - + className:'edu-txt-center', }, { title: '姓名', dataIndex: 'name', key: 'name', - + className:'edu-txt-center', }, { title: '学号', dataIndex: 'stduynumber', key: 'stduynumber', - + className:'edu-txt-center', render: (text, record) => ( {record.stduynumber} @@ -938,7 +942,7 @@ class GraduationTaskssettinglist extends Component{ title: '分班', key: 'classroom', dataIndex: 'classroom', - + className:'edu-txt-center', render: (text, record) => ( {record.classroom==="未分班"?"--":record.classroom} @@ -948,6 +952,7 @@ class GraduationTaskssettinglist extends Component{ title: '分组', key: 'grouping', dataIndex: 'grouping', + className:'edu-txt-center', render: (text, record) => ( {record.grouping} @@ -956,7 +961,7 @@ class GraduationTaskssettinglist extends Component{ title: '关联项目', dataIndex: 'associationitems', key: 'associationitems', - + className:'edu-txt-center', render: (text, record) => (
    @@ -969,7 +974,7 @@ class GraduationTaskssettinglist extends Component{ title: '提交状态', dataIndex: 'submitstate', key: 'submitstate', - + className:'edu-txt-center', render: (text, record) => ( {record.submitstate} @@ -979,7 +984,7 @@ class GraduationTaskssettinglist extends Component{ title: '更新时间', dataIndex: 'turnovertime', key: 'turnovertime', - + className:'edu-txt-center', render: (text, record) => ( @@ -991,7 +996,7 @@ class GraduationTaskssettinglist extends Component{ title: '教师评分', key: 'teacherrating', dataIndex: 'teacherrating', - + className:'edu-txt-center', render: (text, record) => ( @@ -1003,7 +1008,7 @@ class GraduationTaskssettinglist extends Component{ title: '交叉评分', key: 'crossrating', dataIndex: 'crossrating', - + className:'edu-txt-center', render: (text, record) => ( @@ -1015,7 +1020,7 @@ class GraduationTaskssettinglist extends Component{ title: '最终成绩', key: 'finalscore', dataIndex: 'finalscore', - + className:'edu-txt-center', render: (text, record) => ( @@ -1027,6 +1032,7 @@ class GraduationTaskssettinglist extends Component{ title: '操作', key: 'operation', dataIndex: 'operation', + className:'edu-txt-center', render: operation => (
    {this.props.isAdmin()?operation.map((tag,key) => { @@ -1070,17 +1076,17 @@ class GraduationTaskssettinglist extends Component{ title: '序号', dataIndex: 'number', key: 'number', - + className:'edu-txt-center', }, { title: '姓名', dataIndex: 'name', key: 'name', - + className:'edu-txt-center', }, { title: '学号', dataIndex: 'stduynumber', key: 'stduynumber', - + className:'edu-txt-center', render: (text, record) => ( {record.stduynumber} @@ -1090,6 +1096,7 @@ class GraduationTaskssettinglist extends Component{ title: '分组', key: 'grouping', dataIndex: 'grouping', + className:'edu-txt-center', render: (text, record) => ( {record.grouping} @@ -1098,7 +1105,7 @@ class GraduationTaskssettinglist extends Component{ title: '关联项目', dataIndex: 'associationitems', key: 'associationitems', - + className:'edu-txt-center', render: (text, record) => (
    @@ -1112,7 +1119,7 @@ class GraduationTaskssettinglist extends Component{ title: '提交状态', dataIndex: 'submitstate', key: 'submitstate', - + className:'edu-txt-center', render: (text, record) => ( {record.submitstate} @@ -1122,7 +1129,7 @@ class GraduationTaskssettinglist extends Component{ title: '更新时间', dataIndex: 'turnovertime', key: 'turnovertime', - + className:'edu-txt-center', render: (text, record) => ( @@ -1134,7 +1141,7 @@ class GraduationTaskssettinglist extends Component{ title: '教师评分', key: 'teacherrating', dataIndex: 'teacherrating', - + className:'edu-txt-center', render: (text, record) => ( @@ -1146,7 +1153,7 @@ class GraduationTaskssettinglist extends Component{ title: '交叉评分', key: 'crossrating', dataIndex: 'crossrating', - + className:'edu-txt-center', render: (text, record) => ( @@ -1158,7 +1165,7 @@ class GraduationTaskssettinglist extends Component{ title: '最终成绩', key: 'finalscore', dataIndex: 'finalscore', - + className:'edu-txt-center', render: (text, record) => ( @@ -1170,6 +1177,7 @@ class GraduationTaskssettinglist extends Component{ title: '操作', key: 'operation', dataIndex: 'operation', + className:'edu-txt-center', render: operation => (
    {this.props.isAdmin()?operation.map((tag,key) => { @@ -1359,13 +1367,12 @@ class GraduationTaskssettinglist extends Component{ 任务详情

    -
    -

    {taskslistdata.task_name}

    +
    @@ -1448,7 +1455,7 @@ class GraduationTaskssettinglist extends Component{ {taskslistdata.search_assistants && taskslistdata.search_assistants.teacher_comment && taskslistdata.search_assistants.teacher_comment.map((item,key)=>{ return( - {item.name} + {item.name} ({item.count}) From fe5f2e4cb2c3c03c9a943ef8a9fd0fdb18b8a853 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 17:04:34 +0800 Subject: [PATCH 22/23] =?UTF-8?q?tpi=E5=B7=A6=E5=8F=B3=E6=AF=94=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/context/TPIContextProvider.js | 2 +- public/react/src/modules/page/MainContent.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index c272df699..d5d8715f5 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -417,7 +417,7 @@ pop_box_new(htmlvalue, 480, 182); */ let user = resData.user; 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.is_teacher = resData.is_teacher; resData.user = user; diff --git a/public/react/src/modules/page/MainContent.js b/public/react/src/modules/page/MainContent.js index c49b037f9..bb1cd11fc 100644 --- a/public/react/src/modules/page/MainContent.js +++ b/public/react/src/modules/page/MainContent.js @@ -61,7 +61,7 @@ class MainContent extends Component { `}
    + id="game_left_contents" style={{ width: '40%'}}> {/* style={{width: '694px'}} */} {/* 左侧任务说明等功能的区域 */} From adfdb8e35731c1b0751beb76efcc456fa627fded Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 17:20:38 +0800 Subject: [PATCH 23/23] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/graduation/tasks/GraduationTasksSubmitnew.js | 2 +- public/react/src/modules/tpm/NewHeader.js | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index a9ea6d002..fd0e265c5 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -627,7 +627,7 @@ render(){
    - + 取消
    diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index ecbc8570b..2d1451d6b 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -330,14 +330,15 @@ class NewHeader extends Component { }) } educoderlogin=()=>{ - //登出账号 + //退出账号 var url = `/accounts/logout.json`; axios.get((url)).then((result) => { if(result!==undefined){ - this.setState({ - isRender:true - }) + // this.setState({ + // isRender:true + // }) + window.location.href = "/"; } }).catch((error) => { console.log(error);