Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 6 years ago
commit 1f64fa6cff

@ -31,7 +31,7 @@ export function initAxiosInterceptors(props) {
// proxy = "http://testbdweb.trustie.net"
// proxy = "http://testbdweb.educoder.net"
proxy = "https://testeduplus2.educoder.net"
// proxy="http://47.96.87.25:48080"
proxy="http://47.96.87.25:48080"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求
// 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制

@ -8,7 +8,6 @@ import { WordsBtn } from 'educoder'
import AccessoryModal2 from '../coursesPublic/AccessoryModal2'
import AccessoryModal from '../coursesPublic/AccessoryModal'
import axios from 'axios'
import ConnectProject from './ConnectProject'
class CommonWorkItem extends Component{
constructor(props){
super(props);
@ -128,7 +127,7 @@ class CommonWorkItem extends Component{
}
</style>
{
mainList && mainList.homeworks.length>0 && mainList.homeworks.map((item,index)=>{
mainList && mainList.homeworks && mainList.homeworks.length>0 && mainList.homeworks.map((item,index)=>{
let canNotLink = !isAdminOrStudent && item.private_icon == true
return(
<div className="mt20 edu-back-white padding02010" key={index} >
@ -196,7 +195,7 @@ class CommonWorkItem extends Component{
<li className="fr">
{ //
item.work_status && item.work_status.indexOf('关联项目') != -1 &&
<ConnectProject className="fl" {...this.props} work={item}></ConnectProject>
<WordsBtn style="blue" className={` font-16 fl}`} onClick={() => this.props.openConnectionProject(item)}>关联项目</WordsBtn>
}
{ //
item.work_status && item.work_status.indexOf('提交作品') != -1 &&

@ -47,9 +47,14 @@ function buildColumns(that, student_works) {
}
let courseId= that.props.match.params.coursesId;
let workId= that.props.match.params.workId;
const { course_group_count } = that.state;
const { course_group_count, homework_status } = that.state;
const isAdmin = that.props.isAdmin()
const isAdminOrStudent = that.props.isAdminOrStudent()
const isStudent = that.props.isStudent()
const isNiPing = homework_status.indexOf('匿评中') != -1
// https://www.trustie.net/issues/21450 分组作业作品列表 学时视角,匿评阶段的列表显示信息不正确
const niPingAndIsStudent = isStudent && isNiPing
let columns = [{
width: 60,
title: '序号',
@ -76,21 +81,24 @@ function buildColumns(that, student_works) {
{text}
</div>
),
}, {
width: 180,
title: '学号',
dataIndex: 'student_id',
key: 'student_id',
render: (text, record) => (
<span>
<a href="javascript:;" style={{color:'#9A9A9A'}}>{record.student_id}</a>
</span>
),
}]
if (!niPingAndIsStudent) {
columns.push({
width: 180,
title: '学号',
dataIndex: 'student_id',
key: 'student_id',
render: (text, record) => (
<span>
<a href="javascript:;" style={{color:'#9A9A9A'}}>{record.student_id}</a>
</span>
),
})
}
// TODO 只有有分班时才显示分班列
if (course_group_count != 0) {
if (course_group_count != 0 && !niPingAndIsStudent) {
columns.push( {
title: '分班',
key: 'group_name',
@ -103,7 +111,7 @@ function buildColumns(that, student_works) {
),
} )
}
if (gotWorkGroup) {
if (gotWorkGroup && !niPingAndIsStudent) {
columns.push({
width: 72,
title: '分组',
@ -154,45 +162,52 @@ function buildColumns(that, student_works) {
<a href="javascript:;" style={{color:'#989898'}}>{update_time ? moment(update_time).format('YYYY-MM-DD hh:mm') : '--'}</a>
</span>
),
}, {
width: 72,
title: '教师评分',
key: 'teacher_score',
dataIndex: 'teacher_score',
render: (teacher_score, record) => (
<Tooltip title={ getScoreTip(teacher_score, teacher_score) }>
}])
if (!niPingAndIsStudent) {
columns.push({
width: 72,
title: '教师评分',
key: 'teacher_score',
dataIndex: 'teacher_score',
render: (teacher_score, record) => (
<Tooltip title={ getScoreTip(teacher_score, teacher_score) }>
<span>
{ renderScore(teacher_score) }
</span>
</Tooltip>
),
})
columns.push({
width: 72,
title: '助教评分',
key: 'teaching_asistant_score',
dataIndex: 'teaching_asistant_score',
/**
* 2名助教进行了评分
平均分85.0
*
*/
render: (teaching_asistant_score, record) => (
<span>
{ renderScore(teacher_score) }
</span>
</Tooltip>
),
}, {
width: 72,
title: '助教评分',
key: 'teaching_asistant_score',
dataIndex: 'teaching_asistant_score',
/**
* 2名助教进行了评分
平均分85.0
*
*/
render: (teaching_asistant_score, record) => (
<span>
{ <Tooltip placement="bottom" title={
getScoreTip(teaching_asistant_score,
<div>
<div>{record.ta_comment_count}名助教进行了评分</div>
<div>{that.state.ta_mode == 1 ? '平均分': '复审分'}{teaching_asistant_score}</div>
</div>) }
>
{renderScore(teaching_asistant_score) }
</Tooltip> }
</span>
),
}])
{ <Tooltip placement="bottom" title={
getScoreTip(teaching_asistant_score,
<div>
<div>{record.ta_comment_count}名助教进行了评分</div>
<div>{that.state.ta_mode == 1 ? '平均分': '复审分'}{teaching_asistant_score}</div>
</div>) }
>
{renderScore(teaching_asistant_score) }
</Tooltip> }
</span>
),
})
}
if (that.state.anonymous_comment) {
/**
@ -242,36 +257,37 @@ function buildColumns(that, student_works) {
),
})
}
columns.push({
width: 72,
title: '最终成绩',
key: 'work_score',
dataIndex: 'work_score',
render: (work_score, record) => {
return (
<span>
<Tooltip title={
getScoreTip(work_score,
<div>
<div>{`${record.user_name}${record.user_login}`}</div>
{ record.ultimate_score ?
<div>最终调整成绩{record.work_score}</div> :
if (!niPingAndIsStudent) {
columns.push({
width: 72,
title: '最终成绩',
key: 'work_score',
dataIndex: 'work_score',
render: (work_score, record) => {
return (
<span>
<Tooltip title={
getScoreTip(work_score,
<div>
{ record.final_score && <div>作业评分{record.final_score}</div> }
{ record.late_penalty >= 0 && <div>迟交扣分{record.late_penalty}</div>}
{ record.absence_penalty >= 0 && <div>缺评扣分{record.absence_penalty}</div>}
{ record.appeal_penalty >= 0 && <div>违规匿评扣分{record.appeal_penalty}</div>}
<div>最终成绩{record.work_score}</div>
</div> }
</div>)
}>
{ renderScore(work_score) }
</Tooltip>
</span>
)
},
})
<div>{`${record.user_name}${record.user_login}`}</div>
{ record.ultimate_score ?
<div>最终调整成绩{record.work_score}</div> :
<div>
{ record.final_score && <div>作业评分{record.final_score}</div> }
{ record.late_penalty >= 0 && <div>迟交扣分{record.late_penalty}</div>}
{ record.absence_penalty >= 0 && <div>缺评扣分{record.absence_penalty}</div>}
{ record.appeal_penalty >= 0 && <div>违规匿评扣分{record.appeal_penalty}</div>}
<div>最终成绩{record.work_score}</div>
</div> }
</div>)
}>
{ renderScore(work_score) }
</Tooltip>
</span>
)
},
})
}
if (isAdminOrStudent || that.props.work_public == true) {
columns.push({
width: 92,

@ -5,6 +5,7 @@ import '../css/members.css'
import { WordsBtn } from 'educoder'
import axios from 'axios'
import InfiniteScroll from 'react-infinite-scroller';
import NoneData from "../coursesPublic/NoneData"
const Search =Input.Search;
const LIMIT = 15
@ -36,7 +37,7 @@ class ConnectProject extends Component{
this.connectProject(radioValue)
}
connectProject = (project_id) => {
let workId=this.props.work.homework_id;
let workId=this.work.homework_id;
const url = `/homework_commons/${workId}/student_works/relate_project.json`
axios.post(url, {
project_id: project_id
@ -75,6 +76,9 @@ class ConnectProject extends Component{
loading: false,
hasMore: result.data.projects.length != 0
})
if (page == 1) {
this.setState({ haveProjects: result.data.projects.length > 0 })
}
}
}).catch((error)=>{
console.log(error);
@ -84,11 +88,12 @@ class ConnectProject extends Component{
if (window.location.port == 3007) {
window.location.href = '/testbdweb.educoder.net/projects/new'
} else {
window.location.href = '/educoder.net/projects/new'
window.location.href = '/projects/new'
}
}
//关联项目
openConnectionProject=()=>{
openConnectionProject=(work)=>{
this.work = work;
this.fetchData()
this.setState({
project_flag:true
@ -104,10 +109,9 @@ class ConnectProject extends Component{
}
render(){
let {project_flag, projects, loading, hasMore }=this.state;
let {project_flag, projects, loading, hasMore, haveProjects }=this.state;
return(
<React.Fragment>
<WordsBtn style="blue" className={` font-16 ${this.props.className || ''}`} onClick={this.openConnectionProject}>关联项目</WordsBtn>
<Modal
visible={project_flag}
title="关联项目"
@ -120,7 +124,7 @@ class ConnectProject extends Component{
>
<div className="newupload_conbox clearfix">
{
projects && !!projects.length &&
(projects && !!projects.length || this.state.keyword) &&
<div>
<Search placeholder="请输入项目名称进行搜索" className="with100"
value={this.state.keyword} onInput={(e) => {this.setState({keyword: e.target.value})}}
@ -145,7 +149,11 @@ class ConnectProject extends Component{
</div>
}
{
(!projects || projects.length == 0) &&
haveProjects && projects.length == 0 &&
<NoneData></NoneData>
}
{
(!haveProjects) &&
<div className="edu-txt-center">
您当前尚未管理任何项目请先<WordsBtn style="blue" className="" onClick={this.toCreateProject}>创建项目</WordsBtn>
</div>

@ -9,6 +9,7 @@ import '../css/busyWork.css'
import CoursesListType from '../coursesPublic/CoursesListType'
import CommonWorkItem from './CommonWorkItem'
import PublishRightnow from './PublishRightnow'
import ConnectProject from './ConnectProject'
import { WordsBtn } from 'educoder'
import Modals from '../../modals/Modals'
@ -53,7 +54,9 @@ class commonWork extends Component{
let {page,search,order}=this.state;
this.getList(page,search,order);
}
openConnectionProject = (work) => {
this.refs['connectProject'].openConnectionProject(work)
}
// 新建
createCommonWork=(type)=>{
@ -338,6 +341,8 @@ class commonWork extends Component{
</div>
</div>
</div> */}
<ConnectProject ref="connectProject" {...this.props}></ConnectProject>
<Titlesearchsection
title={main_category_name}
@ -418,12 +423,14 @@ class commonWork extends Component{
<Spin size="large" spinning={this.state.isSpin}>
<Checkbox.Group style={{"width":"100%"}} onChange={this.onChangeSelect} value={checkBoxValues}>
<CommonWorkItem mainList={mainList} {...this.props} workType={workType} onItemClick={this.onItemClick}></CommonWorkItem>
<CommonWorkItem mainList={mainList} {...this.props} workType={workType} onItemClick={this.onItemClick}
openConnectionProject={this.openConnectionProject}
></CommonWorkItem>
</Checkbox.Group>
</Spin>
{
mainList && mainList.homeworks.length==0 && <NoneData></NoneData>
mainList && mainList.homeworks && mainList.homeworks.length==0 && <NoneData></NoneData>
}
{

@ -46,9 +46,9 @@ class CCommentItem extends Component{
let { item, commentIndex }=this.props;
const url = `/student_works/${studentWorkId}/cancel_appeal.json`
axios.post(url, { data: {
axios.post(url, {
score_id: item.id
}})
})
.then((response) => {
if (response.data.status == 0) {
this.showNotification('撤销成功')
@ -262,9 +262,21 @@ class CCommentItem extends Component{
return(
<div className="ccomment comment_item_cont df clearfix" key={item.id}>
<div className="J_Comment_Face fl">
<a href={`${_origin}/users/${item.user_login}`} target="_blank">
{item.image_url == '--' ?
<a href={`javascript:void(0)`} >
<img alt="用户头像" height="50"
src={`${getUrl()}/images/edu_user/anony.png`} width="50"/>
</a>
: <a href={`${_origin}/users/${item.user_login}`} target="_blank">
<img alt="用户头像" height="50"
src={`${getUrl()}/images/${item.image_url}`}
width="50"/>
</a>}
{/* <a href={`${_origin}/users/${item.user_login}`} target="_blank">
<img alt="用户头像" height="50" src={getImageUrl(`images/${item.image_url}`)} width="50"/>
</a>
</a> */}
</div>
<div className="t_content fl">

@ -9,7 +9,6 @@ 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(){
@ -44,35 +43,14 @@ class CoursesBanner extends Component {
modalsBottomval: "",
antIcon:false,
coursedata:undefined,
user_phone_binded:false,
isRenders:false,
showTrial:false,
}
}
componentDidMount() {
this.onloadupdatabanner()
try {
if(this.props.current_user!==undefined){
this.setState({
user_phone_binded :this.props.current_user.user_phone_binded,
})
}
}catch (e) {
console.log("CoursesBanner 60")
console.log(e)
}
}
componentDidUpdate = (prevProps) => {
if(prevProps.current_user!=this.props.current_user){
if(this.props.current_user!==undefined){
this.setState({
user_phone_binded :this.props.current_user.user_phone_binded,
})
}
}
}
onloadupdatabanner=()=>{
this.updatabanner()
}
@ -82,19 +60,10 @@ class CoursesBanner extends Component {
axios.get(url).then((result) => {
if( result!=undefined){
let data = result.data;
if(result.data.status === 407){
this.setState({
isRenders:true,
coursedata: data,
showTrial:false,
})
}else{
this.setState({
coursedata: data,
showTrial:true,
})
}
}else{
this.onloadupdatabanner()
}
@ -352,11 +321,10 @@ class CoursesBanner extends Component {
}
render() {
let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state;
let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon} = this.state;
return (
<div>
<Trialapplication {...this.state} user_phone_binded={user_phone_binded} ></Trialapplication>
{
coursedata === undefined || coursedata.status===401? <div id="course_info_1309" className="courseHead" style={{height: '206px'}}></div>:<div id="course_info_1309" className="courseHead" style={{height: '206px'}}>
@ -390,7 +358,7 @@ class CoursesBanner extends Component {
{
coursedata===undefined || coursedata.status===401 || coursedata.status===407?"":
<Tooltip placement="bottom" title={coursedata&&coursedata.name.length<38?"":coursedata.name}>
<Tooltip placement="bottom" title={coursedata&&coursedata.name && coursedata.name.length<38?"":coursedata.name}>
<span className="font-24 fl bannername">{coursedata.name}</span>
</Tooltip>

@ -83,7 +83,7 @@ class GraduationTasksSubmitnew extends Component{
}
handleSubmit=(e) => {
console.log("86");
let {fileList,selectmemberslist,workslist}=this.state;
if(fileList.length === 0){
@ -91,7 +91,7 @@ class GraduationTasksSubmitnew extends Component{
Modalstype:true,
Modalstopval:'请上传附件!',
Loadtype:true,
ModalCancel:this.cancelAttachment
ModalSave:this.cancelAttachment,
})
@ -119,7 +119,7 @@ class GraduationTasksSubmitnew extends Component{
listid.push(list.response.id)
}
e.preventDefault();
// e.preventDefault();
if( GraduationTasksnewtype===true){
this.props.form.validateFields((err, values) => {
if (!err) {
@ -408,7 +408,27 @@ class GraduationTasksSubmitnew extends Component{
selectmemberslist:selects
})
}
onSearchKeywordKeyUp = (e) => {
if (e.keyCode === 13) {
}
}
onSearckeyd=(e)=>{
if(e.keyCode){
let {search} = this.state;
this.searchList(search,1,10)
}
}
onSearchKeywordKeyUps= (e)=>{
if(e.keyCode=== 13){
}
}
onKeywordSearchKeyDown = (e) => {
if(e.keyCode == 13) {
return false;
}
}
gocannel=()=>{
window.history.go(-1)
}
@ -483,7 +503,8 @@ render(){
<a className="color-grey-6 fr font-16 ml30 mt10 mr20" onClick={this.goback}>返回</a>
</div>
<Form labelCol={{ span: 5 }} wrapperCol={{ span: 12 }} onSubmit={GraduationTasksnewtype===true?this.handleSubmit:""} >
{/*<Form labelCol={{ span: 5 }} wrapperCol={{ span: 12 }} onSubmit={GraduationTasksnewtype===true?this.handleSubmit:"return false"}*/}
{/*>*/}
<div className="stud-class-set pd20 coursenavbox edu-back-white">
<style>{`
.uploadBtn.ant-btn {
@ -536,6 +557,16 @@ render(){
>
<div>
<div className={"fl ml20"}>成员要求25</div>
<input type="text" style={{width:"0px",height:"0px",display:"none"}} onKeyUp={(e) => this.onSearchKeywordKeyUp(e)}
onkeydown={(e)=>this.onSearchKeywordKeyUps(e)}/>
<Search
style={{width:"0px",height:"0px",display:"none"}}
onKeyUp={(e) => this.onSearchKeywordKeyUp(e)}
onkeydown={(e)=>this.onSearchKeywordKeyUps(e)}
onPressEnter={this.onKeywordSearchKeyDown}
autoComplete="off"
></Search>
<Search
className={"fl mt5 ml20"}
style={{width:"270px"}}
@ -544,8 +575,11 @@ render(){
value={search}
onInput={this.inputSearchValue}
onSearch={this.searchValue}
onPressEnter={this.onKeywordSearchKeyDown}
onKeyUp={(e) => this.onSearckeyd(e)}
autoComplete="off"
></Search>
<input type="text" style={{display: "none",height:0, width: 0, border: "none"}}/>
</div>
@ -652,11 +686,11 @@ render(){
<Form.Item>
<div className="clearfix mt30 mb30">
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">提交</Button>
<Button type="primary" htmlType="submit" onClick={this.handleSubmit} className="defalutSubmitbtn fl mr20">提交</Button>
<a onClick={this.gocannel} className="defalutCancelbtn fl">取消</a>
</div>
</Form.Item>
</Form>
{/*</Form>*/}
</div>
</div>

@ -1,5 +1,5 @@
import React,{ Component } from "react";
import { Input,Checkbox,Table, Pagination, Modal,Menu ,Spin} from "antd";
import { Input,Checkbox,Table, Pagination, Modal,Menu ,Spin, Tooltip} from "antd";
import ClipboardJS from 'clipboard'
import '../css/Courses.css'
import '../css/members.css'
@ -31,14 +31,6 @@ const dataSource = [{
const buildColumns = (that) => {
const columns=[{
title: '',
dataIndex: 'check',
key: 'check',
render: (text, item) => {
return <Checkbox value={item.course_member_id}></Checkbox>
},
width:"5%"
},{
title: '序号',
dataIndex: 'id',
key: 'id',
@ -71,6 +63,19 @@ const buildColumns = (that) => {
width:"50%",
className:"color-grey-6"
}];
const isAdmin = that.props.isAdmin()
if (isAdmin) {
columns.unshift({
title: '',
dataIndex: 'check',
key: 'check',
render: (text, item) => {
return <Checkbox value={item.course_member_id}></Checkbox>
},
width:"5%"
})
}
return columns;
}
@ -445,7 +450,14 @@ class studentsList extends Component{
<span className="color-orange font-16">
{invite_code}
</span>
<i class="iconfont icon-fuzhi font-14 ml10 copybtn" style={{color: '#FF6800', cursor: 'pointer', verticalAlign: 'baseline'}} data-clipboard-text={invite_code} ></i>
<Tooltip title={<div>
<div>成员可以通过邀请码主动加入课堂</div>
<div>点击立刻复制邀请码</div>
</div>}>
<span>
<i class="iconfont icon-fuzhi font-14 ml10 copybtn" style={{color: '#FF6800', cursor: 'pointer', verticalAlign: 'baseline'}} data-clipboard-text={invite_code} ></i>
</span>
</Tooltip>
</React.Fragment>
}
@ -528,7 +540,7 @@ class studentsList extends Component{
total_count > 0 ?
<div className="mt20 edu-back-white padding20">
<div className="clearfix stu_head" style={{paddingLeft: '15px'}}>
<Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} </Checkbox>
{isAdmin && <Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} </Checkbox>}
<div className="studentList_operation_ul">
{isAdmin && <li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onDelete}>删除</a></li>}
{isAdmin && <li className="li_line drop_down">

@ -32,13 +32,6 @@ function buildColumns(that) {
const isAdminOrTeacher = that.props.isAdminOrTeacher()
const { course_groups } = that.state
const columns = [{
title: '',
dataIndex: 'course_member_id',
key: 'course_member_id',
render: (content, item, index) => {
return <Checkbox value={content}></Checkbox>
}
},{
title: '序号',
// dataIndex: 'name',
key: 'index',
@ -112,7 +105,8 @@ function buildColumns(that) {
}
,
});
if (that.hasGraduationModule()) {
const hasGraduationModule = that.hasGraduationModule()
if (hasGraduationModule) {
columns.push({
title: '答辩组',
key: 'graduation_group',
@ -152,6 +146,16 @@ function buildColumns(that) {
},
})
}
if(isAdmin && hasGraduationModule) {
columns.unshift({
title: '',
dataIndex: 'course_member_id',
key: 'course_member_id',
render: (content, item, index) => {
return <Checkbox value={content}></Checkbox>
}
})
}
return columns
}
@ -181,7 +185,7 @@ class studentsList extends Component{
searchValue:e.target.value
})
}
// approval 2 - 拒绝
onAgree = (record, approval = 1) => {
const courseId = this.props.match.params.coursesId
@ -194,7 +198,7 @@ class studentsList extends Component{
})
.then((response) => {
if (response.data.status == 0) {
this.props.showNotification(`${approval ? '同意' : '拒绝'}`)
this.props.showNotification(`${approval == 1? '同意' : '拒绝'}`)
this.fetchAll(1)
}
})
@ -212,14 +216,22 @@ class studentsList extends Component{
})
this.fetchAll(1);
const isAdminOrTeacher = this.props.isAdminOrTeacher()
const isAdmin = this.props.isAdmin()
isAdminOrTeacher && this.getGroupList();
this.getCourseGroups();
on('addTeacherSuccess', this.addTeacherSuccessListener)
isAdmin && on('updateNavSuccess', this.updateNavSuccess)
}
componentWillUnmount() {
off('addTeacherSuccess', this.addTeacherSuccessListener)
const isAdmin = this.props.isAdmin()
isAdmin && off('updateNavSuccess', this.updateNavSuccess)
}
updateNavSuccess = () => {
this.getCourseGroups()
}
addTeacherSuccessListener = (e, data) => {
// const params = JSON.parse(data)
@ -495,6 +507,7 @@ class studentsList extends Component{
})
}
const isAdminOrTeacher = this.props.isAdminOrTeacher()
const hasGraduationModule = this.hasGraduationModule()
return(
<React.Fragment>
@ -540,9 +553,9 @@ class studentsList extends Component{
`}</style>
<div className="mt20 edu-back-white padding20 teacherList">
<div className="clearfix stu_head" style={{paddingLeft: '15px'}}>
<Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} </Checkbox>
{ isAdmin && hasGraduationModule && <Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} </Checkbox> }
{ <div className="studentList_operation_ul">
{ this.hasGraduationModule() && isAdminOrTeacher && <li className="li_line drop_down">
{ hasGraduationModule && isAdminOrTeacher && <li className="li_line drop_down">
加入答辩组<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"0px","left":"unset", minWidth: '222px'}}>

@ -177,9 +177,7 @@ class EducoderLogin extends Component {
"align-items": "center",
"width": "100%",
}}>
<div className="font-14 color-grey-9 " style={{marginTop:"15px"}}>© 2019 EduCoder 湘ICP备17009477号 Trustie & IntelliDE inside</div>
<div className="font-14 color-grey-9 " style={{marginTop:"15px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div>
</div>
</div>

@ -170,6 +170,7 @@ class NewHeader extends Component {
submitapplications:false,
isRender:false,
isRenders:false,
user_phone_binded:false,
showTrial:false,
}
console.log("176")
@ -207,7 +208,20 @@ class NewHeader extends Component {
}
componentDidUpdate = (prevProps) => {
if(prevProps.user!=this.props.user){
// console.log("216")
// console.log(prevProps.user);
// console.log(this.props.user);
if(this.props.user !== undefined){
this.setState({
user_phone_binded :this.props.user.user_phone_binded,
})
}
}
}
componentWillReceiveProps(newProps, oldProps) {
this.setState({
user:newProps.user
@ -567,6 +581,7 @@ submittojoinclass=(value)=>{
user,
isRender,
isRenders,
user_phone_binded,
}=this.state;
/*
用户名称 用户头像url
@ -588,11 +603,11 @@ submittojoinclass=(value)=>{
}else {
activeIndex = true;
}
// join_course_url: "https://www.educoder.net/courses/join_course_multi_role"
// join_project_url: "https://www.educoder.net/applied_project/applied_project_info"
// rolearr:["",""],
// console.log()
console.log("618");
console.log(user_phone_binded);
return (
<div className="newHeader" id="nHeader">
@ -612,7 +627,7 @@ submittojoinclass=(value)=>{
{/* />*/}
{/* :""*/}
{/*}*/}
<Trialapplication {...this.state} user_phone_binded={user_phone_binded} ></Trialapplication>
<div className="educontent clearfix">
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/}
<a href="/">

@ -258,7 +258,6 @@ export function TPMIndexHOC(WrappedComponent) {
if (response.data) {
this.initCommonState(response.data)
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,
@ -276,7 +275,7 @@ export function TPMIndexHOC(WrappedComponent) {
})
}
render() {
let{Headertop,Footerdown,user_phone_binded}=this.state;
let{Headertop,Footerdown}=this.state;
const common = {
isSuperAdmin:this.isSuperAdmin,
isAdminOrCreator:this.isAdminOrCreator,
@ -290,13 +289,7 @@ export function TPMIndexHOC(WrappedComponent) {
}
return (
<div>
{/*{*/}
{/* user_phone_binded === undefined?*/}
{/* ""*/}
{/* :*/}
{/* <Trialapplication {...this.state} user_phone_binded={user_phone_binded} setTrialapplication = {this.setTrialapplication} ></Trialapplication>*/}
{/*}*/}
<SiderBar
Headertop={Headertop}

Loading…
Cancel
Save