dev_forum
杨树明 6 years ago
parent 81d38a670c
commit 156abe2c7b

@ -101,7 +101,7 @@ class GraduationTaskssettinglist extends Component{
grouping: result.data.have_grouping === true ? worklists[i].grouping_name : null, grouping: result.data.have_grouping === true ? worklists[i].grouping_name : null,
submitstate: worklists[i].status === 0 ? "未提交" : worklists[i].status === 1 ? "按时提交" : worklists[i].status === 2 ? "延时提交" : "", submitstate: worklists[i].status === 0 ? "未提交" : worklists[i].status === 1 ? "按时提交" : worklists[i].status === 2 ? "延时提交" : "",
turnovertime:worklists[i].update_time, turnovertime:worklists[i].update_time,
associationitems:result.data.have_grouping==false?"": {name:worklists[i].project_info === undefined ?"--": worklists[i].project_info.name,id:worklists[i].project_info.id}, associationitems:result.data.have_grouping==false?"": {name:worklists[i].project_info === undefined ?"--": worklists[i].project_info.name,id:worklists[i].project_info===undefined?"":worklists[i].project_info.id},
teacherrating: worklists[i].teacher_comment_score, teacherrating: worklists[i].teacher_comment_score,
crossrating: {cross_comment_score:worklists[i].cross_comment_score,cross_comment_num:worklists[i].cross_comment_num}, crossrating: {cross_comment_score:worklists[i].cross_comment_score,cross_comment_num:worklists[i].cross_comment_num},
finalscore: {work_score:worklists[i].final_score.work_score === null ? "--" : worklists[i].final_score.work_score, finalscore: {work_score:worklists[i].final_score.work_score === null ? "--" : worklists[i].final_score.work_score,
@ -754,6 +754,7 @@ class GraduationTaskssettinglist extends Component{
}, { }, {
title: '操作', title: '操作',
key: 'operation', key: 'operation',
width:'100px',
dataIndex: 'operation', dataIndex: 'operation',
className:'edu-txt-center', className:'edu-txt-center',
render: operation => ( render: operation => (

@ -877,7 +877,7 @@ class TPMBanner extends Component {
<div className="fr user_default_btn user_blue_btn mr20" <div className="fr user_default_btn user_blue_btn mr20"
style={{display: shixunsDetails.can_copy === false || shixunsDetails.can_copy === null ? "none" : "flex"}}> style={{display: shixunsDetails.can_copy === false || shixunsDetails.can_copy === null ? "none" : "flex"}}>
{this.props.identity < 6?<Tooltip placement="bottom" title={"基于这个实训修改形成新的实训"}> {this.props.identity < 8?<Tooltip placement="bottom" title={"基于这个实训修改形成新的实训"}>
<span className="flex1 edu-txt-center fl font-18" <span className="flex1 edu-txt-center fl font-18"
onClick={this.copyForkvisible} onClick={this.copyForkvisible}
style={{display: shixunsDetails.can_copy === false || shixunsDetails.can_copy === null ? "none" : "inline-block"}} style={{display: shixunsDetails.can_copy === false || shixunsDetails.can_copy === null ? "none" : "inline-block"}}

@ -598,7 +598,7 @@ export default class TPMsettings extends Component {
evaluate_script, exec_time, webssh, use_scope, trainee, can_copy, task_pass, test_set_permission, hide_code, code_hidden, forbid_copy, vnc,multi_webssh, evaluate_script, exec_time, webssh, use_scope, trainee, can_copy, task_pass, test_set_permission, hide_code, code_hidden, forbid_copy, vnc,multi_webssh,
opening_time, pod_exist_time,shixunmemoMDvalue opening_time, pod_exist_time,shixunmemoMDvalue
} = this.state; } = this.state;
let operateauthority=this.props.identity<4&&this.state.status==0||this.props.identity===1&&this.state.status==2||this.props.identity===1&&this.state.status==1; let operateauthority=this.props.identity<5&&this.state.status==0||this.props.identity===1&&this.state.status==2||this.props.identity===1&&this.state.status==1;
const description_editormd = this.description_editormd.getValue(); const description_editormd = this.description_editormd.getValue();
@ -1084,7 +1084,7 @@ export default class TPMsettings extends Component {
} }
const dateFormat = 'YYYY-MM-DD HH:mm:ss'; const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let operateauthority=this.props.identity===1?true:this.props.identity<4&&this.state.status==0?true:false; let operateauthority=this.props.identity===1?true:this.props.identity<5&&this.state.status==0?true:false;
return ( return (
<div className="educontent mt30 mb50" id="shixun_settings_show" onClick={this.bigopens} onMouseEnter={this.bigopens}> <div className="educontent mt30 mb50" id="shixun_settings_show" onClick={this.bigopens} onMouseEnter={this.bigopens}>
@ -1099,7 +1099,7 @@ export default class TPMsettings extends Component {
</a>:"" </a>:""
} }
{ {
this.props.identity < 4 && this.state.status==0? this.props.identity < 5 && this.state.status==0?
<a className="edu-default-btn edu-blueline-btn ml20 fr" <a className="edu-default-btn edu-blueline-btn ml20 fr"
onClick={()=>this.operateshixuns(1)}> onClick={()=>this.operateshixuns(1)}>
删除实训 删除实训
@ -1332,7 +1332,7 @@ export default class TPMsettings extends Component {
</Modal> </Modal>
{ {
this.props.identity<4||this.props.power==true? this.props.identity<5||this.props.power==true?
<a onClick={this.showModal} id="define_template" <a onClick={this.showModal} id="define_template"
className="color-orange-tip ml20 mt5 fl">使用自定义脚本</a> : "" className="color-orange-tip ml20 mt5 fl">使用自定义脚本</a> : ""
} }

@ -44,7 +44,8 @@
position:relative; position:relative;
} }
.newedboxheight{ .newedboxheight{
max-height:181px; max-height:204px;
overflow-y: auto;
} }
.newminheight{ .newminheight{
/*max-height: 670px;*/ /*max-height: 670px;*/

@ -239,7 +239,7 @@ class Challenges extends Component {
<p className="clearfix mb30"> <p className="clearfix mb30">
<span className="font-16 fl">简介</span> <span className="font-16 fl">简介</span>
<a style={{ display: this.props.identity < 4 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? "block" : 'none' }} <a style={{ display: this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
href={"/shixuns/" + id + "/settings?edit=1"} className="ring-green fr" href={"/shixuns/" + id + "/settings?edit=1"} className="ring-green fr"
data-tip-down="编辑"> data-tip-down="编辑">
<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" /> <img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" />
@ -262,7 +262,7 @@ class Challenges extends Component {
<p className="clearfix mb10"> <p className="clearfix mb10">
<span className="font-16 fl">全部任务</span> <span className="font-16 fl">全部任务</span>
{this.props.identity < 4 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ? {this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
<Link to={"/shixuns/" + id + "/challenges/new"} <Link to={"/shixuns/" + id + "/challenges/new"}
className="white-btn edu-greenline-btn fr" className="white-btn edu-greenline-btn fr"
// data-tip-down="新增代码编辑类型任务" // data-tip-down="新增代码编辑类型任务"
@ -275,7 +275,7 @@ class Challenges extends Component {
</Link> : "" </Link> : ""
} }
{this.props.identity < 4 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ? {this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
<Link to={"/shixuns/" + id + "/challenges/newquestion"} <Link to={"/shixuns/" + id + "/challenges/newquestion"}
className="white-btn edu-greenline-btn fr mr20" className="white-btn edu-greenline-btn fr mr20"
// data-tip-down="新增选择题类型任务" // data-tip-down="新增选择题类型任务"
@ -333,7 +333,7 @@ class Challenges extends Component {
</span> </span>
<span className="mr15 font-16 fl">{key+1}</span> <span className="mr15 font-16 fl">{key+1}</span>
{this.props.identity<4? {this.props.identity<5?
item.st === 1 ? item.st === 1 ?
<a onClick={() => this.startshixunCombat(this.props.identity, item.challenge_id, "/editquestion")} <a onClick={() => this.startshixunCombat(this.props.identity, item.challenge_id, "/editquestion")}
className="font-16 color05101a">{item.name}</a> className="font-16 color05101a">{item.name}</a>
@ -359,7 +359,7 @@ class Challenges extends Component {
{item.delete_url != undefined && {item.delete_url != undefined &&
<Tooltip placement="bottom" title={"删除"}> <Tooltip placement="bottom" title={"删除"}>
<a onClick={() => this.delOperations(item.challenge_id)} <a onClick={() => this.delOperations(item.challenge_id)}
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }} style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }}
className="fl ring-op-green mr25"> className="fl ring-op-green mr25">
<img src={getImageUrl("images/educoder/icon/close.svg")} <img src={getImageUrl("images/educoder/icon/close.svg")}
className="fl mt5 ml5" /> className="fl mt5 ml5" />
@ -371,7 +371,7 @@ class Challenges extends Component {
{item.up_url != undefined && {item.up_url != undefined &&
<Tooltip placement="bottom" title={"向上移动"}> <Tooltip placement="bottom" title={"向上移动"}>
<a onClick={operationstrue===true?"":() => this.operations(item.challenge_id, "up")} <a onClick={operationstrue===true?"":() => this.operations(item.challenge_id, "up")}
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }} style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }}
className="fl ring-op-green mr25"> className="fl ring-op-green mr25">
<img src={getImageUrl("images/educoder/icon/moveup.svg")} <img src={getImageUrl("images/educoder/icon/moveup.svg")}
className="fl mt2 ml4" /> className="fl mt2 ml4" />
@ -381,7 +381,7 @@ class Challenges extends Component {
{item.down_url != undefined && {item.down_url != undefined &&
<Tooltip placement="bottom" title={"向下移动"}> <Tooltip placement="bottom" title={"向下移动"}>
<a onClick={operationstrue===true?"":() => this.operations(item.challenge_id, "down")} <a onClick={operationstrue===true?"":() => this.operations(item.challenge_id, "down")}
style={{ display: this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status=== 0 ? "block" : 'none' }} style={{ display: this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status=== 0 ? "block" : 'none' }}
className="fl ring-op-green mr25"> className="fl ring-op-green mr25">
<img src={getImageUrl("images/educoder/icon/movedown.svg")} className="fl mt2 ml4" /> <img src={getImageUrl("images/educoder/icon/movedown.svg")} className="fl mt2 ml4" />
</a> </a>
@ -393,7 +393,7 @@ class Challenges extends Component {
item.st === 1 ? item.st === 1 ?
<Tooltip placement="bottom" title={"编辑"}> <Tooltip placement="bottom" title={"编辑"}>
<a <a
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status< 3 ? "block" : 'none' }} style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status< 3 ? "block" : 'none' }}
href={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editquestion"} href={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editquestion"}
className="fl ring-green"> className="fl ring-green">
<img src={getImageUrl("images/educoder/icon/edit.svg")} <img src={getImageUrl("images/educoder/icon/edit.svg")}
@ -403,7 +403,7 @@ class Challenges extends Component {
: :
<Tooltip placement="bottom" title={"编辑"}> <Tooltip placement="bottom" title={"编辑"}>
<a <a
style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status < 3 ? "block" : 'none' }} style={{ display:this.props.user.admin===true?"block":this.props.identity < 5 && ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
href={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editcheckpoint"} href={"/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + item.challenge_id + "/editcheckpoint"}
className="fl ring-green"> className="fl ring-green">
<img src={getImageUrl("images/educoder/icon/edit.svg")} <img src={getImageUrl("images/educoder/icon/edit.svg")}
@ -451,9 +451,9 @@ class Challenges extends Component {
</Tooltip> </Tooltip>
: item.status === 1 && newstatus === 1 ? : item.status === 1 && newstatus === 1 ?
<Tooltip placement="bottom" title={this.props.identity<4?"直接挑战":"请先完成前序关卡"}> <Tooltip placement="bottom" title={this.props.identity<5?"直接挑战":"请先完成前序关卡"}>
<a className={this.props.identity<4&&item.open_game!=""?"edu-default-btn edu-blueback-btn fr Finish_button":"edu-default-btn edu-greyback-btn fr Finish_button"} <a className={this.props.identity<5&&item.open_game!=""?"edu-default-btn edu-blueback-btn fr Finish_button":"edu-default-btn edu-greyback-btn fr Finish_button"}
onClick={this.props.identity<4&&item.open_game!=""?()=>this.startshixunCombat(false,undefined, item.open_game):""} onClick={this.props.identity<5&&item.open_game!=""?()=>this.startshixunCombat(false,undefined, item.open_game):""}
style={{marginTop: '-2px'}}>直接挑战</a> style={{marginTop: '-2px'}}>直接挑战</a>
</Tooltip> : "" : "" </Tooltip> : "" : ""
@ -462,9 +462,9 @@ class Challenges extends Component {
{ {
item.status === 0 ? item.status === 0 ?
<Tooltip placement="bottom" title={this.props.identity<4&&item.open_game!=""?"直接挑战":"请先完成前序关卡"}> <Tooltip placement="bottom" title={this.props.identity<5&&item.open_game!=""?"直接挑战":"请先完成前序关卡"}>
<a className={this.props.identity<4&&item.open_game!=""?"edu-default-btn edu-blueback-btn fr Finish_button":"edu-default-btn edu-greyback-btn fr Finish_button"} <a className={this.props.identity<5&&item.open_game!=""?"edu-default-btn edu-blueback-btn fr Finish_button":"edu-default-btn edu-greyback-btn fr Finish_button"}
onClick={this.props.identity<4&&item.open_game!=""?()=>this.startshixunCombat(false,undefined, item.open_game):""} onClick={this.props.identity<5&&item.open_game!=""?()=>this.startshixunCombat(false,undefined, item.open_game):""}
style={{marginTop: '-2px'}}>直接挑战</a> style={{marginTop: '-2px'}}>直接挑战</a>
</Tooltip>: "" </Tooltip>: ""
} }

@ -1,110 +1,110 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Redirect } from 'react-router'; import { Redirect } from 'react-router';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import classNames from 'classnames'; import classNames from 'classnames';
import { getImageUrl, toPath } from 'educoder'; import { getImageUrl, toPath } from 'educoder';
import axios from 'axios'; import axios from 'axios';
import { CircularProgress } from 'material-ui/Progress'; import { CircularProgress } from 'material-ui/Progress';
const $ = window.$; const $ = window.$;
class Propaedeutics extends Component { class Propaedeutics extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state={ this.state={
PropaedeuticsListcontent:undefined, PropaedeuticsListcontent:undefined,
shixunId:undefined shixunId:undefined
} }
} }
componentDidMount() { componentDidMount() {
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
this.setState({ this.setState({
shixunId:id shixunId:id
}) })
let url="/shixuns/"+id+"/propaedeutics.json"; let url="/shixuns/"+id+"/propaedeutics.json";
axios.get(url).then((response) => { axios.get(url).then((response) => {
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
}else{ }else{
if(response.data.content[0]!=null){ if(response.data.content[0]!=null){
this.setState({ this.setState({
PropaedeuticsListcontent:response.data.content[0] PropaedeuticsListcontent:response.data.content[0]
}) })
}else{ }else{
this.setState({ this.setState({
PropaedeuticsListcontent:"" PropaedeuticsListcontent:""
}) })
} }
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}); });
} }
updatamakedown=(id)=>{ updatamakedown=(id)=>{
setTimeout(()=>{ setTimeout(()=>{
var shixunDescr = window.editormd.markdownToHTML(id, { var shixunDescr = window.editormd.markdownToHTML(id, {
htmlDecode: "style,script,iframe", htmlDecode: "style,script,iframe",
taskList: true, taskList: true,
tex: true, tex: true,
flowChart: true, flowChart: true,
sequenceDiagram: true sequenceDiagram: true
}); });
$("#"+id+" p:first").addClass("ReactMarkdown"); $("#"+id+" p:first").addClass("ReactMarkdown");
$('#collaborators_list_info').show() $('#collaborators_list_info').show()
}, 200) }, 200)
} }
render() { render() {
let {loadingContent} = this.props; let {loadingContent} = this.props;
let {PropaedeuticsListcontent,shixunId}=this.state let {PropaedeuticsListcontent,shixunId}=this.state
if(PropaedeuticsListcontent!=undefined){ if(PropaedeuticsListcontent!=undefined){
this.updatamakedown("ReactMarkdown") this.updatamakedown("ReactMarkdown")
} }
return ( return (
<React.Fragment> <React.Fragment>
<p className="clearfix mb10 pl20 pr20" style={{display:this.props.identity<4&&this.props.status<3?"block":'none'}} > <p className="clearfix mb10 pl20 pr20" style={{display:this.props.identity<5&&this.props.status<3?"block":'none'}} >
<a href={"/shixuns/"+shixunId +"/update_propaedeutics"}className="ring-green fr mt8" id="edit_propaedeutics" <a href={"/shixuns/"+shixunId +"/update_propaedeutics"}className="ring-green fr mt8" id="edit_propaedeutics"
data-tip-down="编辑"><img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" /></a> data-tip-down="编辑"><img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" /></a>
</p> </p>
{ {
loadingContent ? loadingContent ?
<CircularProgress size={40} thickness={3} <CircularProgress size={40} thickness={3}
style={{ marginLeft: 'auto', marginRight: 'auto', marginTop: '200px', display: 'block' }}/> : style={{ marginLeft: 'auto', marginRight: 'auto', marginTop: '200px', display: 'block' }}/> :
<div className="pl20" id="collaborators_list_info" style={{display: 'none',minHeight: '640px',padding:'10px'}}> <div className="pl20" id="collaborators_list_info" style={{display: 'none',minHeight: '640px',padding:'10px'}}>
{PropaedeuticsListcontent===undefined?"": {PropaedeuticsListcontent===undefined?"":
<p id="ReactMarkdown"> <p id="ReactMarkdown">
{PropaedeuticsListcontent === undefined ||PropaedeuticsListcontent === ""? {PropaedeuticsListcontent === undefined ||PropaedeuticsListcontent === ""?
<div className="alltask"> <div className="alltask">
<div className="alltask"> <div className="alltask">
<div className="edu-tab-con-box clearfix edu-txt-center"> <div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/> <img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">暂无数据哦~</p> <p className="edu-nodata-p mb20">暂无数据哦~</p>
</div> </div>
</div> </div>
</div> </div>
:<textarea>{PropaedeuticsListcontent}</textarea>} :<textarea>{PropaedeuticsListcontent}</textarea>}
</p> </p>
} }
</div> </div>
} }
</React.Fragment> </React.Fragment>
); );
} }
} }
export default Propaedeutics; export default Propaedeutics;

@ -1,247 +1,255 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Redirect } from 'react-router'; import { Redirect } from 'react-router';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import classNames from 'classnames'; import classNames from 'classnames';
import axios from 'axios'; import axios from 'axios';
import { trace, trace_collapse ,getImageUrl, toPath} from "educoder"; import { trace, trace_collapse ,getImageUrl, toPath} from "educoder";
import RepositoryDirectories from './RepositoryDirectories' import RepositoryDirectories from './RepositoryDirectories'
const $ = window.$; const $ = window.$;
// 点击按钮复制功能 // 点击按钮复制功能
function jsCopy(){ function jsCopy(){
var e = document.getElementById("copy_rep_content"); var e = document.getElementById("copy_rep_content");
e.select(); e.select();
document.execCommand("Copy"); document.execCommand("Copy");
} }
/** /**
提交记录 提交记录
使用指南 使用指南
*/ */
class Repository extends Component { class Repository extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
} }
componentDidMount() { componentDidMount() {
} }
onRepoFileClick = (item) => { onRepoFileClick = (item) => {
this.props.fetchRepo(item) this.props.fetchRepo(item)
} }
render() { render() {
let { match, author, git_url, lastest_commit, trees, commits,repositoryLoading, pathArray } = this.props; let { match, author, git_url, lastest_commit, trees, commits,repositoryLoading, pathArray } = this.props;
if (!author) { if (!author) {
author = {} author = {}
} }
let userauthority=false; let userauthority=false;
if(this.props.author!=undefined){ if(this.props.author!=undefined){
userauthority=this.props.author.login===""||this.props.author.user_id===""||this.props.author.login===null||this.props.author.user_id===null; userauthority=this.props.author.login===""||this.props.author.user_id===""||this.props.author.login===null||this.props.author.user_id===null;
} }
// console.log(commits) // console.log(commits)
return ( return (
<React.Fragment> <React.Fragment>
{/* jfinalshop/WebRoot */} {/* jfinalshop/WebRoot */}
{/* <div className="pt30 pl20 pr20 pb30 mb10 clearfix" style={{background: '#fff'}}> {/* <div className="pt30 pl20 pr20 pb30 mb10 clearfix" style={{background: '#fff'}}>
<span className="fl color-grey-6 font-16 cdefault mt1"> <span className="fl color-grey-6 font-16 cdefault mt1">
<i className="iconfont icon-fenzhi fl mr5"></i> <i className="iconfont icon-fenzhi fl mr5"></i>
<span className="fl mt2">分支&nbsp;1</span> <span className="fl mt2">分支&nbsp;1</span>
</span> </span>
<a href="https://www.educoder.net/forums/2784" target="_blank" <a href="https://www.educoder.net/forums/2784" target="_blank"
className="fr edu-default-btn edu-greenback-btn">Git使用指南</a> className="fr edu-default-btn edu-greenback-btn">Git使用指南</a>
</div> */} </div> */}
{ repositoryLoading ? <div style={{ minHeight: '500px'}}></div> : { repositoryLoading ? <div style={{ minHeight: '500px'}}></div> :
<div className="" id="collaborators_list_info"> <div className="" id="collaborators_list_info">
<div className="clearfix edu-back-white"> <div className="clearfix edu-back-white">
<div className="padding30-20 clearfix"> <div className="padding30-20 clearfix">
<div className="fl1 clearfix1 mr201"> <div className="fl1 clearfix1 mr201">
<div className="repositorytitle"> <div className="repositorytitle">
{/* <form acceptCharset="UTF-8" action="/shixuns/uznmbg54/repository/uznmbg54" {/* <form acceptCharset="UTF-8" action="/shixuns/uznmbg54/repository/uznmbg54"
id="revision_selector" method="get"> id="revision_selector" method="get">
<div style={{margin:0, padding:0, display:'inline'}}> <div style={{margin:0, padding:0, display:'inline'}}>
<input name="utf8" type="hidden" value="✓"></input> <input name="utf8" type="hidden" value="✓"></input>
</div> </div>
<label className="font-16 fl mr5">分支:</label> <label className="font-16 fl mr5">分支:</label>
<select className="winput-120-35 fl" id="branch" name="branch" defaultValue="master"> <select className="winput-120-35 fl" id="branch" name="branch" defaultValue="master">
<option value="master">master</option> <option value="master">master</option>
</select> </select>
<input id="rev" name="rev" size="8" type="hidden" value=""></input> <input id="rev" name="rev" size="8" type="hidden" value=""></input>
</form> */} </form> */}
<a href="https://www.educoder.net/forums/2784" target="_blank" <a href="https://www.educoder.net/forums/2784" target="_blank"
className=" guideBtn" >Git使用指南</a> className=" guideBtn" >Git使用指南</a>
<div className="fr font-12 color-grey-9 pr"> <div className="fr font-12 color-grey-9 pr">
<label className="fl">网址克隆</label> <label className="fl">网址克隆</label>
<input type="text" id="copy_rep_content" className="fl url-input" <input type="text" id="copy_rep_content" className="fl url-input"
defaultValue={ git_url } style={{width: 313}}/> defaultValue={ git_url } style={{width: 313}}/>
<a onClick={() => { <a onClick={() => {
jsCopy() jsCopy()
}} data-tip-down="点击复制版本库地址" }} data-tip-down="点击复制版本库地址"
className="fl ml5"> className="fl ml5">
<i className="iconfont icon-wangzhikelong color-orange-tip" style={{lineHeight: '18px'}}></i> <i className="iconfont icon-wangzhikelong color-orange-tip" style={{lineHeight: '18px'}}></i>
</a> </a>
<style> <style>
{` {`
.top-black-trangle { .top-black-trangle {
right: 68px; right: 68px;
} }
a.guideBtn { a.guideBtn {
color: #4CACFF !important; color: #4CACFF !important;
margin-left: 4px; margin-left: 4px;
} }
a.guideBtn:hover { a.guideBtn:hover {
text-decoration: underline; text-decoration: underline;
}`} }
</style>
{/* <a href="https://www.educoder.net/forums/2784" target="_blank" #repository_url_tip {
className="fr edu-default-btn edu-greenback-btn">Git使用指南</a> */} top: 30px !important;
left:132px !important;
width: 292px !important;
<a }
onClick={() => { $('#repository_url_tip').css('display') === 'none' `}
? $('#repository_url_tip').show() </style>
: $('#repository_url_tip').hide() }} {/* <a href="https://www.educoder.net/forums/2784" target="_blank"
className="fl ml6 mt1"> className="fr edu-default-btn edu-greenback-btn">Git使用指南</a> */}
<img src={getImageUrl("images/educoder/problem.png")}/>
</a>
<div className="invite-tip clearfix none" id="repository_url_tip" <a
style={{top: '33px', right: '-10px', width: '300px', display: 'none'}}> onClick={() => { $('#repository_url_tip').css('display') === 'none'
<span className="top-black-trangle" style={{"right":"9px"}}></span> ? $('#repository_url_tip').show()
<div className="padding20 invitecontent clearfix"> : $('#repository_url_tip').hide() }}
<p className="font-12 edu-txt-left">请上传当前实训中各个关卡涉及的所有文件<br/> className="fl ml6 mt1">
包括任务文件执行文件以及其他的必须文件<br/><br/> <img src={getImageUrl("images/educoder/problem.png")}/>
提交代码的方法<br/> <div className="invite-tip clearfix none" id="repository_url_tip"
1在电脑上安装Git tortoise客户端<br/> style={{top: '33px', right: '-10px', width: '300px', display: 'none'}}>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;或者其它熟悉的Git客户端<br/> <span className="top-black-trangle" style={{"right":"9px"}}></span>
2在Git客户端上向左侧的地址提交代码<br/><br/> <div className="padding20 invitecontent clearfix">
注意<br/> <p className="font-12 edu-txt-left">请上传当前实训中各个关卡涉及的所有文件<br/>
请在Git客户端要求填写时按照如下说明填写<br/> 包括任务文件执行文件以及其他的必须文件<br/><br/>
* 用户名使用您在本平台绑定的邮箱<br/> 提交代码的方法<br/>
* 口令使用您在本平台的登录口令 1在电脑上安装Git tortoise客户端<br/>
</p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;或者其它熟悉的Git客户端<br/>
</div> 2在Git客户端上向左侧的地址提交代码<br/><br/>
<p className="inviteTipbtn with100"><a 注意<br/>
onClick={() => { $('#repository_url_tip').hide(); }}>知道了</a></p> 请在Git客户端要求填写时按照如下说明填写<br/>
</div> * 用户名使用您在本平台绑定的邮箱<br/>
</div> * 口令使用您在本平台的登录口令
</div> </p>
</div>
</div> <p className="inviteTipbtn with100"><a
</div> onClick={() => { $('#repository_url_tip').hide(); }}>知道了</a></p>
</div>
<style> </a>
{`
.va_sub { </div>
vertical-align: sub; </div>
}
`} </div>
</style> </div>
{/* 用户、最近提交时间 */}
{ <style>
trees === undefined || trees === null ? <div className="alltask"> {`
<div className="edu-tab-con-box clearfix edu-txt-center"> .va_sub {
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/> vertical-align: sub;
<p className="edu-nodata-p mb20">暂无数据哦~</p> }
</div> `}
</div> : </style>
<div> {/* 用户、最近提交时间 */}
<div className="edu-back-skyblue padding10-20 clearfix"> {
<img alt={author.name} className="radius fl mr10" trees === undefined || trees === null ? <div className="alltask">
height="30" <div className="edu-tab-con-box clearfix edu-txt-center">
src={getImageUrl(`images/`+commits[0].author.image_url)} <img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
style={{display:userauthority===true?"none":"block"}} <p className="edu-nodata-p mb20">暂无数据哦~</p>
width="30"/> </div>
<a href={author.user_url} className="mr5 va_sub" target="_blank">{commits[0].author.name}</a> </div> :
<span className="color-grey-6 va_sub">提交于 <div>
<acronym title={commits[0].time}> <div className="edu-back-skyblue padding10-20 clearfix">
{commits===undefined?"":commits[0].time} <img alt={author.name} className="radius fl mr10"
</acronym> {commits===undefined?"":commits[0].title} height="30"
</span> src={getImageUrl(`images/`+commits[0].author.image_url)}
<a href={`/shixuns/${match.params.shixunId}/repository/${match.params.shixunId}/commits`} style={{display:userauthority===true?"none":"block"}}
className="color-grey-6 fr font-16 "> width="30"/>
<i className="iconfont icon-tijiaojilu font-18 fl mr5"></i> <a href={author.user_url} className="mr5 va_sub" target="_blank">{commits[0].author.name}</a>
<span className="fl mt2">提交记录</span> <span className="color-grey-6 va_sub">提交于
</a> <acronym title={commits[0].time}>
</div> {commits===undefined?"":commits[0].time}
</acronym> {commits===undefined?"":commits[0].title}
<div className="padding20" style={{minHeight: '372px'}}> </span>
<div className="bor-grey-e"> <a href={`/shixuns/${match.params.shixunId}/repository/${match.params.shixunId}/commits`}
{/* 当前目录位置 */} className="color-grey-6 fr font-16 ">
<RepositoryDirectories {...this.props}></RepositoryDirectories> <i className="iconfont icon-tijiaojilu font-18 fl mr5"></i>
<span className="fl mt2">提交记录</span>
<div className="versionFileList"> </a>
{trees.map((item, index) => { </div>
return (
<li id={`file${index}`} key={index} className=" file padding5-10"> <div className="padding20" style={{minHeight: '372px'}}>
<span style={{marginLeft: '0px'}} className="task-hide"> <div className="bor-grey-e">
<i className={`${item.type === 'tree' ? 'icon-wenjianjia' : 'icon-zuoye'} {/* 当前目录位置 */}
iconfont color-blue`}></i> <RepositoryDirectories {...this.props}></RepositoryDirectories>
<a
onClick={() => this.onRepoFileClick(item)}> <div className="versionFileList">
&nbsp;{item.name} {trees.map((item, index) => {
</a> return (
</span> <li id={`file${index}`} key={index} className=" file padding5-10">
</li> <span style={{marginLeft: '0px'}} className="task-hide">
) <i className={`${item.type === 'tree' ? 'icon-wenjianjia' : 'icon-zuoye'}
})} iconfont color-blue`}></i>
</div> <a
</div> onClick={() => this.onRepoFileClick(item)}>
</div> &nbsp;{item.name}
</div> </a>
} </span>
</li>
{/* 当前分支的文件 */} )
})}
</div> </div>
</div> </div>
} </div>
</React.Fragment> </div>
}
);
} {/* 当前分支的文件 */}
}
/* </div>
提交记录 </div>
<div className="pl20" id="collaborators_list_info"> }
{ RepositoryList===undefined?"":RepositoryList.commits.map((item,key)=>{ </React.Fragment>
// {"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 className="pl20" id="collaborators_list_info">
</div> { RepositoryList===undefined?"":RepositoryList.commits.map((item,key)=>{
) // {"email":"李暾","title":"2\n","id":"80cb6fc55a14bdd64a9c99913f416966238ed3de","time":"49年前"}
}) } return(
</div> <div>
<div>{item.email}</div>
<div>{item.title}</div>
<div>{item.id}</div>
<li id="dd422c22b14b69b3452f4953ff33bb67" className=" file padding5-10"> <div>{item.time}</div>
<span style={{marginLeft: '0px'}} className="task-hide"> </div>
<i className="iconfont icon-zuoye color-blue"></i> )
<a href="/shixuns/uznmbg54/repository/uznmbg54/master/shixun_entry/1-1.py">1-1.py</a> }) }
</span> </div>
</li>
<li id="dd422c22b14b69b3452f4953ff33bb67" className=" file padding5-10">
*/ <span style={{marginLeft: '0px'}} className="task-hide">
<i className="iconfont icon-zuoye color-blue"></i>
export default Repository; <a href="/shixuns/uznmbg54/repository/uznmbg54/master/shixun_entry/1-1.py">1-1.py</a>
</span>
</li>
*/
export default Repository;

Loading…
Cancel
Save