dev_cs_new
caishi 5 years ago
parent 089f9c3c79
commit 9e043e2ec4

@ -143,7 +143,9 @@ class commonWork extends Component{
this.setState({ this.setState({
order:e.key==="all"?"":e.key, order:e.key==="all"?"":e.key,
page:1, page:1,
isSpin:true isSpin:true,
checkBoxValues:[],
checkAll:false
}) })
let {search}=this.state; let {search}=this.state;
this.getList(1,search,e.key==="all"?"":e.key); this.getList(1,search,e.key==="all"?"":e.key);

@ -1,5 +1,5 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {getImageUrl} from 'educoder'; import { getImageUrl , getUrl } from 'educoder';
class NoneData extends Component{ class NoneData extends Component{
constructor(props) { constructor(props) {
@ -9,7 +9,20 @@ class NoneData extends Component{
const { style } = this.props; const { style } = this.props;
return( return(
<div className="edu-tab-con-box clearfix edu-txt-center" style={style}> <div className="edu-tab-con-box clearfix edu-txt-center" style={style}>
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/> <style>
{`
.edu-tab-con-box{
padding:100px 0px;
}
.ant-modal-body .edu-tab-con-box{
padding:0px!important;
}
img.edu-nodata-img{
margin: 40px auto 20px;
}
`}
</style>
<img className="edu-nodata-img mb20" src={getUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">暂时还没有相关数据哦</p> <p className="edu-nodata-p mb20">暂时还没有相关数据哦</p>
</div> </div>
) )

@ -535,6 +535,18 @@ class ExerciseReviewAndAnswer extends Component{
.inputNumber30 .ant-input-number-input-wrap .ant-input-number-input{ .inputNumber30 .ant-input-number-input-wrap .ant-input-number-input{
height: 28px; height: 28px;
} }
.setRadioStyle{
width:100%;
cursor:pointer;
}
.setRadioStyle span:last-child{
flex:1;
display:flex;
}
.setRadioStyle .ant-radio,.setRadioStyle .ant-checkbox{
height:16px;
margin-top:2px;
}
`}</style> `}</style>
{/*<p style={{height:"60px"}}></p>*/} {/*<p style={{height:"60px"}}></p>*/}
<Modals <Modals

@ -44,19 +44,19 @@ class Multiple extends Component{
console.log(questionType); console.log(questionType);
return( return(
<div className="pl30 pr30 singleDisplay"> <div className="pl30 pr30 singleDisplay">
<Checkbox.Group disabled={ user_exercise_status == 1 ? true : false } onChange={this.saveId} value={questionType.user_answer}> <Checkbox.Group className="with100" disabled={ user_exercise_status == 1 ? true : false } onChange={this.saveId} value={questionType.user_answer}>
{ {
questionType.question_choices && questionType.question_choices.map((item,key)=>{ questionType.question_choices && questionType.question_choices.map((item,key)=>{
let prefix = `${tagArray[key]}.` let prefix = `${tagArray[key]}.`
return( return(
<p className="clearfix mb15 df"> <p className="clearfix mb15 df">
<Checkbox className="fl lineh-15 df mr8 mt2" value={item.choice_id}>{prefix}</Checkbox> <Checkbox className="lineh-15 df mr8 setRadioStyle" value={item.choice_id}>
{/* <span class="fl lineh-20 mt1"></span> */} <span className="fl mr3 lineh-20">{prefix}</span>
{/* <span style={{display:"inline-block"}} className="markdown-body " dangerouslySetInnerHTML={{__html: markdownToHTML1(item.choice_text)}}></span> */} <MarkdownToHtml content={item.choice_text} selector={'multiple_' + (this.props.index + 1) + (key + 1)}
<MarkdownToHtml content={item.choice_text} selector={'multiple_' + (this.props.index + 1) + (key + 1)} className="flex1" style={{display:"inline-block"}}
className="" style={{display:"inline-block"}} ></MarkdownToHtml>
></MarkdownToHtml> </Checkbox>
</p> </p>
) )
}) })

@ -40,18 +40,18 @@ class single extends Component{
let isJudge = questionType.question_type == 2 let isJudge = questionType.question_type == 2
return( return(
<div className="pl30 pr30 singleDisplay"> <div className="pl30 pr30 singleDisplay">
<Radio.Group disabled={ user_exercise_status == 1 ? true : false } value={questionType.user_answer[0]} onChange={this.changeItem}> <Radio.Group className="with100" disabled={ user_exercise_status == 1 ? true : false } value={questionType.user_answer[0]} onChange={this.changeItem}>
{ {
questionType.question_choices && questionType.question_choices.map((item,key)=>{ questionType.question_choices && questionType.question_choices.map((item,key)=>{
let prefix = isJudge ? undefined : `${tagArray[key]}.` let prefix = isJudge ? undefined : `${tagArray[key]}.`
return( return(
<p className={parseInt(questionType.question_type) == 0 ? "clearfix mb15 df" : "fl mr40 df"}> <p className={parseInt(questionType.question_type) == 0 ? "clearfix mb15" : "fl mr40"}>
<Radio className="fl lineh-20" value={item.choice_id}>{prefix}</Radio> <Radio className="df lineh-20 setRadioStyle" value={item.choice_id}>
{/* <span className="fl lineh-20 mr3 "></span> */} <span className="fl mr3">{prefix}</span>
{/* <span style={{display:"inline-block", 'margin-top': '-1px'}} className="markdown-body fl " dangerouslySetInnerHTML={{__html: markdownToHTML1(item.choice_text)}}></span> */} <MarkdownToHtml content={item.choice_text} selector={'single_' + (this.props.index + 1) + (key + 1)}
<MarkdownToHtml content={item.choice_text} selector={'single_' + (this.props.index + 1) + (key + 1)} className="flex1" style={{display:"inline-block", 'margin-top': '-1px'}}
className="fl" style={{display:"inline-block", 'margin-top': '-1px'}} ></MarkdownToHtml>
></MarkdownToHtml> </Radio>
</p> </p>
) )
}) })

@ -384,7 +384,9 @@ class GraduationTasks extends Component{
this.setState({ this.setState({
order: e.key, order: e.key,
isSpin:true isSpin:true,
checkBoxValues:[],
checkAllValue:false
}); });
let newkey=e.key; let newkey=e.key;

@ -587,6 +587,8 @@ class ShixunHomework extends Component{
let {Coursename,page}=this.state; let {Coursename,page}=this.state;
this.setState({ this.setState({
order: e.key, order: e.key,
checkBoxValues:[],
checkedtype:false,
isSpin:true isSpin:true
}); });
let newkey=e.key; let newkey=e.key;

@ -8,7 +8,7 @@ import "./usersInfo.css"
import "../../courses/css/members.css" import "../../courses/css/members.css"
import "../../courses/css/Courses.css" import "../../courses/css/Courses.css"
import banner from '../../../images/account/infobanner.png' import { LinkAfterLogin } from 'educoder'
class InfosBanner extends Component{ class InfosBanner extends Component{
constructor(props){ constructor(props){
@ -68,7 +68,14 @@ class InfosBanner extends Component{
</span> </span>
: :
<span className="fl mt35 ml60"> <span className="fl mt35 ml60">
<a href={`/messages/${login}/message_detail?target_ids=${id}`} className="user_default_btn user_yellow_btn fl font-18">私信</a> <LinkAfterLogin
{...this.props}
{...this.state}
className="user_default_btn user_yellow_btn fl font-18"
to={`/messages/${login}/message_detail?target_ids=${id}`}
>
私信
</LinkAfterLogin>
</span> </span>
} }
</div> </div>

@ -130,7 +130,7 @@ class InfosCourse extends Component{
this.props.current_user && this.props.current_user.user_identity != "学生" ? <Create href={"/courses/new"} name={"新建课堂"} index="1"></Create> : "" this.props.current_user && this.props.current_user.user_identity != "学生" ? <Create href={"/courses/new"} name={"新建课堂"} index="1"></Create> : ""
} }
{ {
(!data || data.courses.length==0) && (!is_current || (this.props.current_user && this.props.current_user.user_identity === "学生" )) && <NoneData></NoneData> (!data || (data && data.courses.length==0)) && category && <NoneData></NoneData>
} }
{ {
data && data.courses && data.courses.map((item,key)=>{ data && data.courses && data.courses.map((item,key)=>{

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

@ -125,7 +125,7 @@ class InfosProject extends Component{
<Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建项目"} index="4"></Create>:"" <Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建项目"} index="4"></Create>:""
} }
{ {
(!data || data.projects.length==0) && (!is_current || (this.props.current_user && this.props.current_user.user_identity === "学生" )) && <NoneData></NoneData> (!data || (data && data.projects.length==0)) && category && <NoneData></NoneData>
} }
{ {
data && data.projects && data.projects.map((item,key)=>{ data && data.projects && data.projects.map((item,key)=>{

@ -115,7 +115,7 @@ class InfosShixun extends Component{
totalCount, totalCount,
isSpin isSpin
} = this.state; } = this.state;
let isStudent = this.props.isStudent();
let is_current=this.props.is_current; let is_current=this.props.is_current;
return( return(
<div className="educontent"> <div className="educontent">
@ -161,7 +161,7 @@ class InfosShixun extends Component{
<Create href={"/shixuns/new"} name={"新建实训"} index="2"></Create>:"" <Create href={"/shixuns/new"} name={"新建实训"} index="2"></Create>:""
} }
{ {
(!data || data.shixuns.length==0) && (!is_current || (this.props.current_user && this.props.current_user.user_identity === "学生" )) && <NoneData></NoneData> (!data || (data && data.shixuns.length==0)) && category && <NoneData></NoneData>
} }
{ {
data && data.shixuns && data.shixuns.map((item,key)=>{ data && data.shixuns && data.shixuns.map((item,key)=>{

Loading…
Cancel
Save