caishi 6 years ago
commit 1c3c85b480

File diff suppressed because one or more lines are too long

@ -106,6 +106,7 @@
position: absolute; position: absolute;
top: -30px; top: -30px;
left: -30px; left: -30px;
left: -24px;
z-index: 999; z-index: 999;
} }

@ -484,7 +484,7 @@ class Comments extends Component {
const goldRewardInputErrorObj = goldRewardInputError ? {'error': 'error'} : {} const goldRewardInputErrorObj = goldRewardInputError ? {'error': 'error'} : {}
return ( return (
<div className="fit -scroll"> <div className="fit -scroll" style={{ 'overflow-x': 'hidden'}}>
{ usingAntdModal ? <Modals { usingAntdModal ? <Modals

@ -0,0 +1,78 @@
import React,{ Component } from "react";
import {Tooltip, Modal, Input } from 'antd'
import moment from 'moment'
import { getUrl, WordsBtn } from 'educoder'
import axios from 'axios'
class AddDirModal extends Component{
constructor(props){
super(props);
this.state = {
}
}
onInput = (e) => {
this.setState({
inputValue: e.target.value
})
}
open = () => {
this.setState({ visible: true, inputValue: '' })
}
onSave = () => {
let coursesId = this.props.match.params.coursesId;
const url = `/courses/${coursesId}/boards.json`
let { inputValue } = this.state;
axios.post(url,{
name: inputValue
}).then((response)=>{
if (response.data.status == 0) {
this.onCancel()
this.props.showNotification('添加成功')
this.props.addSuccess && this.props.addSuccess()
}
}).catch((error)=>{
console.log(error)
})
}
onCancel = () => {
this.setState({ visible: false, inputValue: '' })
}
render(){
let { inputValue, visible } = this.state;
const { title } = this.props;
return(
<Modal
keyboard={false}
title={title}
visible={visible}
className={"Navmodal"}
closable={false}
footer={null}
destroyOnClose={true}
centered={true}
>
<div className="df">
<div className={"fl mt5"}>{this.props.label}</div>
<Input placeholder={this.props.inputPlaceholder || '示例讨论小组A'}
className={"input-flex-35 greyInput fl"}
maxLength="60"
value={inputValue}
onInput={this.onInput}
/>
</div>
{/* {this.state.NavmodalValuetype===true?<span className={"color-red"}>
{this.state.NavmodalValues}
</span>:""} */}
{/* this.state.NavmodalValuetype===true?"clearfix mt20 edu-txt-center": */}
<div className={"clearfix mt50 edu-txt-center"}>
<a className="task-btn mr30" onClick={this.onCancel}>取消</a>
<a className="task-btn task-btn-orange" onClick={this.onSave}>确定</a>
</div>
</Modal>
)
}
}
export default AddDirModal;

@ -3,13 +3,13 @@ import React,{ Component } from "react";
import { import {
Form, Input, InputNumber, Switch, Radio, Form, Input, InputNumber, Switch, Radio,
Slider, Button, Upload, Icon, Rate, Checkbox, message, Slider, Button, Upload, Icon, Rate, Checkbox, message,
Row, Col, Select, Modal Row, Col, Select, Modal, Divider
} from 'antd'; } from 'antd';
import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor';
import axios from 'axios' import axios from 'axios'
import './board.css' import './board.css'
import "../common/formCommon.css" import "../common/formCommon.css"
import AddDirModal from './AddDirModal'
import { RouteHOC } from './common.js' import { RouteHOC } from './common.js'
import CBreadcrumb from '../common/CBreadcrumb' import CBreadcrumb from '../common/CBreadcrumb'
import {getUploadActionUrl, bytesToSize, uploadNameSizeSeperator, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll} from 'educoder'; import {getUploadActionUrl, bytesToSize, uploadNameSizeSeperator, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll} from 'educoder';
@ -29,14 +29,14 @@ class BoardsNew extends Component{
boards: [] boards: []
} }
} }
componentDidMount = () => { addSuccess = () => {
this.fetchBoards()
const topicId = this.props.match.params.topicId }
fetchBoards = () => {
const isEdit = this.isEdit
const boardId = this.props.match.params.boardId const boardId = this.props.match.params.boardId
const boardsUrl = `/courses/board_list.json?board_id=${boardId}`
const isEdit = !!topicId
const boardsUrl = `/courses/board_list.json?board_id=${boardId}`
axios.get(boardsUrl, { }) axios.get(boardsUrl, { })
.then((response) => { .then((response) => {
if (response.data.status == 0) { if (response.data.status == 0) {
@ -57,8 +57,17 @@ class BoardsNew extends Component{
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
}
componentDidMount = () => {
const topicId = this.props.match.params.topicId
const isEdit = !!topicId
this.isEdit = isEdit this.isEdit = isEdit
const boardId = this.props.match.params.boardId
this.fetchBoards()
if (isEdit) { if (isEdit) {
const url = `/messages/${topicId}.json` const url = `/messages/${topicId}.json`
axios.get(url, { axios.get(url, {
@ -260,6 +269,12 @@ class BoardsNew extends Component{
return( return(
<div className="newMain "> <div className="newMain ">
<AddDirModal {...this.props}
title="添加目录"
label="目录名称"
ref="addDirModal"
addSuccess={this.addSuccess}
></AddDirModal>
<style>{` <style>{`
.courseForm .ant-form { .courseForm .ant-form {
} }
@ -312,7 +327,17 @@ class BoardsNew extends Component{
{getFieldDecorator('select_board_id', { {getFieldDecorator('select_board_id', {
// initialValue: '3779', // initialValue: '3779',
})( })(
<Select style={{ width: 230 }}> <Select style={{ width: 230 }}
dropdownRender={menu => (
<div>
{menu}
<Divider style={{ margin: '4px 0' }} />
<div style={{ padding: '8px', cursor: 'pointer' }} onMouseDown={() => this.refs['addDirModal'].open()}>
<Icon type="plus" /> 添加目录
</div>
</div>
)}
>
{this.state.boards.map(item => { {this.state.boards.map(item => {
return ( return (
<Option value={item.id}>{item.name}</Option> <Option value={item.id}>{item.name}</Option>

@ -71,9 +71,10 @@ function buildColumns(that, student_works) {
width: 90, width: 90,
dataIndex: 'user_name', dataIndex: 'user_name',
key: 'user_name', key: 'user_name',
// width: '110px',
render: (text, record) => ( render: (text, record) => (
<div style={{ <div style={{
width: '110px',
overflow: 'hidden', overflow: 'hidden',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
whiteSpace: 'nowrap' whiteSpace: 'nowrap'

@ -241,16 +241,18 @@ class CommonReply extends Component{
.course-message .commentInput { .course-message .commentInput {
padding-bottom: 56px !important; padding-bottom: 56px !important;
} }
.course-message .commentInput.mockInputWrapper { .course-message .commentInput.mockInputWrapper {
padding-bottom: 30px !important; padding-bottom: 20px !important;
} }
.course-message .memoReplies { .course-message .memoReplies {
border-top: 1px solid #EDEDED; /* border-top: 1px solid #EDEDED; */
padding-bottom: 30px;
} }
`}</style> `}</style>
<MemoDetailMDEditor ref="editor" memo={memo} usingMockInput={true} placeholder="说点什么" <MemoDetailMDEditor ref="editor" memo={memo} usingMockInput={true} placeholder="说点什么"
height={160} showError={true} height={160} showError={true}
replyComment={this.replyComment} replyComment={this.replyComment}
commentsLength={comments ? comments.length : 0}
></MemoDetailMDEditor> ></MemoDetailMDEditor>
{/* bor-bottom-greyE */} {/* bor-bottom-greyE */}
<div className="padding40 memoReplies commentsDelegateParent" <div className="padding40 memoReplies commentsDelegateParent"

@ -22,6 +22,7 @@ class Associationmodel extends Component{
projects:undefined, projects:undefined,
projectvalue:undefined, projectvalue:undefined,
projectvaluetype:false, projectvaluetype:false,
searchtypes:false
} }
} }
@ -38,10 +39,10 @@ class Associationmodel extends Component{
search: search search: search
} }
}).then((result)=>{ }).then((result)=>{
console.log(result)
if(result.status===200){ if(result.status===200){
this.setState({ this.setState({
projects:result.data.projects projects:result.data.projects,
searchtypes:search===undefined&&result.data.projects.length==0?true:false
}) })
} }
@ -58,13 +59,11 @@ class Associationmodel extends Component{
goback=()=>{ goback=()=>{
this.props.funlist()
this.props.Cancel()
console.log(this.props)
this.setState({ this.setState({
Modalstype:false, Modalstype:false,
}) })
this.props.funlist()
this.props.Cancel()
} }
@ -80,13 +79,13 @@ class Associationmodel extends Component{
if(result.status===200){ if(result.status===200){
if(result.data.status===0){ if(result.data.status===0){
this.setState({ // this.setState({
Modalstype:true, // Modalstype:true,
Modalstopval:result.data.message, // Modalstopval:result.data.message,
ModalSave:this.goback, // ModalSave:this.goback,
loadtype:true // loadtype:true
}) // })
this.props.funlist() this.goback
} }
} }
@ -96,7 +95,9 @@ class Associationmodel extends Component{
}) })
} }
Saves=()=>{ Saves=()=>{
let {projectvalue}=this.state; let {projectvalue,searchtypes}=this.state
if(searchtypes===false){
if(projectvalue===undefined||projectvalue===""){ if(projectvalue===undefined||projectvalue===""){
this.setState({ this.setState({
projectvaluetype:true, projectvaluetype:true,
@ -114,30 +115,26 @@ class Associationmodel extends Component{
project_id: projectvalue project_id: projectvalue
} }
}).then((result)=>{ }).then((result)=>{
if(result.status===200){ if(result.status===200){
if(result.data.is_relate===false){ if(result.data.is_relate===false){
this.setSaves() this.setSaves()
}else{ }else{
this.setState({ this.setState({
Modalstype:true, Modalstype:true,
Modalstopval:"该项目已被"+result.data.relate_user+"关联", Modalstopval:"该项目已被"+result.data.relate_user+"关联",
ModalSave:this.ModalSave, ModalSave:this.ModalSave,
loadtype:true loadtype:true
}) })
} }
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error) console.log(error)
}) })
} }else{
this.goback()
}
}
onChange = (e) => { onChange = (e) => {
@ -190,7 +187,7 @@ class Associationmodel extends Component{
destroyOnClose={true} destroyOnClose={true}
> >
<div className="task-popup-content"> <div className="task-popup-content">
<p className="task-popup-text-center font-16"> {this.state.searchtypes===false? <p className="task-popup-text-center font-16">
<Search <Search
placeholder="请输入项目名称进行搜索" placeholder="请输入项目名称进行搜索"
@ -201,31 +198,55 @@ class Associationmodel extends Component{
autoComplete="off" autoComplete="off"
></Search> ></Search>
</p> </p>:""}
<style>
<div className={"Association mb20"}> {
`
.project_namestyle{
width: 470px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
`
}
</style>
{this.state.searchtypes===false?<div className={"Association mb20"} style={{
paddingLeft:'0px'
}}>
<RadioGroup onChange={this.onChange} value={projectvalue}> <RadioGroup onChange={this.onChange} value={projectvalue}>
{projects&&projects.map((item,key)=>{ {projects&&projects.map((item,key)=>{
return( return(
<div key={key} style={{ <div key={key} style={{
width: '375px',
height: '30px' height: '30px'
}}> }}>
<Radio value={item.project_id} className="fl "></Radio> <Radio value={item.project_id} className="fl "></Radio>
<div className={"fl ml5"}>{item.project_name}</div> <div className={"fl ml5 project_namestyle"}>{item.project_name}</div>
</div> </div>
) )
})} })}
</RadioGroup> </RadioGroup>
</div> </div>:
<div style={{
paddingLeft:'0px'
}}>
<div style={{
margin:'0px 20%'
}}>
你当前尚未管理任何项目请先 <span><a style={{color:'#1890ff'}} href={"/projects/new"}>创建项目</a> </span>
</div>
</div>}
{projectvaluetype===true?<span className={"color-red ml20 "}>请先选择项目</span>:""} {projectvaluetype===true?<span className={"color-red ml20 "}>请先选择项目</span>:""}
<div className="clearfix mt30 edu-txt-center mb10"> <div className="clearfix mt25 edu-txt-center mb10">
<a className="task-btn color-white mr80" onClick={this.props.Cancel}>取消</a> <a className="task-btn color-white mr80" onClick={this.props.Cancel}>取消</a>
<a className="task-btn task-btn-orange" onClick={this.Saves}>确认</a> <a className="task-btn task-btn-orange" onClick={this.Saves}>确认</a>
</div> </div>

@ -613,7 +613,7 @@ class Selectsetting extends Component{
{item.name} {item.name}
</span> </span>
<span className="color656565 mt2 color-grey-6 font-12 mr8"> <span className="color656565 mt2 color-grey-6 font-12 mr8">
{item.response===undefined?"":isNaN(this.props.bytesToSize(item.response.filesize))?"":this.props.bytesToSize(item.response.filesize)} {item.response===undefined?"":isNaN(this.props.bytesToSize(item.response.filesize))?"123":this.props.bytesToSize(item.response.filesize)}
</span> </span>
<i className="font-14 iconfont icon-guanbi " <i className="font-14 iconfont icon-guanbi "
id={item.response===undefined?"":item.response.id} id={item.response===undefined?"":item.response.id}

@ -1314,8 +1314,8 @@ a.white-btn.use_scope-btn:hover{
.Association{ .Association{
width: 100%; width: 100%;
height: 400px; height: 240px;
padding: 20px; margin-top: 14px;
overflow: auto; overflow: auto;
} }
@ -1539,4 +1539,4 @@ input.ant-input-number-input:focus {
position: absolute; position: absolute;
left: -95px; left: -95px;
top:120px; top:120px;
} }

@ -98,7 +98,7 @@ class SingleEditor extends Component{
} }
} }
if(!answerArray || answerArray.length == 0) { if(!answerArray || answerArray.length == 0) {
this.props.showNotification('请先点击本选择题的正确选项'); return; this.props.showNotification('请先点击选择本选择题的正确选项'); return;
} }
if(!question_title) { if(!question_title) {
this.props.showNotification('请先输入题目题干'); return; this.props.showNotification('请先输入题目题干'); return;

@ -2,7 +2,7 @@ import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Spin,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Spin,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import { WordsBtn,getUrl } from 'educoder'; import { WordsBtn,getUrl ,bytesToSize} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
const Search = Input.Search; const Search = Input.Search;
@ -80,7 +80,8 @@ class GraduationTasksSubmitedit extends Component{
let workId=this.props.match.params.work_Id; let workId=this.props.match.params.work_Id;
let {workslist}=this.state let {workslist}=this.state
let task_id=workslist&&workslist.task_id; let task_id=workslist&&workslist.task_id;
window.location.href="/courses/"+coursesId+"/graduation_tasks/"+task_id+"/"+workId+"/works/edit"; // window.location.href="/courses/"+coursesId+"/graduation_tasks/"+task_id+"/"+workId+"/works/edit";
window.location.href="/courses/"+coursesId+"/graduation_tasks/"+workId+"/appraise";
} }
handleSubmit=(e) => { handleSubmit=(e) => {
@ -248,7 +249,7 @@ class GraduationTasksSubmitedit extends Component{
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
let {attachments,fileList}=this.state; let {attachments,fileList}=this.state;
const url = `/attachments/${file.uid===undefined?file.id:file.uid}.json` const url = `/attachments/${file}.json`
axios.delete(url, { axios.delete(url, {
}) })
.then((response) => { .then((response) => {
@ -576,7 +577,7 @@ class GraduationTasksSubmitedit extends Component{
{item.name} {item.name}
</span> </span>
<span className="color656565 mt2 color-grey-6 font-12 mr8"> <span className="color656565 mt2 color-grey-6 font-12 mr8">
{item.response===undefined?"":isNaN(this.props.bytesToSize(item.response.filesize))?"":this.props.bytesToSize(item.response.filesize)} {item.response===undefined?"":bytesToSize(item.size)}
</span> </span>
<i className="font-14 iconfont icon-guanbi " <i className="font-14 iconfont icon-guanbi "
id={item.response===undefined?"":item.response.id} id={item.response===undefined?"":item.response.id}
@ -592,7 +593,9 @@ class GraduationTasksSubmitedit extends Component{
{workslist&&workslist.task_type===1?"": {workslist&&workslist.task_type===1?"":
<div className="stud-class-set pd20 coursenavbox edu-back-white"> <div className="stud-class-set pd20 coursenavbox edu-back-white"
style={{borderTop:'1px solid #ccc'}}
>
<Form.Item <Form.Item
label="小组成员" label="小组成员"
@ -632,6 +635,7 @@ class GraduationTasksSubmitedit extends Component{
<div className={"members fl"} <div className={"members fl"}
style={{paddingLeft: '9px'}}
onScroll={this.contentViewScroll}> onScroll={this.contentViewScroll}>
<CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}> <CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}>
@ -653,9 +657,7 @@ class GraduationTasksSubmitedit extends Component{
}) })
} }
disabled={item.commit_status===true?true:false} className="fl "></Checkbox> disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<Tooltip placement="bottom" title={item.user_name}> <div className={"fl ml5 fonthidden width87"} style={{width: '70px'}} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width87"} style={{width: '70px'}}>{item.user_name}</div>
</Tooltip>
<div className={"fl ml5 fonthidden width87 color-grey-9"} style={{width: '70px'}}>{item.group_name}</div> <div className={"fl ml5 fonthidden width87 color-grey-9"} style={{width: '70px'}}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"} style={{width: '70px'}}>{item.student_id}</div> <div className={"fl ml5 color-grey-9 fonthidden width87"} style={{width: '70px'}}>{item.student_id}</div>
<div className={"fl ml20"}>{item.commit_status===false?<span className={"color-orange"}>已提交</span> :""}</div> <div className={"fl ml20"}>{item.commit_status===false?<span className={"color-orange"}>已提交</span> :""}</div>
@ -680,12 +682,10 @@ class GraduationTasksSubmitedit extends Component{
height: '30px', height: '30px',
display:item.user_name===undefined?"none":"" display:item.user_name===undefined?"none":""
}}> }}>
<Tooltip placement="bottom" title={item.user_name}> <div className={"fl ml5 fonthidden width87"} style={{width: '50px'}} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width87"} style={{width: '50px'}}>{item.user_name}</div>
</Tooltip>
<div className={"fl ml5 fonthidden width87 color-grey-9"}>{item.group_name}</div> <div className={"fl ml5 fonthidden width87 color-grey-9"}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"}>{item.student_id}</div> <div className={"fl ml5 color-grey-9 fonthidden width87"}>{item.student_id}</div>
{key>0?<div className={"fl ml20"}><i className={"iconfont icon-shanchudiao fl "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""} {key>0?<div className={"fr ml20"}><i className={"iconfont icon-shanchudiao fl color-grey-9"} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""}
</div> </div>
) )
})} })}

@ -2,7 +2,7 @@ import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Tooltip,Spin} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Tooltip,Spin} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import { WordsBtn,getUrl,getImageUrl} from 'educoder'; import { WordsBtn,getUrl,getImageUrl,bytesToSize} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
const Search = Input.Search; const Search = Input.Search;
@ -263,7 +263,7 @@ class GraduationTasksSubmitnew extends Component{
} }
deleteAttachment = (file) => { deleteAttachment = (file) => {
const url = `/attachments/${file.response ? file.response.id : file.uid}.json` const url = `/attachments/${file}.json`
axios.delete(url, { axios.delete(url, {
}) })
.then((response) => { .then((response) => {
@ -446,7 +446,7 @@ render(){
multiple: true, multiple: true,
// https://github.com/ant-design/ant-design/issues/15505 // https://github.com/ant-design/ant-design/issues/15505
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
// showUploadList: false, showUploadList: false,
action: `${getUrl()}/api/attachments.json`, action: `${getUrl()}/api/attachments.json`,
onChange: this.handleChange, onChange: this.handleChange,
onRemove: this.onAttachmentRemove, onRemove: this.onAttachmentRemove,
@ -545,12 +545,46 @@ render(){
</Button> </Button>
<span className={"color-grey-9"}>(单个文件150M以内)</span> <span className={"color-grey-9"}>(单个文件150M以内)</span>
</Upload> </Upload>
</div> <style>
{
`
.maxwidth500{
max-width:500px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #05101a;
}
`
}
</style>
{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{
return(
<p className="color-grey mt10" key={key} >
<a className="color-grey fl">
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>
</a>
<span className="mr12 color9B9B maxwidth500 fl" length="58">
{item.name}
</span>
<span className="color656565 mt2 color-grey-6 font-12 mr8">
{item.response===undefined?"":bytesToSize(item.size)}
</span>
<i className="font-14 iconfont icon-guanbi "
id={item.response===undefined?"":item.response.id}
aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}></i>
</p>
)
})}
</div>
{workslist&&workslist.task_type===1?"": {workslist&&workslist.task_type===1?"":
<div className="stud-class-set pd20 coursenavbox edu-back-white"> <div className="stud-class-set pd20 coursenavbox edu-back-white"
style={{borderTop:'1px solid #ccc'}}
>
<Form.Item <Form.Item
label="小组成员" label="小组成员"
@ -605,6 +639,7 @@ render(){
<div className={"ml20"} style={{width:"100%"}}> <div className={"ml20"} style={{width:"100%"}}>
<div className={"members fl"} <div className={"members fl"}
style={{paddingLeft: '9px'}}
onScroll={this.contentViewScroll}> onScroll={this.contentViewScroll}>
<CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}> <CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}>
{memberslist===undefined?"":memberslist.members.length===0? {memberslist===undefined?"":memberslist.members.length===0?
@ -626,9 +661,7 @@ render(){
}) })
} }
disabled={item.commit_status===true?true:false} className="fl "></Checkbox> disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<Tooltip placement="bottom" title={item.user_name}> <div className={"fl ml5 fonthidden width87"} title={item.user_name} >{item.user_name}</div>
<div className={"fl ml5 fonthidden width87"}>{item.user_name}</div>
</Tooltip>
<div className={"fl ml5 fonthidden width87 color-grey-9"} title={item.group_name}>{item.group_name}</div> <div className={"fl ml5 fonthidden width87 color-grey-9"} title={item.group_name}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"} title={item.student_id}>{item.student_id}</div> <div className={"fl ml5 color-grey-9 fonthidden width87"} title={item.student_id}>{item.student_id}</div>
<div className={"fl ml20"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div> <div className={"fl ml20"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div>
@ -657,12 +690,10 @@ render(){
height: '30px', height: '30px',
display:item.user_name===undefined?"none":"" display:item.user_name===undefined?"none":""
}}> }}>
<Tooltip placement="bottom" title={item.user_name}> <div className={"fl ml5 fonthidden width87"} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width87"}>{item.user_name}</div>
</Tooltip>
<div className={"fl ml5 fonthidden width87 color-grey-9"}>{item.group_name}</div> <div className={"fl ml5 fonthidden width87 color-grey-9"}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"}>{item.student_id}</div> <div className={"fl ml5 color-grey-9 fonthidden width87"}>{item.student_id}</div>
{key>0?<div className={"fl ml20"}><i className={"iconfont icon-shanchudiao fl "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""} {key>0?<div className={"fr ml20"}><i className={"iconfont icon-shanchudiao fl color-grey-9 "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""}
</div> </div>
) )

@ -213,7 +213,7 @@ class GraduationTasksappraise extends Component{
{/*<span className={"mr10 color9B9B"}>15M</span>*/} {/*<span className={"mr10 color9B9B"}>15M</span>*/}
{/*</div>*/} {/*</div>*/}
{datalist&&datalist.attachments.map((item,key)=>{ {datalist&& datalist.attachments && datalist.attachments.map((item,key)=>{
return( return(
<div className="color-grey" key={key}> <div className="color-grey" key={key}>
<a className="color-grey ml20"> <a className="color-grey ml20">
@ -258,7 +258,7 @@ class GraduationTasksappraise extends Component{
</div> </div>
<div className="color-grey" key={key}> <div className="color-grey">
{firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.map((item,key)=>{ {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.map((item,key)=>{
return( return(

@ -304,7 +304,7 @@ class GraduationTasksedit extends Component{
{description===undefined?"":<Form labelCol={{ span: 5 }} wrapperCol={{ span: 12 }} onSubmit={this.handleSubmit} > {description===undefined?"":<Form labelCol={{ span: 5 }} wrapperCol={{ span: 12 }} onSubmit={this.handleSubmit} >
{/*内容*/} {/*内容*/}
<div className="stud-class-set bor-bottom-greyE pd20 edu-back-white"> <div className="stud-class-set bor-bottom-greyE pt20 pl20 pr20 pb0 edu-back-white">
<Form.Item label="类型"> <Form.Item label="类型">
{getFieldDecorator('tasktype', { {getFieldDecorator('tasktype', {
@ -323,13 +323,13 @@ class GraduationTasksedit extends Component{
<Form.Item label="任务标题" > <Form.Item label="任务标题" >
{getFieldDecorator('name', { {getFieldDecorator('name', {
rules: [{ required: true, message: "请输入标题" }], rules: [{ required: true, message: "请输入标题" }],
})(<Input placeholder="请输入任务名称,最大限制20个字符" value={name} onInput={this.changeTitle} className="searchView searchViewAfter" style={{"width":"100%"}} maxLength="60" addonAfter={String(title_num)}/>)} })(<Input placeholder="请输入任务名称,最大限制60个字符" value={name} onInput={this.changeTitle} className="searchView searchViewAfter" style={{"width":"100%"}} maxLength="60" addonAfter={String(title_num)}/>)}
</Form.Item> </Form.Item>
<input type="hidden" id='nametypes' /> <input type="hidden" id='nametypes' />
</div> </div>
<div className="stud-class-set pd20 coursenavbox edu-back-white"> <div className="stud-class-set pt20 pl20 pr20 pb0 coursenavbox edu-back-white">
<style>{` <style>{`
.uploadBtn.ant-btn { .uploadBtn.ant-btn {
border: none; border: none;
@ -348,7 +348,7 @@ class GraduationTasksedit extends Component{
`}</style> `}</style>
<Form.Item <Form.Item
label="内容" label="内容"
style={{marginBottom:'0px'}}
> >
{getFieldDecorator('description', { {getFieldDecorator('description', {
rules: [{ rules: [{

@ -294,7 +294,7 @@ class GraduationTasksnew extends Component {
} }
</style> </style>
{/*内容*/} {/*内容*/}
<div className="stud-class-set bor-bottom-greyE pt20 pl20 pr20 edu-back-white"> <div className="stud-class-set bor-bottom-greyE pt20 pl20 pr20 pb25 edu-back-white">
<Form.Item label="类型" > <Form.Item label="类型" >
{getFieldDecorator('tasktype', { {getFieldDecorator('tasktype', {
@ -313,10 +313,10 @@ class GraduationTasksnew extends Component {
{getFieldDecorator('name', { {getFieldDecorator('name', {
rules: [{required: true, message: "不能为空"}], rules: [{required: true, message: "不能为空"}],
})(<Input placeholder="请输入任务名称最大限制60个字符" value={title_value} onInput={this.changeTitle} })(<Input placeholder="请输入任务名称最大限制60个字符" value={title_value} onInput={this.changeTitle}
className="searchView searchViewAfter mb20 h40" style={{"width": "100%"}} maxLength="60" className="searchView searchViewAfter h40" style={{"width": "100%"}} maxLength="60"
addonAfter={String(title_num)}/>)} addonAfter={String(title_num)}/>)}
</Form.Item> </Form.Item>
<input type="hidden" id='nametypes'/> <input type="hidden" id='nametypes' />
</div> </div>

@ -317,73 +317,59 @@ class GraduationTaskssettingapp extends Component{
} }
funcrosscomment=(e)=>{ funcrosscomment=(e)=>{
let {latetime,end_time}=this.state;
let {latetime,end_time,allowlate}=this.state;
let newtime; let newtime;
if(latetime!=null&&end_time!=null){ if(e.target.checked===true){
if(e.target.checked===true){ if(allowlate===1||allowlate===true){
if(moment(latetime)>moment(end_time)){ if(latetime===null||latetime===""){
newtime=moment(latetime)+604800000; let newlatetime=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
newtime=new Date(newtime) let newcommenttime=moment(new Date()).format("YYYY-MM-DD HH:mm");
}else if(moment(latetime)<moment(end_time)){ this.setState({
newtime=moment(end_time)+604800000; latetime:newlatetime,
newtime=new Date(newtime) crosscomment:e.target.checked,
} commenttime:newcommenttime
})
}else{
let newlatetime=moment(latetime).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttime=moment(latetime).format("YYYY-MM-DD HH:mm");
this.setState({
latetime:newlatetime,
crosscomment:e.target.checked,
commenttime:newcommenttime
})
}
}else{
if(end_time===null||end_time===""){
let newend_time=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttime=moment(new Date()).add(8, 'days').format("YYYY-MM-DD HH:mm");
this.setState({
end_time:newend_time,
crosscomment:e.target.checked,
commenttime:newcommenttime
})
}else{
let newend_time=moment(end_time).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttime=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm");
this.setState({
end_time:newend_time,
crosscomment:e.target.checked,
commenttime:newcommenttime
})
}
this.setState({ }
crosscomment:e.target.checked,
commenttime:moment(moment(newtime)).format("YYYY-MM-DD HH:mm"),
})
}else{
this.setState({
crosscomment:e.target.checked,
commenttime:undefined
})
}
}else if(latetime===null&&end_time!=null){ }else{
if(e.target.checked===true){ this.setState({
newtime=moment(end_time)+604800000; crosscomment:e.target.checked,
newtime=new Date(newtime) commenttime:undefined
this.setState({ })
crosscomment:e.target.checked, }
commenttime:newtime
})
}else{
this.setState({
crosscomment:e.target.checked,
commenttime:undefined
})
}
}else if(latetime!=null&&end_time===null){
if(e.target.checked===true){
newtime=moment(latetime)+604800000;
newtime=new Date(newtime)
this.setState({
crosscomment:e.target.checked,
commenttime:newtime
})
}else{
this.setState({
crosscomment:e.target.checked,
commenttime:undefined
})
}
}else if(latetime===null&&end_time===null){
if(e.target.checked===true){
newtime=moment(new Date())+604800000;
newtime=new Date(newtime)
this.setState({
crosscomment:e.target.checked,
commenttime:newtime
})
}else{
this.setState({
crosscomment:e.target.checked,
commenttime:undefined
})
}
}
} }
@ -588,7 +574,6 @@ class GraduationTaskssettingapp extends Component{
commenttimetype:false commenttimetype:false
}) })
} }
debugger
if(moment(this.state.commenttime)<moment(publish_time)){ if(moment(this.state.commenttime)<moment(publish_time)){
this.setState({ this.setState({
commenttimetype:true, commenttimetype:true,

@ -560,6 +560,7 @@ class GraduationTaskssettinglist extends Component{
AssociationItems=()=>{ AssociationItems=()=>{
this.setState({ this.setState({
visibles:true visibles:true
}) })
@ -1264,8 +1265,6 @@ class GraduationTaskssettinglist extends Component{
} }
} }
console.log(columns)
return( return(
<React.Fragment> <React.Fragment>
@ -1346,13 +1345,15 @@ class GraduationTaskssettinglist extends Component{
/>:""} />:""}
{/*关联项目*/} {/*关联项目*/}
{visibles===true?<Associationmodel {visibles===true?
<Associationmodel
modalname={"关联项目"} modalname={"关联项目"}
visible={visibles} visible={visibles}
Cancel={this.Cancel} Cancel={()=>this.Cancel()}
taskid={taskslistdata&&taskslistdata.task_id} taskid={taskslistdata&&taskslistdata.task_id}
funlist={this.searchValue()} funlist={()=>this.searchValue()}
/>:""} />
:""}
{taskslistdata&&taskslistdata? {taskslistdata&&taskslistdata?
// 教师列表 // 教师列表
@ -1572,13 +1573,13 @@ class GraduationTaskssettinglist extends Component{
<span className="mr15 color-grey9"> <span className="mr15 color-grey9">
<span className={"color-orange"}>{taskslistdata&&taskslistdata.uncommit_count} <span className={"color-orange"}>{taskslistdata&&taskslistdata.uncommit_count}
</span> </span> </span> </span>
<Tooltip title={taskslistdata&&taskslistdata.left_time.status} placement="bottom"> {taskslistdata&&taskslistdata.left_time.status===null?"":<Tooltip title={taskslistdata&&taskslistdata.left_time.status} placement="bottom">
<span className="mr15 color-grey9"> <span className="mr15 color-grey9">
{taskslistdata&&taskslistdata.left_time.status} : {taskslistdata&&taskslistdata.left_time.status} :
<span className={"ml10 color-orange"}> <span className={"ml10 color-orange"}>
{taskslistdata&&taskslistdata.left_time.time}</span> {taskslistdata&&taskslistdata.left_time.time}</span>
</span> </span>
</Tooltip> </Tooltip>}
</div> </div>
:""} :""}
@ -1833,13 +1834,13 @@ class GraduationTaskssettinglist extends Component{
<span className="mr15 color-grey9"> <span className="mr15 color-grey9">
<span className={"color-orange"}>{taskslistdata&&taskslistdata.uncommit_count} <span className={"color-orange"}>{taskslistdata&&taskslistdata.uncommit_count}
</span> </span> </span> </span>
<Tooltip title={taskslistdata&&taskslistdata.left_time.status} placement="bottom"> {taskslistdata&&taskslistdata.left_time.status===null?"":<Tooltip title={taskslistdata&&taskslistdata.left_time.status} placement="bottom">
<span className="mr15 color-grey9"> <span className="mr15 color-grey9">
{taskslistdata&&taskslistdata.left_time.status} : {taskslistdata&&taskslistdata.left_time.status} :
<span className={"ml10 color-orange"}> <span className={"ml10 color-orange"}>
{taskslistdata&&taskslistdata.left_time.time}</span> {taskslistdata&&taskslistdata.left_time.time}</span>
</span> </span>
</Tooltip> </Tooltip>}
</div> </div>
:""} :""}

@ -36,7 +36,7 @@ class Graduationtaskitem extends Component{
</a> </a>
<span className="t_area fl">{item.time}</span> <span className="t_area fl">{item.time}</span>
{/* 分数 */} {/* 分数 */}
<span className="score_area fl">{item.score}</span> {item.score && <span className="score_area fl">{item.score}</span>}
{ !item.is_invalid && item.delete && <Tooltip title={ "删除" } > { !item.is_invalid && item.delete && <Tooltip title={ "删除" } >
<i className="iconfont icon-shanchu mr5 fr" style={{marginLeft: '6px'}} <i className="iconfont icon-shanchu mr5 fr" style={{marginLeft: '6px'}}

@ -40,6 +40,15 @@ const buildColumns = (that) => {
render: (id, student, index) => { render: (id, student, index) => {
return (that.state.page - 1) * 20 + index + 1 return (that.state.page - 1) * 20 + index + 1
} }
}, {
title: '用户id',
dataIndex: 'login',
key: 'login',
align:'center',
className:"color-grey-6",
// render: (name, record) => {
// return <a className="color-dark" target="_blank" href={`/users/${record.login}`}>{name}</a>
// }
}, { }, {
title: '姓名', title: '姓名',
dataIndex: 'name', dataIndex: 'name',
@ -316,6 +325,7 @@ class studentsList extends Component{
}).then((result)=>{ }).then((result)=>{
if (result.data.status == 0) { if (result.data.status == 0) {
this.props.showNotification('移动成功') this.props.showNotification('移动成功')
this.setState({checkBoxValues: []})
this.fetchAll() this.fetchAll()
this.props.updataleftNavfun() this.props.updataleftNavfun()

@ -33,6 +33,7 @@ function buildColumns(that) {
const { course_groups } = that.state const { course_groups } = that.state
const columns = [{ const columns = [{
title: '序号', title: '序号',
width: 28,
// dataIndex: 'name', // dataIndex: 'name',
key: 'index', key: 'index',
render: (content, item, index) => { render: (content, item, index) => {
@ -40,12 +41,13 @@ function buildColumns(that) {
} }
},{ },{
title: '用户ID', title: '用户ID',
width: 82,
dataIndex: 'login', dataIndex: 'login',
key: 'login' key: 'login'
}, { }, {
title: '姓名', title: '姓名',
dataIndex: 'name', dataIndex: 'name',
width: 160, width: 140,
key: 'name', key: 'name',
render: (name, record) => { render: (name, record) => {
return <a href={`/login/${record.login}`} target="_blank">{name}</a> return <a href={`/login/${record.login}`} target="_blank">{name}</a>
@ -57,7 +59,7 @@ function buildColumns(that) {
}] }]
that.state.course_groups && that.state.course_groups.length && columns.push({ that.state.course_groups && that.state.course_groups.length && columns.push({
title: <Tooltip title="仅能批阅指定分班的作品">管理权限</Tooltip>, title: <Tooltip title="仅能批阅指定分班的作品">管理权限</Tooltip>,
width: 230, // width: 230,
key: 'course_groups', key: 'course_groups',
dataIndex: 'course_groups', dataIndex: 'course_groups',
// onClick={() => that.joinCourseGroup(item.id)} // onClick={() => that.joinCourseGroup(item.id)}
@ -113,6 +115,7 @@ function buildColumns(that) {
if (hasGraduationModule) { if (hasGraduationModule) {
columns.push({ columns.push({
title: '答辩组', title: '答辩组',
width: 74,
key: 'graduation_group', key: 'graduation_group',
dataIndex: 'graduation_group', dataIndex: 'graduation_group',
render: text => ( render: text => (
@ -126,6 +129,8 @@ function buildColumns(that) {
columns.push({ columns.push({
title: '操作', title: '操作',
key: 'action', key: 'action',
width: 150,
align:'center',
render: (text, record) => { render: (text, record) => {
if (record.application_id) { if (record.application_id) {
return ( return (

@ -91,6 +91,7 @@ class Listofworks extends Component {
unlimited: 0, unlimited: 0,
unlimitedtwo: 1, unlimitedtwo: 1,
code_review: false, code_review: false,
boolgalist:true,
columns: [ columns: [
{ {
title: '序号', title: '序号',
@ -555,7 +556,7 @@ class Listofworks extends Component {
align: 'center', align: 'center',
width:'96px', width:'96px',
render: (text, record) => ( render: (text, record) => (
record.submitstate === "未提交" ? "--" : record.submitstate === "未提交" ? <span style={{color:'#9A9A9A'}}>--</span>:
<span> <span>
<a style={this.props.isNotMember() === true ? this.state.mystyles : this.state.mystyle} <a style={this.props.isNotMember() === true ? this.state.mystyles : this.state.mystyle}
onClick={() => this.Viewstudenttraininginformations(record)}>调分</a> onClick={() => this.Viewstudenttraininginformations(record)}>调分</a>
@ -778,7 +779,7 @@ class Listofworks extends Component {
// console.log(JSON.stringify(result)) // console.log(JSON.stringify(result))
let datalist = []; let datalist = [];
var game_list = result.data.game_list var game_list = result.data.game_list
var boolgalist=true;
for (var i = 0; i < game_list.length; i++) { for (var i = 0; i < game_list.length; i++) {
datalist.push({ datalist.push({
@ -789,6 +790,10 @@ class Listofworks extends Component {
complete_status: game_list[i].complete_status, complete_status: game_list[i].complete_status,
}) })
if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){
boolgalist=false;
}
} }
// console.log("viewtraining"); // console.log("viewtraining");
// console.log(datalist); // console.log(datalist);
@ -796,7 +801,8 @@ class Listofworks extends Component {
this.setState({ this.setState({
viewtrainingdata: result.data, viewtrainingdata: result.data,
visibles: true, visibles: true,
game_list: datalist game_list: datalist,
boolgalist:boolgalist,
}) })
} }
}).catch((error) => { }).catch((error) => {
@ -1001,7 +1007,7 @@ class Listofworks extends Component {
render() { render() {
// console.log("Listofworks.js000") // console.log("Listofworks.js000")
let {columns, page, limit, course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state; let {columns, page, boolgalist,limit, course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state;
// //
// console.log(teacherdata&&teacherdata.shixun_identifier) // console.log(teacherdata&&teacherdata.shixun_identifier)
// console.log(course_group_info) // console.log(course_group_info)
@ -1045,6 +1051,7 @@ class Listofworks extends Component {
viewtrainingdata={viewtrainingdata} viewtrainingdata={viewtrainingdata}
game_list={game_list} game_list={game_list}
visible={visibles} visible={visibles}
boolgalist={boolgalist}
Cancel={() => this.cancelModulationModels()} Cancel={() => this.cancelModulationModels()}
/> />
@ -1080,12 +1087,12 @@ class Listofworks extends Component {
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn <ActionBtn
className=" btn colorgrey fl hovercolorblue " className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn> to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id===undefined?"":jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn> <WordsBtn className="fl">作业详情</WordsBtn>
</p> </p>
</div> </div>
<div className="educontent mb30"> <div className="educontent mb30" style={{width:"1250px"}}>
<p className=" fl color-black summaryname"> <p className=" fl color-black summaryname">
{teacherdata === undefined ? "" : teacherdata.homework_name} {teacherdata === undefined ? "" : teacherdata.homework_name}
</p> </p>
@ -1101,7 +1108,7 @@ class Listofworks extends Component {
</div> </div>
<div className="edu-back-white"> <div className="edu-back-white" style={{width:"1250px"}}>
<div className="stud-class-set bor-bottom-greyE "> <div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list"> <div className=" clearfix edu-back-white poll_list">
<Link className="active" <Link className="active"
@ -1164,7 +1171,7 @@ class Listofworks extends Component {
</CheckboxGroup> </CheckboxGroup>
{/*请输入姓名或学号搜索*/} {/*请输入姓名或学号搜索*/}
<div className="fr mr5 search-new" style={{marginBottom: '1px'}}> <div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}>
<Search <Search
placeholder="请输入姓名或学号搜索" placeholder="请输入姓名或学号搜索"
id="subject_search_input" id="subject_search_input"

@ -688,7 +688,7 @@ class Listofworksstudentone extends Component {
<WordsBtn className="fl">作业详情</WordsBtn> <WordsBtn className="fl">作业详情</WordsBtn>
</p> </p>
</div> </div>
<div className="educontent mb30"> <div className="educontent mb30" style={{width:"1250px"}}>
<p className=" fl color-black summaryname"> <p className=" fl color-black summaryname">
{teacherdata === undefined ? "" : teacherdata.homework_name} {teacherdata === undefined ? "" : teacherdata.homework_name}
</p> </p>
@ -696,11 +696,11 @@ class Listofworksstudentone extends Component {
typelist={teacherdata === undefined ? [""] : teacherdata.homework_status} typelist={teacherdata === undefined ? [""] : teacherdata.homework_status}
/> />
<a className="color-grey-9 fr font-16 summaryname ml20 mr20" <a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}`}>返回</a> href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id===undefined?"":jobsettingsdata.data.category.category_id}`}>返回</a>
<p className="color-grey-9 fr font-16"></p> <p className="color-grey-9 fr font-16"></p>
</div> </div>
<div className="edu-back-white"> <div className="edu-back-white" style={{width:"1250px"}}>
<div className="stud-class-set bor-bottom-greyE "> <div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list"> <div className=" clearfix edu-back-white poll_list">
<Link className="active" <Link className="active"

@ -36,10 +36,10 @@ class TraineetraininginformationModal extends Component {
props: this.props, props: this.props,
userids: this.props.userids, userids: this.props.userids,
game_list:this.props.game_list, game_list:this.props.game_list,
gline:0, boolgalist:this.props.boolgalist,
}) })
// console.log("TraineetraininginformationModal") // console.log("TraineetraininginformationModal")
// console.log(this.props) // console.log(this.props)
} }
@ -51,123 +51,133 @@ class TraineetraininginformationModal extends Component {
// this.seacthdata(); // this.seacthdata();
} }
// 设置数据 LimitNumber=(txt)=> {
// seacthdata = () => { var str = txt;
// if(str.length>25){
// console.log(datalist) str = str.substring(0,25)+"......"
// } }
return str;
}
render() { render() {
const columns = [ var columns;
if(this.props.boolgalist === true) {
columns = [
{ {
title: '关卡', title: '关卡',
dataIndex: 'number', dataIndex: 'number',
key: 'number', key: 'number',
width: 92,
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span > <span>
<a style={{"color":'#07111B', "text-align": "center"}}>{record.number}</a> <a style={{"color": '#07111B', "text-align": "center"}}>{record.number}</a>
</span> </span>
), ),
}, },
{ {
title: '完成时间', title: '完成时间',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: 178, width: 178,
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span > <span>
<a style={{"color":'#989898', "text-align": "center"}} >{record.name==='Invalid date'?"--":record.name}</a> <a style={{
"color": '#989898',
"text-align": "center"
}}>{record.name === 'Invalid date' ? "--" : record.name}</a>
</span> </span>
), ),
}, },
{ {
title: '耗时', title: '',
dataIndex: 'stduynumber', dataIndex: 'complete_status',
key: 'stduynumber', key: 'complete_status',
align: "center", width: 100,
render: (text, record) => ( align: "center",
<span> render: (text, record) => (
<a style={{"color":'#989898', "text-align": "center"}}>{record.stduynumber}</a> <span>
{record.complete_status === 2 ? <img src={delay}/> : record.complete_status === 3 ?
<img src={invalid}/> : ""}
</span> </span>
), ),
}, },
{ {
title: '经验值', title: '耗时',
key: 'classroom', dataIndex: 'stduynumber',
dataIndex: 'classroom', key: 'stduynumber',
align: "center", width: 92,
render: (text, record) => ( align: "center",
<span> render: (text, record) => (
<a style={{"color":'#29BD8B', "text-align": "center"}}>{record.classroom}</a> <span>
<a style={{"color": '#989898', "text-align": "center"}}>{record.stduynumber}</a>
</span> </span>
), ),
} },
];
const columnss = [
{ {
title: '关卡', title: '经验值',
dataIndex: 'number', key: 'classroom',
key: 'number',
width: 92, width: 92,
dataIndex: 'classroom',
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span > <span>
<a style={{"color": '#29BD8B', "text-align": "center"}}>{record.classroom}</a>
</span>
),
}
]
}
else {
columns = [
{
title: '关卡',
dataIndex: 'number',
key: 'number',
align: "center",
render: (text, record) => (
<span >
<a style={{"color":'#07111B', "text-align": "center"}}>{record.number}</a> <a style={{"color":'#07111B', "text-align": "center"}}>{record.number}</a>
</span> </span>
), ),
}, },
{ {
title: '完成时间', title: '完成时间',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: 178, width: 178,
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span > <span >
<a style={{"color":'#989898', "text-align": "center"}} >{record.name==='Invalid date'?"--":record.name}</a> <a style={{"color":'#989898', "text-align": "center"}} >{record.name==='Invalid date'?"--":record.name}</a>
</span> </span>
), ),
}, },
{ {
title: '', title: '耗时',
dataIndex: 'complete_status', dataIndex: 'stduynumber',
key: 'complete_status', key: 'stduynumber',
width: 100, align: "center",
align: "center", render: (text, record) => (
render: (text, record) => ( <span>
<span>
{record.complete_status===2?<img src={delay}/>:record.complete_status===3?<img src={invalid}/>:""}
</span>
),
},
{
title: '耗时',
dataIndex: 'stduynumber',
key: 'stduynumber',
width: 92,
align: "center",
render: (text, record) => (
<span>
<a style={{"color":'#989898', "text-align": "center"}}>{record.stduynumber}</a> <a style={{"color":'#989898', "text-align": "center"}}>{record.stduynumber}</a>
</span> </span>
), ),
}, },
{ {
title: '经验值', title: '经验值',
key: 'classroom', key: 'classroom',
width: 92, dataIndex: 'classroom',
dataIndex: 'classroom', align: "center",
align: "center", render: (text, record) => (
render: (text, record) => ( <span>
<span>
<a style={{"color":'#29BD8B', "text-align": "center"}}>{record.classroom}</a> <a style={{"color":'#29BD8B', "text-align": "center"}}>{record.classroom}</a>
</span> </span>
), ),
}
]
} }
];
return ( return (
<div> <div>
<Modal <Modal
@ -181,7 +191,7 @@ class TraineetraininginformationModal extends Component {
<div style={{width:"100%" }}className="login_register_content" > <div style={{width:"100%" }}className="login_register_content" >
<div style={{"width": "100%","text-align": "left","clear": "both"}}> <div style={{"width": "100%","text-align": "left","clear": "both"}}>
<div className="mt5 fl" > <div className="mt5 fl" >
<span style={{"text-align": "left"}}>{this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_name}</span> <span style={{"text-align": "left"}}>{this.props.viewtrainingdata === undefined ? "" : this.LimitNumber(this.props.viewtrainingdata.shixun_name)}</span>
<span className="ml10 " style={{"text-align": "left","color":'#29BD8B'}} >经验值<span style={{"color":'#29BD8B'}}> {this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_score}</span></span> <span className="ml10 " style={{"text-align": "left","color":'#29BD8B'}} >经验值<span style={{"color":'#29BD8B'}}> {this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_score}</span></span>
</div> </div>
{/*<Button type="primary" className="ml30" >实训报告</Button>*/} {/*<Button type="primary" className="ml30" >实训报告</Button>*/}
@ -200,12 +210,12 @@ class TraineetraininginformationModal extends Component {
src={this.props.viewtrainingdata === undefined ? "" : "https://www.educoder.net/images/" + `${this.props.viewtrainingdata.image_url}`} src={this.props.viewtrainingdata === undefined ? "" : "https://www.educoder.net/images/" + `${this.props.viewtrainingdata.image_url}`}
width="70"/> width="70"/>
</div> </div>
<div className="fl edu-back-white ml20 mt10"> <div className="fl edu-back-white ml20 mt15">
<li>{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.username}<span style={{"color":"#323232"}}> 通关</span><span style={{"color": '#FF6800'}}>{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.complete_count}/{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.challenges_count}</span></li> <li>{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.username}<span style={{"color":"#323232"}}> 通关</span><span style={{"color": '#FF6800'}}>{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.complete_count}/{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.challenges_count}</span></li>
<li><span style={{"color":"#989898"}} >完成效率</span><span style={{"color":"#4C4C4C"}}>{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.efficiency}</span></li> <li><span style={{"color":"#989898"}} >完成效率</span><span style={{"color":"#4C4C4C"}}>{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.efficiency}</span></li>
<li><span style={{"color":"#989898"}}>通关时间</span> <span style={{"color":"#4C4C4C"}}>{this.props.viewtrainingdata === undefined ? "":moment(this.props.viewtrainingdata.passed_time).format('YYYY-MM-DD HH:mm')==="Invalid date"?"--":moment(this.props.viewtrainingdata.passed_time).format('YYYY-MM-DD HH:mm')}</span> </li> <li><span style={{"color":"#989898"}}>通关时间</span> <span style={{"color":"#4C4C4C"}}>{this.props.viewtrainingdata === undefined ? "":moment(this.props.viewtrainingdata.passed_time).format('YYYY-MM-DD HH:mm')==="Invalid date"?"--":moment(this.props.viewtrainingdata.passed_time).format('YYYY-MM-DD HH:mm')}</span> </li>
</div> </div>
<div className="fl edu-back-white ml20 mt10"> <div className="fl edu-back-white ml20 mt15">
<li className="mt20"> <span style={{"color":"#989898"}}>课堂最高完成效率</span> <span style={{"color":"#4C4C4C"}}>{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.max_efficiency} </span> </li> <li className="mt20"> <span style={{"color":"#989898"}}>课堂最高完成效率</span> <span style={{"color":"#4C4C4C"}}>{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.max_efficiency} </span> </li>
<li><span style={{"color":"#989898"}}>总耗时:</span> <span style={{"color":"#4C4C4C"}}> {this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.total_spend_time}</span> </li> <li><span style={{"color":"#989898"}}>总耗时:</span> <span style={{"color":"#4C4C4C"}}> {this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.total_spend_time}</span> </li>
@ -213,7 +223,7 @@ class TraineetraininginformationModal extends Component {
</div> </div>
{ {
this.props.game_list === undefined?"" : this.props.game_list.length<4? this.props.game_list === undefined?"" : this.props.game_list.length<4?
<div> <div className="edu-table edu-back-white ">
<style> <style>
{ {
` .ant-table-body{ ` .ant-table-body{
@ -233,7 +243,7 @@ class TraineetraininginformationModal extends Component {
/>} />}
</div> </div>
: :
<div> <div className="edu-table edu-back-white ">
<div className={"both"}></div> <div className={"both"}></div>
{this.props.game_list === undefined ? "" : <Table {this.props.game_list === undefined ? "" : <Table
className="mt20" className="mt20"

@ -642,10 +642,10 @@ class Trainingjobsetting extends Component {
if(e.target.value ==="允许补交"){ if(e.target.value ==="允许补交"){
if(this.state.end_time !== null && this.state.end_time!== undefined){ if(this.state.end_time !== null && this.state.end_time!== undefined){
// console.log(this.state.end_time); // console.log(this.state.end_time);
var times = this.state.deadline.format('YYYY-MM-DD HH:mm'); // var times = this.state.deadline.format('YYYY-MM-DD HH:mm');
this.setState({ this.setState({
late_time:moment(handleDateString(times)).add(1, 'months'), late_time:moment(handleDateString(this.state.deadline)).add(1, 'months'),
late_times:moment(handleDateString(times)).add(1, 'months').format('YYYY-MM-DD HH:mm'), late_times:moment(handleDateString(this.state.deadline)).add(1, 'months').format('YYYY-MM-DD HH:mm'),
}) })
} }
@ -1184,10 +1184,12 @@ class Trainingjobsetting extends Component {
} catch (e) { } catch (e) {
} }
this.setState({
end_time:moment(handleDateString(dateString))
})
// this.onChangedata('end_time', value, dateString); // this.onChangedata('end_time', value, dateString);
if(this.state.allowreplenishment === "允许补交"){ if(this.state.allowreplenishment === "允许补交"){
this.setState({ this.setState({
end_time:moment(handleDateString(dateString)),
deadline:moment(handleDateString(dateString)).format('YYYY-MM-DD HH:mm'), deadline:moment(handleDateString(dateString)).format('YYYY-MM-DD HH:mm'),
late_time:moment(handleDateString(dateString)).add(2, 'months'), late_time:moment(handleDateString(dateString)).add(2, 'months'),
late_times:moment(handleDateString(dateString)).add(2, 'months').format('YYYY-MM-DD HH:mm'), late_times:moment(handleDateString(dateString)).add(2, 'months').format('YYYY-MM-DD HH:mm'),

@ -148,13 +148,13 @@ class MemoDetailMDEditor extends Component {
margin-right: 0px !important; margin-right: 0px !important;
} }
.commentInput { .commentInput {
border-bottom: 1px solid #EEEEEE;
} }
.commentInput .editormd{ .commentInput .editormd{
width:100%!important; width:100%!important;
} }
`}</style> `}</style>
<div style={{ display: isInited ? 'none' : ''}} className="mockInputWrapper commentInput" > <div style={{ display: isInited ? 'none' : '', borderBottom: `${this.props.commentsLength == 0 ? 'none' : '1px solid #EEEEEE'}`}}
className="mockInputWrapper commentInput" >
<input onClick={this.onMockInputClick} placeholder={placeholder || '我要回复'}></input> <input onClick={this.onMockInputClick} placeholder={placeholder || '我要回复'}></input>
<a href="javascript:void(0)" <a href="javascript:void(0)"
onClick={this.onMockInputClick} className="commentsbtn task-btn task-btn-blue"> onClick={this.onMockInputClick} className="commentsbtn task-btn task-btn-blue">

@ -1,220 +1,221 @@
/*MemoDetail --------------------------------- START */ /*MemoDetail --------------------------------- START */
.educontent { .educontent {
margin-bottom: 20px; margin-bottom: 20px;
} }
/* 左侧区域最小高度*/
#forum_index_list { /* 左侧区域最小高度*/
min-height: 400px; #forum_index_list {
position: relative; min-height: 400px;
} position: relative;
.noMemosTip { }
position: absolute; .noMemosTip {
right: 10px; position: absolute;
top: 58px; right: 10px;
z-index: 999; top: 58px;
} z-index: 999;
#forum_list { }
background: #f9f9f9; #forum_list {
} background: #f9f9f9;
#forum_list .return_btn { }
line-height: 38px; #forum_list .return_btn {
/* margin-right: 15px; */ line-height: 38px;
font-size: 14px; /* margin-right: 15px; */
cursor: pointer; font-size: 14px;
} cursor: pointer;
#forum_list .return_btn.no_mr { }
margin-right: -16px; #forum_list .return_btn.no_mr {
} margin-right: -16px;
div#forum_list>div { }
background: #fff; div#forum_list>div {
} background: #fff;
.memoContent img { }
max-width: 815px; .memoContent img {
} max-width: 815px;
.memoReplies { }
position: relative; .memoReplies {
margin-top: 8px; position: relative;
} margin-top: 8px;
.memoReplies .-fit { }
position: static; .memoReplies .-fit {
} position: static;
.replies_count { }
margin-left: 12px; .replies_count {
} margin-left: 12px;
.replies_count .label { }
color: #666666; .replies_count .label {
} color: #666666;
.replies_count .count { }
color: #999999; .replies_count .count {
margin-left: 10px; color: #999999;
} margin-left: 10px;
}
.memoMore {
padding-top: 10px; .memoMore {
height: 50px; padding-top: 10px;
line-height: 50px; height: 50px;
text-align: center; line-height: 50px;
color: rgba(69,155,230,1); text-align: center;
cursor: pointer; color: rgba(69,155,230,1);
position: relative; cursor: pointer;
} position: relative;
.memoMore .writeCommentBtn{ }
position: absolute; .memoMore .writeCommentBtn{
right: 0px; position: absolute;
color: #666666; right: 0px;
top: 15px; color: #666666;
} top: 15px;
.memoMore .writeCommentBtn:hover { }
color: #4DACFF; .memoMore .writeCommentBtn:hover {
} color: #4DACFF;
/*使用md編輯器用为子回复时宽度会变*/ }
.panel-comment_item .comment_orig_content { /*使用md編輯器用为子回复时宽度会变*/
width: 705px; .panel-comment_item .comment_orig_content {
} width: 705px;
}
.iconfont.icon-xiazai {
font-size: 22px!important; .iconfont.icon-xiazai {
margin-right: 6px; font-size: 22px!important;
} margin-right: 6px;
/* MemoDetail --------------------------------- END */ }
/* MemoDetail --------------------------------- END */
/* PostItem --------------------------------- START */
.forum_table_item { /* PostItem --------------------------------- START */
padding-left: 20px; .forum_table_item {
} padding-left: 20px;
/* 置顶 */ }
.forum_table_item .btn-top { /* 置顶 */
border-radius: 11px; .forum_table_item .btn-top {
padding: 0px 6px; border-radius: 11px;
background: #FF4343; padding: 0px 6px;
background: #FF4343;
}
}
/* 管理员操作 */
.edu-position-hide { /* 管理员操作 */
position: absolute; .edu-position-hide {
top: 15px; position: absolute;
left: -20px; top: 15px;
box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); left: -20px;
background: #fff; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);
z-index: 1001; background: #fff;
padding: 5px 0; z-index: 1001;
z-index: 999999; padding: 5px 0;
} z-index: 999999;
.edu-position-hide li a:hover { }
background: #4CACFF; .edu-position-hide li a:hover {
color: #fff; background: #4CACFF;
} color: #fff;
.edu-position-hidebox>a:link{ }
color: #4CACFF; .edu-position-hidebox>a:link{
} color: #4CACFF;
.edu-position-hidebox:hover .edu-position-hide { }
display: block; .edu-position-hidebox:hover .edu-position-hide {
} display: block;
.edu-position-hide li a { }
display: inline-block; .edu-position-hide li a {
height: 30px; display: inline-block;
width: 100px; height: 30px;
line-height: 30px; width: 100px;
text-align: center; line-height: 30px;
font-size: 12px!important; text-align: center;
} font-size: 12px!important;
/* PostItem --------------------------------- END */ }
/* PostItem --------------------------------- END */
/* MemoNew --------------------------------- START */
/* MemoNew --------------------------------- START */
#attachments_fields div.ui-progressbar {
width: 120px; #attachments_fields div.ui-progressbar {
height: 10px; width: 120px;
margin: 2px 0 -2px 8px; height: 10px;
display: inline-block; margin: 2px 0 -2px 8px;
} display: inline-block;
.ui-widget-header { }
border: 1px solid #4CACFF; .ui-widget-header {
background: #4CACFF; border: 1px solid #4CACFF;
} background: #4CACFF;
.iconfont.icon-fujian { }
color: #29BD8B .iconfont.icon-fujian {
} color: #29BD8B
}
/* rc-select样式覆写*/
.ecSelect { /* rc-select样式覆写*/
width: 300px; .ecSelect {
} width: 300px;
.ecSelect .rc-select-selection { }
height: 40px; .ecSelect .rc-select-selection {
} height: 40px;
.ecSelect .rc-select-search--inline .rc-select-search__field { }
padding-top: 6px; .ecSelect .rc-select-search--inline .rc-select-search__field {
} padding-top: 6px;
.ecSelect .rc-select-selection--single .rc-select-selection-selected-value }
, .ecSelect .rc-select-selection__placeholder { .ecSelect .rc-select-selection--single .rc-select-selection-selected-value
top: 6px; , .ecSelect .rc-select-selection__placeholder {
top: 6px;
}
.ecSelect .rc-select-arrow { }
top: 6px; .ecSelect .rc-select-arrow {
} top: 6px;
.defalutCancelbtn { }
cursor: pointer; .defalutCancelbtn {
} cursor: pointer;
.defalutSubmitbtnysl{ }
display: block;border: 1px solid #4CACFF;background-color: #4CACFF;color: #fff!important;width: 120px;text-align: center;line-height: 40px;border-radius: 2px; .defalutSubmitbtnysl{
width: 130px; display: block;border: 1px solid #4CACFF;background-color: #4CACFF;color: #fff!important;width: 120px;text-align: center;line-height: 40px;border-radius: 2px;
height: 40px; width: 130px;
background: rgba(76,172,255,1); height: 40px;
border-radius: 4px; background: rgba(76,172,255,1);
font-size: 16px; border-radius: 4px;
font-family: MicrosoftYaHei; font-size: 16px;
font-weight: 400; font-family: MicrosoftYaHei;
color: rgba(255,255,255,1); font-weight: 400;
} color: rgba(255,255,255,1);
#attachments_fields { }
margin-left: -77px; #attachments_fields {
display: flex; margin-left: -77px;
flex-direction: column; display: flex;
} flex-direction: column;
.uploadBtn { }
/* margin-left: 46px; */ .uploadBtn {
} /* margin-left: 46px; */
#memoMD.show_content_grey { }
padding: 0; #memoMD.show_content_grey {
} padding: 0;
.newForm .attachments_fields { }
/*margin-left: -39px !important*/ .newForm .attachments_fields {
} /*margin-left: -39px !important*/
#attachments_fields div.ui-progressbar { }
width: 120px; #attachments_fields div.ui-progressbar {
height: 10px; width: 120px;
margin: 2px 0 -2px 8px; height: 10px;
display: inline-block; margin: 2px 0 -2px 8px;
} display: inline-block;
.ui-progressbar-value.ui-widget-header { }
border: 1px solid #4CACFF; .ui-progressbar-value.ui-widget-header {
background: #4CACFF; border: 1px solid #4CACFF;
} background: #4CACFF;
/* MemoNew --------------------------------- END */ }
/* MemoNew --------------------------------- END */
/*RightMyPublish*/
.publishMemoSection { /*RightMyPublish*/
padding-bottom: 0px !important; .publishMemoSection {
} padding-bottom: 0px !important;
.advertisement { }
margin-top: 10px; .advertisement {
height: 155px; margin-top: 10px;
} height: 155px;
.advertisement img{ }
width: 100%; .advertisement img{
} width: 100%;
}
/* MyPublish*/
.returnBtn { /* MyPublish*/
font-size:16px; .returnBtn {
color:rgba(153,153,153,1); font-size:16px;
float: right; color:rgba(153,153,153,1);
margin-right: 50px; float: right;
position: relative; margin-right: 50px;
bottom: 12px; position: relative;
bottom: 12px;
} }

@ -7,7 +7,12 @@
width:237px!important; width:237px!important;
height: 30px; height: 30px;
margin-bottom: 30px; margin-bottom: 30px;
margin-right: 35px; /*margin-right: 35px;*/
}
.search-newysl {
width:237px!important;
height: 30px;
margin-bottom: 30px;
} }
.search-new-input { .search-new-input {
padding-left: 16px; padding-left: 16px;

@ -319,7 +319,7 @@ class LoginDialog extends Component {
this.setState({ this.setState({
isRender: false isRender: false
}) })
window.location.href="/"; // window.location.href="/";
} }
loginEDU=()=>{ loginEDU=()=>{

@ -32,6 +32,7 @@ class Trialapplication extends Component {
readonlyInput: true, readonlyInput: true,
user_phone_binded: false, user_phone_binded: false,
showTrial: false, showTrial: false,
user: undefined,
} }
//user_phone_binded 判断是否手机号验证 //user_phone_binded 判断是否手机号验证
// console.log("Trialapplication"); // console.log("Trialapplication");
@ -43,15 +44,32 @@ class Trialapplication extends Component {
} }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
// console.log("46");
// console.log(nextProps);
// console.log(this.props);
if (nextProps.user != this.props.user) {
// console.log("50");
// console.log(nextProps.user);
if (nextProps.user !== undefined) {
// console.log("53");
// console.log(nextProps.user);
this.setState({
user_phone_binded: nextProps.user.user_phone_binded,
})
}
}
} }
//初始化数据 //初始化数据
componentDidMount() { componentDidMount() {
console.log("53"); // console.log("53");
//
console.log(this.props.isRenders); // console.log(this.props.isRenders);
if (this.props.isRenders != undefined) { if (this.props.isRenders != undefined) {
this.setState({ this.setState({
@ -77,21 +95,6 @@ class Trialapplication extends Component {
//TODO 这里如果样式变了会出现css不加载的情况 //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,
})
}
} catch (e) {
console.log(e);
}
} }
@ -384,154 +387,151 @@ class Trialapplication extends Component {
<style> <style>
{ {
` `
// .dialogBox{ .dialogBox2{
// height: 370px; height: 420px;
// } }
.dialogBox2{ #DialogIDysl{
height: 420px; z-index: 20000;
} }
#DialogIDysl{ #DialogIDysl .dialogBox {
z-index: 20000; width: 560px;
} }
#DialogIDysl .dialogBox { .MuiPaper-elevation24-45{
width: 560px; box-shadow:none !important;
} }
.MuiPaper-elevation24-45{ .MuiPaper-root-19{
box-shadow:none !important; /* background:none !important; */
} }
.MuiPaper-root-19{ .MuiDialog-paper-9{
/* background:none !important; */ overflow-y:hidden !important;
} }
.MuiDialog-paper-9{ #log_reg_content{
overflow-y:hidden !important; top: 0px !important;
} }
#log_reg_content{ #log_reg_content{
top: 0px !important; width:400px !important;
} border-radius:40px !important;
#log_reg_content{ box-shadow:4px 8px 12px rgba(76,76,76,0.3);
width:400px !important; }
border-radius:40px !important; .log_nav li{
box-shadow:4px 8px 12px rgba(76,76,76,0.3); height:17px;
} font-size:18px;
.log_nav li{ font-family:NotoSansHans-Regular;
height:17px; color:rgba(25,0,0,1);
font-size:18px; line-height: 0px;
font-family:NotoSansHans-Regular; }
color:rgba(25,0,0,1); .vertical-line{
line-height: 0px; margin-left:10px;
} margin-right:10px;
.vertical-line{ }
margin-left:10px; #DialogIDysl div {
margin-right:10px; overflow-y:visible !important;
} box-shadow:none !important;
#DialogIDysl div { border-radius:15px !important;
overflow-y:visible !important; }
box-shadow:none !important; #wrapper{
border-radius:15px !important; position: relative;
} top: 3px;
#wrapper{ left: 0px;
position: relative; margin-bottom: 17px;
top: 3px; }
left: 0px;
margin-bottom: 17px; .slidetounlock{
} font-size: 12px;
background:-webkit-gradient(linear,left top,right top,color-stop(0,#4d4d4d),color-stop(.4,#4d4d4d),color-stop(.5,#fff),color-stop(.6,#4d4d4d),color-stop(1,#4d4d4d));
.slidetounlock{ -webkit-background-clip:text;
font-size: 12px; -webkit-text-fill-color:transparent;
background:-webkit-gradient(linear,left top,right top,color-stop(0,#4d4d4d),color-stop(.4,#4d4d4d),color-stop(.5,#fff),color-stop(.6,#4d4d4d),color-stop(1,#4d4d4d)); -webkit-animation:slidetounlock 3s infinite;
-webkit-background-clip:text; -webkit-text-size-adjust:none
-webkit-text-fill-color:transparent; }
-webkit-animation:slidetounlock 3s infinite; @-webkit-keyframes slidetounlock{0%{background-position:-200px 0} 100%{background-position:200px 0}}
-webkit-text-size-adjust:none
} .handler_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHR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1xGSwxULIGf9A7mQkBwTlhBXAFLHgPgqEAcTkmNCU6AL9d8WII4HOvk3ITkWJAXWUMlOoGQHmsE45ViQ2KuBuASoYC4Wf+OUYxz6mQkgwAAN9mIrUReCXgAAAABJRU5ErkJggg==") no-repeat center;}
@-webkit-keyframes slidetounlock{0%{background-position:-200px 0} 100%{background-position:200px 0}} .handler_ok_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDlBRDI3NjVGMkQ2MTFFNEI5ND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AZgwHaEZhICIzOaBkJkqyM0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==") no-repeat center;} position: relative;
background-color: #e8e8e8;
#drag{ width: 340px;
position: relative; height: 34px;
background-color: #e8e8e8; line-height: 34px;
width: 340px; text-align: center;
height: 34px; }
line-height: 34px; #drag .handler{
text-align: center; position: absolute;
} top: 0px;
#drag .handler{ left: 0px;
position: absolute; width: 40px;
top: 0px; height: 32px;
left: 0px; /*border: 1px solid #ccc;*/
width: 40px; cursor: move;
height: 32px; }
/*border: 1px solid #ccc;*/
cursor: move; #drag .drag_bg{
} background-color: #7ac23c;
height: 34px;
#drag .drag_bg{ width: 0px;
background-color: #7ac23c; }
height: 34px; #drag .drag_text{
width: 0px; position: absolute;
} top: 0px;
#drag .drag_text{ width: 340px;
position: absolute; color:#9c9c9c;
top: 0px; -moz-user-select: none;
width: 340px; -webkit-user-select: none;
color:#9c9c9c; user-select: none;
-moz-user-select: none; -o-user-select:none;
-webkit-user-select: none; -ms-user-select:none;
user-select: none; font-size: 12px;
-o-user-select:none; }
-ms-user-select:none; #drag{
font-size: 12px; overflow: hidden !important;
} }
#drag{
overflow: hidden !important;
}
#closeIcon{
position: absolute;
top: -30px;
#closeIcon{ right: -27px;
position: absolute; z-index: 100000;
top: -30px; }
right: -27px;
z-index: 100000; .bluebutton{
} width: 100%;
text-align: center;
.bluebutton{ color: #FFFFff!important;
width: 100%; display: block;
text-align: center; background: #cbcbcb;
color: #FFFFff!important; height: 45px;
display: block; line-height: 45px;
background: #cbcbcb; border-radius: 4px;
height: 45px; letter-spacing: 2px;
line-height: 45px; cursor: pointer;
border-radius: 4px; }
letter-spacing: 2px; .ant-input {
cursor: pointer; font-family: "Monospaced Number", "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
} -webkit-box-sizing: border-box;
.ant-input { box-sizing: border-box;
font-family: "Monospaced Number", "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; margin: 0;
-webkit-box-sizing: border-box; padding: 0;
box-sizing: border-box; list-style: none;
margin: 0; position: relative;
padding: 0; display: inline-block;
list-style: none; padding: 4px 11px;
position: relative; width: 100%;
display: inline-block; height: 38px;
padding: 4px 11px; font-size: 14px;
width: 100%; line-height: 1.5;
height: 38px; color: rgba(0, 0, 0, 0.65);
font-size: 14px; background-color: #fff;
line-height: 1.5; background-image: none;
color: rgba(0, 0, 0, 0.65); border: 1px solid #d9d9d9;
background-color: #fff; border-radius: 4px;
background-image: none; -webkit-transition: all .3s;
border: 1px solid #d9d9d9; -o-transition: all .3s;
border-radius: 4px; transition: all .3s;
-webkit-transition: all .3s; }
-o-transition: all .3s;
transition: all .3s;
}
` `
} }
</style> </style>
@ -553,7 +553,7 @@ class Trialapplication extends Component {
<div className={"login_register_content"} style={ <div className={"login_register_content"} style={
user_phone_binded === true ? user_phone_binded === true ?
{ {
"width": "560px", "height": "304px", "width": "560px", "height": "280px",
"border-radius": "15px", "border-radius": "15px",
"background": " #FFFFff", "background": " #FFFFff",
"text-align": "center", "text-align": "center",

@ -33,7 +33,7 @@ class MainContent extends Component {
} }
render() { render() {
const { challenge, output_sets, onRunCodeTest, latest_output, record, st, readRepoTimeout, const { challenge, output_sets, onRunCodeTest, latest_output, record, st, readRepoTimeout,
onTestSetHeaderClick, loading, codeLoading, shixun} = this.props onTestSetHeaderClick, loading, codeLoading, shixun, vnc_url} = this.props
// if (output_sets && output_sets.test_sets) { // if (output_sets && output_sets.test_sets) {
// const test_sets_array = JSON.parse("[" + output_sets.test_sets + "]"); // const test_sets_array = JSON.parse("[" + output_sets.test_sets + "]");
@ -86,9 +86,11 @@ class MainContent extends Component {
<div className="fl pr tip-right-con" id="update_game_tip"></div> <div className="fl pr tip-right-con" id="update_game_tip"></div>
</div>*/} </div>*/}
{/* { showIframeContent && vnc_url ? <VNCDisplay { showIframeContent && vnc_url ? <VNCDisplay
vnc_url={vnc_url} vnc_url={vnc_url}
></VNCDisplay> */} ></VNCDisplay>
:
<React.Fragment>
<div className="-layout-v -flex"> <div className="-layout-v -flex">
<div className="-flex -relative"> <div className="-flex -relative">
@ -143,6 +145,9 @@ class MainContent extends Component {
<div id="actionView" className="-layout-h -center -bg-grey-90 -grey-20 -bg-darkblack" style={{height:'48px'}}> <div id="actionView" className="-layout-h -center -bg-grey-90 -grey-20 -bg-darkblack" style={{height:'48px'}}>
<ActionView onRunCodeTest={onRunCodeTest} {...this.props}></ActionView> <ActionView onRunCodeTest={onRunCodeTest} {...this.props}></ActionView>
</div> </div>
</React.Fragment>
}
</div> </div>
</div> </div>
</div> </div>

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

@ -192,16 +192,23 @@ class CodeEvaluateView extends Component {
<React.Fragment> <React.Fragment>
<div>{`已经过职业认证的教师可以免金币查看隐藏测试集。`}</div> <div>{`已经过职业认证的教师可以免金币查看隐藏测试集。`}</div>
<div>{`解锁本关所有测试集需要扣除${challenge.score*5}金币,确定要解锁吗?`}</div> <div>{`解锁本关所有测试集需要扣除${challenge.score*5}金币,确定要解锁吗?`}</div>
<div onClick={()=>this.goToCertification()} style={{color: '#4CACFF', cursor: 'pointer', 'text-decoration': 'underline'
, 'margin-top': '12px'}}>立即认证</div>
</React.Fragment> : </React.Fragment> :
`解锁本关所有测试集需要扣除${challenge.score*5}金币,确定要解锁吗?` <React.Fragment>
<div>{`解锁本关所有测试集需要扣除${challenge.score*5}金币`}</div>
<div>{`确定要解锁吗?`}</div>
</React.Fragment>
const moreButtonsRender = () => { const moreButtonsRender = () => {
return (power === 0 && user.is_teacher) ? ( return ''
<Button variant="raised" style={{ marginRight: '20px'}} // ${this.props.classes.button}
onClick={()=>this.goToCertification()} color="primary"> // return (power === 0 && user.is_teacher) ? (
{ '立即认证' } // <Button variant="raised" style={{ marginRight: '20px'}} className={``}
</Button> // onClick={()=>this.goToCertification()} color="primary">
) : '' // { '立即认证' }
// </Button>
// ) : ''
} }
testSetsComponentArray.push( testSetsComponentArray.push(
<div className="-task-ces-box mb10 clearfix tabContent" key={index+'-1'}> <div className="-task-ces-box mb10 clearfix tabContent" key={index+'-1'}>

@ -229,6 +229,9 @@ body>div[role=dialog]>div {
/* padding-bottom: 10px; */ /* padding-bottom: 10px; */
} }
/* tpi 窗口宽度*/ /* tpi 窗口宽度*/
#tpi-dialog>div[role=document] {
border-radius: 10px;
}
body>div[role=dialog] div[role=document] { body>div[role=dialog] div[role=document] {
min-width: 400px; min-width: 400px;
} }

@ -170,8 +170,7 @@ class NewHeader extends Component {
submitapplications:false, submitapplications:false,
isRender:false, isRender:false,
isRenders:false, isRenders:false,
user_phone_binded:false, showTrial:true,
showTrial:false,
} }
// console.log("176") // console.log("176")
// console.log(props); // console.log(props);
@ -209,18 +208,18 @@ class NewHeader extends Component {
} }
componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {
if(prevProps.user!=this.props.user){ // if(prevProps.user!=this.props.user){
// console.log("216") // // console.log("216")
// console.log(prevProps.user); // // console.log(prevProps.user);
// console.log(this.props.user); // // console.log(this.props.user);
if(this.props.user !== undefined){ // if(this.props.user !== undefined){
this.setState({ // this.setState({
user_phone_binded :this.props.user.user_phone_binded, // user_phone_binded :this.props.user.user_phone_binded,
}) // })
} // }
//
//
} // }
} }
componentWillReceiveProps(newProps, oldProps) { componentWillReceiveProps(newProps, oldProps) {
this.setState({ this.setState({
@ -581,7 +580,6 @@ submittojoinclass=(value)=>{
user, user,
isRender, isRender,
isRenders, isRenders,
user_phone_binded,
}=this.state; }=this.state;
/* /*
用户名称 用户头像url 用户名称 用户头像url
@ -627,7 +625,7 @@ submittojoinclass=(value)=>{
{/* />*/} {/* />*/}
{/* :""*/} {/* :""*/}
{/*}*/} {/*}*/}
<Trialapplication {...this.state} user_phone_binded={user_phone_binded} ></Trialapplication> <Trialapplication {...this.state} ></Trialapplication>
<div className="educontent clearfix"> <div className="educontent clearfix">
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} {/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/}
<a href="/"> <a href="/">

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save