Merge pull request 'issue' (#303) from hc1913847458/forgeplus-react:gitlink_server into gitlink_server

This commit is contained in:
xxq250 2021-11-30 18:37:23 +08:00
commit 54858bcd39
2 changed files with 11 additions and 5 deletions

View File

@ -124,7 +124,9 @@ class Activity extends Component{
</Menu> </Menu>
) )
render(){ render(){
const { time , data , page , project_trends , isSpin , pr_count , new_pr_count , close_issues_count , open_issues_count , pr_all_count ,issues_count } = this.state; const { time , data , page , project_trends , isSpin ,
pr_count , new_pr_count , close_issues_count , open_issues_count , pr_all_count ,issues_count,
type,status } = this.state;
let name = time ? ARRAY.filter(item=>item.id === parseInt(time)) :[{name:"全部"}]; let name = time ? ARRAY.filter(item=>item.id === parseInt(time)) :[{name:"全部"}];
const first_per = pr_all_count > 0 ? `${parseFloat(pr_count/pr_all_count).toFixed(2)*100}%` :"50%"; const first_per = pr_all_count > 0 ? `${parseFloat(pr_count/pr_all_count).toFixed(2)*100}%` :"50%";
@ -156,19 +158,19 @@ class Activity extends Component{
<ul className="percentBox"> <ul className="percentBox">
<li> <li>
<span className="purple">{data && data.pr_count}</span> <span className="purple">{data && data.pr_count}</span>
<span className="change" onClick={()=>this.changeTrends("PullRequest","delay")}>已处理的合并请求</span> <span className={type==="PullRequest" && status==="delay" ?`change active`:"change"} onClick={()=>this.changeTrends("PullRequest","delay")}>已处理的合并请求</span>
</li> </li>
<li> <li>
<span className="green">{data && data.new_pr_count}</span> <span className="green">{data && data.new_pr_count}</span>
<span className="change" onClick={()=>this.changeTrends("PullRequest","not_delay")}>未处理的合并请求</span> <span className={type==="PullRequest"&& status==="not_delay" ?`change active`:"change"} onClick={()=>this.changeTrends("PullRequest","not_delay")}>未处理的合并请求</span>
</li> </li>
<li> <li>
<span className="red">{data && data.close_issues_count}</span> <span className="red">{data && data.close_issues_count}</span>
<span className="change" onClick={()=>this.changeTrends("Issue","delay")}>已关闭的易修</span> <span className={type==="Issue"&& status==="delay" ?`change active`:"change"} onClick={()=>this.changeTrends("Issue","delay")}>已关闭的易修</span>
</li> </li>
<li> <li>
<span className="green">{data && data.open_issues_count}</span> <span className="green">{data && data.open_issues_count}</span>
<span className="change" onClick={()=>this.changeTrends("Issue","not_delay")}>未处理的易修</span> <span className={type==="Issue"&& status==="not_delay" ?`change active`:"change"} onClick={()=>this.changeTrends("Issue","not_delay")}>未处理的易修</span>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -107,6 +107,10 @@
color: black; color: black;
cursor: pointer; cursor: pointer;
} }
.change.active{
color: #466AFF !important;
}
.change:hover{ .change:hover{
color: #4183c4; color: #4183c4;
} }