Merge remote-tracking branch 'origin/master'

# Conflicts:
#	public/react/src/modules/login/Trialapplicationysl.js
dev_forum
杨树林 6 years ago
commit 26e0502fed

@ -16,6 +16,7 @@ import '@icedesign/base/index.scss';
import LoginDialog from './modules/login/LoginDialog'
import Notcompletedysl from './modules/user/Notcompletedysl'
import Trialapplicationysl from './modules/login/Trialapplicationysl'
import Trialapplicationreview from './modules/user/Trialapplicationreview'
import Trialapplication from './modules/login/Trialapplication'
import NotFoundPage from './NotFoundPage'
@ -268,6 +269,7 @@ class App extends Component {
<LoginDialog {...this.props} {...this.state}></LoginDialog>
<Notcompletedysl {...this.props} {...this.state}></Notcompletedysl>
<Trialapplicationysl {...this.props} {...this.state}></Trialapplicationysl>
<Trialapplicationreview {...this.props} {...this.state}></Trialapplicationreview>
{/*{*/}
{/* isRender === true?*/}
{/* <LoginDialog></LoginDialog> : ""*/}
@ -331,8 +333,8 @@ class App extends Component {
<Route path="/fork_list" component={TPMshixunfork_listIndexComponent}>
</Route> */}
<Route path="/forums" component={ForumsIndexComponent}>
</Route>
{/*<Route path="/forums" component={ForumsIndexComponent}>*/}
{/*</Route>*/}
{/*实训课程(原实训路径)*/}

@ -46,6 +46,9 @@ export function getUrl2(path, goTest) {
export function getUploadActionUrl(path, goTest) {
return `${getUrl()}/api/attachments.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}`
}
export function getUploadActionUrlOfAuth(id) {
return `${getUrl()}/api/users/accounts/${id}/auth_attachments.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}`
}
export function test(path) {
return `${path}`;

@ -2,7 +2,8 @@ import { from } from '_array-flatten@2.1.2@array-flatten';
// export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil';
export { getImageUrl as getImageUrl, getUrl as getUrl, getUrl2 as getUrl2, setImagesUrl as setImagesUrl, getUploadActionUrl as getUploadActionUrl } from './UrlTool';
export { getImageUrl as getImageUrl, getUrl as getUrl, getUrl2 as getUrl2, setImagesUrl as setImagesUrl
, getUploadActionUrl as getUploadActionUrl, getUploadActionUrlOfAuth as getUploadActionUrlOfAuth } from './UrlTool';
export { default as queryString } from './UrlTool2';
export { SnackbarHOC as SnackbarHOC } from './SnackbarHOC';

@ -24,6 +24,22 @@
.panel-comment_item .editor__resize {
transform: translateX(-2%);
position: absolute;
width: 120px;
height: 4px;
left: 54%;
transform: translateX(-50%);
margin-top: 2px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
cursor: row-resize;
text-indent: 110%;
white-space: nowrap;
overflow: hidden;
text-transform: capitalize;
box-sizing: border-box;
}
/*帖子回復按鈕*/
@ -31,6 +47,11 @@ a.commentsbtn.task-btn-blue {
background: #4CACFF !important;
}
.commentTab a.commentsbtn.task-btn-blue {
margin-right: 22px;
margin-top: 6px;
}
.editormd-grid-table-row a.editormd-emoji-btn.selected {
border-bottom: 2px solid #4CACFF!important;

@ -648,7 +648,9 @@ class TopicDetail extends Component {
<div className="padding30 memoContent new_li" style={{ paddingBottom: '10px'}}>
<MarkdownToHtml content={memo.content}></MarkdownToHtml>
{memo.is_md == true ? <MarkdownToHtml content={memo.content}></MarkdownToHtml> :
<div dangerouslySetInnerHTML={{ __html: memo.content }}></div>
}
</div>
<div className="padding30 bor-bottom-greyE" style={{paddingTop: '2px'}}>
<div className="mt10 mb20">

@ -650,7 +650,7 @@ render(){
width: '375px',
height: '30px'
}}>
<Checkbox value={item.user_id} checked={parseInt(task_status[key])===item.user_id?true:false}
<Checkbox value={item.user_id} key={item.user_id} checked={parseInt(task_status[key])===item.user_id?true:false}
disabled={item.commit_status || item.user_id == this.props.current_user.user_id ===true?true:false} className="fl "
></Checkbox>
<Tooltip placement="bottom" title={item.user_nam}><div className={"fl ml5 fonthidden"} style={{width: '70px'}}>{item.user_name}</div></Tooltip>

@ -278,7 +278,7 @@ class UseBank extends Component{
*/
return (
<p className="clearfix mb7" key={item.id}>
<Checkbox className="fl" value={item.id}></Checkbox>
<Checkbox className="fl" value={item.id} key={item.id}></Checkbox>
<span className="fl with65">
<label className="task-hide fl" title={item.name && item.name.length > 30 ? item.name:""} style={{"maxWidth":"100%"}}>{item.name}</label>
</span>

@ -114,14 +114,14 @@ class coursesHome extends Component{
onClick={ () => this.changeStatus("course_members_count")}>最热</a>
<div className="fr mr5 search-new">
<Search
{/* <Search
placeholder="课堂名称/教师姓名/学校名称"
id="subject_search_input"
value={search}
onInput={this.inputSearchValue}
onSearch={this.searchValue}
autoComplete="off"
></Search>
></Search> */}
</div>
</div>

@ -80,7 +80,7 @@ class ShixunModal extends Component{
//勾选实训
shixunhomeworkedit=(list)=>{
debugger
let newpatheditarry=[];
if (this.props.singleChoose == true) {
if (list.length > 0) {
@ -99,6 +99,7 @@ class ShixunModal extends Component{
}
contentViewScrolledit=(e)=>{
//滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
let {Searchvalue,type,page}=this.state;
@ -122,9 +123,9 @@ class ShixunModal extends Component{
this.setState({
page:1,
})
this.setupdatalist(value,type,true,1)
this.props.funpatheditarry([])
this.setupdatalist(value,type,true,1)
}
//tag
@ -135,9 +136,9 @@ class ShixunModal extends Component{
page:1,
newshixunmodallist:undefined
})
this.setupdatalist(Searchvalue,types,true,1)
this.props.funpatheditarry([])
this.setupdatalist(Searchvalue,types,true,1)
}
@ -353,11 +354,14 @@ class ShixunModal extends Component{
<Checkbox.Group style={{ width: '100%' }} value={patheditarry} onChange={this.shixunhomeworkedit}>
{
newshixunmodallist === undefined ? "": newshixunmodallist.map((item,key)=>{
console.log(item)
return(
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl with40 edu-txt-left task-hide paddingl5 newtaskhide">
<Checkbox
id={"shixun_input_"+item.shixun_id} value={item.shixun_id}
id={"shixun_input_"+item.shixun_id}
value={item.shixun_id}
key={item.shixun_id}
className=" task-hide edu-txt-left newtaskhide"
style={{"width":"280px"}}
name="shixun_homework[]"

@ -801,10 +801,10 @@ a.white-btn.use_scope-btn:hover{
position: absolute;
}
.ant-input{
.ant-input,.ant-input .ant-input-suffix{
background-color: #fafafa!important;
}
.ant-input:focus{
.ant-input:focus,.ant-input:focus .ant-input-suffix{
background-color:#ffffff!important;
}

@ -193,6 +193,7 @@ class Ecerciseallbackagain extends Component{
className="fl task-hide edu-txt-left"
name="shixun_homework[]"
value={item.user_id}
key={item.user_id}
>
<label style={{"textAlign": "left", "color": "#05101A"}}
className="task-hide color-grey-name" title="frerere">{item.user_name}</label>

@ -122,6 +122,7 @@ class Exercisestatisticalresult extends Component {
return (
<span key={key}>
<Checkbox value={item.exercise_group_id}
key={item.exercise_group_id}
// checked={course_group_info === undefined ? false : course_group_info[key].course_group_id === item.course_group_id ? true : false}
className="fl ">{item.exercise_group_name}
<span>({item.exercise_group_students})</span>

@ -142,6 +142,7 @@ class OfficialAcademicTranscript extends Component {
color: rgba(221,23,23,1);
display: inline-block;
line-height: 24px;
text-align: center;
}
.tasknameboxs{

@ -101,6 +101,7 @@ class Exercisetablesmubus extends Component {
color: rgba(221,23,23,1);
display: inline-block;
line-height: 24px;
text-align: center;
}
.tasknameboxs{

@ -2404,6 +2404,7 @@ class Studentshavecompletedthelist extends Component {
course_groupyslstwodata.map((item, key) => {
return (
<span key={key}><Checkbox className="fl mt5"
key={item.id}
value={item.id}>{item.tu}<span>({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unanswer_users : Teacherliststudentlist.exercise_types.answer_users})</span></Checkbox></span>
)
})
@ -2435,6 +2436,7 @@ class Studentshavecompletedthelist extends Component {
course_groupyslstwodatas.map((item, key) => {
return (
<span key={key}><Checkbox className="fl mt5"
key={item.id}
value={item.id}>{item.tu}<span>({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unreview_counts : Teacherliststudentlist.exercise_types.review_counts})</span></Checkbox></span>
)
})
@ -2464,6 +2466,7 @@ class Studentshavecompletedthelist extends Component {
course_groupyslstwodata.map((item, key) => {
return (
<span key={key}><Checkbox className="fl mt5"
key={item.id}
value={item.id}>{item.tu}<span>({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unanswer_users : Teacherliststudentlist.exercise_types.answer_users})</span></Checkbox></span>
)
})
@ -2492,6 +2495,7 @@ class Studentshavecompletedthelist extends Component {
course_groups.map((item, key) => {
return (
<span key={key}><Checkbox className="fl mt5"
key={item.exercise_group_id}
value={item.exercise_group_id}>{item.exercise_group_name}<span>({item.exercise_group_students})</span></Checkbox></span>
)
})

@ -334,8 +334,8 @@ class Testpapersettinghomepage extends Component{
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a onClick={()=>this.confirmysl(`/exercises/${this.props.match.params.Id}/exercise_lists.xlsx`)}>学生成绩</a></li>
<li><a onClick={()=>this.confirmysl(`/exercises/${this.props.match.params.Id}/export_exercise`)} >空白试卷</a></li>
<li><a onClick={()=>this.confirmysl(`/zip/export_exercises?exercise_id=${this.props.match.params.Id}${this.state.groupyslsval===null||this.state.groupyslsval===undefined?null:this.state.groupyslsval}`)}>学生答题试卷</a></li>
{/*<li><a onClick={()=>this.confirmysl(`/exercises/${this.props.match.params.Id}/export_exercise`)} >空白试卷</a></li>*/}
{/*<li><a onClick={()=>this.confirmysl(`/zip/export_exercises?exercise_id=${this.props.match.params.Id}${this.state.groupyslsval===null||this.state.groupyslsval===undefined?null:this.state.groupyslsval}`)}>学生答题试卷</a></li>*/}
</ul>
</li>:""}
</div>

@ -737,7 +737,7 @@ render(){
width: '375px',
height: '30px'
}}>
<Checkbox value={item.user_id} checked={
<Checkbox value={item.user_id} key={item.user_id} checked={
task_status.map((item,key)=>{
return parseInt(task_status[key])===item.user_id?true:false
})

@ -1188,7 +1188,7 @@ class GraduationTaskssettinglist extends Component{
{taskslistdata.search_assistants&&taskslistdata.search_assistants.task_status.map((item,key)=>{
return(
<span key={key}>
<Checkbox value={item.id} className="fl ">{item.name}
<Checkbox value={item.id} key={item.id} className="fl ">{item.name}
<span>({item.count})</span>
</Checkbox>
</span>
@ -1211,7 +1211,7 @@ class GraduationTaskssettinglist extends Component{
{taskslistdata.search_assistants&&taskslistdata.search_assistants.course_group_info.map((item,key)=>{
return(
<span key={key}>
<Checkbox value={item.course_group_id} className="fl ">{item.group_group_name}
<Checkbox value={item.course_group_id} key={item.course_group_id} className="fl ">{item.group_group_name}
<span>({item.count})</span>
</Checkbox>
</span>
@ -1423,7 +1423,7 @@ class GraduationTaskssettinglist extends Component{
{taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.map((item,key)=>{
return(
<span key={key}>
<Checkbox value={item.id} className="fl ">{item.name}
<Checkbox value={item.id} key={item.id} className="fl ">{item.name}
<span>({item.count})</span>
</Checkbox>
</span>
@ -1456,7 +1456,7 @@ class GraduationTaskssettinglist extends Component{
{taskslistdata.search_assistants&&taskslistdata.search_assistants.task_status.map((item,key)=>{
return(
<span key={key}>
<Checkbox value={item.id} className="fl ">{item.name}
<Checkbox value={item.id} key={item.id} className="fl ">{item.name}
<span>({item.count})</span>
</Checkbox>
</span>
@ -1479,7 +1479,7 @@ class GraduationTaskssettinglist extends Component{
{taskslistdata.search_assistants&&taskslistdata.search_assistants.course_group_info.map((item,key)=>{
return(
<span key={key}>
<Checkbox value={item.course_group_id} className="fl ">{item.group_group_name}
<Checkbox value={item.course_group_id} key={item.course_group_id} className="fl ">{item.group_group_name}
<span>({item.count})</span>
</Checkbox>
</span>

@ -65,7 +65,7 @@ function buildColumns(that) {
sorter: showSorter,
sortOrder: sortedInfo.columnKey === 'name' && sortedInfo.order,
render: (name, record) => {
return <a href={`/login/${record.login}`} target="_blank" className="overflowHidden1" style={{ maxWidth: '110px'}}
return <a href={`/users/${record.login}`} target="_blank" className="overflowHidden1" style={{ maxWidth: '110px'}}
title={`${name.length > 4 ? name : ''}`}>{name}</a>
}
}, {

@ -2596,7 +2596,7 @@ class PollNew extends Component {
{item.question.answers === undefined ? "" : item.question.answers.map((items, i) => {
return (
<div className="mt10 pt20 " style={{"clear": "both"}}>
<Checkbox value={i} className={"fl"} style={{"text-align": "left"}}></Checkbox>
<Checkbox value={i} key={i} className={"fl"} style={{"text-align": "left"}}></Checkbox>
<span className={" flex1"} style={{"text-align": "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1120px"}}>{items.answer_text}</span>
</div>
)

@ -135,7 +135,7 @@ class CommitSummary extends Component{
</div>
<div>
<p className="ml29 fl color-black mt10 summaryname" onClick={this.asdasdsad}>提交总结</p>
<p className="ml29 fl color-black mt10 summaryname" onClick={this.asdasdsad}>修改总结</p>
<a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist?tab=0`} className="color-grey-6 fr font-16 ml30 mt10">返回</a>
</div>
{/*educontentbox*/}

@ -810,6 +810,7 @@ class Listofworks extends Component {
return (
<span key={key}>
<Checkbox value={item.id}
key={item.id}
className="fl ">{item.name}
<span>({item.count})</span>
</Checkbox>
@ -841,6 +842,7 @@ class Listofworks extends Component {
return (
<span key={key}>
<Checkbox value={item.course_group_id}
key={item.course_group_id}
className="fl ">{item.group_group_name}
<span>({item.count})</span>
</Checkbox>

@ -899,10 +899,11 @@ class Listofworksstudentone extends Component {
)
},
],
yslpros:false,
}
console.log("902");
console.log("902");
console.log(this.props);
// console.log("902");
// console.log("902");
// console.log(this.props);
}
componentDidCatch(error, info){
@ -912,19 +913,32 @@ class Listofworksstudentone extends Component {
}
componentWillReceiveProps(nextProps) {
console.log("+++++++++913");
console.log("+++++++++915");
console.log("+++++++++916");
console.log(nextProps);
console.log(this.props)
// console.log(this.props.isAdmin());
if (nextProps.code_review != this.props.code_review) {
if (nextProps.code_review !== undefined) {
console.log("diaoyonglwangluo1");
if(this.props.isAdmin() === true){
this.tearchar();
}else{
this.student();
}
}
}
}
componentDidMount() {
console.log("componentDidMount");
// console.log(this.props.isAdmin());
if(this.props.isAdmin() === true){
this.tearchar();
console.log("909");
// console.log("909");
}else{
this.student();
console.log("911");
// console.log("911");
}
}
@ -1095,7 +1109,7 @@ class Listofworksstudentone extends Component {
})
} else {
console.log(teacherdata)
// console.log(teacherdata)
if (teacherdata.id !== undefined || teacherdata.id !== null || teacherdata.id !== "") {
// console.log("seacthdata设置数据1")
// console.log(this.state.teacherdata )
@ -1165,8 +1179,8 @@ class Listofworksstudentone extends Component {
}
}
console.log("554");
console.log(columns2);
// console.log("554");
// console.log(columns2);
this.setState({
@ -1591,13 +1605,13 @@ class Listofworksstudentone extends Component {
// 设置数据
seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => {
debugger
let {page, limit} = this.state;
let datalist = [];
let columns = this.state.columns;
var columns2=[];
if (teacherdata !== undefined) {
console.log("1588");
// console.log("1588");
for (var i = 0; i < student_works.length; i++) {
var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm');
datalist.push({
@ -1621,8 +1635,8 @@ class Listofworksstudentone extends Component {
user_name: student_works[i].user_name,
user_login: student_works[i].user_login,
})
console.log(datalist);
console.log("1612");
// console.log(datalist);
// console.log("1612");
}
@ -1719,9 +1733,9 @@ class Listofworksstudentone extends Component {
} else {
}
console.log(datalist);
console.log("1712");
//
// console.log(datalist);
// console.log("1712");
this.setState({
data: datalist,
columns: columns2,
@ -2004,7 +2018,7 @@ class Listofworksstudentone extends Component {
}
//立即截止
homeworkends = () => {
console.log("1160");
// console.log("1160");
let homeworkid = this.props.match.params.homeworkid;
let url = "/homework_commons/" + homeworkid + "/end_groups.json";
@ -2201,18 +2215,66 @@ class Listofworksstudentone extends Component {
//
// }
daochushixunbaogao=()=>{
let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo===undefined ||this.state.course_groupyslstwo===null? "": this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo===undefined||this.state.checkedValuesineinfo===null? "":this.state.checkedValuesineinfo}&search=${this.state.searchtext===undefined||this.state.searchtext===null?"":this.state.searchtext}`
this.confirmysl(url);
}
daochuzuoye =() =>{
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo===undefined||this.state.checkedValuesineinfo===null?"":this.state.checkedValuesineinfo}&search=${this.state.searchtext===undefined||this.state.searchtext=== null?"":this.state.searchtext}`
this.confirmysl(url);
}
confirmysl(url){
axios.get(url).then((response) => {
if(response === undefined){
return
}
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() {
let {columns,course_groupysls,isAdmin, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible,visibles, game_list,columnsstu, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state;
// console.log(this.state.data);
// console.log("841");
console.log(this.state.columns);
console.log(data);
console.log("2202");
console.log(this.props.isAdmin());
// console.log(this.state.columns);
// console.log(data);
// console.log("2202");
// console.log(this.props.isAdmin());
return (
this.props.isAdmin() === true ?
@ -2232,7 +2294,13 @@ class Listofworksstudentone extends Component {
updatas={() => this.isupdatas()}
/> : ""}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{visibles === true ?
<div>
<style>
@ -2344,15 +2412,17 @@ class Listofworksstudentone extends Component {
<ul className="clearfix" style={{padding: '20px 15px 10px 20px'}}>
<li className="clearfix ">
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
{teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status=== 0? "":
computeTimetype===true&&this.props.isNotMember()===false? <div className={"computeTime font-13"} onClick={this.setComputeTime}>
<span>
{teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true?
(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTimet}>
计算成绩
</div>:<div className={"computeTimes font-13"}>
</div>:""):
teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
计算成绩
</div>}
</span>}
</div>:"")
}
</span>
<div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}>
<Search
@ -2381,6 +2451,7 @@ class Listofworksstudentone extends Component {
return (
<span key={key}>
<Checkbox value={item.id}
key={item.id}
className="fl ">{item.name}
<span>({item.count})</span>
</Checkbox>
@ -2412,6 +2483,7 @@ class Listofworksstudentone extends Component {
return (
<span key={key}>
<Checkbox value={item.course_group_id}
key={item.course_group_id}
className="fl ">{item.group_group_name}
<span>({item.count})</span>
</Checkbox>
@ -2466,7 +2538,7 @@ class Listofworksstudentone extends Component {
<div className="mh650 edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">没有数据可以显示.</p>
<p className="edu-nodata-p mb30">没有数据可以显示</p>
</div>
</div>
@ -2631,16 +2703,22 @@ class Listofworksstudentone extends Component {
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
{teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status=== 0? "":
computeTimetype===true&&this.props.isNotMember()===false? <div className={"computeTime font-13"} onClick={this.setComputeTime}>
{computeTimetype===true?
(this.props.isNotMember()===false?
<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:<div className={"computeTimes font-13"}>
</div>
:"")
:
(teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
this.props.isNotMember()===false?
<div className={"computeTimes font-13"}>
计算成绩
</div>}
</div>
:"")
}
</span>}
</div>
</div>
@ -2792,16 +2870,17 @@ class Listofworksstudentone extends Component {
<div className="fr">
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
{teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":
<span>
{teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status===0?"":
this.props.isNotMember()===false&&computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
{teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?
(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:<div className={"computeTimes font-13"}>
</div>:""):
teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
计算成绩
</div>}
</span>
</div>:"")
}
</span>}
</div>
{/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/}

@ -32,8 +32,7 @@ class ShixunHomeworkPage extends Component {
visible: false,
showmodel:false,
child:undefined,
DownloadType:false,
DownloadMessageval:undefined,
yslpros:false,
}
}
@ -55,9 +54,9 @@ class ShixunHomeworkPage extends Component {
}
Getdataback = (jobsettingsdata, teacherdata) => {
console.log("56");
console.log(jobsettingsdata);
console.log(teacherdata);
// console.log("56");
// console.log(jobsettingsdata);
// console.log(teacherdata);
this.setState({
jobsettingsdata: jobsettingsdata,
@ -73,22 +72,27 @@ class ShixunHomeworkPage extends Component {
// let sum = []
// sum.push(type[1])
// console.log("componentDidMountcomponentDidMount");
console.log(type);
// console.log(type);
this.setState({
tab: type[1],
})
let querys = this.props.location.pathname;
const types = querys.split('/');
console.log(types);
// console.log(types);
this.setState({
shixuntypes: types[3]
})
}
// confirmysl(child,url) {
// confirmysl(url);
// }
confirmysl(child,i) {
if(i===1){
child.daochushixunbaogao();
}
if(i===2){
child.daochuzuoye();
}
}
homeworkendss(child){
child.homeworkends();
@ -102,40 +106,8 @@ class ShixunHomeworkPage extends Component {
child.workshowmodel();
}
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
bindRef = ref => { this.child = ref }
///////////////教师截止
@ -143,6 +115,7 @@ class ShixunHomeworkPage extends Component {
let {tab, teacherdata, jobsettingsdata} = this.state;
const isAdmin = this.props.isAdmin();
return (
<div className="newMain clearfix ">
<div className={"educontent mb20"} style={{width: "1200px"}}>
@ -230,11 +203,11 @@ class ShixunHomeworkPage extends Component {
<li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
{/*<li><a*/}
{/* onClick={(child,i) => this.confirmysl(this.child,1)}>实训报告</a>*/}
{/*</li>*/}
<li><a
onClick={(url) => this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo===undefined ||this.state.course_groupyslstwo===null? null: this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo===undefined||this.state.checkedValuesineinfo===null? null:this.state.checkedValuesineinfo}&search=${this.state.searchtext===undefined||this.state.searchtext===null?null:this.state.searchtext}`)}>实训报告</a>
</li>
<li><a
onClick={(url) => this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo===undefined||this.state.checkedValuesineinfo===null?null:this.state.checkedValuesineinfo}&search=${this.state.searchtext===undefined||this.state.searchtext=== null?null:this.state.searchtext}`)}>学生成绩</a>
onClick={(child,i) => this.confirmysl(this.child,2)}>学生成绩</a>
</li>
</ul>
@ -254,7 +227,7 @@ class ShixunHomeworkPage extends Component {
<a className="fr color-blue font-16" onClick={(child)=>this.workshowmodels(this.child)}>代码查重</a>
: "" : ""}
{this.state.view_report === true ? <Link className="fr color-blue font-16" target={"_blank"}
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/shixun_work_report`}>
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata&&teacherdata.work_id}/shixun_work_report`}>
查看实训报告
</Link> : ""}
{
@ -271,18 +244,18 @@ class ShixunHomeworkPage extends Component {
</div>
</div>
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
{/*<DownloadMessageysl*/}
{/*{...this.props}*/}
{/*value={this.state.DownloadMessageval}*/}
{/*modalCancel={this.Downloadcal}*/}
{/*modalsType={this.state.DownloadType}*/}
/>
{/*/>*/}
{parseInt(tab) === 0 ?<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>
:parseInt(tab) === 1 ?<Workquestionandanswer triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Workquestionandanswer>
:parseInt(tab) === 2 ?<ShixunStudentWork triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>
:parseInt(tab) === 3 ?<Trainingjobsetting triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>:""}
{parseInt(tab) === 0 ?<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>:""}
{parseInt(tab) === 1 ?<Workquestionandanswer triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Workquestionandanswer>:""}
{parseInt(tab) === 2 ?<ShixunStudentWork triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>:""}
{parseInt(tab) === 3 ?<Trainingjobsetting triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>:""}
</div>
</div>

@ -3,6 +3,7 @@ import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn,ActionBtn} from 'educoder';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import DownloadMessageysl from '../../modals/DownloadMessageysl';
import NoneData from '../coursesPublic/NoneData';
import {
Form,
@ -69,6 +70,8 @@ class ShixunStudentWork extends Component {
datalist:undefined,
showmodel:false,
jobsettingsdata:undefined,
DownloadType:false,
DownloadMessageval:undefined
}
}
@ -78,6 +81,21 @@ class ShixunStudentWork extends Component {
this.props.triggerRef(this);
this.getTrainingjobsettings();
}
componentWillReceiveProps(nextProps) {
// console.log("+++++++++916");
// console.log(nextProps);
// console.log(this.props)
// console.log(this.props.isAdmin());
if (nextProps.code_review != this.props.code_review) {
if (nextProps.code_review !== undefined) {
console.log("diaoyonglwangluo1");
this.getTrainingjobsettings();
}
}
}
getTrainingjobsettings=()=>{
this.getupdata();
this.getTrainingjobsetting();
@ -507,6 +525,55 @@ class ShixunStudentWork extends Component {
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
daochushixunbaogao=()=>{
let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`;
this.confirmysl(url);
}
daochuzuoye =() =>{
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`;
this.confirmysl(url);
}
confirmysl(url){
axios.get(url).then((response) => {
if(response === undefined){
return
}
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() {
let {
data,
@ -596,6 +663,13 @@ class ShixunStudentWork extends Component {
issCancel={()=>this.hideshowmodel()}
updatas={()=>this.getupdata()}
/>:""}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{/*<DownloadMessage*/}
{/* {...this.props}*/}
@ -706,7 +780,7 @@ class ShixunStudentWork extends Component {
{data&&data.group_info === undefined ? "" : data&&data.group_info.map((item, key) => {
return (
<span key={key}>
<Checkbox value={item.id}className="fl ">
<Checkbox value={item.id} key={item.id} className="fl ">
<span>
{item.name}({item.members_count})
</span>
@ -759,7 +833,13 @@ class ShixunStudentWork extends Component {
top: 72%;}
}
`}</style>
{datalist === undefined ? "" : <Table
{datalist === undefined ? "" : datalist.length===0? <div className="alltask">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂无数据哦~</p>
</div>
</div>:<Table
dataSource={datalist}
columns={columns}
pagination={false}
@ -770,7 +850,7 @@ class ShixunStudentWork extends Component {
</div>
{
datalist === undefined ? "":datalist.length<11?
datalist === undefined ? "":datalist.length===0?"":datalist.length<11?
<div className="edu-txt-center mt30 mb20">
<Pagination showQuickJumper current={page}
onChange={this.TablePagination} pageSize={10}

@ -103,7 +103,7 @@ class ShixunWorkReport extends Component {
}
render() {
let{data} =this.state;
let category_id=data===undefined?"":data.category.category_id;
let category_id=data===undefined?"":data.category===null?"":data.category.category_id;
let homework_common_id=data===undefined?"":data.homework_common_id;
let homeworkid=this.props.match.params.homeworkid;
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
@ -125,7 +125,7 @@ class ShixunWorkReport extends Component {
</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+category_id} style="grey" className="btn colorgrey fl hovercolorblue ">
<span className={"color-grey-9"}>{data&&data.category.category_name}</span>
<span className={"color-grey-9"}>{data===undefined?"":data.category===null?"":data.category.category_name}</span>
</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+homework_common_id+"/list?tab=0"} className="fl color-grey-9">作业详情</WordsBtn>
@ -136,10 +136,10 @@ class ShixunWorkReport extends Component {
<div style={{ width:'100%',height:'75px'}} >
<p className=" fl color-black mt25 summaryname">{data&&data.shixun_name}</p>
{/*{this.props.isAdmin()?<a className=" fr font-14 ml30 mt10 mr20 color-grey-9 ">导出实训报告数据</a>:""}*/}
{this.props.isAdmin() ? <a
className="fr color-blue font-16"
onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${homeworkid}`)}
>导出实训报告数据</a> : ""}
{/*{this.props.isAdmin() ? <a*/}
{/*className="fr color-blue font-16"*/}
{/*onClick={()=>this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}*/}
{/*>导出实训报告数据</a> : ""}*/}
</div>
<div className="stud-class-set bor-bottom-greyE">

@ -373,7 +373,7 @@ class ShixunhomeWorkItem extends Component{
width:192px !important;
}
.homepagePostSettingbox{
width:121px !important;
width:139px !important;
}
`
}
@ -381,7 +381,8 @@ class ShixunhomeWorkItem extends Component{
{this.props.isAdmin?<div className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"44px","display":"block"}}>
<a className="btn colorblue font-16" href={"/shixuns/"+discussMessage.shixun_identifier+"/challenges"} target={"_blank"}>实训详情</a>
{this.props.isAdminOrCreator()?<a onClick={()=>this.editname(discussMessage.name,discussMessage.homework_id)} className={"btn colorblue ml20 font-16"}>重命名</a>:""}
<WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>
{/*<WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>*/}
<WordsBtn className="btn colorblue font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>
</div>:""}

@ -154,6 +154,7 @@ class ShixunCustomsPass extends Component {
color: rgba(221,23,23,1);
display: inline-block;
line-height: 24px;
text-align: center;
}
.ant-table-tbody > tr > td{
font-size:14px;

@ -210,9 +210,9 @@ class TraineetraininginformationModal extends Component {
footer={null}
onCancel={this.Cancel}
>
<div style={{width:"100%" }}className="login_register_content" >
<div style={{width:"100%" }} >
<div style={{"width": "100%","text-align": "left","clear": "both"}}>
<div className="mt5 fl" >
<div className="mt8 fl" >
<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.experience=== undefined?"0" :this.props.experience}/</span><span style={{"color":'#29BD8B'}}>{this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_score}</span></span>
</div>
@ -224,7 +224,7 @@ class TraineetraininginformationModal extends Component {
</div>
</div>
<div className=" bor-bottom-greyE mt45 "></div>
{/*<div className=" bor-bottom-greyE mt45 "></div>*/}
<div style={{"clear": "both"}}>
<div className="fl edu-back-white ml10 ">

@ -27,6 +27,7 @@ import moment from 'moment';
import 'moment/locale/zh-cn';
import Modals from "../../modals/Modals";
import Startshixuntask from "../coursesPublic/Startshixuntask";
import DownloadMessageysl from "../../modals/DownloadMessageysl";
const RadioGroup = Radio.Group;
//GraduationTaskssetting.js
@ -140,6 +141,20 @@ class Trainingjobsetting extends Component {
}
componentWillReceiveProps(nextProps) {
// console.log("+++++++++916");
// console.log(nextProps);
// console.log(this.props)
// console.log(this.props.isAdmin());
if (nextProps.code_review != this.props.code_review) {
if (nextProps.code_review !== undefined) {
console.log("diaoyonglwangluo4");
this.getTrainingjobsetting()
}
}
}
// 获取数据地方
@ -1730,6 +1745,55 @@ class Trainingjobsetting extends Component {
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
daochushixunbaogao=()=>{
let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`;
this.confirmysl(url);
}
daochuzuoye =() =>{
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`;
this.confirmysl(url);
}
confirmysl(url){
axios.get(url).then((response) => {
if(response === undefined){
return
}
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() {
@ -1776,7 +1840,13 @@ class Trainingjobsetting extends Component {
{/* {...this.props}*/}
{/* ref="DownloadMessage"*/}
{/*/>*/}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{/*立即发布*/}
<HomeworkModal
modaltype={this.state.modaltype}

@ -35,6 +35,7 @@ import Homeworddescription from "../shixunHomework/Homeworddescription";
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import Startshixuntask from "../coursesPublic/Startshixuntask";
import DownloadMessageysl from "../../modals/DownloadMessageysl";
const TextArea = Input.TextArea
//作业问答页面
@ -93,6 +94,21 @@ class Workquestionandanswer extends Component {
shixuntypes: type[3]
})
}
componentWillReceiveProps(nextProps) {
// console.log("+++++++++916");
// console.log(nextProps);
// console.log(this.props)
// console.log(this.props.isAdmin());
if (nextProps.code_review != this.props.code_review) {
if (nextProps.code_review !== undefined) {
console.log("diaoyonglwangluo2");
var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid)
this.Gettitleinformation(homeworkid)
}
}
}
isupdatas = () => {
var homeworkid = this.props.match.params.homeworkid;
@ -319,6 +335,55 @@ class Workquestionandanswer extends Component {
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
daochushixunbaogao=()=>{
let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`;
this.confirmysl(url);
}
daochuzuoye =() =>{
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`;
this.confirmysl(url);
}
confirmysl(url){
axios.get(url).then((response) => {
if(response === undefined){
return
}
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() {
const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let {
@ -352,6 +417,13 @@ class Workquestionandanswer extends Component {
{/* ref="DownloadMessage"*/}
{/*/>*/}
{/*立即发布*/}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
<HomeworkModal
modaltype={this.state.modaltype}
modalname={this.state.modalname}

@ -143,6 +143,7 @@ class OfficialAcademicTranscript extends Component {
color: rgba(221,23,23,1);
display: inline-block;
line-height: 24px;
text-align: center;
}
.tasknameboxs{

@ -123,3 +123,7 @@
letter-spacing: 2px;
cursor: pointer;
}
.myinput{
display: flex;
justify-content: center;
}

@ -7,7 +7,7 @@ import Dialog, {
DialogTitle,
} from 'material-ui/Dialog';
import axios from 'axios';
import './LoginDialog.css'
import {broadcastChannelPostMessage} from 'educoder'
import {Tabs, Input, Checkbox, Button, notification, Menu} from 'antd';
@ -216,13 +216,13 @@ class Trialapplication extends Component {
this.setState({
isRenders: false
})
this.Cancel();
this.handleDialogClose()
window.location.href = "/";
} else {
this.setState({
isRenders: false
})
this.Cancel();
this.handleDialogClose()
}
}
@ -277,14 +277,12 @@ class Trialapplication extends Component {
this.setState({
isRenders: false
})
this.Cancel();
this.handleDialogClose()
} else {
this.setState({
isRenders: false
})
this.Cancel();
this.handleDialogClose()
}
}
}).catch((error) => {

@ -44,6 +44,7 @@ class Trialapplicationysl extends Component {
Cancel = () => {
// this.props.Cancel()
}
//
componentWillReceiveProps(nextProps) {
// console.log("46");
// console.log(nextProps);
@ -85,7 +86,7 @@ class Trialapplicationysl extends Component {
// console.log("53");
//
// console.log(this.props.isRenders);
this.getipthon();
// this.getipthon();
if (this.props.isRenders != undefined) {
this.setState({
isRenders: this.props.isRenders
@ -292,7 +293,8 @@ class Trialapplicationysl extends Component {
this.setState({
isRenders: false
})
this.Cancel();
// this.Cancel();
this.handleDialogClose()
// } else {
// this.setState({
// isRenders: false

@ -675,7 +675,7 @@ class MainContentContainer extends Component {
const timeOut = time_limit;
// http://localhost:3000/myshixuns/so5w6iap97/stages/zl6kx8f7vfpo/game_build?first=1&resubmit=GDBEX741_1993
// const game_build_url = `${locationPath}/game_build?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}`
const game_build_url = `/tasks/${game.identifier}/game_build.json?first=${first}&resubmit=${resubmit}&content_modified=${!!content_modified ? 1 : 0}&sec_key=${sec_key}`
const game_build_url = `/tasks/${game.identifier}/game_build.json?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}&sec_key=${sec_key}`
// var timeOut = parseInt(<%= @myshixun.main_mirror.try(:time_limit) %>); // 超时参数

@ -336,7 +336,7 @@ class LeftView extends Component {
</div>
</div>
</div>
<div id="tab_con_4" className="tab-info commentsDelegateParent" style={ tabIndex === 3 ? {display: 'block'} : {display: 'none'} }>
<div id="tab_con_4" className="commentTab tab-info commentsDelegateParent" style={ tabIndex === 3 ? {display: 'block'} : {display: 'none'} }>
{ loadingComments ?
<CircularProgress size={40} thickness={3} style={{ marginLeft: 'auto', marginRight: 'auto', marginTop: '40%', display: 'block' }}/> :
<CommentContainer {...this.props}></CommentContainer>

@ -181,7 +181,7 @@ class sendPanel extends Component{
item.shixuns.map((items,keys)=>{
return(
<div className="mt5" key={keys}>
<Checkbox name={key} value={items.shixun_id}>{items.shixun_name}</Checkbox>
<Checkbox name={key} value={items.shixun_id} key={items.shixun_id}>{items.shixun_name}</Checkbox>
</div>
)
})

@ -117,14 +117,14 @@ class ShixunPathSearch extends Component{
<a href="javascript:void(0)" className={ order == "updated_at" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("updated_at")}>最新</a>
<a href="javascript:void(0)" className={ order == "myshixun_count" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("myshixun_count")}>最热</a>
<div className="fr mr5 search-new">
<Search
{/* <Search
placeholder="请输入路径名称进行搜索"
id="subject_search_input"
value={search}
onInput={this.inputSearchValue}
onSearch={this.searchValue}
autoComplete="off"
></Search>
></Search> */}
</div>
</div>
<PathCard {...this.props} {...this.state}></PathCard>

@ -18,7 +18,7 @@ import Addcourses from '../courses/coursesPublic/Addcourses';
import LoginDialog from '../login/LoginDialog';
import Trialapplicationysl from '../login/Trialapplicationysl'
import Trialapplication from '../login/Trialapplication'
import 'antd/lib/modal/style/index.css';
@ -636,7 +636,7 @@ submittojoinclass=(value)=>{
{/* />*/}
{/* :""*/}
{/*}*/}
{/*<Trialapplicationysl {...this.state} {...this.props} Cancel={() => this.cancelModulationModels()} ></Trialapplicationysl>*/}
{/*<Trialapplication {...this.state} {...this.props} Cancel={() => this.cancelModulationModels()} ></Trialapplication>*/}
<div className="educontent clearfix">
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/}
<a href="/">

@ -214,7 +214,7 @@ class ShixunCardList extends Component {
{/*enterButton*/}
{/*/>*/}
<Search
{/* <Search
style={{ width: 300 }}
className="fl"
placeholder="请输入创建者/实训/关卡名称进行搜索"
@ -222,7 +222,7 @@ class ShixunCardList extends Component {
onInput={this.Input_searchs}
onSearch={value => this.Input_search(value)}
autoComplete="off"
></Search>
></Search> */}
</div>
<div className="fr">
<span className="fl color-grey-6 mr30 font-16 mt5" id="search_name">{

@ -43,6 +43,7 @@ class LoginRegisterComponent extends Component {
Whethertoverify:false,
modalsType:false,
pciphone:true,
boolyzm:false,
}
}
@ -213,7 +214,10 @@ class LoginRegisterComponent extends Component {
})
return
}
if (this.state.password !== this.state.passwords==="") {
this.openNotification(`两次输入的密码不一致`);
return
}
else if (this.state.password !==undefined&&this.state.password.length>0&&this.state.password.length<8){
this.setState({
Phonenumberisnotcosmmm:"密码不能少于8位",
@ -236,13 +240,6 @@ class LoginRegisterComponent extends Component {
})
return
}
if (this.state.password !== this.state.passwords) {
this.setState({
Phonenumberisnotcosmmm:"两次输入的密码不一致",
Phonenumberisnotcosymmmm:"两次输入的密码不一致",
})
return
}
if (this.state.codes === undefined|| this.state.codes.length ===0 || this.state.codes === "") {
this.setState({
Phonenumberisnotcosyzm:"验证码不能为空"
@ -271,6 +268,12 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcosyzm:"验证码不正确",
})
return;
}else if(result.data.message==="1小时内同一手机号发送次数超过限制"){
this.setState({
boolyzm:true,
})
this.openNotification(result.data.message);
return;
}else {
this.openNotification(result.data.message);
@ -311,6 +314,7 @@ class LoginRegisterComponent extends Component {
login: stirngt,
Phonenumberisnotco:undefined,
dragOk:false,
boolyzm:false,
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
}
@ -505,6 +509,7 @@ class LoginRegisterComponent extends Component {
codes,
Whethertoverify,
pciphone,
boolyzm,
} = this.state
// height: 346px;
return (
@ -667,11 +672,13 @@ class LoginRegisterComponent extends Component {
<Button className=" ml5 "
style={{"width": "120px", "text-align": "center", "height": "45px"}}
type="primary"
disabled={boolyzm}
onClick={() => this.getverificationcode()} size={"large"}>获取验证码</Button>
:
<Button className=" ml5 "
style={{"width": "120px", "text-align": "center", "height": "45px"}}
type="primary"
disabled={boolyzm}
onClick={() => this.getverificationcode()} size={"large"}>重新发送</Button>
}

@ -718,8 +718,17 @@ class LoginRegisterComponent extends Component {
console.log(classpass);
return (
<div className="login_register_content" style={ parseInt(tab[0])==0?{height: "346px"} :{height: "490px"}}>
<div className="login_register_content login_register_contents" style={ parseInt(tab[0])==0?{height: "346px"} :{height: "490px"}}>
<style>
{
`
.login_register_contents, .login_register_contents .ant-tabs-tabpane {
display: flex;
justify-content: center;
}
`
}
</style>
<div>
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}>

@ -0,0 +1,65 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import { Modal} from 'antd';
import axios from 'axios';
import './common.css'
//您的试用申请正在审核中,请耐心等待
class Trialapplicationreview extends Component {
constructor(props) {
super(props);
this.state={
modalsType:false,
}
}
componentDidMount() {
axios.interceptors.response.use((response) => {
if (response != undefined)
if (response && response.data.status === 408) {
this.setState({
modalsType: true
})
}
return response;
}, (error) => {
//TODO 这里如果样式变了会出现css不加载的情况
});
}
setDownload=()=>{
//立即联系
this.setState({
modalsType:false
})
}
render() {
return(
<Modal
keyboard={false}
closable={false}
footer={null}
destroyOnClose={true}
title="提示"
centered={true}
visible={this.state.modalsType===undefined?false:this.state.modalsType}
width="530px"
>
<div className="educouddiv tabeltext-alignleft">
<div className={"tabeltext-alignleft mb20"}><p>您的试用申请正在审核中请耐心等待</p></div>
<a className="task-btn task-btn-orange bth100" onClick={()=>this.setDownload()}>知道啦</a>
</div>
</Modal>
)
}
}
export default Trialapplicationreview;

@ -16,7 +16,7 @@ class AccountCertification extends Component {
showRealNameCertificationModal = (index) => {
this.setState({
certification:index
certification:index,
})
this.realNameCertificationModal.setVisible(true)
}
@ -25,9 +25,13 @@ class AccountCertification extends Component {
let {basicInfo} = this.props;
return (
<div>
<RealNameCertificationModal ref="realNameCertificationModal" {...this.props}
{this.state.certification===1?<RealNameCertificationModal ref="realNameCertificationModal" {...this.props}
wrappedComponentRef={(form) => this.realNameCertificationModal = form} certification={certification}
></RealNameCertificationModal>
></RealNameCertificationModal>:""}
{this.state.certification===2?<RealNameCertificationModal ref="realNameCertificationModal" {...this.props}
wrappedComponentRef={(form) => this.realNameCertificationModal = form} certification={certification}
></RealNameCertificationModal>:""}
<div className="basicForm">
<style>{`
.basicForm .title {

@ -1,7 +1,7 @@
.login_register_content, .login_register_content .ant-tabs-tabpane {
display: flex;
justify-content: center;
}
/*.login_register_content, .login_register_content .ant-tabs-tabpane {*/
/* !*display: flex;*!*/
/* justify-content: center;*/
/*}*/
.login_register_content .ant-input {
background:rgb(244,244,244);
}

@ -30,7 +30,6 @@ class RealNameCertificationModal extends Component{
constructor(props){
super(props);
this.state={
}
}
@ -125,24 +124,18 @@ class RealNameCertificationModal extends Component{
const { course_lists, checkBoxValues, searchValue, loading, imageUrl, imageUrl2 } = this.state
const { moduleName } = this.props
const { getFieldDecorator } = this.props.form;
const uploadProps = {
name: 'file',
multiple: true,
showUploadList: false,
action: getUploadActionUrl(),
className: 'idPic-uploader first_uploader',
onChange: this.handleChange,
};
let {certification}=this.props;
const uploadProps2 = {
name: 'file',
name: 'image',
data:{type:certification == 1 ? "real_name" : "professional"},
multiple: true,
showUploadList: false,
action: getUploadActionUrl(),
// https://newweb.educoder.net
action: `/api/users/accounts/${this.props.current_user.login}/auth_attachment.json`,
className: 'idPic-uploader',
onChange: this.handleChange2,
};
let {certification}=this.props;
return(
<ModalWrapper
ref="modalWrapper"

@ -101,8 +101,9 @@ class InfosCourse extends Component{
totalCount,
isSpin
} = this.state;
let isStudent = this.props.isStudent();
let is_current=this.props.is_current;
console.log(this.props.current_user&&this.props.current_user.user_identity==="学生")
return(
<div className="educontent">
<Spin size="large" spinning={isSpin}>
@ -125,11 +126,11 @@ class InfosCourse extends Component{
</p>
<div className="square-list clearfix">
{
!isStudent && page == 1 && !category && is_current &&
<Create href={"/courses/new"} name={"新建课堂"} index="1"></Create>
page == 1 && is_current &&
this.props.current_user && this.props.current_user.user_identity != "学生" ? <Create href={"/courses/new"} name={"新建课堂"} index="1"></Create> : ""
}
{
(!data || data.courses.length==0) && (isStudent || category) && <NoneData></NoneData>
(!data || data.courses.length==0) && (this.props.current_user && this.props.current_user.user_identity === "学生" || category) && <NoneData></NoneData>
}
{
data && data.courses && data.courses.map((item,key)=>{

@ -148,11 +148,11 @@ class InfosPath extends Component{
</div>
<div className="square-list clearfix">
{
!isStudent && page == 1 && !category && is_current &&
<Create href={"/paths/new"} name={"新建实践课程"} index="3"></Create>
page == 1 && is_current &&
this.props.current_user && this.props.current_user.user_identity != "学生" ? <Create href={"/paths/new"} name={"新建实践课程"} index="3"></Create>:""
}
{
(!data || data.subjects.length==0) && (isStudent || category) && <NoneData></NoneData>
(!data || data.subjects.length==0) && (this.props.current_user && this.props.current_user.user_identity === "学生" || category) && <NoneData></NoneData>
}
{
data && data.subjects && data.subjects.map((item,key)=>{

@ -121,11 +121,11 @@ class InfosProject extends Component{
</p>
<div className="square-list clearfix">
{
!isStudent && page == 1 && !category && is_current &&
<Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建项目"} index="4"></Create>
page == 1 && is_current && this.props.current_user && this.props.current_user.user_identity != "学生" ?
<Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建项目"} index="4"></Create>:""
}
{
(!data || data.projects.length==0) && (isStudent || category) && <NoneData></NoneData>
(!data || data.projects.length==0) && (this.props.current_user && this.props.current_user.user_identity === "学生" || category) && <NoneData></NoneData>
}
{
data && data.projects && data.projects.map((item,key)=>{

@ -157,11 +157,11 @@ class InfosShixun extends Component{
</div>
<div className="square-list clearfix">
{
!isStudent && page == 1 && !category && is_current &&
<Create href={"/shixuns/new"} name={"新建实训"} index="2"></Create>
page == 1 && is_current && this.props.current_user && this.props.current_user.user_identity != "学生" ?
<Create href={"/shixuns/new"} name={"新建实训"} index="2"></Create>:""
}
{
(!data || data.shixuns.length==0) && (isStudent || category) && <NoneData></NoneData>
(!data || data.shixuns.length==0) && (this.props.current_user && this.props.current_user.user_identity === "学生" || category) && <NoneData></NoneData>
}
{
data && data.shixuns && data.shixuns.map((item,key)=>{

@ -218,10 +218,15 @@ class SearchPage extends Component{
<div>
{/*挑战名字*/}
{item.content.challenge_names === undefined || item.content.challenge_names===0?"": item.content.challenge_names.map((item5, key5) => {
return (
<span className={"markdown-body"}
<div className={"df"}>
<span style={{flex: '0 0 82px'}}>关卡名称</span>
<span className={""}
dangerouslySetInnerHTML={{__html: item5}} />
</div>
)
})
}
@ -231,8 +236,11 @@ class SearchPage extends Component{
{/*挑战标签*/}
{item.content.challenge_tag_names === undefined || item.content.challenge_tag_names===0?"": item.content.challenge_tag_names.map((item6, key6) => {
return (
<span className={key6>1?"markdown-body tzbq ":"markdown-body tzbqx"}
<div className={"df"}>
<span style={{flex: '0 0 82px'}}>关卡标签</span>
<span className={key6>1?" tzbq ":" tzbqx"}
dangerouslySetInnerHTML={{__html:item6}} />
</div>
)
})
}
@ -260,44 +268,44 @@ class SearchPage extends Component{
<span className="ziticor">
{/* <i className="fa fa-user ziticor"></i> */}
<span className="ml10">{item.author_name}</span></span>
<span className="">{item.author_name}</span></span>
<span className="ml10 ziticor "><span>{item.author_school_name}</span>
</span>
{!!item.challenges_count && <span className="ml20 ziticor">
<i className="iconfont icon-shixunguanqia ziticor"></i>
{/* <i className="iconfont icon-shixunguanqia ziticor"></i> */}
<span>任务:
<span className="ml10 ziticor">{item.challenges_count}</span>
</span>
</span> }
{!!item.study_count && <span className="ml20 ziticor">
<i className="iconfont icon-chengyuan ziticor"></i>
{/* <i className="iconfont icon-chengyuan ziticor"></i> */}
<span>学习人数:
<span className="ml10 ziticor">{item.study_count}</span>
</span>
</span>}
{!!item.stage_shixuns_count && <span className="ml20 ziticor">
<i className="iconfont icon-shixunguanqia ziticor"></i>
{/* <i className="iconfont icon-shixunguanqia ziticor"></i> */}
<span>实训数:
<span className="ml10 ziticor">{item.stage_shixuns_count}</span>
</span>
</span>}
{type == 'subject' && !!item.visits_count && <span className="ml20 ziticor">
<i className="iconfont icon-chengyuan ziticor" style={{ 'margin-bottom': '1px' }}></i>
{/* <i className="iconfont icon-chengyuan ziticor" style={{ 'margin-bottom': '1px' }}></i> */}
<span>访问数:
<span className="ml10 ziticor">{item.visits_count}</span>
</span>
</span>}
{!!item.members_count && <span className="ml20 ziticor">
<i className="iconfont icon-chengyuan ziticor"></i>
{/* <i className="iconfont icon-chengyuan ziticor"></i> */}
<span>成员数:
<span className="ml10 ziticor">{item.members_count}</span>
</span>
</span>}
{!!item.all_replies_count && <span className="ml20 ziticor">
<i className="iconfont icon-huifu1 ziticor"></i>
{/* <i className="iconfont icon-huifu1 ziticor"></i> */}
<span>回复数:<span className="ml10 ziticor">{item.all_replies_count}</span></span>
</span> }

@ -113,7 +113,7 @@
margin-left: 68px;
}
.tzbqx{
margin-left: 24px;
/* margin-left: 24px; */
}
.bjyss{
background: #F8F8F8;

Loading…
Cancel
Save