hjm 6 years ago
commit 720b1f2964

@ -125,7 +125,7 @@ $(window).resize(function() {
rightSlider(); rightSlider();
}); });
function rightSlider() { function rightSlider() {
var poi = parseInt((parseInt($(window).width()) - 1200) / 2) - 34; var poi = parseInt((parseInt($(window).width()) - 1200) / 2) - 81;
// console.log(parseInt($(window).width())+" "+poi); // console.log(parseInt($(window).width())+" "+poi);
if (poi > 0) { if (poi > 0) {
$(".-task-sidebar").css("right", poi); $(".-task-sidebar").css("right", poi);

@ -9,7 +9,16 @@ class Loading extends Component {
// Loading // Loading
return ( return (
<div className="App" style={{minHeight: '800px'}}> <div className="App" style={{minHeight: '800px'}}>
<Spin size="large" /> <style>
{
`
.margintop{
margin-top:20%;
}
`
}
</style>
<Spin size="large" className={"margintop"}/>
</div> </div>
); );
} }

@ -252,7 +252,7 @@ class UseBank extends Component{
<div style={{"height":"230px"}} className="d_middle edu-txt-center"> <div style={{"height":"230px"}} className="d_middle edu-txt-center">
<div> <div>
<p className="font-16 mb20 color-grey-3">通过职业认证的教师才能访问公共题库</p> <p className="font-16 mb20 color-grey-3">通过职业认证的教师才能访问公共题库</p>
<a className="white-btn edu-orangeback-btn" target="_blank" href="https://www.educoder.net/account/professional_certification">立即认证</a> <a className="white-btn edu-orangeback-btn" target="_blank" href="/account/professional_certification">立即认证</a>
</div> </div>
</div> </div>
: :

@ -1,11 +1,7 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { Modal,Checkbox,Select,Input,Tooltip } from "antd"; import { Modal,Checkbox,Select,Input,Tooltip,Spin,Icon } from "antd";
import axios from'axios'; import axios from'axios';
import Loading from '@icedesign/base/lib/loading';
import '@icedesign/base/lib/loading/style.js';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
const Option = Select.Option;
const Search = Input.Search; const Search = Input.Search;
class PathModal extends Component{ class PathModal extends Component{
constructor(props){ constructor(props){
@ -126,7 +122,7 @@ class PathModal extends Component{
render(){ render(){
let {Searchvalue,type,Modalstype}=this.state; let {Searchvalue,type,Modalstype}=this.state;
let {visible,shixunmodallist,hometypepvisible,newshixunmodallist}=this.props; let {visible,shixunmodallist,hometypepvisible,newshixunmodallist}=this.props;
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
return( return(
<div> <div>
@ -148,8 +144,7 @@ class PathModal extends Component{
width="840px" width="840px"
destroyOnClose={true} destroyOnClose={true}
> >
<Loading visible={false} shape="dot-circle" color='#4AC7FF'> <Spin indicator={antIcon} spinning={hometypepvisible} size="large" style={{marginTop:'15%'}}>
<div className="newupload_conbox"> <div className="newupload_conbox">
{ shixunmodallist && shixunmodallist.tags.length===0?"":<div className="clearfix mb20 shixun_work_div newshixun_tab_div cdefault" style={{"marginRight":"4px"}} id="shixun_tab_div"> { shixunmodallist && shixunmodallist.tags.length===0?"":<div className="clearfix mb20 shixun_work_div newshixun_tab_div cdefault" style={{"marginRight":"4px"}} id="shixun_tab_div">
@ -203,7 +198,6 @@ class PathModal extends Component{
<div className="over210 pl20 pr20" <div className="over210 pl20 pr20"
onScroll={this.contentViewScrolledit} onScroll={this.contentViewScrolledit}
style={{"Height":"204px"}}> style={{"Height":"204px"}}>
<Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'>
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}> <Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}>
{ {
newshixunmodallist&&newshixunmodallist.map((item,key)=>{ newshixunmodallist&&newshixunmodallist.map((item,key)=>{
@ -229,7 +223,6 @@ class PathModal extends Component{
}) })
} }
</Checkbox.Group> </Checkbox.Group>
</Loading>
</div> </div>
{ this.state.patheditarrytype===true?<span className={"color-red"}>{this.state.patheditarryvalue}</span>:""} { this.state.patheditarrytype===true?<span className={"color-red"}>{this.state.patheditarryvalue}</span>:""}
<div className="mt20 marginauto clearfix edu-txt-center"> <div className="mt20 marginauto clearfix edu-txt-center">
@ -237,7 +230,7 @@ class PathModal extends Component{
<a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.savecouseShixunModal}>确定</a> <a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.savecouseShixunModal}>确定</a>
</div> </div>
</div> </div>
</Loading> </Spin>
</Modal> </Modal>
</div> </div>
) )

@ -1,9 +1,7 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { Modal,Checkbox,Select,Input} from "antd"; import { Modal,Checkbox,Select,Input,Spin,Icon} from "antd";
import axios from'axios'; import axios from'axios';
import NoneData from "../coursesPublic/NoneData"; import NoneData from "../coursesPublic/NoneData";
import Loading from '@icedesign/base/lib/loading';
import '@icedesign/base/lib/loading/style.js';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
const Option = Select.Option; const Option = Select.Option;
@ -244,7 +242,7 @@ class Selectresource extends Component{
render(){ render(){
let {Searchvalue,type,category_id,Resourcelist,hometypepvisible,patheditarry}=this.state; let {Searchvalue,type,category_id,Resourcelist,hometypepvisible,patheditarry}=this.state;
let {visible,shixunmodallist}=this.props; let {visible,shixunmodallist}=this.props;
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
return( return(
<div> <div>
{/*提示*/} {/*提示*/}
@ -275,8 +273,8 @@ class Selectresource extends Component{
` `
} }
</style> </style>
<Loading visible={false} shape="dot-circle" color='#4AC7FF'>
<Spin indicator={antIcon} spinning={hometypepvisible} size="large" style={{marginTop:'15%'}}>
<style>{` <style>{`
.newupload_conboxtop{ .newupload_conboxtop{
margin-top: -30px; margin-top: -30px;
@ -343,8 +341,8 @@ class Selectresource extends Component{
> >
{ {
Resourcelist === undefined ? "": Resourcelist === undefined ?Resourcelist.files.length===0?<NoneData/>:
<Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'>
<Checkbox.Group style={{ width: '100%' }} value={patheditarry} onChange={this.shixunhomeworkedit}> <Checkbox.Group style={{ width: '100%' }} value={patheditarry} onChange={this.shixunhomeworkedit}>
{ {
Resourcelist.files.map((item,key)=>{ Resourcelist.files.map((item,key)=>{
@ -367,9 +365,8 @@ class Selectresource extends Component{
) )
}) })
} }
</Checkbox.Group> </Checkbox.Group>:""
{ Resourcelist.files.length===0?<NoneData/>:""}
</Loading>
} }
</div> </div>
@ -382,7 +379,7 @@ class Selectresource extends Component{
<a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.savecouseShixunModal}>确定</a> <a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.savecouseShixunModal}>确定</a>
</div> </div>
</div> </div>
</Loading> </Spin>
</Modal>:""} </Modal>:""}
</div> </div>
) )

@ -1,218 +1,216 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { Modal,Checkbox,Select,Input} from "antd"; import { Modal,Checkbox,Select,Input} from "antd";
import axios from'axios'; import axios from'axios';
import Loading from '@icedesign/base/lib/loading';
import '@icedesign/base/lib/loading/style.js'; import Modals from '../../modals/Modals';
import Modals from '../../modals/Modals';
const Option = Select.Option;
const Option = Select.Option; const Search = Input.Search;
const Search = Input.Search;
function formatDate(date) {
function formatDate(date) { var dateee = new Date(date).toJSON();
var dateee = new Date(date).toJSON(); return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') }
}
class Showoldfiles extends Component{
class Showoldfiles extends Component{ constructor(props){
constructor(props){ super(props);
super(props); this.state={
this.state={ Searchvalue:undefined,
Searchvalue:undefined, type:'all',
type:'all', category_id:0,
category_id:0, page:1,
page:1, Resourcelist:undefined,
Resourcelist:undefined,
getallfiles:false,
getallfiles:false, searchtype:'getallfiles'
searchtype:'getallfiles' }
} }
} componentDidMount() {
componentDidMount() {
}
}
componentDidUpdate = (prevProps) => {
componentDidUpdate = (prevProps) => {
if ( prevProps.visible != this.props.visible ) {
if ( prevProps.visible != this.props.visible ) {
}
}
}
}
cloasshanchudiao=()=>{
cloasshanchudiao=()=>{ this.props.closaoldfilesprops()
this.props.closaoldfilesprops() }
}
render(){
render(){ let {visible,allfiles}=this.props;
let {visible,allfiles}=this.props;
return(
return( <div>
<div> {/*提示*/}
{/*提示*/} <Modals
<Modals modalsType={this.state.Modalstype}
modalsType={this.state.Modalstype} modalsTopval={this.state.Modalstopval}
modalsTopval={this.state.Modalstopval} modalCancel={this.state.ModalCancel}
modalCancel={this.state.ModalCancel} modalSave={this.state.ModalSave}
modalSave={this.state.ModalSave} loadtype= {this.state.loadtype}
loadtype= {this.state.loadtype}
/>
/> {visible===true?
{visible===true? <Modal
<Modal title="选择版本"
title="选择版本" visible={visible}
visible={visible} closable={false}
closable={false} footer={null}
footer={null} width="600px"
width="600px" destroyOnClose={true}
destroyOnClose={true} keyboard={false}
keyboard={false} >
> <a id='closeIcon' onClick={this.cloasshanchudiao}><i className='iconfont icon-shanchudiao'></i></a>
<a id='closeIcon' onClick={this.cloasshanchudiao}><i className='iconfont icon-shanchudiao'></i></a> <style>
<style> {
{ `
` .ant-modal-body{
.ant-modal-body{ padding: 30px 0px;
padding: 30px 0px; }
} `
` }
} </style>
</style>
<Loading visible={false} shape="dot-circle" color='#4AC7FF'> <style>{`
.newupload_conboxtop{
<style>{` margin-top: -30px;
.newupload_conboxtop{ }
margin-top: -30px; #shixun_tab_div{
} padding: 0 30px;
#shixun_tab_div{ padding-top:30px;
padding: 0 30px; }
padding-top:30px;
} .selectfiles{
width: 600px;
.selectfiles{ height: 48px;
width: 600px; background: rgba(255,104,0,0.1);
height: 48px; line-height: 48px;
background: rgba(255,104,0,0.1); text-align: center;
line-height: 48px; }
text-align: center;
} .selectfilesfont{
font-size:14px;
.selectfilesfont{ font-family:Microsoft YaHei;
font-size:14px; font-weight:400;
font-family:Microsoft YaHei; line-height:25px;
font-weight:400; color:rgba(255,104,0,1);
line-height:25px; }
color:rgba(255,104,0,1); `}</style>
}
`}</style> <div className="newupload_conbox newupload_conboxtop">
<div className="clearfix cdefault" style={{"marginRight":"4px"}}>
<div className="newupload_conbox newupload_conboxtop">
<div className="clearfix cdefault" style={{"marginRight":"4px"}}> <div className={"selectfiles"}>
<span className={"selectfilesfont"}>
<div className={"selectfiles"}> 该文件有历史版本请选择您需要的文件点击文件名 下载
<span className={"selectfilesfont"}> </span>
该文件有历史版本请选择您需要的文件点击文件名 下载 </div>
</span> </div>
</div>
</div>
<style>{`
.greybackHead{
<style>{` padding:0px 30px;
.greybackHead{ }
padding:0px 30px; .fontlefts{
} width: 300px;
.fontlefts{ text-align: center;
width: 300px; }
text-align: center;
} .filesves{
width: 220px;
.filesves{ text-align: center;
width: 220px; }
text-align: center; `}</style>
} <ul className="clearfix greybackHead edu-txt-center">
`}</style> <li className="fl paddingleft22 fontlefts">资源名称</li>
<ul className="clearfix greybackHead edu-txt-center"> <li className="fl filesves" >版本</li>
<li className="fl paddingleft22 fontlefts">资源名称</li> </ul>
<li className="fl filesves" >版本</li>
</ul>
<div className="over210 pl20 pr20"
onScroll={this.contentViewScroll}
<div className="over210 pl20 pr20" style={{"Height":"204px"}}>
onScroll={this.contentViewScroll}
style={{"Height":"204px"}}> <style>{`
.color-grey-9a{color: #9A9A9A !important;}
<style>{` .datastyle{
.color-grey-9a{color: #9A9A9A !important;} width: 120px;
.datastyle{ overflow: hidden;
width: 120px; height: 37px;
overflow: hidden; }
height: 37px; `}</style>
}
`}</style> <style>{`
<style>{` .fontlefts{
width: 340px;
.fontlefts{ text-align: center;
width: 340px; }
text-align: center;
} .filesves{
width: 200px;
.filesves{ text-align: center;
width: 200px; }
text-align: center; .isabox{
} max-width: 280px;
.isabox{ overflow: hidden;
max-width: 280px; text-overflow: ellipsis;
overflow: hidden; white-space: nowrap;
text-overflow: ellipsis; display: inline-block;
white-space: nowrap; float: left;
display: inline-block; }
float: left; `}</style>
} {
`}</style> allfiles === undefined ? "":
{ <div>
allfiles === undefined ? "":
<div> <div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" id={allfiles.id}>
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" id={allfiles.id}> <li className="fl fontlefts">
<a className={"isabox"} href={allfiles.url}>{allfiles.title}</a>
<li className="fl fontlefts"> <span className={"newcolor-orange fl"}>当前版本</span>
<a className={"isabox"} href={allfiles.url}>{allfiles.title}</a> </li>
<span className={"newcolor-orange fl"}>当前版本</span>
</li> <li className="fl filesves ">
{formatDate(allfiles.created_on)}
<li className="fl filesves "> </li>
{formatDate(allfiles.created_on)}
</li> </div>
{
</div> allfiles.attachment_histories.length===0?"":allfiles.attachment_histories.map((item,key)=>{
{ return(
allfiles.attachment_histories.length===0?"":allfiles.attachment_histories.map((item,key)=>{
return( <div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" id={item.id} key={key}>
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" id={item.id} key={key}> <li className="fl fontlefts">
<a className={"isabox"} href={item.url}>{item.title}</a>
<li className="fl fontlefts"> </li>
<a className={"isabox"} href={item.url}>{item.title}</a>
</li> <li className="fl filesves ">
{formatDate(item.created_on)}
<li className="fl filesves "> </li>
{formatDate(item.created_on)}
</li> </div>
)
</div> })
) }
}) </div>
} }
</div> </div>
}
</div> </div>
</div> </Modal>:""}
</Loading> </div>
</Modal>:""} )
</div> }
) }
}
}
export default Showoldfiles; export default Showoldfiles;

@ -1,8 +1,6 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { Modal,Checkbox,Select,Input,Tooltip,Spin,Icon} from "antd"; import { Modal,Checkbox,Select,Input,Tooltip,Spin,Icon} from "antd";
import axios from'axios'; import axios from'axios';
// import Loading from '@icedesign/base/lib/loading';
// import '@icedesign/base/lib/loading/style.js';
const Option = Select.Option; const Option = Select.Option;
const Search = Input.Search; const Search = Input.Search;
@ -276,7 +274,7 @@ class ShixunModal extends Component{
` `
} }
</style> </style>
{/*<Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'>*/}
<Checkbox.Group style={{ width: '100%' }} value={patheditarry} onChange={this.shixunhomeworkedit}> <Checkbox.Group style={{ width: '100%' }} value={patheditarry} onChange={this.shixunhomeworkedit}>
{ {
newshixunmodallist === undefined ? "": newshixunmodallist.map((item,key)=>{ newshixunmodallist === undefined ? "": newshixunmodallist.map((item,key)=>{
@ -303,7 +301,6 @@ class ShixunModal extends Component{
}) })
} }
</Checkbox.Group> </Checkbox.Group>
{/*</Loading>*/}
</div> </div>
</div> </div>
</Spin> </Spin>

@ -10,8 +10,6 @@ import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
import SiderBar from '../tpm/SiderBar'; import SiderBar from '../tpm/SiderBar';
import Loading from '@icedesign/base/lib/loading';
import { SnackbarHOC , getImageUrl} from 'educoder'; import { SnackbarHOC , getImageUrl} from 'educoder';
import Slider from '@icedesign/base/lib/slider'; import Slider from '@icedesign/base/lib/slider';
@ -24,9 +22,7 @@ import '@icedesign/base/lib/rating/style.js';
import './home.css'; import './home.css';
import '@icedesign/base/lib/loading/style.js'; import {Tooltip,Spin} from 'antd';
import {Tooltip} from 'antd';
const $ = window.$; const $ = window.$;
@ -110,7 +106,7 @@ class ShixunsHome extends Component {
return ( return (
<div className="newMain clearfix backFAFAFA"> <div className="newMain clearfix backFAFAFA">
<Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'> <Spin spinning={hometypepvisible} size="large" style={{marginTop:'15%'}}>
{/*懒加载*/} {/*懒加载*/}
<SiderBar/> <SiderBar/>
@ -498,8 +494,7 @@ class ShixunsHome extends Component {
</div> </div>
</div> </div>
</div> </div>
</Spin>
</Loading>
</div> </div>
); );
} }

@ -1,10 +1,8 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {getImageUrl} from 'educoder'; import {getImageUrl} from 'educoder';
import {Modal,Input,Checkbox,Tooltip} from "antd"; import {Modal,Input,Checkbox,Tooltip,Spin} from "antd";
import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd'; import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
import Loading from '@icedesign/base/lib/loading';
import '@icedesign/base/lib/loading/style.js';
import '../ShixunPaths.css'; import '../ShixunPaths.css';
import axios from 'axios'; import axios from 'axios';
const $ = window.$; const $ = window.$;
@ -437,7 +435,7 @@ class DetailCardsEditAndAdd extends Component{
width="840px" width="840px"
destroyOnClose={true} destroyOnClose={true}
> >
<Loading visible={hometypepvisible} shape="dot-circle" color='#4AC7FF'> <Spin spinning={hometypepvisible} size="large" style={{marginTop:'15%'}}>
<div className="newupload_conbox"> <div className="newupload_conbox">
<div className="clearfix mb20 shixun_work_div newshixun_tab_div cdefault" style={{"marginRight":"4px"}} id="shixun_tab_div"> <div className="clearfix mb20 shixun_work_div newshixun_tab_div cdefault" style={{"marginRight":"4px"}} id="shixun_tab_div">
<li className="fl mr5 mt5"> <a onClick={()=>this.changeTag(0,`${search}`)} className={ type===0 ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部</a></li> <li className="fl mr5 mt5"> <a onClick={()=>this.changeTag(0,`${search}`)} className={ type===0 ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部</a></li>
@ -516,7 +514,7 @@ class DetailCardsEditAndAdd extends Component{
<a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.clickShixunchoose}>确定</a> <a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.clickShixunchoose}>确定</a>
</div> </div>
</div> </div>
</Loading> </Spin>
</Modal> </Modal>
</div> </div>

@ -1,10 +1,8 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {getImageUrl} from 'educoder'; import {getImageUrl} from 'educoder';
import {Modal,Input,Checkbox,Tooltip} from "antd"; import {Modal,Input,Checkbox,Tooltip,Spin} from "antd";
import { DragDropContext,Draggable, Droppable} from 'react-beautiful-dnd'; import { DragDropContext,Draggable, Droppable} from 'react-beautiful-dnd';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
import Loading from '@icedesign/base/lib/loading';
import '@icedesign/base/lib/loading/style.js';
import '../ShixunPaths.css'; import '../ShixunPaths.css';
import axios from 'axios'; import axios from 'axios';
const $ = window.$; const $ = window.$;
@ -478,8 +476,8 @@ class DetailCardsEditAndEdit extends Component{
footer={null} footer={null}
width="840px" width="840px"
destroyOnClose={true} destroyOnClose={true}
> >Z
<Loading visible={hometypepvisible} shape="dot-circle" color='#4AC7FF'> <Spin spinning={hometypepvisible} size="large" style={{marginTop:'15%'}}>
<div className="newupload_conbox"> <div className="newupload_conbox">
<div className="clearfix mb20 shixun_work_div newshixun_tab_div cdefault" style={{"marginRight":"4px"}} id="shixun_tab_div"> <div className="clearfix mb20 shixun_work_div newshixun_tab_div cdefault" style={{"marginRight":"4px"}} id="shixun_tab_div">
<li className="fl mr5 mt5"> <a onClick={()=>this.changeTag(0,`${search}`)} className={ type===0 ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部</a></li> <li className="fl mr5 mt5"> <a onClick={()=>this.changeTag(0,`${search}`)} className={ type===0 ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部</a></li>
@ -558,7 +556,7 @@ class DetailCardsEditAndEdit extends Component{
<a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.clickShixunchoose}>确定</a> <a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.clickShixunchoose}>确定</a>
</div> </div>
</div> </div>
</Loading> </Spin>
</Modal> </Modal>
</div> </div>

@ -638,7 +638,7 @@ submittojoinclass=(value)=>{
{/*<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.shixun_paths_url}>实训路径</a></li>*/} {/*<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.shixun_paths_url}>实训路径</a></li>*/}
<li className={`${activePaths === true ? 'pr active' : 'pr'}`}> <li className={`${activePaths === true ? 'pr active' : 'pr'}`}>
<a href={this.props.Headertop===undefined?"":'/paths'}>课程</a></li> <a href={this.props.Headertop===undefined?"":'/paths'}>课程</a></li>
{/*<li><a href={this.props.Headertop===undefined?"":'/courses'}>课堂</a></li>*/} {/*<li><a href={this.props.Headertop===undefined?"":'/courses'}>课堂</a></li>*/}
<li className={`${coursestype === true ? 'pr active' : 'pr'}`}> <li className={`${coursestype === true ? 'pr active' : 'pr'}`}>
@ -671,13 +671,13 @@ submittojoinclass=(value)=>{
</div> </div>
</li> </li>
<li className=""><a href={"/libraries"}>教学案例</a></li> {/*<li className=""><a href={"/libraries"}>教学案例</a></li>*/}
<li className=""><a href={this.props.Headertop===undefined?"":this.props.Headertop.competitions_url}>竞赛</a></li> <li className=""><a href={this.props.Headertop===undefined?"":this.props.Headertop.competitions_url}>在线竞赛</a></li>
<li className={`${activeForums === true ? 'active' : ''}`}><a href={this.props.Headertop===undefined?"":this.props.Headertop.topic_url}>问答</a></li> <li className={`${activeForums === true ? 'active' : ''}`}><a href={this.props.Headertop===undefined?"":this.props.Headertop.topic_url}>交流问答</a></li>
<li <li
style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth===null? 'none' : 'block'}} style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth===null? 'none' : 'block'}}
><a href={this.props.Headertop===undefined?"":this.props.Headertop.auth}>认证</a></li> ><a href={this.props.Headertop===undefined?"":this.props.Headertop.auth}>工程认证</a></li>
</ul> </ul>

@ -23,7 +23,7 @@ $(window).scroll(function(){
}); });
function rightSlider(){ function rightSlider(){
var poi=parseInt((parseInt($(window).width())- 1200 )/2)-34; var poi=parseInt((parseInt($(window).width())- 1200 )/2)-81;
// console.log(parseInt($(window).width())+" "+poi); // console.log(parseInt($(window).width())+" "+poi);
if(poi>0){ if(poi>0){
$(".-task-sidebar").css("right",poi); $(".-task-sidebar").css("right",poi);

@ -1,193 +1,192 @@
import React, {Component} from 'react'; import React, {Component} from 'react';
import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Pagination,Tooltip} from 'antd'; import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Pagination,Tooltip,Spin} from 'antd';
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
// import "antd/dist/antd.css"; // import "antd/dist/antd.css";
import Rating from '@icedesign/base/lib/rating'; import Rating from '@icedesign/base/lib/rating';
import Loading from '@icedesign/base/lib/loading'; import axios from 'axios';
import axios from 'axios'; import {getImageUrl, toPath, getUrl} from 'educoder'
import {getImageUrl, toPath, getUrl} from 'educoder' import './shixunCss/fork.css';
import './shixunCss/fork.css'; let origin = getUrl();
let origin = getUrl(); let path = getUrl("/editormd/lib/")
let path = getUrl("/editormd/lib/") const $ = window.$;
const $ = window.$; let timeout;
let timeout; let currentValue;
let currentValue;
export default class TPMFork_listComponent extends Component {
constructor(props) {
export default class TPMFork_listComponent extends Component { super(props)
constructor(props) { this.state = {
super(props) shixuns:undefined,
this.state = { total_count:0,
shixuns:undefined, shixunsID:undefined,
total_count:0, Forkvisible: true,
shixunsID:undefined, Forkcurrent: 1
Forkvisible: true, }
Forkcurrent: 1 }
}
}
componentDidMount() {
let id = this.props.match.params.shixunId;
componentDidMount() {
let id = this.props.match.params.shixunId; let Url="/shixuns/"+id+"/fork_list.json";
axios.get(Url, {
let Url="/shixuns/"+id+"/fork_list.json"; params: {
axios.get(Url, { page:1,
params: { limit:8
page:1, }
limit:8 }).then((response)=> {
} this.setState({
}).then((response)=> { shixunsID:id,
this.setState({ shixuns:response.data.shixuns,
shixunsID:id, total_count:response.data.total_count,
shixuns:response.data.shixuns, Forkvisible:false
total_count:response.data.total_count, })
Forkvisible:false }).catch((error)=>{
}) console.log(error)
}).catch((error)=>{ });
console.log(error) }
});
}
TPMForkonChange=(pageNumber)=>{
let id = this.props.match.params.shixunId;
TPMForkonChange=(pageNumber)=>{ this.setState({
let id = this.props.match.params.shixunId; Forkvisible:true
this.setState({ })
Forkvisible:true let Url="/shixuns/"+id+"/fork_list.json";
}) axios.get(Url, {
let Url="/shixuns/"+id+"/fork_list.json"; params: {
axios.get(Url, { page:pageNumber,
params: { limit:8
page:pageNumber, }
limit:8 }).then((response)=> {
} this.setState({
}).then((response)=> { shixunsID:id,
this.setState({ shixuns:response.data.shixuns,
shixunsID:id, total_count:response.data.total_count,
shixuns:response.data.shixuns, Forkvisible: false,
total_count:response.data.total_count, Forkcurrent: pageNumber
Forkvisible: false, })
Forkcurrent: pageNumber }).catch((error)=>{
}) console.log(error)
}).catch((error)=>{ });
console.log(error) }
}); render() {
}
render() { let {shixuns, total_count, shixunsID, Forkvisible, Forkcurrent} = this.state;
let {shixuns, total_count, shixunsID, Forkvisible, Forkcurrent} = this.state;
return (
<React.Fragment>
return ( <div className="educontent mb20">
<React.Fragment>
<div className="educontent mb20"> <div className="edu-back-white padding20 clearfix mt30">
<span className="fl font-16">Fork实训列表</span>
<div className="edu-back-white padding20 clearfix mt30"> <a href={"/shixuns/"+shixunsID+"/challenges"} className="font-16 color-grey-9 fr">返回</a>
<span className="fl font-16">Fork实训列表</span> </div>
<a href={"/shixuns/"+shixunsID+"/challenges"} className="font-16 color-grey-9 fr">返回</a> {/*<Loading visible={Forkvisible} shape="dot-circle" style={{width:'100%'}}color='#4AC7FF'>*/}
</div> <Spin spinning={Forkvisible} size="large" style={{marginTop:'15%'}}>
<Loading visible={Forkvisible} shape="dot-circle" style={{width:'100%'}}color='#4AC7FF'> <div className="mt30 square-list clearfix mh320">
<div className="mt30 square-list clearfix mh320">
{ shixuns===undefined?" ":shixuns.map((item,key)=>{
{ shixuns===undefined?" ":shixuns.map((item,key)=>{ return(
return( <div className="square-Item" key={key} id={item.id}>
<div className="square-Item" key={key} id={item.id}>
<div className="tag-green">
<div className="tag-green"> <span className="tag-name"> {item.tag_name}</span>
<span className="tag-name"> {item.tag_name}</span> <img src={require(`./shixunCss/tag2.png`)}/>
<img src={require(`./shixunCss/tag2.png`)}/> </div>
</div>
<div className={item.power === false ? "closeSquare" : "none"}>
<div className={item.power === false ? "closeSquare" : "none"}> <img src={getImageUrl("images/educoder/icon/lockclose.svg")}
<img src={getImageUrl("images/educoder/icon/lockclose.svg")} className="mt80 mb25"/>
className="mt80 mb25"/> <p className="font-14 color-white">非试用内容需要授权</p>
<p className="font-14 color-white">非试用内容需要授权</p> </div>
</div>
<a href={"/shixuns/"+item.identifier+"/challenges"} className="square-img" target="_blank">
<a href={"/shixuns/"+item.identifier+"/challenges"} className="square-img" target="_blank"> <img src={'/'+item.pic}/>
<img src={'/'+item.pic}/> </a>
</a>
<div className="square-main">
<div className="square-main"> <p className="task-hide">
<p className="task-hide"> <a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank" className="justify color-grey-name">
<a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank" className="justify color-grey-name"> {item.name}
{item.name} </a>
</a> </p>
</p>
<p className="clearfix mt8 ml-3">
<p className="clearfix mt8 ml-3"> <span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title="">
<span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title=""> <Rating key={key} value={item.score_info===null?5:item.score_info} disabled allowHalf />
<Rating key={key} value={item.score_info===null?5:item.score_info} disabled allowHalf /> </span>
</span> <span className="fl ml25 font-12 color-grey-9 lineh-12 mt4">{item.score_info===null?"5分":item.score_info+"分"}</span>
<span className="fl ml25 font-12 color-grey-9 lineh-12 mt4">{item.score_info===null?"5分":item.score_info+"分"}</span> </p>
</p>
<p className="clearfix mt8 font-12 color-grey-B4">
<p className="clearfix mt8 font-12 color-grey-B4">
<Tooltip placement="bottom" title={"关卡"}>
<Tooltip placement="bottom" title={"关卡"}> <span className="mr10 fl squareIconSpan">
<span className="mr10 fl squareIconSpan"> <i className="iconfont icon-shixunguanqia fl mr3"></i>{item.challenges_count}
<i className="iconfont icon-shixunguanqia fl mr3"></i>{item.challenges_count} </span>
</span> </Tooltip>
</Tooltip>
{/*<Tooltip placement="bottom" title={"经验值"}>*/}
{/*<Tooltip placement="bottom" title={"经验值"}>*/} {/*<span className="mr10 fl squareIconSpan">*/}
{/*<span className="mr10 fl squareIconSpan">*/} {/*<i className="iconfont icon-jingyan fl mr3"></i>{item.exp}*/}
{/*<i className="iconfont icon-jingyan fl mr3"></i>{item.exp}*/} {/*</span>*/}
{/*</span>*/} {/*</Tooltip>*/}
{/*</Tooltip>*/}
<Tooltip placement="bottom" title={"学习人数"}>
<Tooltip placement="bottom" title={"学习人数"}> <span className="mr10 fl squareIconSpan" style={{display:item.stu_num===0?"none":'block'}}>
<span className="mr10 fl squareIconSpan" style={{display:item.stu_num===0?"none":'block'}}> <i className="iconfont icon-chengyuan fl mr3"></i>{item.stu_num}
<i className="iconfont icon-chengyuan fl mr3"></i>{item.stu_num} </span>
</span> </Tooltip>
</Tooltip>
<span className="fr color-grey-B3 squareIconSpan">{item.level}</span>
<span className="fr color-grey-B3 squareIconSpan">{item.level}</span> </p>
</p>
</div>
</div> </div>
</div> )
) })
}) }
} </div>
</div>
{/*<div>{total_count}</div>*/}
{/*<div>{total_count}</div>*/} <div className="educontent mb80 edu-txt-center mt10" style={{display: total_count > 8 ? "block" : "none"}}>
<div className="educontent mb80 edu-txt-center mt10" style={{display: total_count > 8 ? "block" : "none"}}> {/*<div className={total_count < 9 ? " ml32" : "ml105"}>*/}
{/*<div className={total_count < 9 ? " ml32" : "ml105"}>*/} <Pagination
<Pagination showQuickJumper
showQuickJumper defaultCurrent={1}
defaultCurrent={1} pageSize={8}
pageSize={8} total={total_count}
total={total_count} current={Forkcurrent}
current={Forkcurrent} style={
style={ {
{ display: total_count < 9 ? 'none' : 'block'
display: total_count < 9 ? 'none' : 'block' }
} }
} onChange={this.TPMForkonChange}/>
onChange={this.TPMForkonChange}/> </div>
</div> </Spin>
{/*</Loading>*/}
</Loading> </div>
</div> </React.Fragment>
</React.Fragment> )
) }
} }
}

@ -131,7 +131,7 @@ export function TPMIndexHOC(WrappedComponent) {
}else if(this.props.match.path==="/shixuns"){ }else if(this.props.match.path==="/shixuns"){
document.title="开发社区"; document.title="开发社区";
}else if(this.props.match.path==="/paths"){ }else if(this.props.match.path==="/paths"){
document.title="实课程"; document.title="实课程";
}else if(this.props.match.path==="/courses"){ }else if(this.props.match.path==="/courses"){
document.title="翻转课堂"; document.title="翻转课堂";
} }

@ -15,14 +15,14 @@
/*flex-wrap: wrap;*/ /*flex-wrap: wrap;*/
/*display: -webkit-flex; !* Safari *!*/ /*display: -webkit-flex; !* Safari *!*/
/*display: flex;*/ /*display: flex;*/
width: 340px; width: 360px;
position:relative; position:relative;
overflow: hidden; overflow: hidden;
} }
.newsubscript{ .newsubscript{
position: absolute; position: absolute;
right: 23px; right: 23px;
bottom: 38px; bottom: 16px;
cursor: pointer; cursor: pointer;
} }
.newsubscript:hover{ .newsubscript:hover{

@ -7,11 +7,9 @@ import PropTypes from 'prop-types';
import classNames from 'classnames'; import classNames from 'classnames';
// import { Rating,Loading} from '@icedesign/base';
import {getImageUrl,setImagesUrl, toPath} from 'educoder'; import {getImageUrl,setImagesUrl, toPath} from 'educoder';
// import { Pagination,Row,Col } from 'antd'; import { Spin,Icon } from 'antd';
import 'antd/lib/pagination/style/index.css'; import 'antd/lib/pagination/style/index.css';
@ -21,8 +19,6 @@ import Rating from '@icedesign/base/lib/rating';
import Pagination from '@icedesign/base/lib/pagination'; import Pagination from '@icedesign/base/lib/pagination';
// import Loading from '@icedesign/base/lib/loading';
// 引入业务组件样式 // 引入业务组件样式
import '@icedesign/base/lib/pagination/style.js'; import '@icedesign/base/lib/pagination/style.js';
@ -30,8 +26,6 @@ import '@icedesign/base/lib/rating/style.js';
import { Tooltip } from 'antd'; import { Tooltip } from 'antd';
// import '@icedesign/base/lib/loading/style.js';
import axios from 'axios'; import axios from 'axios';
const $ = window.$; const $ = window.$;
@ -63,8 +57,8 @@ class ShixunCard extends Component {
let {middleshixundata, pagination, typepvisible, pages, totalcount} = this.props; let {middleshixundata, pagination, typepvisible, pages, totalcount} = this.props;
return ( return (
<div className="educontent mb80"> <div className="educontent mb80">
{/*<Loading visible={typepvisible} shape="dot-circle" color='#4AC7FF'>*/}
<Spin spinning={typepvisible} size="large" style={{marginTop:'15%'}}>
<div id="shixun_list_content" <div id="shixun_list_content"
style={{display: middleshixundata === undefined || middleshixundata.length === 0 ? "block" : "none"}}> style={{display: middleshixundata === undefined || middleshixundata.length === 0 ? "block" : "none"}}>
<div className="square-list clearfix"> <div className="square-list clearfix">
@ -168,7 +162,7 @@ class ShixunCard extends Component {
</div> </div>
</div> </div>
{/*</Loading>*/} </Spin>
</div> </div>
) )
} }

@ -6,6 +6,8 @@ import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import axios from 'axios'; import axios from 'axios';
import { Spin } from 'antd';
import { TPMIndexHOC } from '../TPMIndexHOC'; import { TPMIndexHOC } from '../TPMIndexHOC';
import { SnackbarHOC } from 'educoder'; import { SnackbarHOC } from 'educoder';
@ -16,10 +18,6 @@ import ShixunSearchBar from './ShixunSearchBar';
import ShixunCard from './ShixunCard'; import ShixunCard from './ShixunCard';
import Loading from '@icedesign/base/lib/loading';
import '@icedesign/base/lib/loading/style.js';
const queryString = require('query-string'); const queryString = require('query-string');
const $ = window.$; const $ = window.$;
@ -362,7 +360,7 @@ class ShixunsIndex extends Component {
return ( return (
<div className="newMain clearfix backFAFAFA"> <div className="newMain clearfix backFAFAFA">
<Loading visible={typepvisible} shape="dot-circle" color='#4AC7FF'> <Spin spinning={typepvisible} size="large" style={{marginTop:'15%'}}>
{/*懒加载*/} {/*懒加载*/}
<ShixunSearchBar <ShixunSearchBar
@ -394,7 +392,7 @@ class ShixunsIndex extends Component {
shixunsPage={this.shixunsPage.bind(this)} shixunsPage={this.shixunsPage.bind(this)}
/> />
</Loading> </Spin>
</div> </div>
); );
} }

Loading…
Cancel
Save