Merge branch 'hotfix_gitlink' of http://106.75.45.236:3000/tongChong/forgeplus-react into feature_style

This commit is contained in:
何童崇 2022-06-15 17:11:03 +08:00
commit c2b1808cab
9 changed files with 58 additions and 24 deletions

View File

@ -27,7 +27,7 @@
margin-left: 15px;
}
.currentMenu{
.ant-dropdown-menu.currentMenu{
width: 120px;
text-align: center;
padding:0px;

View File

@ -688,6 +688,12 @@ class Detail extends Component {
() => (<WikiEdit {...this.props} {...this.state} {...common} />)
}
></Route>
{/* wiki具体某一个地址 */}
<Route path="/:owner/:projectsId/wiki/:wikiName"
render={
(props) => (<Wiki {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
{/* wiki */}
<Route path="/:owner/:projectsId/wiki"
render={

View File

@ -9,7 +9,7 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur
const [ menuName , setMenuName ] = useState(undefined);
const [ visible , setVisible ] = useState(false);
useEffect(()=>{
if(list){
if(Array.isArray(list)){
// banner
let a = list.filter(item=>item.menu_name === "resources");
if((pathname && pathname==="source") && (a && a.length === 0)){

View File

@ -1,6 +1,6 @@
import React, { Component } from "react";
import { Link } from "react-router-dom";
import { Tag } from "antd";
import { Tag, Tooltip } from "antd";
import { AlignCenter } from '../Component/layout';
import { getImageUrl, turnbar } from "educoder";
import "./merge.css";
@ -157,7 +157,7 @@ class MergeItem extends Component {
"--"
)}
</li>
<li>{item.version || "--"}</li>
<li>{item.version ? <Tooltip placement="topLeft" title={item.version}>{item.version}</Tooltip> : "--"}</li>
<li>
<div

View File

@ -1,6 +1,6 @@
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { Popconfirm } from 'antd'
import { Popconfirm,Tooltip } from 'antd'
import { TagInfo } from '../Utils/TagColor';
class OrderItem extends Component {
constructor(props) {
@ -84,7 +84,9 @@ class OrderItem extends Component {
}
</li>
<li>{item.tracker || "--"}</li>
{ !mile ?<li>{item.version || "--"}</li>:""}
{!mile ? <li>
{item.version ? <Tooltip placement="topLeft" title={item.version}>{item.version}</Tooltip> : "--"}
</li> : ""}
<li>{item.issue_status || "--"}</li>
<li style={{color:`${item.done_ratio === "100%"?"#28BD6C":"#F73030"}`}}>{item.done_ratio || "--"}</li>
<li>

View File

@ -116,11 +116,11 @@ class order extends Component {
};
// 获取列表数据
getIssueList = (status_type, begin, end) => {
getIssueList = (status_type,) => {
this.setState({
isSpin: true
})
const { select_params } = this.state;
const { select_params ,begin,end} = this.state;
const { projectsId, owner } = this.props.match.params;
const url = `/${owner }/${projectsId}/issues.json`;
axios
@ -282,13 +282,17 @@ class order extends Component {
// 翻页
ChangePage = (page) => {
window.scrollTo(0,0);
const { status_type } = this.state;
const { status_type,select_params } = this.state;
this.setState({
isSpin: true,
checkedValue: [],
all: false,
select_params:{
...select_params,
page
}
},()=>{
this.state.select_params.page=page;
// this.state.select_params.page=page;
this.getIssueList(status_type);
});
};
@ -432,18 +436,28 @@ class order extends Component {
// 修改开始时间
changeBeginTime = (data, value) => {
const { status_type } = this.state;
const { status_type,select_params } = this.state;
this.setState({
begin: value
begin: value,
select_params:{
...select_params,
page:1
}
},()=>{
this.getIssueList(status_type, value, this.state.end);
})
this.getIssueList(status_type, value, this.state.end);
}
changeEndTime = (data, value) => {
const { status_type } = this.state;
const { status_type,select_params } = this.state;
this.setState({
end: value
})
this.getIssueList(status_type, this.state.begin, value);
end: value,
select_params:{
...select_params,
page:1
}
},()=>{
this.getIssueList(status_type, this.state.begin, value);
});
}
// 选择列表里面的checkbox

View File

@ -19,7 +19,7 @@ export default (props) => {
let projectsId = match.params.projectsId;
let owner = match.params.owner;
let wikiName = match.params.wikiName;
const [fileArrInit, setFileArrInit] = useState(null);
const [checkItem, setCheckItem] = useState({});
const [itemDetail, setItemDetail] = useState({});
@ -40,7 +40,12 @@ export default (props) => {
setFileArr(res.data);
setFileArrInit(res.data);
if (res.data.length) {
setCheckItem(res.data[0]);
if (wikiName) {
let activeItem = res.data.filter(item => { return item.name == wikiName })[0] || res.data[0];
setCheckItem(activeItem)
} else {
setCheckItem(res.data[0]);
}
};
} else {
setFileArr([]);
@ -191,6 +196,11 @@ export default (props) => {
},
};
function changeitem(item){
history.push(`/${owner}/${projectsId}/wiki/${item.name}`)
setCheckItem(item);
}
return (
< Spin spinning={!fileArrInit} className="opacitySpin">
{fileArrInit && fileArrInit.length ?
@ -234,7 +244,7 @@ export default (props) => {
{
fileArr.map(item => {
return <div className="wiki-nav-title-parent" key={item.name}>
<div className={`wiki-nav-title ${item.name === checkItem.name ? 'active' : ''}`} onClick={() => { setCheckItem(item) }}>
<div className={`wiki-nav-title ${item.name === checkItem.name ? 'active' : ''}`} onClick={() => { changeitem(item) }}>
<div className="nav-title-left">
<i className="iconfont icon-wenjianjia2 mr3"></i>
<span className="nav-title-left-text">{item.name}</span>
@ -266,7 +276,7 @@ export default (props) => {
{itemDetail.image_url && <img alt="头像" className="head-log-small" src={getImageUrl(`/${itemDetail.image_url}`)} />}
<span >{itemDetail.userName}</span>
</span>
<span className="time-ago">上次修改于{checkItem.commit ? timeAgo(checkItem.commit.author.when):'刚刚'}</span>
<span className="time-ago">上次修改于{checkItem.commit ? timeAgo(checkItem.commit.author.when) : '刚刚'}</span>
</div>
{permission && <Button type="primary" onClick={goEdit}>编辑</Button>}
</div>

View File

@ -23,6 +23,8 @@ function Check({ current_user, showNotification, history }) {
const [taskId, setTaskId] = useState();
const [havePass, setHavePass] = useState(false);
const disabledCheck = new Date().getTime() > new Date('2022-07-01').getTime();
const columns = [
{
title: '学生姓名',
@ -128,8 +130,8 @@ function Check({ current_user, showNotification, history }) {
return (
<div className='actionBox'>
{
text ? <Button type="default" onClick={() => { checkStudent(record.id, 0) }}>撤销</Button> :
<Button type="primary" disabled={havePass} onClick={() => { checkStudent(record.id, 1) }}>通过</Button>
text ? <Button disabled={disabledCheck} type="default" onClick={() => { checkStudent(record.id, 0) }}>撤销</Button> :
<Button disabled={disabledCheck} type="primary" disabled={havePass} onClick={() => { checkStudent(record.id, 1) }}>通过</Button>
}
</div>
)

View File

@ -27,7 +27,7 @@ body>.-task-title {
width: 100%;
height:58px;
min-width: 1200px;
z-index: 1000;
z-index: 1031;
position: fixed;
background: #1B2440;
color: #fff;