@@ -1277,7 +1289,7 @@ class CommonWorkSetting extends Component{
placeholder="请选择申诉结束时间"
id={"endtime"}
width={"210px"}
- value={appeal_time===null||appeal_time===""?"":moment(appeal_time, dateFormat)}
+ value={!appeal_time?"":moment(appeal_time, dateFormat)}
onChange={this.appeal_time_change}
disabled={ (anonymous_appeal && !noAuth ? false : true) || moment(init_appeal_time) < moment()}
/>
diff --git a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js
index 66bca0023..f448483d2 100644
--- a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js
+++ b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js
@@ -27,8 +27,6 @@ class HomeworkModal extends Component{
group_ids:[],
endtime:""
}
- console.log("30");
- console.log(props);
}
componentDidMount() {
diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js
index d46b48038..58569554f 100644
--- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js
+++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js
@@ -656,7 +656,7 @@ class ExerciseReviewAndAnswer extends Component{
return(
- {parseInt(key+1)}、{type[item.question_type]}({item.question_score}分)
+ {exercise_questions.q_position}、{type[item.question_type]}({item.question_score}分)
{
// 填空(一直都有调分),和简答题调分:老师身份 已经评分的才能出现调分按钮
diff --git a/public/react/src/modules/courses/graduation/tasks/index.js b/public/react/src/modules/courses/graduation/tasks/index.js
index 99784c453..a50452f88 100644
--- a/public/react/src/modules/courses/graduation/tasks/index.js
+++ b/public/react/src/modules/courses/graduation/tasks/index.js
@@ -13,6 +13,7 @@ import Modals from '../../../modals/Modals';
import UseBank from "../../busyWork/UseBank";
import '../../css/members.css';
import '../style.css';
+import moment from 'moment'
class GraduationTasks extends Component{
@@ -413,7 +414,7 @@ class GraduationTasks extends Component{
Topval:"本操作只对“未发布”的对象生效",
Botvalleft:"暂不发布",
Botval:"则通过后续手动设置,定时发布",
- starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
+ starttime:"发布时间:"+moment(new Date()).format("YYYY-MM-DD HH:mm"),
starttimes:this.props.getNowFormatDates(1),
typs:"start",
endtime:"截止时间:"+endtime,
diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js
index 9b1a2ad6e..509bf56c1 100644
--- a/public/react/src/modules/courses/members/teacherList.js
+++ b/public/react/src/modules/courses/members/teacherList.js
@@ -49,7 +49,7 @@ function buildColumns(that) {
width: 160,
key: 'name',
render: (name, record) => {
- return {name}
+ return {name}
}
}, {
title: '角色',
diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js
index 9626a1475..d2b942ce7 100644
--- a/public/react/src/modules/login/Trialapplication.js
+++ b/public/react/src/modules/login/Trialapplication.js
@@ -44,18 +44,14 @@ class Trialapplication extends Component {
componentWillReceiveProps(nextProps) {
- // this.setState({
- // isRenders:nextProps.isRenders
- // })
- // console.log("componentWillReceiveProps");
- // console.log(nextProps);
+
}
//初始化数据
componentDidMount() {
- // console.log("53");
+ console.log("53");
- // console.log(this.props.isRenders);
+ console.log(this.props.isRenders);
if (this.props.isRenders != undefined) {
this.setState({
@@ -78,14 +74,15 @@ class Trialapplication extends Component {
}
return response;
}, (error) => {
- // // // TODO 这里如果样式变了会出现css不加载的情况
+ //TODO 这里如果样式变了会出现css不加载的情况
+
});
- // console.log("89");
+ console.log("89");
try {
- // console.log(this.state.props.user && this.state.props.user.user_phone_binded);
- if (this.state.props.user !== undefined) {
+ 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.user_phone_binded,
+ user_phone_binded: this.state.props.user_phone_binded,
})
}
@@ -212,6 +209,7 @@ class Trialapplication extends Component {
this.setState({
isRenders: false
})
+ this.Cancel();
window.location.href = "/";
} else {
this.setState({
@@ -273,6 +271,8 @@ class Trialapplication extends Component {
thiss.setState({
isRenders: false
})
+ thiss.Cancel();
+
} else {
thiss.setState({
isRenders: false
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index e97a728d4..ecbc8570b 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -171,8 +171,9 @@ class NewHeader extends Component {
isRender:false,
isRenders:false,
showTrial:false,
- user:undefined,
}
+ console.log("176")
+ console.log(props);
}
componentDidMount() {
@@ -581,7 +582,6 @@ submittojoinclass=(value)=>{
/>
{/* :""*/}
{/*}*/}
-
{/*{*/}
{/* isRenders&&isRenders===true?*/}
@@ -707,18 +707,18 @@ submittojoinclass=(value)=>{
注册
:
-
+
{user.username}
- - 我的课堂
+ - 我的课堂
{/* p 老师 l 学生 */}
- - 我的实训
- - 我的实训课程
- - 我的项目
+ - 我的实训
+ - 我的实训课程
+ - 我的项目
- 账号管理
{/*- this.educoderlogin()} >登入测试接口
*/}
{/*- this.trialapplications()} >试用申请
*/}
diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js
index c808a4808..7723af4fc 100644
--- a/public/react/src/modules/tpm/TPMIndexHOC.js
+++ b/public/react/src/modules/tpm/TPMIndexHOC.js
@@ -9,6 +9,7 @@ import { getUrl } from 'educoder'
import axios from 'axios';
import './TPMIndex.css'
+import Trialapplication from "../login/Trialapplication";
// import "antd/dist/antd.css";
// import '../../css/educoder/edu-common.css'
// import '../../css/educoder/edu-all.css'
@@ -246,10 +247,10 @@ export function TPMIndexHOC(WrappedComponent) {
}
*/
if (response.data) {
-
this.initCommonState(response.data)
- this.setState({
- tpmLoading: false,
+ this.setState({
+ user_phone_binded:response.data.user_phone_binded,
+ tpmLoading: false,
coursedata: {
course_identity: response.data.course_identity >= 0 ? response.data.course_identity : undefined,
course_public: response.data.course_public,
@@ -266,7 +267,7 @@ export function TPMIndexHOC(WrappedComponent) {
})
}
render() {
- let{Headertop,Footerdown}=this.state;
+ let{Headertop,Footerdown,user_phone_binded}=this.state;
const common = {
isSuperAdmin:this.isSuperAdmin,
isAdminOrCreator:this.isAdminOrCreator,
@@ -278,11 +279,17 @@ export function TPMIndexHOC(WrappedComponent) {
isNotMember: this.isNotMember,
isUserid:this.state.coursedata&&this.state.coursedata.userid
}
-
-
return (
-
+
+ }
+
+
diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js
index 3300423a1..201d5b43a 100644
--- a/public/react/src/modules/user/usersInfo/Infos.js
+++ b/public/react/src/modules/user/usersInfo/Infos.js
@@ -1,11 +1,11 @@
import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder';
+import {Link} from 'react-router-dom';
import {Tooltip,Menu} from 'antd';
-import InfosCourse from './InfosCourse';
-import InfosShixun from './InfosShixun';
-import InfosProject from './InfosProject';
-import InfosPath from './InfosPath';
-import InfosBank from './InfosBank';
+import Loadable from 'react-loadable';
+import Loading from '../../../Loading';
+import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
+
import axios from 'axios';
import {getImageUrl} from 'educoder';
import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
@@ -17,6 +17,22 @@ import update from 'immutability-helper'
import Trialapplication from '../../login/Trialapplication'
+const InfosCourse = Loadable({
+ loader: () => import('./InfosCourse'),
+ loading:Loading,
+})
+const InfosShixun = Loadable({
+ loader: () => import('./InfosShixun'),
+ loading:Loading,
+})
+const InfosPath = Loadable({
+ loader: () => import('./InfosPath'),
+ loading:Loading,
+})
+const InfosProject = Loadable({
+ loader: () => import('./InfosProject'),
+ loading:Loading,
+})
const $ = window.$;
class Infos extends Component{
@@ -29,7 +45,8 @@ class Infos extends Component{
sign:undefined,
type:0,
login:undefined,
- isRenders:false
+ isRenders:false,
+ moduleName:"courses"
}
}
componentDidMount =()=>{
@@ -177,10 +194,13 @@ class Infos extends Component{
followed,
id,
login,
- isRenders
+ isRenders,
+ moduleName
}=this.state;
let {username}= this.props.match.params;
- let {isAdmin}=this.props.isAdmin();
+
+ let {pathname}=this.props.location;
+ moduleName=pathname.split("/")[3];
return(
{
@@ -194,24 +214,24 @@ class Infos extends Component{
{data && data.name}
@@ -220,22 +240,22 @@ class Infos extends Component{
-
+
-
+ this.setState({moduleName: 'courses'})}
+ to={`/users/${username}/courses`}>课堂
+
+
-
+ this.setState({moduleName: 'shixuns'})}
+ to={`/users/${username}/shixuns`}>实训
+
+
-
+ this.setState({moduleName: 'paths'})}
+ to={`/users/${username}/paths`}>实训课程
+
+
-
+ this.setState({moduleName: 'projects'})}
+ to={`/users/${username}/projects`}>项目
+
+
+ { data && data.identity!="学生" &&
- 题库
}
+
- {
- parseInt(type) == 0 &&
- }
- {
- parseInt(type) == 1 &&
- }
- {
- parseInt(type) == 2 &&
- }
- {
- parseInt(type) == 3 &&
- }
- {
- parseInt(type) == 4 &&
- }
+
+
+ {/* --------------------------------------------------------------------- */}
+
+ {/* 课堂 */}
+ {/* http://localhost:3007/courses/1309/homework/9300/setting */}
+ ()
+ }
+ >
+
+ {/* 实训 */}
+ ()
+ }
+ >
+
+ {/* 实训课程 */}
+ ()
+ }
+ >
+
+ {/* 项目 */}
+ ()
+ }
+ >
+
+
)
}
diff --git a/public/react/src/modules/user/usersInfo/InfosBank.js b/public/react/src/modules/user/usersInfo/InfosBank.js
index 39015681d..cf670063d 100644
--- a/public/react/src/modules/user/usersInfo/InfosBank.js
+++ b/public/react/src/modules/user/usersInfo/InfosBank.js
@@ -39,7 +39,7 @@ class InfosBank extends Component{
}
getCourses=(category,type,page,sort_by,CoursesId)=>{
- let url=`/users/${this.props.login}/question_banks.json`;
+ let url=`/users/${this.props.match.params.username}/question_banks.json`;
axios.get((url),{params:{
category,
type,
diff --git a/public/react/src/modules/user/usersInfo/InfosCourse.js b/public/react/src/modules/user/usersInfo/InfosCourse.js
index b864dff63..109a4d7b9 100644
--- a/public/react/src/modules/user/usersInfo/InfosCourse.js
+++ b/public/react/src/modules/user/usersInfo/InfosCourse.js
@@ -36,7 +36,7 @@ class InfosCourse extends Component{
}
getCourses=(category,status,page)=>{
- let url=`/users/${this.props.login}/courses.json`;
+ let url=`/users/${this.props.match.params.username}/courses.json`;
axios.get((url),{params:{
category,
status,
diff --git a/public/react/src/modules/user/usersInfo/InfosPath.js b/public/react/src/modules/user/usersInfo/InfosPath.js
index 55422f208..ce3bcfba8 100644
--- a/public/react/src/modules/user/usersInfo/InfosPath.js
+++ b/public/react/src/modules/user/usersInfo/InfosPath.js
@@ -38,7 +38,7 @@ class InfosPath extends Component{
}
getCourses=(category,status,sort_by,page,per_page)=>{
- let url=`/users/${this.props.login}/subjects.json`;
+ let url=`/users/${this.props.match.params.username}/subjects.json`;
axios.get((url),{params:{
category,
status,
diff --git a/public/react/src/modules/user/usersInfo/InfosProject.js b/public/react/src/modules/user/usersInfo/InfosProject.js
index fab96f59e..99232b8ef 100644
--- a/public/react/src/modules/user/usersInfo/InfosProject.js
+++ b/public/react/src/modules/user/usersInfo/InfosProject.js
@@ -32,7 +32,7 @@ class InfosProject extends Component{
}
getCourses=(category,status,page)=>{
- let url=`/users/${this.props.login}/projects.json`;
+ let url=`/users/${this.props.match.params.username}/projects.json`;
axios.get((url),{params:{
category,
status,
diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js
index 90575f9f0..d6835098a 100644
--- a/public/react/src/modules/user/usersInfo/InfosShixun.js
+++ b/public/react/src/modules/user/usersInfo/InfosShixun.js
@@ -38,7 +38,7 @@ class InfosShixun extends Component{
}
getCourses=(category,status,sort_by,page)=>{
- let url=`/users/${this.props.login}/shixuns.json`;
+ let url=`/users/${this.props.match.params.username}/shixuns.json`;
axios.get((url),{params:{
category,
status,
diff --git a/public/react/src/modules/user/usersInfo/usersInfo.css b/public/react/src/modules/user/usersInfo/usersInfo.css
index 31bdd5a2c..0be9837bf 100644
--- a/public/react/src/modules/user/usersInfo/usersInfo.css
+++ b/public/react/src/modules/user/usersInfo/usersInfo.css
@@ -8,8 +8,20 @@
float: left;
margin: 0px 40px;
padding:0px;
- height: 47px;line-height: 40px;
+ height: 45px;
+ line-height: 40px;
font-size: 16px;
+ position: relative;
+}
+.navInfo li.active::after{
+ position: absolute;
+ left: 0px;
+ height: 2px;
+ width: 100%;
+ content: '';
+ bottom: 0px;
+ background: #05101A!important;
+ color: #666!important;
}
.navInfo li,.navInfo li.ant-menu-item-active{
border-bottom: none!important;