调整版本库

dev_new_shixunsrepository
杨树明 5 years ago
parent 04ddbef336
commit bf4e553035

@ -114,7 +114,8 @@ class TPMRepositoryComponent extends Component {
}
// listItem 如果是num则是通过面包屑点击过来的取pathArray的子集
fetchRepo = (listItem) => {
console.log(1)
debugger
const { pathArray } = this.state;
let newPathArray = pathArray.slice(0)

@ -2,6 +2,7 @@ import React, { Component } from 'react';
import axios from 'axios';
import { trace_collapse, info } from 'educoder';
import RepositoryCodeEditor from './shixunchild/Repository/RepositoryCodeEditor';
import {debuggerCode} from "../../redux/actions/ojForUser";
class TPMRepositoryComponentdetails extends Component {
constructor(props) {
@ -64,6 +65,7 @@ class TPMRepositoryComponentdetails extends Component {
}
fetchCode = (newPathArray) => {
const path = newPathArray.join('/')
debugger
// https://testeduplus2.educoder.net/shixuns/3ozvy5f8/file_content.json
this.setContentWidth100(true)
@ -105,7 +107,8 @@ class TPMRepositoryComponentdetails extends Component {
}
// listItem 如果是num则是通过面包屑点击过来的取pathArray的子集
fetchRepo = (listItem) => {
console.log(2)
debugger
const { pathArray } = this.state;
let newPathArray = pathArray.slice(0)

@ -39,7 +39,7 @@
}
.color5091FF{
color:#5091FF;
color:#5091FF !important;
}
.height7052pxRepositor{
@ -62,3 +62,7 @@
.color888{
color:#888888
}
.padding0-12{
padding: 12px 0px;
}

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import {getImageUrl} from "educoder";
import RepositoryDirectories from './RepositoryDirectories';
import { Button ,Tree,Icon,Modal} from "antd";
import { Button ,Tree,Icon,Modal,Tooltip} from "antd";
import axios from 'axios';
import {Link} from 'react-router-dom';
import RepositoryCombinePath from './RepositoryCombinePath';
@ -202,12 +202,12 @@ class Repository extends Component {
<div className={"fl copy_rep_contentbox"}>
<input type="text" id="copy_rep_content" className="fl url-input mt2"
defaultValue={ git_url } style={{width: 266}}/>
<a onClick={() => {
jsCopy()
}} data-tip-down="点击复制版本库地址"
className="fl ml5">
<Tooltip placement="topLeft" title={"点击复制版本库"}>
<a onClick={() => {jsCopy()}} className="fl ml5">
<i className="iconfont icon-fuzhi2 colorbe" style={{lineHeight: '18px'}}></i>
</a>
</Tooltip>
</div>
<style>
{`
@ -225,7 +225,7 @@ class Repository extends Component {
#repository_url_tip {
top: 30px !important;
left:161px !important;
left:111px !important;
width: 292px !important;
}
`}
@ -321,7 +321,7 @@ class Repository extends Component {
{
trees === undefined || trees === null ||trees.length===0? <RepositoryNoneData></RepositoryNoneData>:
<div className={"padding020Repository"}>
{commits===undefined?"":commits===null||commits.length===0?"":<div className=" padding10-20 clearfix height7052pxRepositor borbotF4">
{commits===undefined?"":commits===null||commits.length===0?"":<div className="padding0-12 clearfix height7052pxRepositor borbotF4">
<img alt={author.name} className="radius fl mr10 mt5"
height="35"
src={getImageUrl(`images/`+commits[0].author.image_url)}
@ -340,7 +340,9 @@ class Repository extends Component {
</a>
</div>}
<div className="padding20" style={{minHeight: '372px'}}>
{/*className="padding20" */}
<div style={{minHeight: '372px'}}>
<div>
{/* 当前目录位置 */}
<div className={"mb10"}>
@ -364,10 +366,29 @@ class Repository extends Component {
{/* })}*/}
{/*</div>*/}
{ this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?
<Button size={"small"} className={"fr"} type="link" onClick={this.showDeleteConfirm}><Icon type="delete" /></Button>:""}
<div className={"both"}></div>
<DirectoryTree multiple defaultExpandAll checkable onSelect={this.onSelectDirectoryTree} onCheck={this.onCheck}>
{/*{ this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?*/}
{/* <Button size={"small"} className={"fr"} type="link" onClick={this.showDeleteConfirm}><Icon type="delete" /></Button>:""}*/}
{/*<div className={"both"}></div>*/}
<style>
{
`
.reposanttreeswitcher .ant-tree-switcher{
display: none !important;
}
`
}
</style>
<DirectoryTree
className={"reposanttreeswitcher"}
// multiple
defaultExpandAll
// checkable
onSelect={this.onSelectDirectoryTree}
// onCheck={this.onCheck}
>
{ trees === undefined ?"": trees === null || trees.length===0?"":trees.map((item, index) => {
return (
<TreeNode disableCheckbox={this.state.ischeckevalue===item.name?false:this.state.ischecke?true:item.type==='tree'?true:false} item={item} title={`${item.name}`} key={item.type==='tree'?"0-0":`0-0-${index}`} icon={item.type==='tree'?<i className="iconfont icon-xingzhuangjiehebeifen color-blue font-12" />:<i className="iconfont icon-xingzhuangjiehe color-blue font-12"/>} id={`file${index}`} key={index}>

@ -32,7 +32,7 @@ class RepositoryNoneData extends Component{
<div>此处存放本实训所需的所有代码等相关文件你可以通过以下两种方式来使用</div>
</div>
<div className="edu-nodata-p font-14">
<div className={"width490Repository"}><span className={"color5091FF"}>1Git客户端</span>使</div>
<div className={"width490Repository"}>1<span><a className={"color5091FF"} href="/forums/2784" target="_blank">Git客户端</a></span>使</div>
</div>
<div className="edu-nodata-p mb50 font-14">
<div className={"width490Repository"}>2直接在平台上创建文件目录以及相关代码文件</div>

Loading…
Cancel
Save