this.changeTag("all")} className={ type==="all" ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部
@@ -277,6 +341,9 @@ class ShixunModal extends Component{
width: 11%;
box-sizing: border-box;
}
+ .pl12{
+ padding-left: 12px;
+ }
`
}
@@ -298,7 +365,7 @@ class ShixunModal extends Component{
{item.school}
{item.myshixuns_count}
-
{item.level}
+
{item.level}
详情
diff --git a/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js b/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js
index dc3044cc0..3f4f1a0ca 100644
--- a/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js
+++ b/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js
@@ -1,4 +1,4 @@
-import React, { useState, useEffect, useRef, memo } from 'react'
+import React, { useState, useEffect, useRef, useMemo } from 'react'
import { trigger } from 'educoder'
import { Input, Checkbox } from "antd";
import CourseGroupChooser from '../CourseGroupChooser'
@@ -105,4 +105,4 @@ function CourseGroupChooserModal({ course_groups = [], isAdminOrCreator, item, i
)
}
-export default memo(CourseGroupChooserModal)
\ No newline at end of file
+export default useMemo(CourseGroupChooserModal)
\ No newline at end of file
diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js
index 42f5fbf6a..1913b0d2d 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js
@@ -454,20 +454,6 @@ class ShixunHomework extends Component{
checkBoxValues:[]
})
- let coursesId=this.props.match.params.coursesId;
- let url ="/courses/"+coursesId+"/homework_commons/shixuns.json";
-
- axios.get(url).then((result)=>{
- if(result.status===200){
- this.setState({
- shixunmodallist:result.data,
- hometypepvisible:false,
- newshixunmodallist:result.data.shixun_list,
- })
- }
- }).catch((error)=>{
- console.log(error);
- })
}
@@ -477,24 +463,10 @@ class ShixunHomework extends Component{
this.setState({
hometypepvisible:true,
patheditarry:[],
- checkBoxValues:[]
+ checkBoxValues:[],
+ shixunpath: true,
})
- let coursesId=this.props.match.params.coursesId;
- let url ="/courses/"+coursesId+"/homework_commons/subjects.json";
-
- axios.get(url).then((result)=>{
- if(result.status===200){
- this.setState({
- shixunpath:true,
- shixunpathlist:result.data,
- hometypepvisible:false,
- newshixunpathlist:result.data.subject_list,
- })
- }
- }).catch((error)=>{
- console.log(error);
- })
}
@@ -508,116 +480,80 @@ class ShixunHomework extends Component{
})
}
- funshixunmodallist=(search,type,loading,page)=>{
- let{newshixunmodallist}=this.state;
- let newshixunmodallists=[]
- if(page>1){
- newshixunmodallists=newshixunmodallist;
- }
- this.setState({
- hometypepvisible:loading
- })
- let coursesId=this.props.match.params.coursesId;
- let url ="/courses/"+coursesId+"/homework_commons/shixuns.json";
-
- axios.get(url, {
- params: {
- search: search,
- type:type,
- page:page
- }
- }).then((result)=>{
- if(result.status===200){
-
- let shixun_list=result.data.shixun_list;
- for(var i=0; i
{
- console.log(error);
- })
- }
-
- funshixunpathlist=(search,type,loading,page)=>{
- let{newshixunpathlist}=this.state;
- let newshixunmodallists=[]
- if(page>1){
- newshixunmodallists=newshixunpathlist;
- }
- this.setState({
- hometypepvisible:loading
- })
- let coursesId=this.props.match.params.coursesId;
- let url ="/courses/"+coursesId+"/homework_commons/subjects.json";
-
- axios.get(url, {
- params: {
- search: search,
- type:type,
- page:page
- }
- }).then((result)=>{
- if(result.status===200){
-
- let shixun_list=result.data.subject_list;
- for(var i=0; i{
- console.log(error);
- })
- }
-
- funshixunpathlist=(search,type,loading,page)=>{
- let{newshixunpathlist}=this.state;
- let newshixunmodallists=[]
- if(page>1){
- newshixunmodallists=newshixunpathlist;
- }
- this.setState({
- hometypepvisible:loading
- })
- let coursesId=this.props.match.params.coursesId;
- let url ="/courses/"+coursesId+"/homework_commons/subjects.json";
+ // funshixunmodallist=(search,type,loading,page)=>{
+ // let{newshixunmodallist}=this.state;
+ // let newshixunmodallists=[]
+ // if(page>1){
+ // newshixunmodallists=newshixunmodallist;
+ // }
+ // this.setState({
+ // hometypepvisible:loading
+ // })
+ // let coursesId=this.props.match.params.coursesId;
+ // let url ="/courses/"+coursesId+"/homework_commons/shixuns.json";
+ //
+ // axios.get(url, {
+ // params: {
+ // search: search,
+ // type:type,
+ // page:page
+ // }
+ // }).then((result)=>{
+ // if(result.status===200){
+ //
+ // let shixun_list=result.data.shixun_list;
+ // for(var i=0; i{
+ // console.log(error);
+ // })
+ // }
- axios.get(url, {
- params: {
- search: search,
- type:type,
- page:page
- }
- }).then((result)=>{
- if(result.status===200){
- let shixun_list=result.data.subject_list;
- for(var i=0; i{
- console.log(error);
- })
- }
+ // funshixunpathlist=(search,type,loading,page)=>{
+ // let{newshixunpathlist}=this.state;
+ // let newshixunmodallists=[]
+ // if(page>1){
+ // newshixunmodallists=newshixunpathlist;
+ // }
+ // this.setState({
+ // hometypepvisible:loading
+ // })
+ // let coursesId=this.props.match.params.coursesId;
+ // let url ="/courses/"+coursesId+"/homework_commons/subjects.json";
+ //
+ // axios.get(url, {
+ // params: {
+ // search: search,
+ // type:type,
+ // page:page
+ // }
+ // }).then((result)=>{
+ // if(result.status===200){
+ //
+ // let shixun_list=result.data.subject_list;
+ // for(var i=0; i{
+ // console.log(error);
+ // })
+ // }
PaginationCourse=(pageNumber)=>{
let {Coursename,order}=this.state;
@@ -1012,13 +948,16 @@ class ShixunHomework extends Component{
course_groups={course_groups}
getcourse_groupslist={(id)=>this.getcourse_groupslist(id)}
/>:""}
+
{/*选择实训*/}
{shixunmodal===true?this.funshixunmodallist(search,type,loading,page)}
+ // funshixunmodallist={(search,type,loading,page)=>this.funshixunmodallist(search,type,loading,page)}
hometypepvisible={hometypepvisible}
hidecouseShixunModal={this.hidecouseShixunModal}
newshixunmodallist={newshixunmodallist}
@@ -1027,6 +966,7 @@ class ShixunHomework extends Component{
funpatheditarry={(patheditarry)=>this.funpatheditarry(patheditarry)}
patheditarry={patheditarry}
/>:""}
+
{shixunmodal===true||shixunpath===true?:""}
{/*选择实训路径*/}
{shixunpath===true? this.funshixunpathlist(search,type,loading,page)}
+ // funshixunpathlist={(search,type,loading,page)=>this.funshixunpathlist(search,type,loading,page)}
hometypepvisible={hometypepvisible}
hidecouseShixunModal={this.hidecouseShixunModal}
coursesId={this.props.match.params.coursesId}
diff --git a/public/react/src/modules/page/main/CodeEvaluateView.css b/public/react/src/modules/page/main/CodeEvaluateView.css
index bd0427d7b..137174d95 100644
--- a/public/react/src/modules/page/main/CodeEvaluateView.css
+++ b/public/react/src/modules/page/main/CodeEvaluateView.css
@@ -126,4 +126,5 @@
display: inline-block;
height: 10px;
margin: 5px 0;
+ float: right;
}
\ No newline at end of file
diff --git a/public/react/src/modules/page/main/CodeEvaluateView.js b/public/react/src/modules/page/main/CodeEvaluateView.js
index 48bb0b245..8be0b8765 100644
--- a/public/react/src/modules/page/main/CodeEvaluateView.js
+++ b/public/react/src/modules/page/main/CodeEvaluateView.js
@@ -184,8 +184,8 @@ class CodeEvaluateView extends Component {
{ headIconClass && }
{ _headLockIconClass && }
- { item.ts_memo && 消耗内存{item.ts_memo}MB }
- { item.ts_memo && item.ts_time && }
+ { item.ts_mem && 消耗内存{item.ts_mem}MB }
+ { item.ts_mem && item.ts_time && }
{ item.ts_time && 代码执行时长:{item.ts_time}秒 }
diff --git a/public/react/src/modules/user/AccountPage.js b/public/react/src/modules/user/AccountPage.js
index 25c9f7198..3d34b3e13 100644
--- a/public/react/src/modules/user/AccountPage.js
+++ b/public/react/src/modules/user/AccountPage.js
@@ -79,6 +79,22 @@ class AccountPage extends Component {
.accountPage {
display: flex;
}
+ .basicFormWrap{
+ flex:1;
+ width: 0;
+ }
+
+ /* 左侧 */
+ .accountNav {
+ width: 290px;
+ box-shadow: 0px 4px 9px 0px rgba(11,62,120,0.21);
+ border-radius: 2px;
+ padding-top: 8px;
+ padding-bottom: 30px;
+ margin-bottom:30px;
+ margin-right:20px;
+ height:418px;
+ }
`}
diff --git a/public/react/src/modules/user/account/AccountBasic.js b/public/react/src/modules/user/account/AccountBasic.js
index 80eee8fc7..aef66e5c2 100644
--- a/public/react/src/modules/user/account/AccountBasic.js
+++ b/public/react/src/modules/user/account/AccountBasic.js
@@ -3,7 +3,7 @@ import React, { Component } from 'react';
import { SnackbarHOC, getImageUrl, City } from 'educoder';
import { Form, Button, Input, Radio, Select, Tooltip, Icon } from 'antd'
import './common.css'
-
+import { getHiddenName } from './AccountBasicEdit'
const RadioGroup = Radio.Group;
const Option = Select.Option
@@ -70,7 +70,7 @@ class AccountBasicEdit extends Component {
label="姓名"
className="display formItemInline"
>
- {basicInfo && basicInfo.name}
+ {basicInfo && (basicInfo.show_realname == true ? basicInfo.name : getHiddenName(basicInfo.name))}
{
console.log(values);
let {basicInfo}=this.props;
- // TODO 为什么modal里的form影响到这里的了
- if (err) {
- delete err.depart
- }
- if(!err || Object.keys(err).length == 0){
+ if(!err ){
let url=`/users/accounts/${basicInfo.id}.json`
axios.put((url),{
nickname:values.nickname,
@@ -158,19 +162,10 @@ class AccountBasic extends Component {
}
}
- getHiddenName(name) {
- if (!name) return ''
- let len=parseInt(name.length)-1;
- let str="";
- for(var i = 0; i < len; i++){ str += "*"; }
- const newName = name.substr(0,1)+str;
- return newName
- }
-
// 将名字隐藏起来
hideRealName=(name)=>{
this.setState({ realName: name })
- const newName = this.getHiddenName(name)
+ const newName = getHiddenName(name)
this.props.form.setFieldsValue({
name: newName
@@ -202,16 +197,18 @@ class AccountBasic extends Component {
}
//搜索部门
searchDepartment=(e)=>{
- this.props.form.setFieldsValue({
- org2:e
- })
- let arr = this.state.departments.filter(function(item){
- return item.name.indexOf(e) > -1
- })
- this.setState({
- filterDepartments:arr,
- departmentsName:e
- })
+ if (e) {
+ this.props.form.setFieldsValue({
+ org2:e
+ })
+ let arr = this.state.departments.filter(function(item){
+ return item.name.indexOf(e) > -1
+ })
+ this.setState({
+ filterDepartments:arr,
+ departmentsName:e
+ })
+ }
}
// 选择部门、学院
@@ -251,6 +248,9 @@ class AccountBasic extends Component {
this.props.form.setFieldsValue({
org2:result.data.departments[0].name
})
+ this.setState({
+ department_id: result.data.departments[0].id
+ })
}
}
}).catch((error)=>{
@@ -303,12 +303,15 @@ class AccountBasic extends Component {
const { getFieldDecorator } = this.props.form;
let{basicInfo}=this.props
+ // form合并了
+ const propsWithoutForm = Object.assign({}, this.props)
+ delete propsWithoutForm.form
return (
this.applyForAddOrgForm = form} schoolName={school}
- {...this.props}>
+ {...propsWithoutForm}>
this.applyForAddChildOrgForm = form} >
+ {...propsWithoutForm} wrappedComponentRef={(form) => this.applyForAddChildOrgForm = form} >
基本信息
@@ -402,7 +405,7 @@ class AccountBasic extends Component {
{ showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)' }
:
-
{showRealName ? this.props.basicInfo.name : this.getHiddenName(this.props.basicInfo.name)}
+
{showRealName ? this.props.basicInfo.name : getHiddenName(this.props.basicInfo.name)}
this.showOrHide(showRealName)}>
{ showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)' }
diff --git a/public/react/src/modules/user/account/AccountNav.js b/public/react/src/modules/user/account/AccountNav.js
index 5117eacc2..b0038e43b 100644
--- a/public/react/src/modules/user/account/AccountNav.js
+++ b/public/react/src/modules/user/account/AccountNav.js
@@ -21,8 +21,60 @@ class AccountNav extends Component {
const isSecure = path.indexOf('secure') != -1
return (
+
{
- basicInfo &&
+ basicInfo && basicInfo.id &&
diff --git a/public/react/src/modules/user/account/AccountSecure.js b/public/react/src/modules/user/account/AccountSecure.js
index 6cff4d901..29abf22e4 100644
--- a/public/react/src/modules/user/account/AccountSecure.js
+++ b/public/react/src/modules/user/account/AccountSecure.js
@@ -35,6 +35,9 @@ class AccountSecure extends Component {
// 获取验证码倒计时
remainTime=()=>{
+ this.setState({
+ seconds: 60
+ })
this.timer = setInterval(() => {
let { seconds } =this.state;
let s = parseInt(seconds)-1;
@@ -53,7 +56,7 @@ class AccountSecure extends Component {
// 获取验证码
getCode=(index)=>{
- let url=`/account/get_verification_code.json`
+ let url=`/accounts/get_verification_code.json`
let login = '';
let values=this.props.form.getFieldsValue();
if(index == 3){
@@ -199,9 +202,11 @@ class AccountSecure extends Component {
InputNewPassword=(rule,value,callback)=>{
const { form } = this.props;
- if (value.length<8 || value.length>12) {
- callback("请输入8-12个字符的新密码,区分大小写!");
- }else {
+ if (!value) {
+ callback("请输入8-16位字符的新密码,区分大小写!");
+ } else if (value.length<8 || value.length>16) {
+ callback("请输入8-16位字符的新密码,区分大小写!");
+ } else {
callback();
}
}
@@ -283,7 +288,7 @@ class AccountSecure extends Component {
:
未绑定
}
- 绑定手机号码,将获得500金币的奖励哟~,手机号码仅自己可见~
+ {basicInfo.phone ? '仅自己可见,可用手机号码登录EduCoder' : '绑定手机号码,将获得500金币的奖励哟~,手机号码仅自己可见~'}
{
updating != PHONE &&
@@ -305,10 +310,10 @@ class AccountSecure extends Component {
rules: [{
// initialValue: this.state.cityDefaultValue,
required: true,
- message: '请输入要绑定的手机号码',
+ message: `请输入要${basicInfo.phone ? '更换' : '绑定'}的手机号码`,
}],
})(
-
+
)}
@@ -442,10 +447,6 @@ class AccountSecure extends Component {
>
{getFieldDecorator('p_new', {
rules: [{
- // initialValue: this.state.cityDefaultValue,
- required: true,
- message: '请输入8~16位的新密码,区分大小写',
- },{
validator:this.InputNewPassword
}],
})(
diff --git a/public/react/src/modules/user/account/common.css b/public/react/src/modules/user/account/common.css
index d84686f59..113b39e07 100644
--- a/public/react/src/modules/user/account/common.css
+++ b/public/react/src/modules/user/account/common.css
@@ -18,9 +18,7 @@
.flexRow {
display: flex;
}
-.color-green-light{
- color: #45E660!important;
-}
+
.mb15{margin-bottom: 15px!important;}
/* BUTTOn */
.ant-btn {
@@ -45,72 +43,11 @@ button.ant-btn.ant-btn-primary.grayBtn {
display: none;
}
-.basicFormWrap{
- flex:1;
- width: 0;
-}
-/* .basicForm .ant-form-item-label {
- width: 100px;
- padding-right: 10px;
-}
- .basicForm .ant-form-item-label label {
- color: #979797
- } */
- /* 左侧 */
- .accountNav {
- width: 290px;
- box-shadow: 0px 4px 9px 0px rgba(11,62,120,0.21);
- border-radius: 2px;
- padding-top: 8px;
- padding-bottom: 30px;
- margin-bottom:30px;
- margin-right:20px;
- height:418px;
- }
- .accountInfo {
- text-align: center;
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .accountInfo .name {
- color: #05101A;
- font-size: 24px;
- height: 36px;
- }
- .accountInfo .role {
- color: #666666;
- font-size: 14px;
- }
- .accountManagement .title {
- color: #05101A;
- font-size: 18px;
- font-weight: 400;
- padding: 10px 28px;
- margin-top: 6px;
- }
- .accountManagement .navItem {
- font-size: 16px;
- padding: 6px 0px;
- padding-left: 30px;
- border-left: 2px solid #fff;
- cursor: pointer;
- color:#4D4D4D;
- }
- .accountManagement .navItem i{
- margin-top: -4px;
- display: inline-block;
- margin-right: 7px;
- }
- .accountManagement .navItem i.status{
- margin-top: 1px;
- margin-right: 24px;
- }
- .accountManagement .navItem.active {
- border-left: 2px solid #4CACFF;
- background: #E6F3FF;
+ /* .basicForm .ant-form-item-label {
+ width: 100px;
+ padding-right: 10px;
}
- .accountManagement .navItem.active i:first-child{
- color:#4CACFF!important;
- }
\ No newline at end of file
+ .basicForm .ant-form-item-label label {
+ color: #979797
+ } */
diff --git a/public/react/src/modules/user/modal/ApplyForAddOrgModal.js b/public/react/src/modules/user/modal/ApplyForAddOrgModal.js
index 02c4d4a99..76664bfec 100644
--- a/public/react/src/modules/user/modal/ApplyForAddOrgModal.js
+++ b/public/react/src/modules/user/modal/ApplyForAddOrgModal.js
@@ -40,9 +40,9 @@ class ApplyForAddOrgModal extends Component{
if(!err){
let url=`/add_school_applies.json`;
axios.post(url,{
- schoolName:values.name,
- province:values.city[0],
- city:values.city[1],
+ schoolName:values.schoolName,
+ province:values.city && values.city[0],
+ city:values.city && values.city[1],
address:values.address,
remarks:values.remarks
}).then((result)=>{
@@ -95,6 +95,10 @@ class ApplyForAddOrgModal extends Component{
.explain .ant-form-explain{
top:36px;
}
+
+ .addOrg ul.ant-cascader-menu {
+ width: 196px;
+ }
`}
+
)}
diff --git a/public/react/src/modules/user/modal/RealNameCertificationModal.js b/public/react/src/modules/user/modal/RealNameCertificationModal.js
index ccb301a32..6c92423cd 100644
--- a/public/react/src/modules/user/modal/RealNameCertificationModal.js
+++ b/public/react/src/modules/user/modal/RealNameCertificationModal.js
@@ -2,7 +2,7 @@ import React, { Component } from "react";
import { message, Icon, Input, Form, Upload} from "antd";
import axios from 'axios'
import ModalWrapper from "../../courses/common/ModalWrapper"
-import { City, getUploadActionUrl,getImageUrl } from 'educoder'
+import { City, getUploadActionUrl, getImageUrl, ImageLayerHook } from 'educoder'
import '../account/common.css'
import authImg from '../../../images/account/auth.png'
@@ -201,7 +201,11 @@ class RealNameCertificationModal extends Component{
}
.applyForModal .ant-form-item-label label {
color: #979797
+ }
+ .applyForModal .ant-upload.ant-upload-drag .ant-upload {
+ padding: 0px;
}
+
.certificationModal .ant-modal-body{
padding:20px;
}
@@ -295,9 +299,9 @@ class RealNameCertificationModal extends Component{
{imageUrl2 ?
-
+ //
- :
+ :
@@ -311,7 +315,9 @@ class RealNameCertificationModal extends Component{