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.props.funpatheditarry([])
this.setupdatalist(value,type,true,1)
this.props.funpatheditarry([])
}
//tag
@ -135,9 +136,9 @@ class ShixunModal extends Component{
page:1,
newshixunmodallist:undefined
})
this.props.funpatheditarry([])
this.setupdatalist(Searchvalue,types,true,1)
this.props.funpatheditarry([])
}
@ -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>

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

@ -100,7 +100,8 @@ class Exercisetablesmubus extends Component {
border-radius: 12px;
color: rgba(221,23,23,1);
display: inline-block;
line-height: 24px;
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>

@ -284,7 +284,7 @@ class Listofworksstudentone extends Component {
<span>
{
record.efficiencyscore&& record.efficiencyscore=== "--"?(
<span style={{color:"#9A9A9A"}}>
<span style={{color:"#9A9A9A"}}>
--
</span>
)
@ -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");
}
}
@ -963,32 +977,32 @@ class Listofworksstudentone extends Component {
course_group: "",
}
axios.post(urll, data).then((result) => {
if(result === undefined){
return
}
if(result === undefined){
return
}
// console.log("951");
// console.log(result);
// debugger
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
student_works: result.data.student_works,
jobsettingsdata: result,
publish_immediately: result.data.publish_immediately,
end_immediately: result.data.end_immediately,
id: result.data.id,
work_efficiency: result.data.work_efficiency,
code_review: result.data.code_review,
challenges_count: result.data.challenges_count,
view_report: result.data.view_report,
})
this.props.Getdataback(result,result.data);
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata(result.data);
} else {
this.seacthdatas(result.data, result.data.student_works);
}
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
student_works: result.data.student_works,
jobsettingsdata: result,
publish_immediately: result.data.publish_immediately,
end_immediately: result.data.end_immediately,
id: result.data.id,
work_efficiency: result.data.work_efficiency,
code_review: result.data.code_review,
challenges_count: result.data.challenges_count,
view_report: result.data.view_report,
})
this.props.Getdataback(result,result.data);
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata(result.data);
} else {
this.seacthdatas(result.data, result.data.student_works);
}
}).catch((error) => {
console.log(error);
@ -1070,13 +1084,13 @@ class Listofworksstudentone extends Component {
for(var i=0;i<this.state.columnsstu.length;i++){
var item = this.state.columnsstu[i];
if (work_efficiency === false) {
if(item.title==="关卡得分"){
}
else if(item.title==="效率分"){
}
if(item.title==="关卡得分"){
}
else if(item.title==="效率分"){
}
}
if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
@ -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({
@ -1193,7 +1207,7 @@ class Listofworksstudentone extends Component {
}
}
if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
@ -1399,8 +1413,8 @@ class Listofworksstudentone extends Component {
challenges_count:result.data.challenges_count,
view_report:result.data.view_report,
})
this.props.Getdataback(result,result.data);
this.seacthdata(result.data);
this.props.Getdataback(result,result.data);
this.seacthdata(result.data);
}
}).catch((error) => {
console.log(error)
@ -1433,7 +1447,7 @@ class Listofworksstudentone extends Component {
})
this.Getalistofworkstwo(this.state.order, "", "", "", pageNumber, this.state.limit);
}
//计算成绩
//计算成绩
setComputeTime=()=>{
let {teacherdata}=this.state;
this.setState({
@ -1497,26 +1511,26 @@ class Listofworksstudentone extends Component {
limit:20,
}
axios.post(urll, data).then((result) => {
if (result) {
// console.log(url)
// console.log("作品列表6789077")
// console.log(JSON.stringify(result))
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
allow_late:result.data.allow_late,
course_group_info: result.data.course_group_info,
loadingstate: false,
jobsettingsdata: result,
publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1);
}
if (result) {
// console.log(url)
// console.log("作品列表6789077")
// console.log(JSON.stringify(result))
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
allow_late:result.data.allow_late,
course_group_info: result.data.course_group_info,
loadingstate: false,
jobsettingsdata: result,
publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1);
}
}).catch((error) => {
console.log(error)
this.setState({
@ -1559,22 +1573,22 @@ class Listofworksstudentone extends Component {
// console.log(url)
// console.log("作品列表______________________")
// console.log(JSON.stringify(result))
if (result !== undefined) {
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
loadingstate: false,
jobsettingsdata: result,
allow_late:result.data.allow_late,
publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
if (result !== undefined) {
this.setState({
teacherdata: result.data,
task_status: result.data.task_status,
course_group_info: result.data.course_group_info,
loadingstate: false,
jobsettingsdata: result,
allow_late:result.data.allow_late,
publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
// }
}
}).catch((error) => {
@ -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,96 +2215,150 @@ 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 ?
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{visible === true ? <ModulationModal
visible={visible}
Cancel={this.cancelModulationModel}
Saves={(value, num) => this.saveModulationModal(value, num)}
/> : ""}
{this.state.showmodel === true ? <ShixunWorkModal
{...this.props}
visible={this.state.showmodel}
modalname={"代码查重"}
data={[]}
issCancel={() => this.hideshowmodel()}
updatas={() => this.isupdatas()}
/> : ""}
{visibles === true ?
<div>
<style>
{
`
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{visible === true ? <ModulationModal
visible={visible}
Cancel={this.cancelModulationModel}
Saves={(value, num) => this.saveModulationModal(value, num)}
/> : ""}
{this.state.showmodel === true ? <ShixunWorkModal
{...this.props}
visible={this.state.showmodel}
modalname={"代码查重"}
data={[]}
issCancel={() => this.hideshowmodel()}
updatas={() => this.isupdatas()}
/> : ""}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{visibles === true ?
<div>
<style>
{
`
body {
overflow: hidden !important;
}
`
}
</style>
<TraineetraininginformationModal
{...this.props} {...this.state}
homeworkid={this.props.match.params.homeworkid}
coursesId={this.props.match.params.coursesId}
workid={teacherdata.id}
isAdmins={this.props.isAdmin()}
userids={this.state.userids}
viewtrainingdata={viewtrainingdata}
game_list={game_list}
visible={visibles}
experience={experience}
boolgalist={boolgalist}
Cancel={() => this.cancelModulationModels()}
/>
</div>
: ""
}
{/*立即发布*/}
<HomeworkModal
modaltype={this.state.modaltype}
modalname={this.state.modalname}
visible={this.state.svisible}
Topval={this.state.Topval}
Topvalright={this.state.Topvalright}
Botvalleft={this.state.Botvalleft}
Botval={this.state.Botval}
starttime={this.state.starttime}
endtime={this.state.endtime}
Cancelname={this.state.Cancelname}
Savesname={this.state.Savesname}
Cancel={this.state.Cancel}
Saves={this.state.Saves}
course_groups={this.state.course_groups}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
starttimes={this.state.starttimes}
typs={this.state.typs}
/>
<div className={"educontent "}>
<div className="edu-back-white">
}
</style>
<TraineetraininginformationModal
{...this.props} {...this.state}
homeworkid={this.props.match.params.homeworkid}
coursesId={this.props.match.params.coursesId}
workid={teacherdata.id}
isAdmins={this.props.isAdmin()}
userids={this.state.userids}
viewtrainingdata={viewtrainingdata}
game_list={game_list}
visible={visibles}
experience={experience}
boolgalist={boolgalist}
Cancel={() => this.cancelModulationModels()}
/>
</div>
: ""
}
<style>
{`
{/*立即发布*/}
<HomeworkModal
modaltype={this.state.modaltype}
modalname={this.state.modalname}
visible={this.state.svisible}
Topval={this.state.Topval}
Topvalright={this.state.Topvalright}
Botvalleft={this.state.Botvalleft}
Botval={this.state.Botval}
starttime={this.state.starttime}
endtime={this.state.endtime}
Cancelname={this.state.Cancelname}
Savesname={this.state.Savesname}
Cancel={this.state.Cancel}
Saves={this.state.Saves}
course_groups={this.state.course_groups}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
starttimes={this.state.starttimes}
typs={this.state.typs}
/>
<div className={"educontent "}>
<div className="edu-back-white">
<style>
{`
.startbox{
height: 48px;
background: rgba(255,104,0,0.1);
@ -2332,149 +2400,153 @@ class Listofworksstudentone extends Component {
}
`}
</style>
{computeTimetype===false?<li className="clearfix startbox">
</style>
{computeTimetype===false?<li className="clearfix startbox">
<span className={"startfont"}>
正在执行成绩计算请稍后刷新页面查看结果
温馨提示执行时间因作品数量而异
</span>
</li>:""}
{/*作品状态GraduationTaskssettinglist*/}
<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}>
计算成绩
</div>:<div className={"computeTimes font-13"}>
计算成绩
</div>}
</span>}
<div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}>
<Search
placeholder="请输入姓名或学号搜索"
id="subject_search_input"
autoComplete="off"
value={searchtext}
onKeyUp={(e) => this.onSearchKeywordKeyUpt(e)}
onInput={this.inputSearchValuest}
onSearch={this.searchValuest}
></Search>
</div>
</li>
</li>:""}
{/*作品状态GraduationTaskssettinglist*/}
<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>
<span>
{teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true?
(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTimet}>
计算成绩
</div>:""):
teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
计算成绩
</div>:"")
}
</span>
<div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}>
<Search
placeholder="请输入姓名或学号搜索"
id="subject_search_input"
autoComplete="off"
value={searchtext}
onKeyUp={(e) => this.onSearchKeywordKeyUpt(e)}
onInput={this.inputSearchValuest}
onSearch={this.searchValuest}
></Search>
</div>
</li>
<li className="clearfix mt10">
<li className="clearfix mt10">
<span className="fl mr10 color-grey-8 ">作品状态</span>
<span className="fl "><a id="graduation_comment_no_limit"
className={unlimited === 0 ? "pl10 pr10 mr20 check_on" : "pl10 pr10 mr20 "}
onClick={() => this.notlimiteds()}>不限</a></span>
<CheckboxGroup value={course_groupyslstwo}
onChange={(e) => this.funtaskstatust(e, task_status && task_status)}
style={{paddingTop: '4px'}}>
<span className="fl mr10 color-grey-8 ">作品状态</span>
<span className="fl "><a id="graduation_comment_no_limit"
className={unlimited === 0 ? "pl10 pr10 mr20 check_on" : "pl10 pr10 mr20 "}
onClick={() => this.notlimiteds()}>不限</a></span>
<CheckboxGroup value={course_groupyslstwo}
onChange={(e) => this.funtaskstatust(e, task_status && task_status)}
style={{paddingTop: '4px'}}>
{task_status === undefined ? "" : task_status.map((item, key) => {
return (
<span key={key}>
{task_status === undefined ? "" : task_status.map((item, key) => {
return (
<span key={key}>
<Checkbox value={item.id}
key={item.id}
className="fl ">{item.name}
<span>({item.count})</span>
</Checkbox>
</span>
)
})}
</CheckboxGroup>
{/*请输入姓名或学号搜索*/}
</li>
{/*分班情况*/}
<li className="clearfix mt10 ">
{JSON.stringify(course_group_info) === "[]" ? "" : course_group_info === undefined ? "" : course_group_info.length < 2 ? "" :
<div>
<span className="fl mr10 color-grey-8">分班情况</span>
<span className="fl "><a id="graduation_comment_no_limit"
className={unlimitedtwo === 0 ? "pl10 pr10 mr20 " : "pl10 pr10 mr20 check_on"}
onClick={() => this.notlimitedst()}>不限</a></span>
<CheckboxGroup value={course_groupysls}
onChange={(e) => this.funtaskstatustwot(e, course_group_info && course_group_info)}
style={{paddingTop: '4px',width:'1017px'}}>
{course_group_info === undefined ? "" :
course_group_info.map((item, key) => {
return (
<span key={key}>
)
})}
</CheckboxGroup>
{/*请输入姓名或学号搜索*/}
</li>
{/*分班情况*/}
<li className="clearfix mt10 ">
{JSON.stringify(course_group_info) === "[]" ? "" : course_group_info === undefined ? "" : course_group_info.length < 2 ? "" :
<div>
<span className="fl mr10 color-grey-8">分班情况</span>
<span className="fl "><a id="graduation_comment_no_limit"
className={unlimitedtwo === 0 ? "pl10 pr10 mr20 " : "pl10 pr10 mr20 check_on"}
onClick={() => this.notlimitedst()}>不限</a></span>
<CheckboxGroup value={course_groupysls}
onChange={(e) => this.funtaskstatustwot(e, course_group_info && course_group_info)}
style={{paddingTop: '4px',width:'1017px'}}>
{course_group_info === undefined ? "" :
course_group_info.map((item, key) => {
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>
</span>
)
})
}
</CheckboxGroup>
</div>}
</li>
)
})
}
</CheckboxGroup>
</div>}
</li>
</ul>
</ul>
<div id="graduation_work_list" style={{padding: '0px 20px 10px 20px'}}>
<div id="graduation_work_list" style={{padding: '0px 20px 10px 20px'}}>
<div className="clearfix">
<div className="clearfix">
<span className="fl color-grey-6 font-12"><span
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.student_works.length}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count} </span>
<style>
{
`
<style>
{
`
.edu-position-hide li a:hover {
background: #F0F0F0;
}
`
}
</style>
<div className="fr edu-menu-panel">
<ul>
<li className="edu-position edu-position-hidebox">
<a className="font-12">
{orders === "update_time" ? "时间" : orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序</a>
<i className="iconfont icon-xiajiantou ml5 font-12 "></i>
<ul className="edu-position-hide undis mt10">
<li> <a onClick={(e) => this.funordert("update_time")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>更新时间</a></li>
<li> <a onClick={(e) => this.funordert("work_score")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>最终成绩</a></li>
<li> <a onClick={(e) => this.funordert("student_id")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>学生学号</a></li>
</ul>
</li>
</ul>
</div>
}
</style>
<div className="fr edu-menu-panel">
<ul>
<li className="edu-position edu-position-hidebox">
<a className="font-12">
{orders === "update_time" ? "时间" : orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序</a>
<i className="iconfont icon-xiajiantou ml5 font-12 "></i>
<ul className="edu-position-hide undis mt10">
<li> <a onClick={(e) => this.funordert("update_time")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>更新时间</a></li>
<li> <a onClick={(e) => this.funordert("work_score")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>最终成绩</a></li>
<li> <a onClick={(e) => this.funordert("student_id")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>学生学号</a></li>
</ul>
</li>
</ul>
</div>
</div>
{
JSON.stringify(data) === "[]" ?
<div id="forum_list" className="forum_table">
<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>
</div>
</div>
</div>
{
JSON.stringify(data) === "[]" ?
<div id="forum_list" className="forum_table">
<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>
</div>
</div>
:
<div className={"justify break_full_word new_li edu-back-white"} style={{minHeight: "480px"}}>
<style>{`
</div>
:
<div className={"justify break_full_word new_li edu-back-white"} style={{minHeight: "480px"}}>
<style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;}
}
@ -2486,32 +2558,32 @@ class Listofworksstudentone extends Component {
height: 85px;
}
`}</style>
<div className="edu-table edu-back-white ant-tables">
{data === undefined ? "" : <Table
dataSource={data}
columns={columns}
pagination={false}
loading={loadingstate}
/>}
</div>
<div className="edu-table edu-back-white ant-tables">
{data === undefined ? "" : <Table
dataSource={data}
columns={columns}
pagination={false}
loading={loadingstate}
/>}
</div>
}
</div>
{
teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
<div className="edu-txt-center mt30 ">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit}
total={teacherdata.work_count}></Pagination>
</div>
: ""
}
</div>
</div>
{
teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
<div className="edu-txt-center mt30 ">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit}
total={teacherdata.work_count}></Pagination>
</div>
: ""
}
</div>
:
</div>
:
<div>
{
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
@ -2631,15 +2703,21 @@ 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}>
计算成绩
</div>:<div className={"computeTimes font-13"}>
计算成绩
</div>}
</span>}
{computeTimetype===true?
(this.props.isNotMember()===false?
<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>
:"")
:
(teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
this.props.isNotMember()===false?
<div className={"computeTimes font-13"}>
计算成绩
</div>
:"")
}
</span>}
</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}>
计算成绩
</div>:<div className={"computeTimes font-13"}>
计算成绩
</div>}
</span>
}
{teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?
(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:""):
teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
计算成绩
</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>:""}

@ -153,7 +153,8 @@ class ShixunCustomsPass extends Component {
border-radius: 12px;
color: rgba(221,23,23,1);
display: inline-block;
line-height: 24px;
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}

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

@ -122,4 +122,8 @@
border-radius: 4px;
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);
@ -64,16 +65,16 @@ class Trialapplicationysl extends Component {
}
getipthon=()=>{
getipthon=()=>{
// console.log("Trialapplicationysl");
// console.log("70");
let url = `/users/get_user_info.json`
axios.get(url).then((result)=> {
console.log(result);
if(result){
this.setState({
user_phone_binded:result.data.user_phone_binded,
})
this.setState({
user_phone_binded:result.data.user_phone_binded,
})
}
}).catch((error)=>{
console.log(error)
@ -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
@ -288,11 +289,12 @@ class Trialapplicationysl extends Component {
if(result !== undefined){
// this.props.showNotification(`试用申请已提交,我们将尽快完成审核`);
// if (this.state.showTrial === false) {
window.location.href = "/";
this.setState({
isRenders: false
})
this.Cancel();
window.location.href = "/";
this.setState({
isRenders: false
})
// 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;

@ -1,93 +1,97 @@
import React, { Component } from 'react';
// import { Button } from 'antd'
import { WordsBtn, getImageUrl } from 'educoder';
import RealNameCertificationModal from '../modal/RealNameCertificationModal'
import '../../courses/css/Courses.css'
import {CNotificationHOC} from '../../courses/common/CNotificationHOC'
class AccountCertification extends Component {
constructor(props){
super(props);
this.state={
certification:1
}
}
showRealNameCertificationModal = (index) => {
this.setState({
certification:index
})
this.realNameCertificationModal.setVisible(true)
}
render() {
let {certification}=this.state
let {basicInfo} = this.props;
return (
<div>
<RealNameCertificationModal ref="realNameCertificationModal" {...this.props}
wrappedComponentRef={(form) => this.realNameCertificationModal = form} certification={certification}
></RealNameCertificationModal>
<div className="basicForm">
<style>{`
.basicForm .title {
font-size: 16px;
padding-left: 30px;
margin-bottom: 10px;
}
.flexTable {
display: flex;
flex-direction: column;
}
.flexRow {
display: flex;
}
.flexRow .name {
margin-left: 46px;
}
.flexRow .description {
margin-left: 30px;
flex: 1;
color: #CDCDCD;
}
.flexRow .status {
width: 100px;
color: #28AC7F;
}
`}</style>
<div className="title">认证信息</div>
<div className="flexTable">
<div className="flexRow lineh-20 mb20">
<div className="name">实名认证</div>
<div className="description">有些课程需要实名认证才能加入哟还能获得500金币的奖励~ </div>
<div className="status">
{
basicInfo && basicInfo.authentication =="uncertified" ?
<WordsBtn style="blue" className="borderBottom" onClick={()=>this.showRealNameCertificationModal(1)} >立即认证</WordsBtn>:
basicInfo && basicInfo.authentication =="applying" ? <span style={{color: '#FF6800'}}>待审核</span>:
<span><i className="iconfont icon-wancheng color-green font-16 mr3"></i></span>
}
</div>
</div>
<div className="flexRow lineh-20">
<div className="name">职业认证</div>
<div className="description">教师认证完毕之后可创建课堂发布实训免金币查看所有实训答案.. </div>
<div className="status">
{
basicInfo && basicInfo.professional_certification =="uncertified" ?
<WordsBtn style="blue" className="borderBottom" onClick={()=>this.showRealNameCertificationModal(2)} >立即认证</WordsBtn>:
basicInfo && basicInfo.professional_certification =="applying" ? <span style={{color: '#FF6800'}}>待审核</span>:
<span><i className="iconfont icon-wancheng color-green font-16 mr3"></i></span>
}
</div>
</div>
</div>
</div>
<div style={{color: '#989898', marginLeft: '20px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</div>
</div>
);
}
}
export default AccountCertification;
import React, { Component } from 'react';
// import { Button } from 'antd'
import { WordsBtn, getImageUrl } from 'educoder';
import RealNameCertificationModal from '../modal/RealNameCertificationModal'
import '../../courses/css/Courses.css'
import {CNotificationHOC} from '../../courses/common/CNotificationHOC'
class AccountCertification extends Component {
constructor(props){
super(props);
this.state={
certification:1
}
}
showRealNameCertificationModal = (index) => {
this.setState({
certification:index,
})
this.realNameCertificationModal.setVisible(true)
}
render() {
let {certification}=this.state
let {basicInfo} = this.props;
return (
<div>
{this.state.certification===1?<RealNameCertificationModal ref="realNameCertificationModal" {...this.props}
wrappedComponentRef={(form) => this.realNameCertificationModal = form} certification={certification}
></RealNameCertificationModal>:""}
{this.state.certification===2?<RealNameCertificationModal ref="realNameCertificationModal" {...this.props}
wrappedComponentRef={(form) => this.realNameCertificationModal = form} certification={certification}
></RealNameCertificationModal>:""}
<div className="basicForm">
<style>{`
.basicForm .title {
font-size: 16px;
padding-left: 30px;
margin-bottom: 10px;
}
.flexTable {
display: flex;
flex-direction: column;
}
.flexRow {
display: flex;
}
.flexRow .name {
margin-left: 46px;
}
.flexRow .description {
margin-left: 30px;
flex: 1;
color: #CDCDCD;
}
.flexRow .status {
width: 100px;
color: #28AC7F;
}
`}</style>
<div className="title">认证信息</div>
<div className="flexTable">
<div className="flexRow lineh-20 mb20">
<div className="name">实名认证</div>
<div className="description">有些课程需要实名认证才能加入哟还能获得500金币的奖励~ </div>
<div className="status">
{
basicInfo && basicInfo.authentication =="uncertified" ?
<WordsBtn style="blue" className="borderBottom" onClick={()=>this.showRealNameCertificationModal(1)} >立即认证</WordsBtn>:
basicInfo && basicInfo.authentication =="applying" ? <span style={{color: '#FF6800'}}>待审核</span>:
<span><i className="iconfont icon-wancheng color-green font-16 mr3"></i></span>
}
</div>
</div>
<div className="flexRow lineh-20">
<div className="name">职业认证</div>
<div className="description">教师认证完毕之后可创建课堂发布实训免金币查看所有实训答案.. </div>
<div className="status">
{
basicInfo && basicInfo.professional_certification =="uncertified" ?
<WordsBtn style="blue" className="borderBottom" onClick={()=>this.showRealNameCertificationModal(2)} >立即认证</WordsBtn>:
basicInfo && basicInfo.professional_certification =="applying" ? <span style={{color: '#FF6800'}}>待审核</span>:
<span><i className="iconfont icon-wancheng color-green font-16 mr3"></i></span>
}
</div>
</div>
</div>
</div>
<div style={{color: '#989898', marginLeft: '20px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</div>
</div>
);
}
}
export default AccountCertification;

@ -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"

@ -1,203 +1,204 @@
import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import {Tooltip,Menu,Pagination,Spin} from 'antd';
import Loadable from 'react-loadable';
import Loading from '../../../Loading';
import axios from 'axios';
import NoneData from '../../courses/coursesPublic/NoneData'
import {getImageUrl} from 'educoder';
import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
import { CNotificationHOC } from '../../courses/common/CNotificationHOC'
import "./usersInfo.css"
import Create from './publicCreatNew'
class InfosCourse extends Component{
constructor(props){
super(props);
this.state={
category:undefined,
status:undefined,
page:1,
per_page:16,
totalCount:undefined,
data:undefined,
isSpin:false
}
}
componentDidMount=()=>{
this.setState({
isSpin:true
})
let{category,status,page}=this.state;
this.getCourses(category,status,page);
}
getCourses=(category,status,page)=>{
let url=`/users/${this.props.match.params.username}/courses.json`;
axios.get((url),{params:{
category,
status,
page,
per_page: this.props.is_current && category && page ==1?17:16
}}).then((result)=>{
if(result){
this.setState({
totalCount:result.data.count,
data:result.data,
isSpin:false
})
}
}).catch((error)=>{
console.log(error);
})
}
//切换种类
changeCategory=(cate)=>{
this.setState({
category:cate,
page:1,
isSpin:true
})
let{status}=this.state;
this.getCourses(cate,status,1);
}
//切换状态
changeStatus=(status)=>{
this.setState({
status:status,
page:1,
isSpin:true
})
let{category}=this.state;
this.getCourses(category,status,1);
}
//切换页数
changePage=(page)=>{
this.setState({
page,
isSpin:true
})
let{category,status}=this.state;
this.getCourses(category,status,page);
}
// 进入课堂
turnToCourses=(url,flag)=>{
if(flag){
this.props.history.push(url);
}
}
render(){
let{
category,
status,
page,
data,
totalCount,
isSpin
} = this.state;
let isStudent = this.props.isStudent();
let is_current=this.props.is_current;
return(
<div className="educontent">
<Spin size="large" spinning={isSpin}>
<div className="white-panel edu-back-white pt25 pb25 clearfix ">
<li className={category ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeCategory()}>全部</a></li>
<li className={category=="manage" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的</a></li>
<li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li>
</div>
{
is_current &&
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
<li className={status=="processing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("processing")}>正在进行</a></li>
<li className={status=="end" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("end")}>已结束</a></li>
</div>
}
<p className="pl25 pr25 clearfix font-12 mb20 mt20">
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"课堂"}</span>
<span className="fr color-grey-9">时间最新</span>
</p>
<div className="square-list clearfix">
{
!isStudent && page == 1 && !category && is_current &&
<Create href={"/courses/new"} name={"新建课堂"} index="1"></Create>
}
{
(!data || data.courses.length==0) && (isStudent || category) && <NoneData></NoneData>
}
{
data && data.courses && data.courses.map((item,key)=>{
return(
<div className="square-Item" onClick={()=>this.turnToCourses(`${item.first_category_url}`,item.can_visited)} style={{"cursor": "pointer"}}>
{
item.is_public == 1 &&
<React.Fragment>
<div className={key == 0 ?"publicpart orangeBlack":"publicpart"}></div>
<span className="smalltrangle"></span>
<span className="publicword">公开</span>
</React.Fragment>
}
{
item.can_visited ==false?
<div className="closeSquare">
<img src={getImageUrl("/images/educoder/icon/lockclose.svg")} className="mt80 mb25"/>
<p className="font-14 color-white">非成员不能访问</p>
</div>:""
}
<div className="substance">
<p className="subName font-16">
<span>{item.name}</span>
</p>
<span><img alt="用户" className="radius mt15" height="60" src={getImageUrl('images/'+`${item.teacher && item.teacher.avatar_url}`)} width="60"/></span>
<p className="font-14 mt10"><span>{item.teacher && item.teacher.real_name}</span></p>
<p className="font-16 mb15 task-hide mt10"><span className="color-grey-98">{item.teacher && item.teacher.school_name}</span></p>
</div>
<div className="edu-txt-center course-bottom">
<div className="inline color-grey-6">
{
item.members_count > 0 &&
<Tooltip placement="bottom" title="成员">
<span className="fl ml10 mr10 squareIconSpan">
<i className="iconfont icon-chengyuan fl mr3" data-tip-down="成员"></i>{item.members_count}</span>
</Tooltip>
}
{
item.homework_commons_count > 0 &&
<Tooltip placement="bottom" title="作业">
<span className="fl ml10 mr10 squareIconSpan">
<i className="iconfont icon-zuoye fl mr3" data-tip-down="作业"></i>{item.homework_commons_count}</span>
</Tooltip>
}
{
item.attachments_count > 0 &&
<Tooltip placement="bottom" title="资源">
<span className="fl ml10 mr10 squareIconSpan">
<i className="iconfont icon-ziyuan fl mr3" data-tip-down="资源"></i>{item.attachments_count}</span>
</Tooltip>
}
</div>
</div>
</div>
)
})
}
</div>
{
totalCount > 15 &&
<div className="mt30 mb50 edu-txt-center">
<Pagination showQuickJumper total={totalCount} onChange={this.changePage} pageSize={16} current={page}/>
</div>
}
</Spin>
</div>
)
}
}
import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import {Tooltip,Menu,Pagination,Spin} from 'antd';
import Loadable from 'react-loadable';
import Loading from '../../../Loading';
import axios from 'axios';
import NoneData from '../../courses/coursesPublic/NoneData'
import {getImageUrl} from 'educoder';
import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
import { CNotificationHOC } from '../../courses/common/CNotificationHOC'
import "./usersInfo.css"
import Create from './publicCreatNew'
class InfosCourse extends Component{
constructor(props){
super(props);
this.state={
category:undefined,
status:undefined,
page:1,
per_page:16,
totalCount:undefined,
data:undefined,
isSpin:false
}
}
componentDidMount=()=>{
this.setState({
isSpin:true
})
let{category,status,page}=this.state;
this.getCourses(category,status,page);
}
getCourses=(category,status,page)=>{
let url=`/users/${this.props.match.params.username}/courses.json`;
axios.get((url),{params:{
category,
status,
page,
per_page: this.props.is_current && category && page ==1?17:16
}}).then((result)=>{
if(result){
this.setState({
totalCount:result.data.count,
data:result.data,
isSpin:false
})
}
}).catch((error)=>{
console.log(error);
})
}
//切换种类
changeCategory=(cate)=>{
this.setState({
category:cate,
page:1,
isSpin:true
})
let{status}=this.state;
this.getCourses(cate,status,1);
}
//切换状态
changeStatus=(status)=>{
this.setState({
status:status,
page:1,
isSpin:true
})
let{category}=this.state;
this.getCourses(category,status,1);
}
//切换页数
changePage=(page)=>{
this.setState({
page,
isSpin:true
})
let{category,status}=this.state;
this.getCourses(category,status,page);
}
// 进入课堂
turnToCourses=(url,flag)=>{
if(flag){
this.props.history.push(url);
}
}
render(){
let{
category,
status,
page,
data,
totalCount,
isSpin
} = this.state;
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}>
<div className="white-panel edu-back-white pt25 pb25 clearfix ">
<li className={category ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeCategory()}>全部</a></li>
<li className={category=="manage" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的</a></li>
<li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li>
</div>
{
is_current &&
<div className="edu-back-white padding20-30 clearfix secondNav bor-top-greyE">
<li className={status ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeStatus()}>全部</a></li>
<li className={status=="processing" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("processing")}>正在进行</a></li>
<li className={status=="end" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeStatus("end")}>已结束</a></li>
</div>
}
<p className="pl25 pr25 clearfix font-12 mb20 mt20">
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"课堂"}</span>
<span className="fr color-grey-9">时间最新</span>
</p>
<div className="square-list clearfix">
{
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) && (this.props.current_user && this.props.current_user.user_identity === "学生" || category) && <NoneData></NoneData>
}
{
data && data.courses && data.courses.map((item,key)=>{
return(
<div className="square-Item" onClick={()=>this.turnToCourses(`${item.first_category_url}`,item.can_visited)} style={{"cursor": "pointer"}}>
{
item.is_public == 1 &&
<React.Fragment>
<div className={key == 0 ?"publicpart orangeBlack":"publicpart"}></div>
<span className="smalltrangle"></span>
<span className="publicword">公开</span>
</React.Fragment>
}
{
item.can_visited ==false?
<div className="closeSquare">
<img src={getImageUrl("/images/educoder/icon/lockclose.svg")} className="mt80 mb25"/>
<p className="font-14 color-white">非成员不能访问</p>
</div>:""
}
<div className="substance">
<p className="subName font-16">
<span>{item.name}</span>
</p>
<span><img alt="用户" className="radius mt15" height="60" src={getImageUrl('images/'+`${item.teacher && item.teacher.avatar_url}`)} width="60"/></span>
<p className="font-14 mt10"><span>{item.teacher && item.teacher.real_name}</span></p>
<p className="font-16 mb15 task-hide mt10"><span className="color-grey-98">{item.teacher && item.teacher.school_name}</span></p>
</div>
<div className="edu-txt-center course-bottom">
<div className="inline color-grey-6">
{
item.members_count > 0 &&
<Tooltip placement="bottom" title="成员">
<span className="fl ml10 mr10 squareIconSpan">
<i className="iconfont icon-chengyuan fl mr3" data-tip-down="成员"></i>{item.members_count}</span>
</Tooltip>
}
{
item.homework_commons_count > 0 &&
<Tooltip placement="bottom" title="作业">
<span className="fl ml10 mr10 squareIconSpan">
<i className="iconfont icon-zuoye fl mr3" data-tip-down="作业"></i>{item.homework_commons_count}</span>
</Tooltip>
}
{
item.attachments_count > 0 &&
<Tooltip placement="bottom" title="资源">
<span className="fl ml10 mr10 squareIconSpan">
<i className="iconfont icon-ziyuan fl mr3" data-tip-down="资源"></i>{item.attachments_count}</span>
</Tooltip>
}
</div>
</div>
</div>
)
})
}
</div>
{
totalCount > 15 &&
<div className="mt30 mb50 edu-txt-center">
<Pagination showQuickJumper total={totalCount} onChange={this.changePage} pageSize={16} current={page}/>
</div>
}
</Spin>
</div>
)
}
}
export default InfosCourse;

@ -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"}
dangerouslySetInnerHTML={{__html:item6}} />
<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