parent
3abf3f7975
commit
a4a1a75ecf
@ -1,83 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import Comments from '../comment/Comments'
|
||||
|
||||
import { commentHOC } from '../comment/CommentsHOC'
|
||||
import { CircularProgress } from 'material-ui/Progress';
|
||||
|
||||
import './TPMShixunDiscuss.css'
|
||||
|
||||
import TPMRightSection from './component/TPMRightSection'
|
||||
import TPMNav from './component/TPMNav'
|
||||
|
||||
class TPMShixunDiscuss extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps, newContext) {
|
||||
if (newProps.shixun && newProps.shixun.id && (!this.props || !this.props.shixun || this.props.shixun.id != newProps.shixun.id) ) {
|
||||
window.document.title = newProps.shixun.name
|
||||
// this.props.fetchCommentIfNotFetched &&
|
||||
// this.props.fetchCommentIfNotFetched();
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
// TODO 加了HOC后 mount了两次
|
||||
this.props.fetchCommentIfNotFetched &&
|
||||
this.props.fetchCommentIfNotFetched();
|
||||
}
|
||||
//
|
||||
|
||||
onPaginationChange = (page) => {
|
||||
window.$("html,body").animate({"scrollTop":160})
|
||||
this.props.onPaginationChange(page)
|
||||
}
|
||||
|
||||
render() {
|
||||
const { loadingComments, creator, shixun, myshixun, recommend_shixuns, current_user, watched,
|
||||
aboutFocus, user, match
|
||||
} = this.props;
|
||||
|
||||
let _user = user;
|
||||
if (user) {
|
||||
_user = Object.assign({}, user);
|
||||
_user.user_url = `/users/${user.login}`
|
||||
}
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="tpmComment educontent clearfix mt30 mb80">
|
||||
|
||||
<div className="with65 fl edu-back-white commentsDelegateParent" >
|
||||
<TPMNav
|
||||
match={match}
|
||||
user={user}
|
||||
shixun={shixun}
|
||||
{...this.props}
|
||||
></TPMNav>
|
||||
{ loadingComments ?
|
||||
<CircularProgress size={40} thickness={3} style={{ marginLeft: 'auto', marginRight: 'auto', marginTop: '200px', display: 'block' }}/> :
|
||||
<Comments
|
||||
{...this.props}
|
||||
user={_user}
|
||||
onPaginationChange={this.onPaginationChange}
|
||||
></Comments>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div className="with35 fr pl20">
|
||||
<TPMRightSection {...this.props}></TPMRightSection>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default commentHOC( TPMShixunDiscuss );
|
@ -1,260 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
import { List,Typography,Tag,Modal,Radio} from 'antd';
|
||||
|
||||
import TPMRightSection from './component/TPMRightSection';
|
||||
import TPMNav from './component/TPMNav';
|
||||
import axios from 'axios';
|
||||
|
||||
class Audit_situationComponent extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
datas:undefined,
|
||||
value:undefined,
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getdatas()
|
||||
|
||||
}
|
||||
|
||||
|
||||
getdatas=()=>{
|
||||
|
||||
let url=`/shixuns/${this.props.match.params.shixunId}/review_newest_record.json`;
|
||||
axios.get(url).then((response) => {
|
||||
|
||||
if(response.data===undefined||JSON.stringify(response.data) == "{}"||response.data===null){
|
||||
this.setState({
|
||||
datas:[
|
||||
{
|
||||
name: '内容审核情况',
|
||||
id:"Content",
|
||||
},
|
||||
{
|
||||
name: '性能审核情况',
|
||||
id:"Performance",
|
||||
},
|
||||
]
|
||||
})
|
||||
}else{
|
||||
let newlist=[]
|
||||
if(response.data.content_info!=undefined&&response.data.perference_info===undefined){
|
||||
let arr=[
|
||||
{
|
||||
name: '内容审核情况',
|
||||
id:"Content",
|
||||
status:response.data.content_info.status,
|
||||
username:response.data.content_info.username,
|
||||
time:response.data.content_info.time,
|
||||
},
|
||||
{
|
||||
name: '性能审核情况',
|
||||
id:"Performance",
|
||||
},
|
||||
]
|
||||
newlist=arr
|
||||
}
|
||||
|
||||
if(response.data.content_info===undefined&&response.data.perference_info!=undefined){
|
||||
let arr=[
|
||||
{
|
||||
name: '内容审核情况',
|
||||
id:"Content",
|
||||
},
|
||||
{
|
||||
name: '性能审核情况',
|
||||
id:"Performance",
|
||||
status:response.data.perference_info.status,
|
||||
username:response.data.perference_info.username,
|
||||
time:response.data.perference_info.time,
|
||||
},
|
||||
]
|
||||
newlist=arr
|
||||
}
|
||||
|
||||
if(response.data.content_info!=undefined&&response.data.perference_info!=undefined){
|
||||
let arr=[
|
||||
{
|
||||
name: '内容审核情况',
|
||||
id:"Content",
|
||||
status:response.data.content_info.status,
|
||||
username:response.data.content_info.username,
|
||||
time:response.data.content_info.time,
|
||||
},
|
||||
{
|
||||
name: '性能审核情况',
|
||||
id:"Performance",
|
||||
status:response.data.perference_info.status,
|
||||
username:response.data.perference_info.username,
|
||||
time:response.data.perference_info.time,
|
||||
},
|
||||
]
|
||||
newlist=arr
|
||||
}
|
||||
|
||||
this.setState({
|
||||
datas:newlist
|
||||
})
|
||||
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
});
|
||||
}
|
||||
|
||||
showModal = (id,status) => {
|
||||
debugger
|
||||
this.setState({
|
||||
visible: true,
|
||||
editid:id,
|
||||
value:status
|
||||
});
|
||||
};
|
||||
|
||||
handleOk=(id,editid)=>{
|
||||
let url = `/shixuns/${this.props.match.params.shixunId}/review_shixun.json`;
|
||||
axios.post(url, {
|
||||
status: id===undefined?1:id,
|
||||
review_type: editid,
|
||||
}).then((response) => {
|
||||
if(response.data.status===0){
|
||||
this.props.showNotification(response.data.message);
|
||||
this.setState({
|
||||
visible: false,
|
||||
});
|
||||
this.getdatas()
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
});
|
||||
};
|
||||
|
||||
handleCancel = e => {
|
||||
this.setState({
|
||||
visible: false,
|
||||
});
|
||||
};
|
||||
|
||||
onChange = e => {
|
||||
this.setState({
|
||||
value: e.target.value,
|
||||
});
|
||||
};
|
||||
render() {
|
||||
const { tpmLoading, shixun, user, match } = this.props;
|
||||
let {value,editid,datas}=this.state;
|
||||
|
||||
console.log(this.props)
|
||||
return (
|
||||
<React.Fragment>
|
||||
|
||||
{this.state.visible===true?<Modal
|
||||
title="审核情况更改"
|
||||
visible={this.state.visible}
|
||||
keyboard={false}
|
||||
closable={false}
|
||||
footer={null}
|
||||
destroyOnClose={true}
|
||||
centered={true}
|
||||
>
|
||||
<div>
|
||||
<style>
|
||||
{
|
||||
`
|
||||
body{
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.ant-modal-body{
|
||||
text-align: center;
|
||||
}
|
||||
`
|
||||
}
|
||||
</style>
|
||||
|
||||
<Radio.Group onChange={this.onChange} value={this.state.value===undefined?1:this.state.value}>
|
||||
<Radio value={1}>已完成</Radio>
|
||||
<Radio value={0}>未完成</Radio>
|
||||
</Radio.Group>
|
||||
|
||||
<div className={"mt30"}>
|
||||
<a className="pop_close task-btn mr20 margin-tp26" onClick={()=>this.handleCancel()}>取消</a>
|
||||
<a className="task-btn task-btn-orange margin-tp26" onClick={()=>this.handleOk(value,editid)}>确定</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</Modal>:""}
|
||||
|
||||
<style>
|
||||
{
|
||||
`
|
||||
.Itemtitle{
|
||||
float: left;
|
||||
padding-top: 2px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
`
|
||||
}
|
||||
</style>
|
||||
|
||||
{ tpmLoading ? <div style={{ minHeight: '886px'}}></div> :
|
||||
|
||||
<div className="tpmComment educontent clearfix mt30 mb80">
|
||||
|
||||
<div className="with65 fl edu-back-white commentsDelegateParent" >
|
||||
|
||||
<TPMNav
|
||||
match={match}
|
||||
user={user}
|
||||
shixun={shixun}
|
||||
{...this.props}
|
||||
></TPMNav>
|
||||
|
||||
<div className="padding20 edu-back-white mt20" style={{minHeight: '640px'}}>
|
||||
{this.props.identity >2||this.props.identity===undefined?"":<List
|
||||
dataSource={datas}
|
||||
bordered
|
||||
renderItem={(item,key) => (
|
||||
<List.Item
|
||||
key={item.id}
|
||||
actions={[
|
||||
<a onClick={()=>this.showModal(item.id,item.status)} key={key}>
|
||||
<i className="iconfont icon-bianjidaibeijing font-22 color-green"></i>
|
||||
</a>,
|
||||
]}
|
||||
>
|
||||
<List.Item.Meta
|
||||
title={<div className={"font-16"}>
|
||||
<div className={"Itemtitle"}>{item.name}</div>
|
||||
{item.status===undefined?"":item.status===1?<Tag color="#FF6800">已完成</Tag>:<Tag color="#bcbcbc">未完成</Tag>}
|
||||
</div>}
|
||||
description={
|
||||
<div>
|
||||
{item.time===undefined?"":<span>审核时间: {item.time}</span>}
|
||||
{item.username===undefined?"":<span className={"ml30"}>审核人: {item.username}</span>}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</List.Item>
|
||||
)}
|
||||
/>}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="with35 fr pl20">
|
||||
<TPMRightSection {...this.props}></TPMRightSection>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Audit_situationComponent;
|
@ -1,67 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getImageUrl, toPath } from 'educoder'
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
class NewFooter extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps, newContext) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="newFooter edu-txt-center ">
|
||||
{/*newContainers*/}
|
||||
<div className="inner-footer_con">
|
||||
{this.props.user&&this.props.user.main_site===true?<div className="footercon">
|
||||
{/* <div className="inline mt40 mb5">
|
||||
<a href="/" className="fl" style={{height:'70px'}}>
|
||||
<img alt="高校智能化教学与实训平台" src={getImageUrl(`images/educoder/headNavLogo.png?1526520218`)} width="70px">
|
||||
</img>
|
||||
</a>
|
||||
<span className="fl color-grey-c cdefault font-28 ml22" style={{lineHeight:'74px'}}>EduCoder.net</span>
|
||||
</div> */}
|
||||
<ul className="clearfix inner-footernav">
|
||||
<li><a href="/" className="fl" target="_blank">网站首页</a></li>
|
||||
<li><Link to="/help/about_us" className="fl" target="_blank">关于我们</Link></li>
|
||||
<li><Link to="/help/contact_us" className="fl" target="_blank">联系我们</Link></li>
|
||||
<li><Link to="/help/cooperatives" className="fl" target="_blank">合作伙伴</Link></li>
|
||||
<li><Link to="/help/agreement" className="fl" target="_blank">服务协议</Link></li>
|
||||
<li><Link to="/help/help_center" className="fl" target="_blank">帮助中心</Link></li>
|
||||
<li><Link to="/help/feedback" className="fl" target="_blank">意见反馈</Link></li>
|
||||
</ul>
|
||||
</div>:""}
|
||||
<div>
|
||||
{this.props.mygetHelmetapi === null ? "" :
|
||||
this.props.mygetHelmetapi===undefined|| this.props.mygetHelmetapi.footer===null||this.props.mygetHelmetapi.footer===undefined?
|
||||
<p className="footer_con-p inline lineh-30 font-14">
|
||||
<span className="font-18 fl">©</span> 2019 EduCoder
|
||||
<a style={{"color":"#888"}} target="_blank" href="http://beian.miit.gov.cn/" className="ml15 mr15">湘ICP备17009477号</a>
|
||||
<a style={{"color":"#888"}} target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=43019002000962" className="mr15">
|
||||
<img className="vertical4" src={require('./beian.png')}/>湘公网安备43019002000962号
|
||||
</a>
|
||||
<a href="https://team.trustie.net" style={{"color":"#888"}}
|
||||
target="_blank">Trustie</a> & IntelliDE inside. <span
|
||||
className="mr15">版权所有 湖南智擎科技有限公司</span>
|
||||
</p>
|
||||
:
|
||||
<div dangerouslySetInnerHTML={{__html: this.props.mygetHelmetapi.footer}}></div>
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
<div className="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default NewFooter;
|
File diff suppressed because it is too large
Load Diff
@ -1,143 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { getImageUrl} from 'educoder';
|
||||
import './TPMIndex.css';
|
||||
|
||||
const $ = window.$;
|
||||
|
||||
$(window).resize(function(){
|
||||
rightSlider();
|
||||
});
|
||||
|
||||
$(window).scroll(function(){
|
||||
if($(".gotop").length>0){
|
||||
if($(document).scrollTop()>0){
|
||||
$(".-task-sidebar .gotop").show();
|
||||
$(".gotop").click(function(){
|
||||
$("html,body").scrollTop(0);
|
||||
});
|
||||
}
|
||||
if($(document).scrollTop()==0){
|
||||
$(".-task-sidebar .gotop").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function rightSlider(){
|
||||
var poi=parseInt((parseInt($(window).width())- 1200 )/2)-81;
|
||||
// console.log(parseInt($(window).width())+" "+poi);
|
||||
if(poi>0){
|
||||
$(".-task-sidebar").css("right",poi);
|
||||
}else{
|
||||
$(".-task-sidebar").css("right","0px");
|
||||
}
|
||||
$(".-task-sidebar").show();
|
||||
}
|
||||
|
||||
|
||||
function _initSider() {
|
||||
var $descSide = $("<div class='-task-desc'></div>").appendTo("body");
|
||||
$(".-task-sidebar>div").hover(function(){
|
||||
//移入显示二维码
|
||||
if($(this).hasClass("scan")){
|
||||
$(".scan_ewm").show().css({right:"75px",opacity:0}).stop().animate({
|
||||
right:"45px",opacity:1
|
||||
})
|
||||
return;
|
||||
}
|
||||
var $tool = $(this).attr("tooltips");
|
||||
$descSide.html($tool+"<div><img src='/images/edu_user/jt.png'></div>");
|
||||
$descSide.data('_dom', this)
|
||||
$descSide.show().css({
|
||||
left:$(this).offset().left - $descSide.width()-30,
|
||||
opacity:0,
|
||||
top:$(this).offset().top
|
||||
}).stop().animate({
|
||||
left:$(this).offset().left - $descSide.width()-5,
|
||||
opacity:1
|
||||
},400);
|
||||
},function(){
|
||||
if($(this).hasClass("scan")){
|
||||
$(".scan_ewm").stop().animate({right:"75px",opacity:0},200).hide();
|
||||
}
|
||||
$descSide.stop().animate({
|
||||
left:$(this).offset().left - $descSide.width()-30,
|
||||
opacity:0
|
||||
},200).hide();
|
||||
});
|
||||
rightSlider();
|
||||
|
||||
$(window).scroll(function() {
|
||||
if ($descSide.height()) {
|
||||
var hoverIcon = $descSide.data('_dom')
|
||||
$descSide.css('top', $(hoverIcon).offset().top)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
class SiderBar extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
_initSider();
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
// console.log(this.props)
|
||||
return (
|
||||
|
||||
<div className="-task-sidebar" >
|
||||
{this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?<div>
|
||||
<div className="gotop" tooltips="返回顶部">
|
||||
<a>
|
||||
<i className="iconfont icon-shangjiantou color-white"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div className="feedback" tooltips="意见反馈">
|
||||
<a target="_blank" className="color_white" href="/help?index=6">
|
||||
<i className="iconfont icon-yijianfankui color-white font-22"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div className="scan pr">
|
||||
<span className="inline"><i className="iconfont icon-erweima color-white font-22 fl"></i></span>
|
||||
<p className="scan_ewm" style={{display: 'none', right:' 75px',opacity: '0'}}>
|
||||
<p className="pr padding10">
|
||||
<style>
|
||||
{
|
||||
`
|
||||
.WeChatstyle{
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
`
|
||||
}
|
||||
</style>
|
||||
<img src={getImageUrl("images/educoder/EWM.jpg")} width="158px" height="158px" />
|
||||
<p className={"WeChatstyle"}>微信扫一扫</p>
|
||||
<p className={"WeChatstyle"}>关注公众号</p>
|
||||
<span className="trangle_right"></span>
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="consult" tooltips="在线咨询">
|
||||
<a target="_blank" className="color_white" href="//shang.qq.com/wpa/qunwpa?idkey=2f2043d88c1bd61d182b98bf1e061c6185e23055bec832c07d8148fe11c5a6cd">
|
||||
<i className="iconfont icon-qqzaixianzixun color-white font-22"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>:""}
|
||||
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SiderBar;
|
File diff suppressed because it is too large
Load Diff
@ -1,54 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { CircularProgress } from 'material-ui/Progress';
|
||||
|
||||
import './TPMShixunDiscuss.css'
|
||||
|
||||
import Challenges from './shixunchild/Challenges/Challenges'
|
||||
|
||||
import TPMRightSection from './component/TPMRightSection'
|
||||
|
||||
import TPMNav from './component/TPMNav'
|
||||
|
||||
class TPMChallenge extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
const { loadingContent, shixun, user, match
|
||||
} = this.props;
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="educontent clearfix mt30 mb80">
|
||||
|
||||
<div className="with65 fl edu-back-white" >
|
||||
<TPMNav
|
||||
match={match}
|
||||
user={user}
|
||||
shixun={shixun}
|
||||
{...this.props}
|
||||
></TPMNav>
|
||||
<Challenges
|
||||
{...this.props}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="with35 fr pl20">
|
||||
<TPMRightSection
|
||||
{...this.props}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TPMChallenge;
|
@ -1,34 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
import TPMChallenge from './TPMChallenge';
|
||||
class TPMChallengeContainer extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
tpmLoading: true,
|
||||
creator: {
|
||||
owner_id: '',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { tpmLoading } = this.props;
|
||||
const user = this.props.current_user;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
|
||||
{ tpmLoading ? <div style={{ minHeight: '886px'}}></div> :
|
||||
<TPMChallenge
|
||||
{...this.props}
|
||||
>
|
||||
</TPMChallenge>
|
||||
}
|
||||
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TPMChallengeContainer;
|
@ -1,53 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { CircularProgress } from 'material-ui/Progress';
|
||||
|
||||
import './TPMShixunDiscuss.css'
|
||||
|
||||
import Collaborators from './shixunchild/Collaborators/Collaborators'
|
||||
import TPMRightSection from './component/TPMRightSection'
|
||||
import TPMNav from './component/TPMNav'
|
||||
|
||||
class TPMCollaborators extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
const { loadingContent, creator, shixun, myshixun, recommend_shixuns, current_user, watched,
|
||||
aboutFocus, user, match
|
||||
} = this.props;
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="educontent clearfix mt30 mb80">
|
||||
|
||||
<div className="with65 fl edu-back-white" >
|
||||
<TPMNav
|
||||
match={match}
|
||||
user={user}
|
||||
shixun={shixun}
|
||||
{...this.props}
|
||||
></TPMNav>
|
||||
<Collaborators
|
||||
{...this.props}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="with35 fr pl20">
|
||||
<TPMRightSection
|
||||
{...this.props}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TPMCollaborators;
|
@ -1,47 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import TPMCollaborators from './TPMCollaborators'
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
class TPMChallengeContainer extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps, newContext) {
|
||||
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
// this.props.showShixun();
|
||||
}
|
||||
|
||||
|
||||
|
||||
render() {
|
||||
const { tpmLoading } = this.props;
|
||||
const user = this.props.current_user;
|
||||
return (
|
||||
<React.Fragment>
|
||||
{ tpmLoading ? <div style={{ minHeight: '886px'}}></div> :
|
||||
<TPMCollaborators
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
user={user}
|
||||
aboutFocus={this.props.aboutFocus}
|
||||
|
||||
>
|
||||
</TPMCollaborators>
|
||||
}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TPMChallengeContainer;
|
@ -1,3 +0,0 @@
|
||||
.ml105 {
|
||||
margin-left: 15%;
|
||||
}
|
Before Width: | Height: | Size: 1.1 KiB |
@ -1,50 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import TPMForklist from './TPMForklist'
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
class TPMRanking_listContainer extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
tpmLoading: true,
|
||||
creator: {
|
||||
owner_id: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps, newContext) {
|
||||
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.props.showShixun();
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
const { tpmLoading } = this.props;
|
||||
const user = this.props.current_user;
|
||||
return (
|
||||
<React.Fragment>
|
||||
{ tpmLoading ? <div style={{ minHeight: '886px'}}></div> :
|
||||
<TPMForklist
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
user={user}
|
||||
aboutFocus={this.props.aboutFocus}
|
||||
|
||||
>
|
||||
</TPMForklist>
|
||||
}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TPMRanking_listContainer;
|
@ -1,63 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { CircularProgress } from 'material-ui/Progress';
|
||||
|
||||
import './TPMShixunDiscuss.css'
|
||||
|
||||
import Shixunfork_list from './shixunchild/Shixunfork_list'
|
||||
import TPMRightSection from './component/TPMRightSection'
|
||||
import TPMNav from './component/TPMNav'
|
||||
|
||||
class TPMForklist extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps, newContext) {
|
||||
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
render() {
|
||||
const { loadingContent, creator, shixun, myshixun, recommend_shixuns, current_user, watched,
|
||||
aboutFocus, user, match
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="tpmComment educontent clearfix mt30 mb80">
|
||||
|
||||
<div className="with65 fl edu-back-white commentsDelegateParent" >
|
||||
<TPMNav
|
||||
match={match}
|
||||
user={user}
|
||||
shixun={shixun}
|
||||
{...this.props}
|
||||
></TPMNav>
|
||||
{ loadingContent ?
|
||||
<CircularProgress size={40} thickness={3} style={{ marginLeft: 'auto', marginRight: 'auto', marginTop: '200px', display: 'block' }}/> :
|
||||
|
||||
<Shixunfork_list/>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div className="with35 fr pl20">
|
||||
<TPMRightSection {...this.props}></TPMRightSection>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TPMForklist;
|
@ -1,416 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
||||
|
||||
import Loading from '../../Loading';
|
||||
|
||||
import Loadable from 'react-loadable';
|
||||
|
||||
import { TPMIndexHOC } from './TPMIndexHOC';
|
||||
|
||||
import { SnackbarHOC } from 'educoder';
|
||||
|
||||
import TPMBanner from './TPMBanner';
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
import TPMShixunDiscussContainer from './TPMShixunDiscussContainer';
|
||||
|
||||
import TPMRepositoryComponent from './TPMRepositoryComponent';
|
||||
|
||||
import TPMRepositoryCommits from './shixunchild/Repository/TPMRepositoryCommits';
|
||||
|
||||
import TPMsettings from './TPMsettings/TPMsettings';
|
||||
|
||||
import TPMChallengeComponent from './TPMChallengeContainer';
|
||||
import TPMPropaedeuticsComponent from './TPMPropaedeuticsComponent';
|
||||
import TPMRanking_listComponent from './TPMRanking_listContainer';
|
||||
import TPMCollaboratorsComponent from './TPMCollaboratorsContainer';
|
||||
import Audit_situationComponent from './Audit_situationComponent';
|
||||
|
||||
import '../page/tpiPage.css'
|
||||
|
||||
const $ = window.$
|
||||
//任务
|
||||
// const TPMChallengeComponent = Loadable({
|
||||
// loader: () => import('./TPMChallengeContainer'),
|
||||
// loading: Loading,
|
||||
// })
|
||||
|
||||
//背景知识
|
||||
// const TPMPropaedeuticsComponent = Loadable({
|
||||
// loader: () => import('./TPMPropaedeuticsComponent'),
|
||||
// loading: Loading,
|
||||
// })
|
||||
|
||||
//版本库
|
||||
// const TPMRepositoryComponent = Loadable({
|
||||
// loader: () => import('./TPMRepositoryComponent'),
|
||||
// loading: Loading,
|
||||
// })
|
||||
|
||||
// const TPMRepositoryComponent = Loadable({
|
||||
// loader: () => import('./TPMRepositoryComponent'),
|
||||
// loading: Loading,
|
||||
// })
|
||||
|
||||
//合作
|
||||
// const TPMCollaboratorsComponent = Loadable({
|
||||
// loader: () => import('./TPMCollaboratorsContainer'),
|
||||
// loading: Loading,
|
||||
// })
|
||||
|
||||
|
||||
//评论
|
||||
// const TPMShixunDiscussComponent = Loadable({
|
||||
// loader: () => import('./TPMShixunDiscussContainer'),
|
||||
// loading: Loading,
|
||||
// })
|
||||
|
||||
//排行版
|
||||
// const TPMRanking_listComponent = Loadable({
|
||||
// loader: () => import('./TPMRanking_listContainer'),
|
||||
// loading: Loading,
|
||||
// })
|
||||
|
||||
// //编辑实训
|
||||
// const TPMModifysettings = Loadable({
|
||||
// loader: () =>import('./modules/tpm/TPMsettings/TPMsettings'),
|
||||
// loading: Loading,
|
||||
// })
|
||||
|
||||
//新建实训
|
||||
const TPMchallengesnew = Loadable({
|
||||
loader: () => import('./challengesnew/TPMchallengesnew'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
//新建tab2
|
||||
const TPMevaluation = Loadable({
|
||||
loader: () => import('./challengesnew/TPMevaluation'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
//新建tab3答案
|
||||
// const TPManswer = Loadable({
|
||||
// loader: () => import('./challengesnew/TPManswer'),
|
||||
// loading: Loading,
|
||||
// })
|
||||
const TPManswer = Loadable({
|
||||
loader: () => import('./challengesnew/TPManswer2'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
//选择题
|
||||
const TPMquestion = Loadable({
|
||||
loader: () => import('./challengesnew/TPMquestion'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
//fork列表
|
||||
const TPMFork_listComponent = Loadable({
|
||||
loader: () => import('./TPMFork/TPMForklist'),
|
||||
loading: Loading,
|
||||
})
|
||||
//背景知识修改
|
||||
const TPMUpdatepropaede = Loadable({
|
||||
loader: () => import('./TPMUpdatepropaede/TPMUpdatepropaede'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
|
||||
|
||||
// 版本库添加文件
|
||||
const AddFile = Loadable({
|
||||
loader: () => import('./shixunchild/Repository/RepositoryAddFile'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const interceptorUrlArray = ['repository.json', 'commits.json', 'propaedeutics.json'
|
||||
, 'challenges.json', 'discusses.json', 'ranking_list.json', 'collaborators.json']
|
||||
const cacheInterceptorUrlMap = {}
|
||||
class TPMIndex extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
loadingContent: false,
|
||||
power: false,
|
||||
shixunsDetails: {},
|
||||
shixunId: undefined,
|
||||
star_info: [0, 0, 0, 0, 0, 0],
|
||||
star_infos: [0, 0, 0, 0, 0, 0],
|
||||
identity:undefined,
|
||||
TPMRightSectionData:undefined,
|
||||
PropaedeuticsList: undefined,
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount = () => {
|
||||
|
||||
let id = this.props.match.params.shixunId;
|
||||
|
||||
// let collaborators = `/shixuns/` + id + `/propaedeutics.json`;
|
||||
//
|
||||
// axios.get(collaborators).then((response) => {
|
||||
// if (response.status === 200) {
|
||||
// if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
|
||||
//
|
||||
// }else{
|
||||
// this.setState({
|
||||
// PropaedeuticsList: response.data,
|
||||
// shixunId: id
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }).catch((error) => {
|
||||
// console.log(error)
|
||||
// });
|
||||
|
||||
let Url = `/shixuns/` + id + `.json`;
|
||||
axios.get(Url).then((response) => {
|
||||
if (response.status === 200) {
|
||||
document.title=response.data.name;
|
||||
let newstar_info = [];
|
||||
// let start1=
|
||||
for (var i = 0; i < response.data.score_info.length; i++) {
|
||||
|
||||
if (i === 0) {
|
||||
newstar_info.push(response.data.score_info[i])
|
||||
} else {
|
||||
newstar_info.push((response.data.score_info[i] / 100) * 5)
|
||||
}
|
||||
}
|
||||
let newstar_infos = response.data.score_info;
|
||||
this.setState({
|
||||
shixunsDetails: response.data,
|
||||
shixunId: id,
|
||||
star_info: newstar_info,
|
||||
star_infos: newstar_infos,
|
||||
power: response.data.power,
|
||||
identity: response.data.identity,
|
||||
propaedeutics:response.data.propaedeutics,
|
||||
status: response.data.shixun_status,
|
||||
secret_repository: response.data.secret_repository,
|
||||
|
||||
});
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.setState({
|
||||
shixunsDetails: undefined,
|
||||
shixunId: undefined,
|
||||
star_info: undefined,
|
||||
star_infos: undefined,
|
||||
power: undefined,
|
||||
identity: undefined,
|
||||
status: undefined,
|
||||
propaedeutics:undefined
|
||||
});
|
||||
});
|
||||
|
||||
this.tpmContentRequestInterceptor = axios.interceptors.request.use((config) => {
|
||||
let url = config.url;
|
||||
// console.log('tpmContentRequestInterceptor:', url)
|
||||
for ( let i = 0; i < interceptorUrlArray.length; i++ ) {
|
||||
if (url.indexOf(interceptorUrlArray[i]) != -1) {
|
||||
url = url.split('?')[0]
|
||||
console.log('loadingContent, url:', url)
|
||||
|
||||
this.setState({ loadingContent: true })
|
||||
|
||||
cacheInterceptorUrlMap[url] = true
|
||||
}
|
||||
}
|
||||
return config;
|
||||
}, function (error) {
|
||||
return Promise.reject(error);
|
||||
});
|
||||
|
||||
// Add a response interceptor
|
||||
this.tpmContentResponseInterceptor = axios.interceptors.response.use((response) => {
|
||||
// console.log('loadingContent finished, url:', response.config.url)
|
||||
// TODO 依赖了api这个前缀
|
||||
let url = response.config.url.split('api')[1];
|
||||
url = url.split('?')[0]
|
||||
if (cacheInterceptorUrlMap[url]) {
|
||||
|
||||
this.setState({ loadingContent: false })
|
||||
delete cacheInterceptorUrlMap[response.url]
|
||||
}
|
||||
return response;
|
||||
}, function (error) {
|
||||
// Do something with response error
|
||||
return Promise.reject(error);
|
||||
});
|
||||
|
||||
|
||||
//右侧数据
|
||||
let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`;
|
||||
axios.get(shixunsDetailsURL).then((response)=> {
|
||||
this.setState({
|
||||
TPMRightSectionData: response.data
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
componentWillUnmount = () => {
|
||||
axios.interceptors.request.eject(this.tpmContentRequestInterceptor);
|
||||
this.tpmContentRequestInterceptor = null;
|
||||
axios.interceptors.request.eject(this.tpmContentResponseInterceptor);
|
||||
this.tpmContentResponseInterceptor = null;
|
||||
}
|
||||
|
||||
|
||||
setLoadingContent = (isLoadingContent) => {
|
||||
this.setState({ loadingContent: isLoadingContent })
|
||||
}
|
||||
|
||||
// TpmTPMBannertype(type){
|
||||
//
|
||||
// }
|
||||
|
||||
render() {
|
||||
let url = window.location.href;
|
||||
let flag = url.indexOf("add_file")>-1;
|
||||
return (
|
||||
<div className="newMain clearfix">
|
||||
{
|
||||
!flag &&
|
||||
<TPMBanner
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
></TPMBanner>
|
||||
}
|
||||
|
||||
<Switch {...this.props}>
|
||||
|
||||
<Route path="/shixuns/:shixunId/repository/:repoId/commits" render={
|
||||
(props) => (<TPMRepositoryCommits {...this.props} {...this.state} {...props}
|
||||
/>)
|
||||
}></Route>
|
||||
<Route path="/shixuns/:shixunId/secret_repository/:repoId/commits" render={
|
||||
(props) => (<TPMRepositoryCommits {...this.props} {...this.state} {...props} secret_repository_tab={true}
|
||||
/>)
|
||||
}></Route>
|
||||
|
||||
<Route exact path="/shixuns/:shixunId/challenges" render={
|
||||
(props) => (<TPMChallengeComponent {...this.props} {...this.state} {...props}
|
||||
/>)
|
||||
}></Route>
|
||||
|
||||
<Route path="/shixuns/:shixunId/repository/add_file" render={
|
||||
(props) => (<AddFile {...this.props} {...this.state} {...props}
|
||||
/>)
|
||||
}></Route>
|
||||
|
||||
<Route path="/shixuns/:shixunId/repository" render={
|
||||
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props}
|
||||
/>)
|
||||
}></Route>
|
||||
<Route path="/shixuns/:shixunId/secret_repository" render={
|
||||
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props} secret_repository_tab={true}
|
||||
/>)
|
||||
}></Route>
|
||||
|
||||
{/* <Route exact path="/shixuns/:shixunId/propaedeutics" component={TPMPropaedeuticsComponent}></Route> */}
|
||||
|
||||
<Route exact path="/shixuns/:shixunId/propaedeutics" render={
|
||||
(props) => (<TPMPropaedeuticsComponent {...this.props} {...this.state} {...props}
|
||||
/>)
|
||||
}></Route>
|
||||
|
||||
|
||||
<Route exact path="/shixuns/:shixunId/collaborators" render={
|
||||
(props) => (<TPMCollaboratorsComponent {...this.props} {...this.state} {...props}
|
||||
/>)
|
||||
}></Route>
|
||||
|
||||
|
||||
{/* <Route exact path="/shixuns/:shixunId/repository/:shixunId/" component={TPMRepositoryComponent}></Route> */}
|
||||
|
||||
|
||||
<Route path="/shixuns/:shixunId/shixun_discuss" render={
|
||||
(props) => (<TPMShixunDiscussContainer {...this.props} {...this.state} {...props}
|
||||
initForumState={(data)=>this.initForumState(data)}
|
||||
setSearchValue={this.setSearchValue}
|
||||
setHotLabelIndex={this.setHotLabelIndex}
|
||||
/>)
|
||||
}></Route>
|
||||
|
||||
|
||||
<Route path="/shixuns/:shixunId/settings" render={
|
||||
(props) => (<TPMsettings {...this.props} {...this.state} {...props} />)
|
||||
}></Route>
|
||||
|
||||
|
||||
<Route exact path="/shixuns/:shixunId/ranking_list" render={
|
||||
(props) => (<TPMRanking_listComponent {...this.props} {...this.state} {...props}
|
||||
/>)
|
||||
}></Route>
|
||||
|
||||
<Route exact path="/shixuns/:shixunId/audit_situation" render={
|
||||
(props) => (<Audit_situationComponent {...this.props} {...this.state} {...props}
|
||||
/>)
|
||||
}></Route>
|
||||
|
||||
<Route exact path="/shixuns/:shixunId/fork_list" render={
|
||||
(props) => (<TPMFork_listComponent {...this.props} {...props}
|
||||
/>)
|
||||
}></Route>
|
||||
|
||||
<Route exact path="/shixuns/:shixunId/update_propaedeutics" render={
|
||||
(props) => (<TPMUpdatepropaede {...this.props} {...props}
|
||||
/>)
|
||||
}></Route>
|
||||
|
||||
{/*评测设置*/}
|
||||
<Route path="/shixuns/:shixunId/challenges/:checkpointId/tab=2" render={
|
||||
(props) => (<TPMevaluation {...this.props} {...props} {...this.state}/>)
|
||||
}></Route>
|
||||
|
||||
|
||||
{/*参考答案*/}
|
||||
<Route path="/shixuns/:shixunId/challenges/:checkpointId/tab=3" render={
|
||||
(props) => (<TPManswer {...this.props} {...props} {...this.state}/>)
|
||||
}></Route>
|
||||
|
||||
{/*新建关卡*/}
|
||||
<Route path="/shixuns/:shixunId/challenges/new" render={
|
||||
(props) => (<TPMchallengesnew {...this.props} {...props} {...this.state}/>)
|
||||
}></Route>
|
||||
|
||||
{/*编辑关卡*/}
|
||||
<Route path="/shixuns/:shixunId/challenges/:checkpointId/editcheckpoint" render={
|
||||
(props) => (<TPMchallengesnew {...this.props} {...props} {...this.state} />)
|
||||
}></Route>
|
||||
|
||||
{/*新建选择题*/}
|
||||
<Route path="/shixuns/:shixunId/challenges/newquestion" render={
|
||||
(props) => (<TPMquestion {...this.props} {...props} {...this.state} />)
|
||||
}></Route>
|
||||
|
||||
{/*修改选择题*/}
|
||||
<Route path="/shixuns/:shixunId/challenges/:checkpointId/editquestion/:choose_id" render={
|
||||
(props) => (<TPMquestion {...this.props} {...props} {...this.state}/>)
|
||||
}></Route>
|
||||
|
||||
{/*修改选择题*/}
|
||||
<Route path="/shixuns/:shixunId/challenges/:checkpointId/editquestion" render={
|
||||
(props) => (<TPMquestion {...this.props} {...props} {...this.state}/>)
|
||||
}></Route>
|
||||
|
||||
<Route exact path="/shixuns/:shixunId" render={
|
||||
(props) => (<TPMChallengeComponent {...this.props} {...this.state} {...props}
|
||||
/>)
|
||||
}></Route>
|
||||
|
||||
|
||||
{/*<Route exact path="/shixuns/:shixunId" component={TPMChallengeComponent}></Route>*/}
|
||||
</Switch>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SnackbarHOC() (TPMIndexHOC ( TPMIndex ));
|
@ -1,74 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { CircularProgress } from 'material-ui/Progress';
|
||||
|
||||
import './TPMShixunDiscuss.css'
|
||||
|
||||
import Propaedeutics from './shixunchild/Propaedeutics/Propaedeu_tics'
|
||||
|
||||
import TPMRightSection from './component/TPMRightSection'
|
||||
|
||||
import TPMNav from './component/TPMNav'
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
class TPMPropaedeutics extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
shixunId: undefined
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps, newContext) {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
const { loadingContent, creator, shixun, myshixun, recommend_shixuns, current_user, watched,
|
||||
aboutFocus, user, match
|
||||
} = this.props;
|
||||
// <Comments
|
||||
// {...this.props}
|
||||
// user={_user}
|
||||
// onPaginationChange={this.onPaginationChange}
|
||||
// ></Comments>
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="tpmComment educontent clearfix mt30 mb80">
|
||||
|
||||
<div className="with65 fl edu-back-white commentsDelegateParent" >
|
||||
<TPMNav
|
||||
match={match}
|
||||
user={user}
|
||||
shixun={shixun}
|
||||
{...this.state}
|
||||
{...this.props}
|
||||
/>
|
||||
|
||||
<Propaedeutics
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="with35 fr pl20">
|
||||
<TPMRightSection {...this.props}></TPMRightSection>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TPMPropaedeutics;
|
@ -1,39 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import TPMPropaedeutics from './TPMPropaedeutics'
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
class TPMPropaedeuticsComponent extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
// tpmLoading: true,
|
||||
// creator: {
|
||||
// owner_id: ''
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { tpmLoading } = this.props;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
{ tpmLoading ? <div style={{ minHeight: '886px'}}></div> :
|
||||
<TPMPropaedeutics
|
||||
{...this.props}
|
||||
>
|
||||
</TPMPropaedeutics>
|
||||
}
|
||||
</React.Fragment>
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TPMPropaedeuticsComponent ;
|
@ -1,59 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { CircularProgress } from 'material-ui/Progress';
|
||||
|
||||
import './TPMShixunDiscuss.css'
|
||||
|
||||
import Ranking_list from './shixunchild/Ranking_list/Ranking_list'
|
||||
import TPMRightSection from './component/TPMRightSection'
|
||||
import TPMNav from './component/TPMNav'
|
||||
|
||||
class TPMRanking_list extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
const { loadingContent, creator, shixun, myshixun, recommend_shixuns, current_user, watched,
|
||||
aboutFocus, user, match
|
||||
} = this.props;
|
||||
|
||||
// <Comments
|
||||
// {...this.props}
|
||||
// user={_user}
|
||||
// onPaginationChange={this.onPaginationChange}
|
||||
// ></Comments>
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="tpmComment educontent clearfix mt30 mb80">
|
||||
|
||||
<div className="with65 fl edu-back-white commentsDelegateParent" >
|
||||
|
||||
<TPMNav
|
||||
match={match}
|
||||
user={user}
|
||||
shixun={shixun}
|
||||
{...this.props}
|
||||
></TPMNav>
|
||||
|
||||
<Ranking_list
|
||||
{...this.props}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="with35 fr pl20">
|
||||
<TPMRightSection {...this.props}></TPMRightSection>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TPMRanking_list;
|
@ -1,37 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import TPMRanking_list from './TPMRanking_list'
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
class TPMRanking_listContainer extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { tpmLoading } = this.props;
|
||||
const user = this.props.current_user;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
{ tpmLoading ? <div style={{ minHeight: '886px'}}></div> :
|
||||
<TPMRanking_list
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
user={user}
|
||||
aboutFocus={this.props.aboutFocus}
|
||||
>
|
||||
</TPMRanking_list>
|
||||
}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TPMRanking_listContainer;
|
@ -1,58 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { CircularProgress } from 'material-ui/Progress';
|
||||
|
||||
import './TPMShixunDiscuss.css'
|
||||
|
||||
import Repository from './shixunchild/Repository/Repository'
|
||||
import TPMRightSection from './component/TPMRightSection'
|
||||
import TPMNav from './component/TPMNav'
|
||||
|
||||
// import RepositoryChooseModal from './component/modal/RepositoryChooseModal'
|
||||
|
||||
class TPMRepository extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
const { loadingContent, creator, shixun, myshixun, recommend_shixuns, current_user, watched,
|
||||
aboutFocus, user, match, isContentWidth100
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="tpmComment educontent clearfix mt30 mb80">
|
||||
{/* 可能会影响到其他页面的样式,需要测试、协商 */}
|
||||
<div className={`${isContentWidth100 ? 'width100': 'with65'} fl edu-back-white`}
|
||||
style={{background: 'transparent'}}>
|
||||
<TPMNav
|
||||
match={match}
|
||||
user={user}
|
||||
shixun={shixun}
|
||||
{...this.props}
|
||||
></TPMNav>
|
||||
{/* <RepositoryChooseModal {...this.props}></RepositoryChooseModal> */}
|
||||
{ loadingContent ?
|
||||
<CircularProgress size={40} thickness={3} style={{ marginLeft: 'auto', marginRight: 'auto', marginTop: '200px', display: 'block' }}/> :
|
||||
<Repository
|
||||
{...this.props}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
|
||||
{ !isContentWidth100 && <div className="with35 fr pl20">
|
||||
<TPMRightSection {...this.props}></TPMRightSection>
|
||||
</div>}
|
||||
</div>
|
||||
</React.Fragment>
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TPMRepository;
|
@ -1,47 +0,0 @@
|
||||
.tpmComment .-fit {
|
||||
position: inherit;
|
||||
}
|
||||
.tpmComment .rc-pagination {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.tpmComment .paginationSection {
|
||||
background: #FAFAFA;
|
||||
}
|
||||
.tpmComment .comment_item_cont.df.clearfix:nth-last-child(1) {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/*.tpmComment .fl.edu-back-white {*/
|
||||
/*min-height: 600px;*/
|
||||
/*}*/
|
||||
|
||||
|
||||
.user_watch_btn {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/*md编辑器*/
|
||||
.tpmComment .commentItemMDEditor a.task-btn {
|
||||
background: #4cacff!important;
|
||||
margin-right: 16px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
/* md编辑器 resizeBar*/
|
||||
.tpmComment .commentItemMDEditor .editor__resize {
|
||||
transform: translateX(-176%)
|
||||
}
|
||||
|
||||
#ratePanel > div > div > div.fr div.rateYo.fl.mt3 {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
cursor: default;
|
||||
width: 110px;
|
||||
}
|
||||
|
||||
.tpmComment .icon-jiangli {
|
||||
/* margin-top: 2px; */
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { CircularProgress } from 'material-ui/Progress';
|
||||
|
||||
import './TPMShixunDiscuss.css'
|
||||
|
||||
import ShixunDiscuss from './shixunchild/ShixunDiscuss/ShixunDiscuss'
|
||||
import TPMRightSection from './component/TPMRightSection'
|
||||
import TPMNav from './component/TPMNav'
|
||||
|
||||
import Comments from '../comment/Comments'
|
||||
import { commentHOC } from '../comment/CommentsHOC'
|
||||
|
||||
class TPMShixunDiscuss extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps, newContext) {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
// TODO 加了HOC后 mount了两次
|
||||
this.props.fetchCommentIfNotFetched &&
|
||||
this.props.fetchCommentIfNotFetched();
|
||||
}
|
||||
|
||||
render() {
|
||||
const { loadingContent, creator, shixun, myshixun, recommend_shixuns, current_user, watched,
|
||||
aboutFocus, user, match
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="tpmComment educontent clearfix mt30 mb80">
|
||||
|
||||
<div className="with65 fl edu-back-white commentsDelegateParent" >
|
||||
<TPMNav
|
||||
match={match}
|
||||
user={user}
|
||||
shixun={shixun}
|
||||
{...this.props}
|
||||
></TPMNav>
|
||||
{ loadingContent ?
|
||||
<CircularProgress size={40} thickness={3} style={{ marginLeft: 'auto', marginRight: 'auto', marginTop: '200px', display: 'block' }}/> :
|
||||
<Comments
|
||||
{...this.props}
|
||||
user={user}
|
||||
showHiddenButton={true}
|
||||
></Comments>
|
||||
// onPaginationChange={this.onPaginationChange}
|
||||
// <ShixunDiscuss
|
||||
// {...this.props}
|
||||
// />
|
||||
}
|
||||
</div>
|
||||
|
||||
<div className="with35 fr pl20">
|
||||
<TPMRightSection {...this.props}></TPMRightSection>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default commentHOC ( TPMShixunDiscuss );
|
@ -1,45 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import TPMShixunDiscuss from './TPMShixunDiscuss'
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
class TPMShixunDiscussContainer extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps, newContext) {
|
||||
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
const { tpmLoading } = this.props;
|
||||
const user = this.props.current_user;
|
||||
return (
|
||||
<React.Fragment>
|
||||
{ tpmLoading ? <div style={{ minHeight: '886px'}}></div> :
|
||||
<TPMShixunDiscuss
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
user={user}
|
||||
aboutFocus={this.props.aboutFocus}
|
||||
|
||||
>
|
||||
</TPMShixunDiscuss>
|
||||
}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TPMShixunDiscussContainer;
|
@ -1,100 +0,0 @@
|
||||
import React, {Component} from 'react';
|
||||
|
||||
import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal} from 'antd';
|
||||
|
||||
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor';
|
||||
|
||||
import {getUrl} from 'educoder';
|
||||
|
||||
|
||||
|
||||
export default class TPMUpdatepropaede extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.neweditanswerRef=React.createRef();
|
||||
this.state = {
|
||||
shixunId:undefined,
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
let id = this.props.match.params.shixunId;
|
||||
let url="/shixuns/"+id+"/propaedeutics.json";
|
||||
axios.get(url).then((response) => {
|
||||
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
|
||||
|
||||
}else{
|
||||
this.setState({
|
||||
shixunId:id,
|
||||
})
|
||||
if(response.data.content[0]!=null){
|
||||
this.setState({
|
||||
editanswersRefval:response.data.content,
|
||||
})
|
||||
this.neweditanswerRef.current.setValue(response.data.content)
|
||||
}else{
|
||||
this.setState({
|
||||
editanswersRefval:"",
|
||||
})
|
||||
this.neweditanswerRef.current.setValue('')
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
updatepropaedeuticsvalue=()=>{
|
||||
let id = this.props.match.params.shixunId;
|
||||
let url="/shixuns/"+id+"/update_propaedeutics.json";
|
||||
const update_propaedeuticsvalue = this.neweditanswerRef.current.getValue().trim();
|
||||
axios.post(url,{
|
||||
content:update_propaedeuticsvalue
|
||||
}
|
||||
).then((response) => {
|
||||
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
|
||||
|
||||
}else{
|
||||
this.props.showSnackbar(response.data.message);
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
});
|
||||
}
|
||||
render() {
|
||||
let {shixunId} = this.state;
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="educontent">
|
||||
|
||||
<div className="edu-back-white mt30">
|
||||
<div className="font-16 pt30 pl20 pr20 pb40 bor-bottom-greyE clearfix">
|
||||
<span className="fl">背景知识</span>
|
||||
<a href={"/shixuns/"+shixunId+"/propaedeutics"}className="color-grey-9 fr">返回</a>
|
||||
</div>
|
||||
|
||||
<div className="padding40-20">
|
||||
<TPMMDEditor ref={this.neweditanswerRef} placeholder="请输入选择题的题干内容" mdID={'editquestioMDid'} refreshTimeout={1500}
|
||||
needRecreate={true} watch={true} className="courseMessageMD" initValue={this.neweditanswerRefval}></TPMMDEditor>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="clearfix mb30 mt30">
|
||||
<a className="defalutSubmitbtn fl mr20"
|
||||
onClick={this.updatepropaedeuticsvalue}>保存</a>
|
||||
<a href={"/shixuns/"+shixunId+"/propaedeutics"} className="defalutCancelbtn fl"
|
||||
>取消</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,113 +0,0 @@
|
||||
.radioStyle{
|
||||
display: block;
|
||||
height: 30px;
|
||||
}
|
||||
#settingsMarkdown{
|
||||
background:transparent;
|
||||
}
|
||||
#challenge_begin{
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
#shixundescription .CodeMirror{
|
||||
margin-top: 31px !important;
|
||||
height: 364px !important;
|
||||
}
|
||||
#shixundescription .editormd-preview{
|
||||
width:578px !important;
|
||||
top: 40px !important;
|
||||
height: 364px !important;
|
||||
}
|
||||
|
||||
#shixunmemoMD .CodeMirror{
|
||||
margin-top: 31px !important;
|
||||
height: 578px !important;
|
||||
}
|
||||
|
||||
#shixunmemoMD .editormd-preview{
|
||||
width: 578px !important;
|
||||
top: 40px !important;
|
||||
height: 578px !important;
|
||||
}
|
||||
|
||||
.radioStyle {
|
||||
display: block;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
a.white-btn.use_scope-btn:hover {
|
||||
color: #FFF !important;
|
||||
}
|
||||
|
||||
.shixunScopeInput {
|
||||
width: 218px;
|
||||
height: 33px;
|
||||
display: block;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.ant-modal-title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a.newuse_scope-btn:hover {
|
||||
border: 1px solid #F06200;
|
||||
color: #fff !important;
|
||||
background: #FF7500;
|
||||
}
|
||||
|
||||
a.newuse_scope-btn {
|
||||
border: 1px solid #FF7500;
|
||||
color: #FF7500 !important;
|
||||
}
|
||||
|
||||
.tpmprompt {
|
||||
padding-left: 20px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
.ml36{
|
||||
margin-left: 26px;
|
||||
}
|
||||
|
||||
#shixunmemoMD{
|
||||
width:98% !important;
|
||||
height: 620px !important;
|
||||
}
|
||||
#shixunmemoMDs{
|
||||
width: 98% !important;
|
||||
height: 420px !important;
|
||||
}
|
||||
#shixunmemoMDs .CodeMirror {
|
||||
/* width: 548px !important; */
|
||||
margin-top: 31px !important;
|
||||
height: 402px !important;
|
||||
}
|
||||
.pdr20{
|
||||
padding-right:20px;
|
||||
}
|
||||
|
||||
.nonemodel{
|
||||
width: 59%;
|
||||
height: 468px;
|
||||
/*background: rgba(0, 0, 0, 0.65);*/
|
||||
background: #f5f5f5;
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
opacity: 0.5;
|
||||
left: 21.5%;
|
||||
}
|
||||
|
||||
.shixunmemoMDdiv{
|
||||
width: 99%;
|
||||
height: 615px;
|
||||
}
|
||||
|
||||
.shixunspanred{
|
||||
margin-left: 142px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.ml82{
|
||||
margin-left:82px;
|
||||
}
|
Before Width: | Height: | Size: 19 KiB |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,84 +0,0 @@
|
||||
import React, {Component} from 'react';
|
||||
|
||||
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
|
||||
import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor';
|
||||
|
||||
|
||||
export default class TpmQuestionMain extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<div className="edu-back-white mb10 clearfix">
|
||||
<div className="padding40-20">
|
||||
<p className="color-grey-6 font-16 mb30">任务名称</p>
|
||||
<div className="df">
|
||||
<span className="mr30 color-orange pt10">*</span>
|
||||
<div className="flex1 mr20">
|
||||
<input type="text"
|
||||
className={this.props.questionInputvaluetype === true ? "input-100-45 greyInpus wind100" : "input-100-45 greyInput "}
|
||||
maxLength="50"
|
||||
name="challenge[subject]"
|
||||
value={this.props.questionsInputvalue}
|
||||
placeholder="请输入任务名称(此信息将提前展示给学员),例:计算学生的课程成绩绩点"
|
||||
onInput={this.props.questionInputvalue}
|
||||
/>
|
||||
</div>
|
||||
<div style={{width: '57px'}}>
|
||||
<span
|
||||
className={this.props.questionInputvaluetype === true ? "color-orange mt8 fl" : "color-orange mt8 fl none"}
|
||||
id="new_shixun_name"><i className="fa fa-exclamation-circle mr3"></i>必填项</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="edu-back-white padding40-20 mb20">
|
||||
<p className="color-grey-6 font-16 mb30">过关任务</p>
|
||||
<div className="df">
|
||||
<span className="mr30 color-orange pt10">*</span>
|
||||
<div className="flex1 mr20">
|
||||
<TPMMDEditor ref={this.props.contentMdRef} placeholder="请输入选择题的过关任务内容" mdID={'courseContentMD'} refreshTimeout={1500}
|
||||
watch={true} className="courseMessageMD" initValue={this.props.contentMdRefval} height={700}></TPMMDEditor>
|
||||
</div>
|
||||
<div>
|
||||
<span
|
||||
className={this.props.questionInputvaluetypes === true ? "color-orange mt8 fl" : "color-orange mt8 fl none"}
|
||||
id="new_shixun_pass"><i
|
||||
className="fa fa-exclamation-circle mr3"></i>必填项</span>
|
||||
</div>
|
||||
</div>
|
||||
<p id="e_tip_questioMDQuestion" className="edu-txt-right color-grey-cd font-12 pdr20"></p>
|
||||
<p id="e_tips_questioMDQuestion" className="edu-txt-right color-grey-cd font-12 pdr20"></p>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="clearfix mt30"
|
||||
style={{display: this.props.identity > 4 || this.props.identity === undefined || this.props.power === false ? "none" : "block"}}>
|
||||
<a className="defalutSubmitbtn fl mr20"
|
||||
onClick={this.props.sumittype === true ? "" : this.props.clickquestionsumit}>提交</a>
|
||||
<a href={this.props.go_back_url}
|
||||
className="defalutCancelbtn fl">取消</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,269 +0,0 @@
|
||||
.CodeMirror-scroll {
|
||||
overflow: auto !important;
|
||||
margin-bottom: -30px;
|
||||
margin-right: -30px;
|
||||
padding-bottom: 30px;
|
||||
height: 100%;
|
||||
outline: none;
|
||||
position: relative;
|
||||
}
|
||||
a.white-btn.orange-btn:hover {
|
||||
border: 1px solid #F06200;
|
||||
color: #FFF !important;
|
||||
}
|
||||
.flex1 a.white-btn.orange-btn:hover {
|
||||
border: 1px solid #F06200;
|
||||
color: #FFF !important;
|
||||
}
|
||||
|
||||
/*.challenge_nav li a{*/
|
||||
/*color:#000 !important;*/
|
||||
/*}*/
|
||||
|
||||
.questionli{
|
||||
width: 95%;
|
||||
margin-left: 37px;
|
||||
}
|
||||
#directory_file{
|
||||
height:200px;
|
||||
overflow-y:auto;
|
||||
background:#f5f5f5;
|
||||
padding:10px;
|
||||
}
|
||||
.directory_filepath{
|
||||
width:120px;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
a{
|
||||
text-decoration: none;
|
||||
color: #05101a;
|
||||
}
|
||||
.repository_url_tippostion{
|
||||
position: absolute;
|
||||
left: 22%;
|
||||
width: 500px;
|
||||
top: 100%;
|
||||
}
|
||||
|
||||
.top-black-trangleft {
|
||||
display: block;
|
||||
border-width: 8px;
|
||||
position: absolute;
|
||||
top: -16px;
|
||||
/* right: 4px; */
|
||||
border-style: dashed solid dashed dashed;
|
||||
border-color: transparent transparent rgba(5,16,26,0.6) transparent;
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
#exercisememoMD .CodeMirror {
|
||||
margin-top: 31px !important;
|
||||
height: 370px !important;
|
||||
/*width: 579px !important;*/
|
||||
}
|
||||
|
||||
#exercisememoMD .editormd-preview {
|
||||
top: 40px !important;
|
||||
height: 370px !important;
|
||||
width: 578px !important;
|
||||
}
|
||||
#exercisememoMD{
|
||||
/*height: 700px !important;*/
|
||||
}
|
||||
#questioMD{
|
||||
/*width: 95% !important;*/
|
||||
height: 417px !important;
|
||||
margin-left: 0% !important;
|
||||
}
|
||||
|
||||
|
||||
#questioMD .CodeMirror {
|
||||
/*width: 550.5px !important;*/
|
||||
margin-top: 31px !important;
|
||||
height: 374px !important;
|
||||
}
|
||||
|
||||
#questioMD .editormd-preview {
|
||||
top: 40px !important;
|
||||
height: 375px !important;
|
||||
width: 550px !important;
|
||||
}
|
||||
|
||||
#newquestioMD .CodeMirror {
|
||||
/*width: 549px !important;*/
|
||||
margin-top: 31px !important;
|
||||
height: 364px !important;
|
||||
}
|
||||
|
||||
#newquestioMD .editormd-preview {
|
||||
top: 40px !important;
|
||||
height: 364px !important;
|
||||
width: 578px !important;
|
||||
}
|
||||
|
||||
#challenge_choose_answer .CodeMirror {
|
||||
margin-top: 31px !important;
|
||||
height: 364px !important;
|
||||
/*width: 578px !important;*/
|
||||
}
|
||||
|
||||
|
||||
#challenge_choose_answer .editormd-preview {
|
||||
top: 40px !important;
|
||||
height: 364px !important;
|
||||
width: 578px !important;
|
||||
}
|
||||
|
||||
#neweditanswer .CodeMirror {
|
||||
margin-top: 31px !important;
|
||||
height: 364px !important;
|
||||
/*width: 549.5px !important;*/
|
||||
}
|
||||
|
||||
#neweditanswer .editormd-preview {
|
||||
top: 40px !important;
|
||||
height: 364px !important;
|
||||
width: 551px !important;
|
||||
}
|
||||
|
||||
#repository_url_tip {
|
||||
top: 30px !important;
|
||||
left: 249px !important;
|
||||
width: 292px !important;
|
||||
}
|
||||
|
||||
#editanswers .CodeMirror{
|
||||
/*width: 548px !important;*/
|
||||
height: 358px !important;
|
||||
margin-top: 30px !important;
|
||||
}
|
||||
#editanswers .editormd-preview{
|
||||
width: 578px !important;
|
||||
height: 358px !important;
|
||||
|
||||
}
|
||||
#newquestioMDs .CodeMirror{
|
||||
/*width: 510px !important;*/
|
||||
height: 358px !important;
|
||||
margin-top: 30px !important;
|
||||
}
|
||||
|
||||
#newquestioMDs .editormd-preview{
|
||||
width: 578px !important;
|
||||
height: 358px !important;
|
||||
}
|
||||
|
||||
.choose_names{
|
||||
width: 80px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
#answerMD .CodeMirror{
|
||||
/*width: 569px !important;*/
|
||||
height: 600px !important;
|
||||
margin-top: 30px !important;
|
||||
}
|
||||
|
||||
#answerMD .editormd-preview{
|
||||
width: 578px !important;
|
||||
height: 600px !important;
|
||||
}
|
||||
|
||||
#answerMD {
|
||||
height: 600px !important;
|
||||
}
|
||||
|
||||
.textareavalue{
|
||||
width: 100%;
|
||||
padding: 5px;
|
||||
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.greyInput{
|
||||
width: 107%;
|
||||
}
|
||||
.greyInpus{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pdr20{
|
||||
padding-right:20px;
|
||||
}
|
||||
|
||||
.winput-240-40s {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
|
||||
.winput-240-40s:focus{
|
||||
background-color: #fff;
|
||||
}
|
||||
.input-100-45{
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.input-100-45:focus{
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.wind100{
|
||||
width:100% !important;
|
||||
}
|
||||
|
||||
.color-bule-tip {
|
||||
color: #5485f7 !important;
|
||||
}
|
||||
.martopf4{
|
||||
margin-top:-4px;
|
||||
}
|
||||
|
||||
.headdfgf{
|
||||
display: block;
|
||||
width: 100px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.color979797{
|
||||
color: #979797 !important;
|
||||
}
|
||||
|
||||
.border-left{
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-bottom: 6px solid transparent;
|
||||
border-right: 6px solid #cccbcb;
|
||||
border-top: 6px solid transparent;
|
||||
position: absolute;
|
||||
left: 30px;
|
||||
top: 12px;
|
||||
}
|
||||
.border-left span{
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-bottom: 6px solid transparent;
|
||||
border-right: 6px solid #fff;
|
||||
border-top: 6px solid transparent;
|
||||
position: absolute;
|
||||
left: 1px;
|
||||
top: -6px;
|
||||
z-index: 10;
|
||||
}
|
||||
.fillTip{
|
||||
position: absolute;
|
||||
left: 36px;
|
||||
top: 2px;
|
||||
width: 125px;
|
||||
font-size: 12px;
|
||||
display: block;
|
||||
padding: 5px;
|
||||
border: 1px solid #eaeaea;
|
||||
border-radius: 5px;
|
||||
box-sizing: border-box;
|
||||
height: 32px;
|
||||
line-height: 20px;
|
||||
font-family: "微软雅黑","宋体";
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
|
||||
|
||||
class TPMNav extends Component {
|
||||
|
||||
render() {
|
||||
const { user, match, shixun, secret_repository } = this.props;
|
||||
let isAdminOrCreator = false;
|
||||
if (user) {
|
||||
isAdminOrCreator = user.admin || user.manager
|
||||
}
|
||||
const shixunId = match.params.shixunId;
|
||||
// const challengesPath = `/shixuns/${shixunId}/challenges`;
|
||||
// console.log(this.props.propaedeutics)
|
||||
const challengesPath = `/shixuns/${shixunId}/challenges`;
|
||||
// console.log(match.path)
|
||||
return (
|
||||
<div className="bor-bottom-greyE clearfix pl20 pr20 pt40 pb20 edu-back-white challengeNav">
|
||||
<Link
|
||||
to={challengesPath}
|
||||
className={match.path === "/shixuns/:shixunId"|| match.path ==="/shixuns/:shixunId/challenges"? " active fl mr40": 'fl mr40'}>任务</Link>
|
||||
|
||||
{
|
||||
this.props.propaedeutics===undefined?"":this.props.propaedeutics===false?"":<Link to={`/shixuns/${shixunId}/propaedeutics`}
|
||||
className={`${match.url.indexOf('propaedeutics') != -1 ? 'active' : ''} fl mr40 `}
|
||||
id={"knowledge"}
|
||||
>背景知识</Link>
|
||||
}
|
||||
|
||||
{ this.props.identity >4||this.props.identity===undefined ?"":<Link to={`/shixuns/${shixunId}/repository`}
|
||||
className={`${match.url.indexOf('/repository') != -1 ? 'active' : ''} fl mr40`}>版本库</Link>}
|
||||
{this.props.identity >4||this.props.identity===undefined ?"": secret_repository && <Link to={`/shixuns/${shixunId}/secret_repository`}
|
||||
className={`${match.url.indexOf('secret_repository') != -1 ? 'active' : ''} fl mr40`}>私密版本库</Link>}
|
||||
|
||||
<Link to={`/shixuns/${shixunId}/collaborators`}
|
||||
className={`${match.url.indexOf('collaborators') != -1 ? 'active' : ''} fl mr40`}>合作者</Link>
|
||||
|
||||
<Link to={`/shixuns/${shixunId}/shixun_discuss`}
|
||||
className={`${match.url.indexOf('shixun_discuss') != -1 ? 'active' : ''} fl mr40`}>评论</Link>
|
||||
|
||||
<Link to={`/shixuns/${shixunId}/ranking_list`}
|
||||
className={`${match.url.indexOf('ranking_list') != -1 ? 'active' : ''} fl mr40`}>排行榜</Link>
|
||||
|
||||
{this.props.identity >2||this.props.identity===undefined?"":<Link to={`/shixuns/${shixunId}/audit_situation`}
|
||||
className={`${match.url.indexOf('audit_situation') != -1 ? 'active' : ''} fl`}>审核情况</Link>}
|
||||
|
||||
<a
|
||||
href={`/shixuns/${shixunId}/settings`} className="edu-default-btn edu-blueline-btn ml20 fr"
|
||||
style={{display: this.props.identity >4||this.props.identity===undefined ? "none" : 'block'}}
|
||||
>配置</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TPMNav;
|
@ -1,205 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
import { getImageUrl,} from "educoder";
|
||||
|
||||
import './TPMright.css';
|
||||
|
||||
import {Icon,Tooltip} from 'antd';
|
||||
|
||||
// import "antd/dist/antd.css";
|
||||
|
||||
class TPMRightSection extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
|
||||
TPMRightSection:false,
|
||||
clickNewsubscripttype:false
|
||||
}
|
||||
}
|
||||
|
||||
// componentDidMount() {
|
||||
// let id=this.props.match.params.shixunId;
|
||||
//
|
||||
// let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`;
|
||||
//
|
||||
// axios.get(shixunsDetailsURL).then((response)=> {
|
||||
// if(response.status===200){
|
||||
// this.setState({
|
||||
// TPMRightSectionData: response.data
|
||||
// });
|
||||
// }
|
||||
// }).catch((error)=>{
|
||||
// console.log(error)
|
||||
// });
|
||||
// }
|
||||
|
||||
// shouldComponentUpdate(nextProps, nextState) {
|
||||
// return nextProps.TPMRightSectionData !== this.state.TPMRightSectionData
|
||||
// }
|
||||
clickNewsubscript=(val)=>{
|
||||
if(val===0){
|
||||
this.setState({
|
||||
TPMRightSection:true,
|
||||
clickNewsubscripttype:true
|
||||
})
|
||||
}else{
|
||||
this.setState({
|
||||
TPMRightSection:false,
|
||||
clickNewsubscripttype:false
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
render() {
|
||||
let {TPMRightSection,clickNewsubscripttype}=this.state;
|
||||
let {TPMRightSectionData}=this.props
|
||||
|
||||
return (
|
||||
<div>
|
||||
{
|
||||
TPMRightSectionData===undefined?"":
|
||||
<div>
|
||||
<div className="edu-back-white padding40-20 mb10">
|
||||
<p className="font-16 mb20">创建者</p>
|
||||
<div className="df">
|
||||
<a href={TPMRightSectionData===undefined?"":TPMRightSectionData.creator===undefined?"":`/users/${TPMRightSectionData.creator.login}/courses`}>
|
||||
<img alt="头像" className="radius mr10" height="80" src={getImageUrl(TPMRightSectionData===undefined?"":TPMRightSectionData.creator===undefined?"":'images/'+TPMRightSectionData.creator.image_url+"?1532489442")} width="80" />
|
||||
</a>
|
||||
<div className="flex1">
|
||||
|
||||
<p className="mb20">{TPMRightSectionData===undefined?"":TPMRightSectionData.creator===undefined?"":TPMRightSectionData.creator.name}</p>
|
||||
<div className="clearfix">
|
||||
<span>发布 {TPMRightSectionData.user_shixuns_count}</span>
|
||||
{/*<span className="ml20">粉丝 <span id="user_h_fan_count">{TPMRightSectionData.fans_count}</span></span>*/}
|
||||
{/* <a href="/watchers/unwatch?className=fr+user_watch_btn+edu-default-btn+edu-focus-btn&object_id=3039&object_type=user&shixun_id=61&target_id=3039" className="fr edu-default-btn user_watch_btn edu-focus-btn" data-method="post" data-remote="true" id="cancel_watch" rel="nofollow">取消关注</a> */}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{
|
||||
TPMRightSectionData === undefined ? "" :TPMRightSectionData.tags===undefined?"": TPMRightSectionData.tags.length === 0 ? "" :
|
||||
<div className="edu-back-white padding40-20 mb10 relative">
|
||||
<p className="font-16 mb20">技能标签 <span className="color-grey-c">{TPMRightSectionData.tags.length}</span></p>
|
||||
<div className={TPMRightSection===false?"newedbox newedboxheight":"newedbox newminheight"}>
|
||||
<div className="clearfix" id="boxheight">
|
||||
{ TPMRightSectionData.tags.map((item,key)=>{
|
||||
return(
|
||||
<span className={item.status===false?"newedu-filter-btn fl":"edu-filter-btn29BD8B fl"}
|
||||
style={{display:item.tag_name===" "||item.tag_name===""?"none":""}}
|
||||
key={key}>{item.tag_name}</span>
|
||||
)})
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className={TPMRightSectionData.tags.length>15&&clickNewsubscripttype===false?"newsubscript mb9 color-grey-9":"newsubscript mb9 color-grey-9 none"}
|
||||
|
||||
data-tip-down="显示全部"
|
||||
onClick={()=>this.clickNewsubscript(0)}><span className="mr8">...</span><Icon type="caret-down" />
|
||||
</div>
|
||||
|
||||
|
||||
<div className={clickNewsubscripttype===false?"newsubscript mb9 color-grey-9 none":"newsubscript mb9 color-grey-9"}
|
||||
|
||||
data-tip-down="显示全部"
|
||||
onClick={()=>this.clickNewsubscript(1)}><Icon type="caret-up" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
<div className="padding20 edu-back-white mb10 mt10" style={{
|
||||
display: TPMRightSectionData === undefined?"none":TPMRightSectionData.paths===undefined?"":TPMRightSectionData.paths.length === 0 ? "none" : "block"
|
||||
}}>
|
||||
<p className="mb20 font-16 clearfix">所属课程</p>
|
||||
<div className="recommend-list" >
|
||||
{
|
||||
TPMRightSectionData===undefined?"":TPMRightSectionData.paths===undefined?"":TPMRightSectionData.paths.map((i,k)=>{
|
||||
|
||||
return(
|
||||
|
||||
<div className="recomments clearfix df" key={k}>
|
||||
|
||||
<a href={"/paths/"+i.id} height="96" width="128" target="_blank">
|
||||
<img alt="实训" height="96" src={"/"+i.image_url} width="128" />
|
||||
</a>
|
||||
|
||||
<div className="ml10 flex1">
|
||||
<a href={"/paths/"+i.id} target="_blank" data-tip-down={i.name} className="color-grey-6 task-hide mb12 recomment-name">{i.name}</a>
|
||||
<p className="clearfix mt8 font-12 color-grey-B4">
|
||||
|
||||
<Tooltip placement="bottom" title={"章节"}>
|
||||
<span className="mr10 fl squareIconSpan"><i className="iconfont icon-shixun fl mr3"></i>{i.stages_count}</span>
|
||||
</Tooltip>
|
||||
|
||||
{/*<Tooltip placement="bottom" title={"经验值"}>*/}
|
||||
{/*<span className="mr10 fl squareIconSpan"><i className="iconfont icon-jingyan fl mr3"></i>{i.score_count}</span>*/}
|
||||
{/*</Tooltip>*/}
|
||||
|
||||
<Tooltip placement="bottom" title={"学习人数"}>
|
||||
<span className="mr10 fl squareIconSpan"><i className="iconfont icon-chengyuan fl mr3"></i>{i.members_count}</span>
|
||||
</Tooltip>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{TPMRightSectionData === undefined?"":TPMRightSectionData.paths===undefined?"":TPMRightSectionData.paths.length === 0 ? "" :
|
||||
this.props.user&&this.props.user.main_site===true?<div className="padding20 edu-back-white"
|
||||
style={{
|
||||
display:
|
||||
TPMRightSectionData === undefined?"none":TPMRightSectionData.recommands===undefined?"none":TPMRightSectionData.recommands.length === 0 ? "none" : "block"
|
||||
}}
|
||||
>
|
||||
<p className="mb20 font-16 clearfix">推荐实训</p>
|
||||
<div className="recommend-list">
|
||||
{
|
||||
TPMRightSectionData===undefined?"":TPMRightSectionData.recommands===undefined?"":TPMRightSectionData.recommands.map((item,key)=>{
|
||||
return(
|
||||
<div className="recomments clearfix df" key={key}>
|
||||
<a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank">
|
||||
<img alt="69?1526971094" height="96" src={"/"+item.pic} width="128"/>
|
||||
</a>
|
||||
<div className="ml10 flex1">
|
||||
<Tooltip placement="bottom" title={item.name}>
|
||||
<a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank" className="color-grey-6 task-hide mb12 recomment-name">{item.name}</a>
|
||||
</Tooltip>
|
||||
<p className="clearfix mt8 font-12 color-grey-B4">
|
||||
{item.stu_num} 人学习
|
||||
</p>
|
||||
<p className="edu-txt-right color-orange pr10">{item.level}</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</div>:""
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export default TPMRightSection;
|
File diff suppressed because it is too large
Load Diff
@ -1,19 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
export default class TPMNewshixuns extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,397 +0,0 @@
|
||||
/* BASICS */
|
||||
|
||||
.CodeMirror {
|
||||
/* Set height, width, borders, and global font properties here */
|
||||
font-family: monospace;
|
||||
height: 300px;
|
||||
color: black;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
/* PADDING */
|
||||
|
||||
.CodeMirror-lines {
|
||||
padding: 4px 0; /* Vertical padding around content */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
padding: 0 4px; /* Horizontal padding of content */
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
background-color: white; /* The little square between H and V scrollbars */
|
||||
}
|
||||
|
||||
/* GUTTER */
|
||||
|
||||
.CodeMirror-gutters {
|
||||
border-right: 1px solid #ddd;
|
||||
background-color: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.CodeMirror-linenumbers {}
|
||||
.CodeMirror-linenumber {
|
||||
padding: 0 3px 0 5px;
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker { color: black; }
|
||||
.CodeMirror-guttermarker-subtle { color: #999; }
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror-cursor {
|
||||
border-left: 1px solid black;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
/* Shown when moving in bi-directional text */
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
.cm-fat-cursor .CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0 !important;
|
||||
background: #7e7;
|
||||
}
|
||||
.cm-fat-cursor div.CodeMirror-cursors {
|
||||
z-index: 1;
|
||||
}
|
||||
.cm-fat-cursor-mark {
|
||||
background-color: rgba(20, 255, 20, 0.5);
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
}
|
||||
.cm-animate-fat-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
background-color: #7e7;
|
||||
}
|
||||
@-webkit-keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
.CodeMirror-overwrite .CodeMirror-cursor {}
|
||||
|
||||
.cm-tab { display: inline-block; text-decoration: inherit; }
|
||||
|
||||
.CodeMirror-rulers {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: -50px; bottom: -20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
top: 0; bottom: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* DEFAULT THEME */
|
||||
|
||||
.cm-s-default .cm-header {color: blue;}
|
||||
.cm-s-default .cm-quote {color: #090;}
|
||||
.cm-negative {color: #d44;}
|
||||
.cm-positive {color: #292;}
|
||||
.cm-header, .cm-strong {font-weight: bold;}
|
||||
.cm-em {font-style: italic;}
|
||||
.cm-link {text-decoration: underline;}
|
||||
.cm-strikethrough {text-decoration: line-through;}
|
||||
|
||||
.cm-s-default .cm-keyword {color: #708;}
|
||||
.cm-s-default .cm-atom {color: #219;}
|
||||
.cm-s-default .cm-number {color: #164;}
|
||||
.cm-s-default .cm-def {color: #00f;}
|
||||
.cm-s-default .cm-variable,
|
||||
.cm-s-default .cm-punctuation,
|
||||
.cm-s-default .cm-property,
|
||||
.cm-s-default .cm-operator {}
|
||||
.cm-s-default .cm-variable-2 {color: #05a;}
|
||||
.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
|
||||
.cm-s-default .cm-comment {color: #a50;}
|
||||
.cm-s-default .cm-string {color: #a11;}
|
||||
.cm-s-default .cm-string-2 {color: #f50;}
|
||||
.cm-s-default .cm-meta {color: #555;}
|
||||
.cm-s-default .cm-qualifier {color: #555;}
|
||||
.cm-s-default .cm-builtin {color: #30a;}
|
||||
.cm-s-default .cm-bracket {color: #997;}
|
||||
.cm-s-default .cm-tag {color: #170;}
|
||||
.cm-s-default .cm-attribute {color: #00c;}
|
||||
.cm-s-default .cm-hr {color: #999;}
|
||||
.cm-s-default .cm-link {color: #00c;}
|
||||
|
||||
.cm-s-default .cm-error {color: #f00;}
|
||||
.cm-invalidchar {color: #f00;}
|
||||
|
||||
.CodeMirror-composing { border-bottom: 2px solid; }
|
||||
|
||||
/* Default styles for common addons */
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
|
||||
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
||||
.CodeMirror-activeline-background {background: #e8f2ff;}
|
||||
|
||||
/* STOP */
|
||||
|
||||
/* The rest of this file contains styles related to the mechanics of
|
||||
the editor. You probably shouldn't touch them. */
|
||||
|
||||
.CodeMirror {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
overflow: scroll !important; /* Things will break if this is overridden */
|
||||
/* 30px is the magic margin used to hide the element's real scrollbars */
|
||||
/* See overflow: hidden in .CodeMirror */
|
||||
margin-bottom: -30px; margin-right: -30px;
|
||||
padding-bottom: 30px;
|
||||
height: 100%;
|
||||
outline: none; /* Prevent dragging from highlighting the element */
|
||||
position: relative;
|
||||
}
|
||||
.CodeMirror-sizer {
|
||||
position: relative;
|
||||
border-right: 30px solid transparent;
|
||||
}
|
||||
|
||||
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
||||
before actual scrolling happens, thus preventing shaking and
|
||||
flickering artifacts. */
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
}
|
||||
.CodeMirror-vscrollbar {
|
||||
right: 0; top: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.CodeMirror-hscrollbar {
|
||||
bottom: 0; left: 0;
|
||||
overflow-y: hidden;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
.CodeMirror-scrollbar-filler {
|
||||
right: 0; bottom: 0;
|
||||
}
|
||||
.CodeMirror-gutter-filler {
|
||||
left: 0; bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute; left: 0; top: 0;
|
||||
min-height: 100%;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-bottom: -30px;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
.CodeMirror-gutter-background {
|
||||
position: absolute;
|
||||
top: 0; bottom: 0;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
|
||||
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
|
||||
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
min-height: 1px; /* prevents collapsing before first draw */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
/* Reset some styles that the rest of the page might have set */ border-radius: 0;
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-font-variant-ligatures: contextual;
|
||||
font-variant-ligatures: contextual;
|
||||
}
|
||||
.CodeMirror-wrap pre {
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.CodeMirror-linebackground {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: 0; bottom: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-linewidget {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 0.1px; /* Force widget margins to stay inside of the container */
|
||||
}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-rtl pre { direction: rtl; }
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Force content-box sizing for the elements where we expect it */
|
||||
.CodeMirror-scroll,
|
||||
.CodeMirror-sizer,
|
||||
.CodeMirror-gutter,
|
||||
.CodeMirror-gutters,
|
||||
.CodeMirror-linenumber {
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
div.CodeMirror-dragcursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-selected { background: #d9d9d9; }
|
||||
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
||||
.CodeMirror-crosshair { cursor: crosshair; }
|
||||
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
|
||||
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
|
||||
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
|
||||
|
||||
.cm-searching {
|
||||
background-color: #ffa;
|
||||
background-color: rgba(255, 255, 0, .4);
|
||||
}
|
||||
|
||||
/* Used to force a border model for a node */
|
||||
.cm-force-border { padding-right: .1px; }
|
||||
|
||||
@media print {
|
||||
/* Hide the cursor when printing */
|
||||
.CodeMirror div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/* See issue #2901 */
|
||||
.cm-tab-wrap-hack:after { content: ''; }
|
||||
|
||||
/* Help users use markselection to safely style text background */
|
||||
span.CodeMirror-selectedtext { background: none; }
|
||||
|
||||
|
||||
|
||||
|
||||
.radioStyle{
|
||||
display: block;
|
||||
height: 30px;
|
||||
}
|
||||
a.white-btn.use_scope-btn:hover{
|
||||
|
||||
}
|
||||
.shixunScopeInput{
|
||||
width:218px;
|
||||
height:33px;
|
||||
display:block;
|
||||
margin-bottom:15px;
|
||||
}
|
||||
|
||||
#memoMD .CodeMirror {
|
||||
/*width: 576px !important;*/
|
||||
margin-top: 31px !important;
|
||||
height: 364px !important;
|
||||
}
|
||||
|
||||
#memoMD .editormd-preview {
|
||||
width: 578px !important;
|
||||
top: 40px !important;
|
||||
height: 364px !important;
|
||||
}
|
||||
|
||||
.ml36{
|
||||
margin-left: 26px;
|
||||
}
|
||||
#person-unit a.white-btn.use_scope-btn:hover {
|
||||
border: 1px solid #F06200;
|
||||
color:#FFF !important;
|
||||
}
|
||||
|
||||
.shixunspanred{
|
||||
margin-left: 142px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.ml82{
|
||||
margin-left: 82px;
|
||||
}
|
||||
|
||||
.ant-btn-primary.active, .ant-btn-primary:active {
|
||||
color: #fff;
|
||||
background-color: #096dd9;
|
||||
border-color: #096dd9;
|
||||
}
|
||||
|
||||
.ant-btn:hover, .ant-btn:focus, .ant-btn:active, .ant-btn.active{
|
||||
background-color: #4CACFF;
|
||||
}
|
Before Width: | Height: | Size: 720 B |
@ -1,9 +0,0 @@
|
||||
.height40 {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.line27{
|
||||
line-height: 27px;
|
||||
vertical-align: 1px;
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import classNames from 'classnames';
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
import { trace_collapse } from 'educoder'
|
||||
const $ = window.$;
|
||||
|
||||
|
||||
class RepositoryDirectories extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
|
||||
}
|
||||
}
|
||||
componentDidMount() {
|
||||
}
|
||||
render() {
|
||||
const { match, pathArray, fetchRepo
|
||||
} = this.props;
|
||||
let { RepositoryList } = this.state;
|
||||
return (
|
||||
<React.Fragment>
|
||||
|
||||
{ pathArray.length !== 0 &&
|
||||
<div className="bor-bottom-greyE padding5-10 font-14 ">
|
||||
<a className="color-blue"
|
||||
onClick={() => fetchRepo(0)}
|
||||
>
|
||||
{match.params.shixunId}
|
||||
</a>
|
||||
<span className="ml3 mr3">/</span>
|
||||
{ pathArray.map((item, index) => {
|
||||
// /shixuns/3ozvy5f8/repository/3ozvy5f8/master/shixun_show/src
|
||||
return (
|
||||
<React.Fragment>
|
||||
{ this.props.nameTypeMap[item] === 'tree' || item.indexOf('.') === -1
|
||||
? <a
|
||||
onClick={() => fetchRepo(index + 1)}
|
||||
className="color-blue">
|
||||
{item}</a>
|
||||
:
|
||||
<a >
|
||||
{item}</a>
|
||||
}
|
||||
{index !== pathArray.length - 1 && <span className="ml3 mr3">/</span>}
|
||||
</React.Fragment>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div> }
|
||||
|
||||
</React.Fragment>
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
export default RepositoryDirectories;
|
@ -1,145 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import classNames from 'classnames';
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
import TPMNav from '../../component/TPMNav'
|
||||
import TPMRightSection from '../../component/TPMRightSection'
|
||||
import { CircularProgress } from 'material-ui/Progress';
|
||||
|
||||
import { trace_collapse } from 'educoder'
|
||||
const $ = window.$;
|
||||
|
||||
// 点击按钮复制功能
|
||||
function jsCopy(){
|
||||
var e = document.getElementById("copy_rep_content");
|
||||
e.select();
|
||||
document.execCommand("Copy");
|
||||
}
|
||||
class TPMRepositoryCommits extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
RepositoryList: undefined,
|
||||
}
|
||||
}
|
||||
componentDidMount() {
|
||||
let id = this.props.match.params.shixunId;
|
||||
|
||||
let collaborators=`/shixuns/`+id+`/commits.json`;
|
||||
axios.post(collaborators, {
|
||||
secret_repository: this.props.secret_repository_tab
|
||||
}).then((response)=> {
|
||||
|
||||
if(response.status===200){
|
||||
this.setState({
|
||||
RepositoryList: response.data
|
||||
});
|
||||
}
|
||||
trace_collapse('repo commits res', response.data)
|
||||
|
||||
}).catch((error)=>{
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
}
|
||||
render() {
|
||||
const { loadingContent, creator, shixun, myshixun, recommend_shixuns, current_user, watched,
|
||||
aboutFocus, user, match
|
||||
} = this.props;
|
||||
let { RepositoryList } = this.state;
|
||||
return (
|
||||
<React.Fragment>
|
||||
|
||||
<div className="tpmComment educontent clearfix mt30 mb80">
|
||||
{/* 可能会影响到其他页面的样式,需要测试、协商 */}
|
||||
<div className="with65 fl edu-back-white commentsDelegateParent"
|
||||
style={{background: 'transparent'}}>
|
||||
<TPMNav
|
||||
match={match}
|
||||
user={user}
|
||||
shixun={shixun}
|
||||
{...this.props}
|
||||
></TPMNav>
|
||||
{ loadingContent ?
|
||||
<CircularProgress size={40} thickness={3}
|
||||
style={{ marginLeft: 'auto', marginRight: 'auto', marginTop: '200px', display: 'block' }}/>
|
||||
:
|
||||
|
||||
<div className="" >
|
||||
<div className="edu-back-white font-16 mb10 clearfix padding20">
|
||||
<span className="fl"><i className="iconfont icon-tijiaojilu mr5"></i>
|
||||
提交记录
|
||||
</span>
|
||||
{/* 35 */}
|
||||
<span className="color-grey-9 fr">
|
||||
<Link to={`/shixuns/${match.params.shixunId}/repository/${match.params.repoId}`}
|
||||
className="font-14 color-grey-9">返回</Link>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
{`
|
||||
a.pullreques_name:hover {
|
||||
color: #666 !important
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
<div className="edu-back-white font-16 mb10 clearfix padding20">
|
||||
<ul className="pullreques_pull_list">
|
||||
{ RepositoryList === undefined ? "" : RepositoryList.commits.map( (item, key)=>{
|
||||
return (
|
||||
<li className="clear" key={ key }>
|
||||
<a
|
||||
style={{ cursor: 'inherit' }}
|
||||
className="fl color-grey-6 font-16 pullreques_name task-hide"
|
||||
target="_blank">{item.email}</a>
|
||||
<p className="pullreques_pull_txt ml10 fl" style={{lineHeight: '32px'}}>
|
||||
{item.title}
|
||||
</p>
|
||||
<a style={{ cursor: 'inherit' }}
|
||||
className="fr mr15 color-blue">{item.time}</a>
|
||||
|
||||
<div className="cl"></div>
|
||||
</li>)
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div className="with35 fr pl20">
|
||||
<TPMRightSection {...this.props}></TPMRightSection>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</React.Fragment>
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
{ RepositoryList === undefined ? "" : RepositoryList.commits.map( (item, key)=>{
|
||||
// {"email":"李暾","title":"2\n","id":"80cb6fc55a14bdd64a9c99913f416966238ed3de","time":"49年前"}
|
||||
return (
|
||||
<div>
|
||||
<div>{item.email}</div>
|
||||
<div>{item.title}</div>
|
||||
<div>{item.id}</div>
|
||||
<div>{item.time}</div>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
*/
|
||||
export default TPMRepositoryCommits;
|
@ -1,170 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import classNames from 'classnames';
|
||||
|
||||
import { getImageUrl, toPath } from 'educoder'
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
const $ = window.$;
|
||||
|
||||
class ShixunDiscuss extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
TPMRightSectionData: undefined
|
||||
}
|
||||
}
|
||||
getshixunsDetailsList = (id) => {
|
||||
let shixunsDetailsURL = `/shixuns/` + id + `/discusses.json`;
|
||||
axios.get(shixunsDetailsURL).then((response) => {
|
||||
if (response.status === 200) {
|
||||
this.setState({
|
||||
TPMRightSectionData: response.data
|
||||
});
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
});
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
let id = this.props.match.params.shixunId;
|
||||
setTimeout(this.getshixunsDetailsList(id), 1000);
|
||||
}
|
||||
render() {
|
||||
let { TPMRightSectionData } = this.state;
|
||||
|
||||
return (
|
||||
<div className="mt30">
|
||||
<div id="no_data">
|
||||
<div className="justify markdown-body editormd-html-preview" id="challenge_editorMd_propaedeutics">
|
||||
|
||||
|
||||
{
|
||||
TPMRightSectionData===undefined?"":TPMRightSectionData.map((item,key)=>{
|
||||
return(
|
||||
<div className="comment_item_cont df clearfix" key={key}>
|
||||
<div className="J_Comment_Face fl">
|
||||
<a href={item.user.user_url} target="_blank">
|
||||
<img alt="用户头像" height="50" src={getImageUrl("images/"+item.user.image_url)} width="50" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div className="t_content fl" style={{width:'100%'}}>
|
||||
<div className="J_Comment_Reply">
|
||||
<div className="comment_orig_content" style={{margin: '0px'}}>
|
||||
|
||||
<div className="J_Comment_Info clearfix mt3">
|
||||
<div className="t_info fl">
|
||||
<a href={item.user.user_url} className="content-username hide fl">{item.user.name}</a>
|
||||
<span className="t_area fl">{item.time}</span>
|
||||
<span className="fl color-light-green font-14 ml15">[第{item.round}关]</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="comment_content clearfix" id="reply_content_3783">
|
||||
<div className="color-grey-3" id="reply_content_3783"><div>
|
||||
<p>{item.content}</p>
|
||||
</div>
|
||||
<div className="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{
|
||||
item.replies.map((i,k)=>{
|
||||
return(
|
||||
<div className="childrenCommentsView" key={k} style={{width:'100%'}}>
|
||||
<div className="trangle"></div>
|
||||
<div className="childComment">
|
||||
<div className="J_Comment_Info clearfix mt3">
|
||||
<div className="t_info fl">
|
||||
<a href={i.user.user_url} className="content-username hide fl">{i.user.name}</a>
|
||||
<span className="t_area fl">{i.time}</span>
|
||||
</div>
|
||||
<p className="fr orig_reply lineh-20">
|
||||
<span id="hidden_discuss_btn_952"></span>
|
||||
<a className="color-grey-8">
|
||||
<i className="iconfont icon-jiangli fl mt2"></i>
|
||||
</a>
|
||||
<a className="color-grey-8" id="delete_reply_118_952">
|
||||
<i className="iconfont icon-shanchu mr5"></i>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div className="comment_content clearfix" id="reply_content_3800">
|
||||
<div className="color-grey-3" id="reply_content_3800">
|
||||
<div>
|
||||
<p>{i.content}</p>
|
||||
</div>
|
||||
<div className="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
<p className="fr orig_reply">
|
||||
<span id="hidden_discuss_btn_952"></span>
|
||||
<a className="color-grey-8">
|
||||
<i className="iconfont icon-jiangli mr5 fl"></i>
|
||||
</a>
|
||||
<a className="color-grey-8 fl mt2">
|
||||
<i className=" fa fa-eye mr5"></i>
|
||||
</a>
|
||||
<a className="color-grey-8">
|
||||
<i className="iconfont icon-shanchu mr5"></i>
|
||||
</a>
|
||||
<a className="color-grey-8">
|
||||
<i className="iconfont icon-huifu1 mr5"></i>
|
||||
</a>
|
||||
<span className="reply_praise_count_952">
|
||||
<a className="fr mr5 color-grey-8">
|
||||
<i className="iconfont icon-dianzan-xian mr5"></i>
|
||||
<span className="fr font-14">3</span>
|
||||
</a>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
|
||||
<div className="commentItemMDEditorView commentItemMDEditorView_4220" style={{display:'none'}}>
|
||||
<div className="homepagePostReplyPortrait mr15 fl imageFuzzy" id="reply_image_3097" style={{marginTop: '28px', marginRight: '0px'}}>
|
||||
<a href="/users/innov" target="_blank" alt="用户头像">
|
||||
<img alt="0?1442652658" height="33" src="/images/avatars/User/1" width="33"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="reply_message_4220" className="reply_to_message commentItemMDEditor" style={{paddingTop: '0px', paddingBottom: '20px'}}>
|
||||
<div id="reply_message_editorMd_4220" className="editorMD" style={{marginBottom: '0px'}}>
|
||||
<textarea></textarea>
|
||||
</div>
|
||||
<div className="editor__resize" >调整高度</div>
|
||||
<a id="commitBtn_4220" className="commentsbtn task-btn task-btn-blue fr ">发送</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default ShixunDiscuss;
|
@ -1,69 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import { BrowserRouter as Router, Route, Link} from "react-router-dom";
|
||||
|
||||
import { Switch } from 'antd';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import classNames from 'classnames'
|
||||
|
||||
import { TPMIndexHOC } from '../TPMIndexHOC'
|
||||
|
||||
import { SnackbarHOC } from 'educoder'
|
||||
|
||||
import ShixunCard from '.././shixuns/ShixunCard';
|
||||
|
||||
import { Pagination,Row,Col,Rate } from 'antd';
|
||||
|
||||
import './shixunchildCss/Shixunfork_list.css';
|
||||
|
||||
import 'antd/lib/rate/style/index.css';
|
||||
|
||||
const $ = window.$;
|
||||
|
||||
class Shixunforklist extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
handleChange = (value) => {
|
||||
console.log('Page: ', value);
|
||||
// this.setState({ value });
|
||||
}
|
||||
//JSX
|
||||
render() {
|
||||
const { match, history } = this.props
|
||||
|
||||
return (
|
||||
<div className="newMain clearfix">
|
||||
|
||||
<div className="educontent">
|
||||
<div className="edu-back-white padding20 clearfix mb20 mt30">
|
||||
<span className="fl font-16">Fork实训列表</span>
|
||||
<Link to="/shixunchild" className="font-16 color-grey-9 fr">返回</Link>
|
||||
</div>
|
||||
|
||||
|
||||
<ShixunCard/>
|
||||
|
||||
|
||||
|
||||
<div className="educontent edu-txt-center mb80">
|
||||
<div className="inline pages_user_show">
|
||||
<ul>
|
||||
|
||||
</ul>
|
||||
<div className="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
export default SnackbarHOC() (TPMIndexHOC ( Shixunforklist ));
|
@ -1,28 +0,0 @@
|
||||
.editormd-html-preview, .editormd-preview-container {
|
||||
width: 95% !important;
|
||||
}
|
||||
.Finish_button{
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
margin-top: -8px;
|
||||
}
|
||||
.startbtnModal .ant-modal-content{
|
||||
background: transparent;
|
||||
box-shadow: 0 4px 12px transparent;
|
||||
}
|
||||
|
||||
.startbtnModal .ant-modal-content .ant-modal-body .ant-spin-spinning{
|
||||
margin-left: 45%;
|
||||
}
|
||||
|
||||
.color05101a{
|
||||
color:#05101a;
|
||||
}
|
||||
|
||||
.mtf3{
|
||||
margin-top: -3px;
|
||||
}
|
||||
.addshixuns{
|
||||
height: 27px;
|
||||
line-height: 25px;
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
.ant-rate{
|
||||
color: #FFAA05 !important;
|
||||
}
|
||||
.ant-pagination-options-quick-jumper input{
|
||||
height: 22 !important;
|
||||
}
|
@ -1,253 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import { BrowserRouter as Router, Route} from "react-router-dom";
|
||||
|
||||
import { Switch ,Input,Tooltip,Icon} from 'antd';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import classNames from 'classnames'
|
||||
|
||||
import 'antd/lib/switch/style/index.css'
|
||||
|
||||
import './shixunCss/ShixunCardList.css';
|
||||
|
||||
import { on, off } from 'educoder'
|
||||
|
||||
const $ = window.$;
|
||||
|
||||
const Search = Input.Search;
|
||||
|
||||
class ShixunCardList extends Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state={
|
||||
allevent:"desc",
|
||||
mine:0,
|
||||
InputValue: props.keyword || "",
|
||||
typemy:0,
|
||||
hots:0,
|
||||
news:0,
|
||||
shixunid:"",
|
||||
upcircle:false,
|
||||
typekeyid:undefined,
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate = (prevProps, prevState) => {
|
||||
if (this.props.keyword != prevProps.keyword) {
|
||||
this.setState({
|
||||
InputValue: this.props.keyword
|
||||
})
|
||||
}
|
||||
}
|
||||
componentDidMount = () => {
|
||||
on('searchKeywordChange', (event, data) => {
|
||||
// console.log(data)
|
||||
this.Input_search(data)
|
||||
})
|
||||
}
|
||||
componentWillUnmount = () => {
|
||||
off('searchKeywordChange')
|
||||
}
|
||||
|
||||
|
||||
latestHot=(e,key)=>{
|
||||
|
||||
let{upcircle,typekeyid}=this.state;
|
||||
|
||||
let id = e.target.id;
|
||||
$("#"+id).siblings().removeClass("active");
|
||||
$("#"+id).addClass("active");
|
||||
|
||||
let type;
|
||||
|
||||
// if(id==="all"){
|
||||
// type="publish_time";
|
||||
// }
|
||||
if(id==="hot"){
|
||||
type="hot";
|
||||
}else if(id==="new"){
|
||||
type="new";
|
||||
|
||||
}
|
||||
if(typekeyid===key){
|
||||
if(upcircle===true){
|
||||
this.setState({
|
||||
upcircle:false,
|
||||
})
|
||||
this.props.Shixunsupcircles("desc")
|
||||
}else if(upcircle===false){
|
||||
this.setState({
|
||||
upcircle:true,
|
||||
})
|
||||
this.props.Shixunsupcircles("asc")
|
||||
}
|
||||
}else{
|
||||
this.setState({
|
||||
typekeyid:key
|
||||
})
|
||||
}
|
||||
|
||||
//allevent
|
||||
this.props.ShixunsState(false,type);
|
||||
}
|
||||
|
||||
|
||||
onSwitchChange=(e,key)=>{
|
||||
let id=e.target.id
|
||||
$("#"+id).siblings().removeClass("active");
|
||||
$("#"+id).addClass("active");
|
||||
let {typemy,upcircle,typekeyid}=this.state;
|
||||
|
||||
if(typekeyid===key){
|
||||
if(upcircle===true){
|
||||
this.setState({
|
||||
upcircle:false,
|
||||
})
|
||||
this.props.Shixunsupcircles("desc")
|
||||
}else if(upcircle===false){
|
||||
this.setState({
|
||||
upcircle:true
|
||||
})
|
||||
this.props.Shixunsupcircles("asc")
|
||||
}
|
||||
}else{
|
||||
this.setState({
|
||||
typekeyid:key
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
if(typemy===0){
|
||||
this.setState({
|
||||
typemy:1
|
||||
})
|
||||
}else{
|
||||
this.setState({
|
||||
typemy:0
|
||||
})
|
||||
}
|
||||
// allevent
|
||||
this.props.ShixunsSwitch();
|
||||
}
|
||||
//输入框搜索
|
||||
Input_search = (value) => {
|
||||
this.setState({
|
||||
InputValue: value
|
||||
})
|
||||
this.props.OnSearchInput(value,true);
|
||||
}
|
||||
|
||||
Input_searchs = (e) => {
|
||||
this.setState({
|
||||
InputValue: e.target.value
|
||||
})
|
||||
this.props.OnSearchInput(e.target.value,false);
|
||||
}
|
||||
upcircles=(val)=>{
|
||||
if(val==="asc"){
|
||||
this.setState({
|
||||
upcircle:false,
|
||||
})
|
||||
this.props.Shixunsupcircles("desc")
|
||||
}else if(val==="desc"){
|
||||
this.setState({
|
||||
upcircle:true
|
||||
})
|
||||
this.props.Shixunsupcircles("asc")
|
||||
}
|
||||
}
|
||||
render(){
|
||||
let {mine,InputValue,upcircle}=this.state;
|
||||
return (
|
||||
<div className="educontent mt20">
|
||||
<div className="clearfix">
|
||||
|
||||
{/*<div className="fl mr20 font-16 bestChoose shixun_repertoire active"*/}
|
||||
{/*id={"all"}*/}
|
||||
{/*onClick={(e)=>this.latestHot(e,1)}>全部*/}
|
||||
{/*</div>*/}
|
||||
{/*<div className="fl mr20 font-16 bestChoose shixun_repertoire"*/}
|
||||
{/*id={mine}*/}
|
||||
{/*onClick={(e)=>this.onSwitchChange(e,2)}>我的*/}
|
||||
{/*</div>*/}
|
||||
|
||||
<div className="fl mr20 font-16 bestChoose shixun_repertoire active"
|
||||
id="new"
|
||||
onClick={(e)=>this.latestHot(e,4)}>最新
|
||||
</div>
|
||||
|
||||
<div className="fl font-16 bestChoose shixun_repertoire"
|
||||
id="hot"
|
||||
onClick={(e)=>this.latestHot(e,3)}>最热
|
||||
</div>
|
||||
|
||||
|
||||
{/*<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"*/}
|
||||
{/*style={{display:upcircle===true?"block":"none"}}*/}
|
||||
{/*// onClick={()=>this.upcircles("asc")}*/}
|
||||
{/*>*/}
|
||||
{/*<Tooltip placement="bottom" title={"升序"}>*/}
|
||||
{/*<Icon type="up-circle" theme="twoTone" />*/}
|
||||
{/*/!*<Icon type="sort-descending" />*!/*/}
|
||||
{/*</Tooltip>*/}
|
||||
{/*</div>*/}
|
||||
{/*<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"*/}
|
||||
{/*// onClick={()=>this.upcircles("desc")}*/}
|
||||
{/*style={{display:upcircle===true?"none":"block"}}*/}
|
||||
{/*>*/}
|
||||
{/*<Tooltip placement="bottom" title={"降序"}>*/}
|
||||
{/*<Icon type="down-circle" theme="twoTone" />*/}
|
||||
{/*/!*<Icon type="sort-ascending" />*!/*/}
|
||||
{/*</Tooltip>*/}
|
||||
{/*</div>*/}
|
||||
|
||||
{/*<div className="fr mt3">*/}
|
||||
{/*<Search*/}
|
||||
{/*style={{ width: 300 }}*/}
|
||||
{/*className="search-new-input fl"*/}
|
||||
{/*placeholder="请输入创建者/实训/关卡名称进行搜索"*/}
|
||||
{/*value={InputValue}*/}
|
||||
{/*onInput={this.Input_searchs}*/}
|
||||
{/*onSearch={value => this.Input_search(value)}*/}
|
||||
{/*enterButton*/}
|
||||
{/*/>*/}
|
||||
|
||||
{/* <Search
|
||||
style={{ width: 300 }}
|
||||
className="fl"
|
||||
placeholder="请输入创建者/实训/关卡名称进行搜索"
|
||||
value={InputValue}
|
||||
onInput={this.Input_searchs}
|
||||
onSearch={value => this.Input_search(value)}
|
||||
autoComplete="off"
|
||||
></Search> */}
|
||||
{/*</div>*/}
|
||||
{/*<div className="fr">*/}
|
||||
{/*<span className="fl color-grey-6 mr30 font-16 mt5" id="search_name">{*/}
|
||||
{/*this.props.search_tags === null ? "" : this.props.search_tags*/}
|
||||
{/*}</span>*/}
|
||||
{/*<div className="fl mr5" style={{marginTop:'1px'}}>*/}
|
||||
{/*/!* <div className="controlblue"></div>*/}
|
||||
{/*<span className="controlring"></span> *!/*/}
|
||||
{/*<Switch*/}
|
||||
{/*className="controlbtn mr10 mt10 pr"*/}
|
||||
{/*size="small"*/}
|
||||
{/*style={{marginTop:'1px'}}*/}
|
||||
{/*onChange={this.onSwitchChange}*/}
|
||||
{/*/>*/}
|
||||
{/*</div>*/}
|
||||
{/*<span className="fl font-16 cdefault" data-tip-down="隐藏我学习的实训">隐藏我的</span>*/}
|
||||
|
||||
{/*</div>*/}
|
||||
{/*<span className="fr color-grey-6 mr30 font-16" id="search_name"></span>*/}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ShixunCardList;
|
@ -1,422 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import { Redirect } from 'react-router';
|
||||
|
||||
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
import { Spin } from 'antd';
|
||||
|
||||
import { TPMIndexHOC } from '../TPMIndexHOC';
|
||||
|
||||
import { SnackbarHOC } from 'educoder';
|
||||
|
||||
import ShixunCardList from './ShixunCardList';
|
||||
|
||||
import ShixunSearchBar from './ShixunSearchBar';
|
||||
|
||||
import ShixunCard from './ShixunCard';
|
||||
|
||||
import UpgradeModals from '../../modals/UpgradeModals';
|
||||
|
||||
const queryString = require('query-string');
|
||||
|
||||
const $ = window.$;
|
||||
|
||||
class ShixunsIndex extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state={
|
||||
order_by: "new",
|
||||
page:1,
|
||||
limit:16,
|
||||
keyword:"",
|
||||
status:0,
|
||||
diff:0,
|
||||
tag_level: 1,
|
||||
tag_id:'',
|
||||
middleshixundata:[],
|
||||
typepvisible:true,
|
||||
pages:1,
|
||||
search_tags:null,
|
||||
parsedid:undefined,
|
||||
newtag_level:undefined,
|
||||
newpalce:undefined,
|
||||
sort:"desc"
|
||||
}
|
||||
}
|
||||
componentDidMount(){
|
||||
|
||||
const upsystem=`/users/system_update.json`;
|
||||
axios.get(upsystem).then((response)=>{
|
||||
let updata=response.data;
|
||||
this.setState({
|
||||
updata:updata
|
||||
})
|
||||
}).catch((error)=>{
|
||||
console.log(error);
|
||||
})
|
||||
|
||||
|
||||
|
||||
let _keyword;
|
||||
if (window.__headSearchKeyword) {
|
||||
this.setState({ keyword: window.__headSearchKeyword })
|
||||
_keyword = window.__headSearchKeyword
|
||||
delete window.__headSearchKeyword
|
||||
}
|
||||
const parsed = queryString.parse(this.props.location.search);
|
||||
if(parsed.id===undefined&&parsed.type===undefined){
|
||||
let {order_by, tag_level, tag_id, page, limit, keyword, status, diff} = this.state;
|
||||
let params={
|
||||
order_by:order_by,
|
||||
tag_level:tag_level,
|
||||
tag_id:tag_id,
|
||||
page:page,
|
||||
limit:limit,
|
||||
keyword: _keyword || keyword ,
|
||||
status:status,
|
||||
diff:diff,
|
||||
sort: "desc"
|
||||
}
|
||||
this.shixunresultend(params);
|
||||
}else{
|
||||
let {order_by,page, limit, keyword, status, diff} = this.state;
|
||||
let nawparsed=parsed.type;
|
||||
let newpalce=parsed.palce;
|
||||
if(nawparsed==="rep"){
|
||||
nawparsed=1
|
||||
}
|
||||
else if(nawparsed==="sub"){
|
||||
nawparsed=2
|
||||
}else if(nawparsed==="tag"){
|
||||
nawparsed=3
|
||||
}
|
||||
let params={
|
||||
order_by:order_by,
|
||||
tag_level:nawparsed,
|
||||
tag_id:parsed.id,
|
||||
page:page,
|
||||
limit:limit,
|
||||
keyword: _keyword || keyword,
|
||||
status:status,
|
||||
diff:diff,
|
||||
sort: "desc"
|
||||
}
|
||||
this.setState({
|
||||
parsedid:parsed.id,
|
||||
newtag_level:nawparsed,
|
||||
newpalce:newpalce
|
||||
})
|
||||
this.shixunresultend(params);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
allUpdatashixunlist=()=>{
|
||||
let{sort,order_by}=this.state;
|
||||
|
||||
this.setState({
|
||||
tag_level: 1,
|
||||
tag_id:'',
|
||||
page: 1,
|
||||
limit: 16,
|
||||
keyword:'',
|
||||
status: 0,
|
||||
diff: 0,
|
||||
})
|
||||
|
||||
let params={
|
||||
order_by:order_by,
|
||||
tag_level: 1,
|
||||
tag_id:'',
|
||||
page: 1,
|
||||
limit: 16,
|
||||
keyword:'',
|
||||
status: 0,
|
||||
diff: 0,
|
||||
sort:sort
|
||||
}
|
||||
this.shixunresultend(params)
|
||||
}
|
||||
Updatasearchlist=(value)=>{
|
||||
if (value[1].tag_id === " ") {
|
||||
this.setState({
|
||||
keyword: ""
|
||||
})
|
||||
}
|
||||
this.setState({
|
||||
tag_level:value[0].tag_level,
|
||||
tag_id:value[1].tag_id,
|
||||
typepvisible:true
|
||||
})
|
||||
|
||||
let {order_by, sort, limit, keyword, status, diff} = this.state;
|
||||
|
||||
let params={
|
||||
order_by:order_by,
|
||||
tag_level:value[0].tag_level,
|
||||
tag_id:value[1].tag_id,
|
||||
page:1,
|
||||
limit:limit,
|
||||
keyword:keyword,
|
||||
status:status,
|
||||
diff:diff,
|
||||
sort:sort
|
||||
}
|
||||
|
||||
this.shixunresultend(params)
|
||||
}
|
||||
|
||||
StatusEnquiry=(key)=>{
|
||||
|
||||
let Vrl=`/shixuns.json`;
|
||||
let newstatus;
|
||||
let newdiff;
|
||||
if(key[0].type===1){
|
||||
this.setState({
|
||||
status: key[1].value,
|
||||
typepvisible:true
|
||||
})
|
||||
newstatus=key[1].value;
|
||||
newdiff=this.state.diff;
|
||||
}else if(key[0].type===2){
|
||||
this.setState({
|
||||
diff: key[1].value,
|
||||
typepvisible:true
|
||||
})
|
||||
newdiff=key[1].value;
|
||||
newstatus=this.state.status;
|
||||
}
|
||||
let params= {
|
||||
order_by:this.state.order_by,
|
||||
tag_level:this.state.tag_level,
|
||||
tag_id:this.state.tag_id,
|
||||
page:1,
|
||||
limit:this.state.limit,
|
||||
keyword:this.state.keyword,
|
||||
status:newstatus,
|
||||
diff:newdiff,
|
||||
}
|
||||
this.shixunresultend(params)
|
||||
|
||||
}
|
||||
|
||||
OnSearchInput=(value,type)=>{
|
||||
if(type===true){
|
||||
this.setState({
|
||||
keyword:value,
|
||||
typepvisible:true,
|
||||
pages:1
|
||||
})
|
||||
let {order_by, tag_level, tag_id, sort, limit, status, diff} = this.state;
|
||||
let params= {
|
||||
order_by:order_by,
|
||||
tag_level:tag_level,
|
||||
tag_id:tag_id,
|
||||
page:1,
|
||||
limit:limit,
|
||||
keyword:value,
|
||||
status:status,
|
||||
diff:diff,
|
||||
sort:sort
|
||||
}
|
||||
this.shixunresultend(params)
|
||||
}else{
|
||||
this.setState({
|
||||
keyword:value,
|
||||
pages:1
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
ShixunsSwitch=()=>{
|
||||
//types
|
||||
this.setState({
|
||||
order_by:"mine",
|
||||
typepvisible:true,
|
||||
pages:1,
|
||||
})
|
||||
let{tag_level,tag_id,page,limit,keyword,status,diff,sort}=this.state;
|
||||
let newsort=sort;
|
||||
if(newsort===undefined){
|
||||
newsort="desc"
|
||||
}
|
||||
let params= {
|
||||
order_by:"mine",
|
||||
tag_level:tag_level,
|
||||
tag_id:tag_id,
|
||||
page:1,
|
||||
limit:limit,
|
||||
keyword:keyword,
|
||||
status:status,
|
||||
diff:diff,
|
||||
sort:newsort
|
||||
}
|
||||
this.shixunresultend(params)
|
||||
}
|
||||
|
||||
|
||||
shixunsPage=(value)=>{
|
||||
this.setState({
|
||||
page:value,
|
||||
typepvisible:true,
|
||||
pages:value
|
||||
})
|
||||
let {order_by, tag_level, tag_id, limit, keyword, status, diff,sort} = this.state;
|
||||
let params= {
|
||||
order_by:order_by,
|
||||
tag_level:tag_level,
|
||||
tag_id:tag_id,
|
||||
page:value,
|
||||
limit:limit,
|
||||
keyword:keyword,
|
||||
status:status,
|
||||
diff:diff,
|
||||
sort:sort
|
||||
}
|
||||
|
||||
let Url=`/shixuns.json`;
|
||||
axios.get(Url,{
|
||||
params
|
||||
}).then((response)=> {
|
||||
if(response.status===200){
|
||||
this.setState({
|
||||
middleshixundata: response.data,
|
||||
typepvisible:false,
|
||||
});
|
||||
}
|
||||
}).catch((error)=>{
|
||||
console.log(error)
|
||||
});
|
||||
}
|
||||
ShixunsState=(val,type)=>{
|
||||
// sort,
|
||||
let {tag_level, tag_id, page, limit, keyword, status, diff,sort} = this.state;
|
||||
let newsort=sort;
|
||||
this.setState({
|
||||
order_by:type,
|
||||
typepvisible:true,
|
||||
pages:1,
|
||||
// sort:sort
|
||||
})
|
||||
|
||||
let params
|
||||
// let vals=false
|
||||
if(newsort===undefined){
|
||||
newsort="desc"
|
||||
}
|
||||
params= {
|
||||
order_by:type,
|
||||
tag_level:tag_level,
|
||||
tag_id:tag_id,
|
||||
page:1,
|
||||
limit:limit,
|
||||
keyword:keyword,
|
||||
status:status,
|
||||
diff:diff,
|
||||
sort:newsort
|
||||
}
|
||||
this.shixunresultend(params)
|
||||
}
|
||||
|
||||
Shixunsupcircles=(sort)=>{
|
||||
console.log(sort)
|
||||
this.setState({
|
||||
sort:sort
|
||||
})
|
||||
let {
|
||||
order_by,
|
||||
tag_level,
|
||||
tag_id,
|
||||
limit,
|
||||
keyword,
|
||||
status,
|
||||
diff,
|
||||
} = this.state;
|
||||
|
||||
|
||||
|
||||
let params= {
|
||||
order_by:order_by,
|
||||
tag_level:tag_level,
|
||||
tag_id:tag_id,
|
||||
page:1,
|
||||
limit:limit,
|
||||
keyword:keyword,
|
||||
status:status,
|
||||
diff:diff,
|
||||
sort:sort
|
||||
}
|
||||
this.shixunresultend(params)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
shixunresultend=(params)=>{
|
||||
let Url=`/shixuns.json`;
|
||||
axios.get(Url,{
|
||||
params
|
||||
}).then((response)=> {
|
||||
// TODO 有keyword返回值时 显示一共有多少条记录
|
||||
if(response.status===200){
|
||||
this.setState({
|
||||
search_tags:response.data.search_tags,
|
||||
middleshixundata: response.data,
|
||||
typepvisible:false,
|
||||
pages:1
|
||||
});
|
||||
}
|
||||
}).catch((error)=>{
|
||||
console.log(error)
|
||||
});
|
||||
}
|
||||
render() {
|
||||
let {middleshixundata, typepvisible, pages, search_tags, keyword,parsedid,newtag_level,newpalce} = this.state;
|
||||
|
||||
// console.log(this.state.updata)
|
||||
return (
|
||||
<div className="newMain clearfix backFAFAFA">
|
||||
{this.state.updata===undefined?"":<UpgradeModals
|
||||
{...this.state}
|
||||
/>}
|
||||
{/*<Spin spinning={typepvisible} size="large" style={{marginTop:'15%'}}>*/}
|
||||
<ShixunSearchBar
|
||||
Updatasearchlist={this.Updatasearchlist.bind(this)}
|
||||
allUpdatashixunlist={this.allUpdatashixunlist}
|
||||
StatusEnquiry={this.StatusEnquiry.bind(this)}
|
||||
OnSearchInput={this.OnSearchInput.bind(this)}
|
||||
keyword={keyword}
|
||||
parsedid={parsedid}
|
||||
newtag_level={newtag_level}
|
||||
newpalce={newpalce}
|
||||
/>
|
||||
|
||||
<ShixunCardList
|
||||
ShixunsState={this.ShixunsState.bind(this)}
|
||||
ShixunsSwitch={this.ShixunsSwitch.bind(this)}
|
||||
Shixunsupcircles={this.Shixunsupcircles.bind(this)}
|
||||
allUpdatashixunlist={this.allUpdatashixunlist}
|
||||
{...this.state}
|
||||
OnSearchInput={this.OnSearchInput.bind(this)}
|
||||
/>
|
||||
|
||||
<ShixunCard
|
||||
typepvisible={typepvisible}
|
||||
middleshixundata={middleshixundata.shixuns}
|
||||
totalcount={middleshixundata.total_count}
|
||||
pagination={middleshixundata.pagination}
|
||||
pages={pages}
|
||||
shixunsPage={this.shixunsPage.bind(this)}
|
||||
/>
|
||||
{/*</Spin>*/}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SnackbarHOC() (TPMIndexHOC ( ShixunsIndex ));
|
@ -1,114 +0,0 @@
|
||||
.shixunsdiffcult{
|
||||
width: 40px;
|
||||
height: 21px;
|
||||
overflow: hidden;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.rateYo{
|
||||
text-align: center;
|
||||
cursor: default;
|
||||
width: 111px;
|
||||
}
|
||||
|
||||
a:link, a:visited {
|
||||
color: #05101a;
|
||||
}
|
||||
|
||||
a:link{text-decoration:none;}
|
||||
|
||||
a:visited{text-decoration:none;}
|
||||
|
||||
a:hover{text-decoration:none;}
|
||||
|
||||
a:active{text-decoration:none;}
|
||||
|
||||
|
||||
.next-rating-overlay .next-icon{
|
||||
color: #FFA800!important;
|
||||
}
|
||||
|
||||
.displayblock{
|
||||
display:block;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.totalScore{
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
display: -webkit-flex;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.next-progress-line{
|
||||
width: 210px !important;
|
||||
margin-left: 10px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.next-progress-line-overlay-normal{
|
||||
background-color: #FFA800 !important;
|
||||
}
|
||||
.next-rating-base-disabled{
|
||||
cursor: default!important;
|
||||
}
|
||||
/*#challenge_begin {*/
|
||||
/*!*height: 40px !important;*!*/
|
||||
/*line-height: 30px;*/
|
||||
/*}*/
|
||||
.ant-modal-title{
|
||||
font-size: 16px;
|
||||
font-weight: bold !important;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.ml60{
|
||||
margin-left:20px;
|
||||
}
|
||||
|
||||
.marginauto{
|
||||
margin:0 auto;
|
||||
}
|
||||
.margin152{
|
||||
margin-left: 152px;
|
||||
}
|
||||
|
||||
.margin-tp26{
|
||||
margin-top: -26px;
|
||||
}
|
||||
.edu-h315{
|
||||
height:315px;
|
||||
}
|
||||
|
||||
.height39 {
|
||||
height: 39px !important;
|
||||
}
|
||||
|
||||
#commentsStar{
|
||||
margin-top: -7px;
|
||||
width: 90px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.startbtnModal .ant-modal-content{
|
||||
background: transparent;
|
||||
box-shadow: 0 4px 12px transparent;
|
||||
}
|
||||
|
||||
.startbtnModal .ant-modal-content .ant-modal-body .ant-spin-spinning{
|
||||
margin-left: 45%;
|
||||
}
|
||||
|
||||
.mr51{
|
||||
margin-right:51px;
|
||||
}
|
||||
|
||||
.flexbannerright{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.width360{
|
||||
width:360px;
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
#myshixuns_count{
|
||||
text-decoration:none !important;
|
||||
}
|
||||
#created_at{
|
||||
text-decoration:none !important;
|
||||
}
|
||||
.shixun_repertoire{
|
||||
cursor: pointer ;
|
||||
}
|
||||
.next-btn-medium:hover{
|
||||
color: #4CACFF;
|
||||
border:1px solid #4CACFF;
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
.iconfontShixunSearchBar{
|
||||
z-index: 1000;
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.diffSelect{
|
||||
margin-left:20px !important;
|
||||
}
|
||||
.ant-input-search-button{
|
||||
/*margin-right: 10px;*/
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
.Mousebox{
|
||||
width: 800px !important;
|
||||
}
|
||||
.subshaicontent a{
|
||||
height:30px;
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
.ml350 {
|
||||
margin-left: 40%;
|
||||
}
|
||||
|
||||
.ml32 {
|
||||
margin-left: 32%;
|
||||
}
|
||||
|
||||
.square-img{
|
||||
min-height: 210px;
|
||||
}
|
||||
.task-hide{
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
.backFAFAFA{
|
||||
background:#FAFAFA;
|
||||
}
|
||||
|
||||
.demo {
|
||||
width: 500px;
|
||||
background-color: #0dcecb;
|
||||
text-align: center;
|
||||
padding:50px;
|
||||
}
|
||||
.next-loading {
|
||||
margin-bottom: 5px;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.next-rating-overlay .next-icon{
|
||||
color: #FFA800!important;
|
||||
}
|
||||
|
||||
.custom-pagination {
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.ml425{
|
||||
margin-left:42.5%;
|
||||
margin-top:20px;
|
||||
}
|
Before Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in new issue