hjm 5 years ago
commit 3328ad8465

@ -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;
}

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

@ -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*/}

@ -899,6 +899,7 @@ class Listofworksstudentone extends Component {
)
},
],
yslpros:false,
}
// console.log("902");
// console.log("902");
@ -912,15 +913,26 @@ class Listofworksstudentone extends Component {
}
componentWillReceiveProps(nextProps) {
console.log("+++++++++913");
console.log("+++++++++915");
console.log("+++++++++916");
console.log(nextProps);
console.log(this.props)
// 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");
@ -1097,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 )
@ -1599,7 +1611,7 @@ class Listofworksstudentone extends Component {
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({
@ -2217,6 +2229,9 @@ class Listofworksstudentone extends Component {
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){
@ -2521,7 +2536,7 @@ class Listofworksstudentone extends Component {
<div className="mh650 edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">没有数据可以显示.</p>
<p className="edu-nodata-p mb30">没有数据可以显示</p>
</div>
</div>

@ -32,6 +32,7 @@ class ShixunHomeworkPage extends Component {
visible: false,
showmodel:false,
child:undefined,
yslpros:false,
}
}
@ -53,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,
@ -71,13 +72,13 @@ 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]
})

@ -81,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();
@ -523,6 +538,9 @@ class ShixunStudentWork extends Component {
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){

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

@ -373,7 +373,7 @@ class ShixunhomeWorkItem extends Component{
width:192px !important;
}
.homepagePostSettingbox{
width:121px !important;
width:139px !important;
}
`
}

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

@ -141,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()
}
}
}
// 获取数据地方
@ -1744,6 +1758,9 @@ class Trainingjobsetting extends Component {
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){

@ -94,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;
@ -333,6 +348,9 @@ class Workquestionandanswer extends Component {
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){

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

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

@ -30,7 +30,6 @@ class RealNameCertificationModal extends Component{
constructor(props){
super(props);
this.state={
fileList:[]
}
}
@ -38,7 +37,6 @@ class RealNameCertificationModal extends Component{
}
setVisible = (visible) => {
this.setState({ fileList:[] });
this.refs.modalWrapper.setVisible(visible)
}
@ -120,8 +118,6 @@ class RealNameCertificationModal extends Component{
loading: false,
}));
}
let fileList = [...info.fileList];
this.setState({ fileList });
}
render(){
@ -294,7 +290,7 @@ class RealNameCertificationModal extends Component{
<span className="idPic-uploader demoImg">
<img src={`${certification == 1 ? authImg : jobImg}`} alt="avatar" style={{ maxHeight: '110px'}}/>
</span>
<Dragger {...uploadProps2} fileList = {this.state.fileList}>
<Dragger {...uploadProps2}>
{imageUrl2 ?
// <a href={imageUrl2} target="_blank" title="点击重新上传图片"></a>
<img src={imageUrl2} alt="avatar" style={{ maxHeight: '110px'}}/>

@ -1,203 +1,205 @@
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 isStudent = this.props.isStudent();
let is_current=this.props.is_current;
console.log(this.props.current_user&&this.props.current_user.user_identity==="学生")
return(
<div className="educontent">
<Spin size="large" spinning={isSpin}>
<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 &&
this.props.current_user&&this.props.current_user.user_identity==="学生"?"":<Create href={"/courses/new"} name={"新建课堂"} index="1"></Create>
}
{
(!data || data.courses.length==0) && (isStudent || category) && <NoneData></NoneData>
}
{
data && data.courses && 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;
Loading…
Cancel
Save