diff --git a/public/react/src/forge/Activity/Activity.js b/public/react/src/forge/Activity/Activity.js index ac75281c5..f4670718f 100644 --- a/public/react/src/forge/Activity/Activity.js +++ b/public/react/src/forge/Activity/Activity.js @@ -74,7 +74,14 @@ class Activity extends Component{ const { type,status,page } = this.state; this.getInfo(e.key,type,status,page); } - + //筛选 + changeTrends=(type,status)=>{ + this.setState({ + type,status + }) + const {time,page}=this.state; + this.getInfo(time,type,status,page); + } // 分页 ChangePage=(page)=>{ this.setState({ @@ -127,19 +134,19 @@ class Activity extends Component{ @@ -157,7 +164,7 @@ class Activity extends Component{ { project_trends && project_trends.map((item,key)=>{ return( - + ) }) } diff --git a/public/react/src/forge/Activity/ActivityItem.js b/public/react/src/forge/Activity/ActivityItem.js index 931d5d6bc..dfecf1c9a 100644 --- a/public/react/src/forge/Activity/ActivityItem.js +++ b/public/react/src/forge/Activity/ActivityItem.js @@ -6,21 +6,38 @@ import { getImageUrl } from 'educoder'; class ActivityItem extends Component{ render(){ + const { projectsId } = this.props.match.params; const { item } = this.props; return( -
-
-

- {item.name} - {item.trend_type} -

-

- - {item.user_name} - { item.created_at && 创建于{item.created_at}} -

-
-
+ + + {/* 如果是版本发布 */} + { item.trend_type==="VersionRelease"?  + + {item.name} + {item.trend_type} +

+ : + // 如果是工单 + item.trend_type==="Issue"? + + {item.name} + {item.trend_type} +

+ : + // 如果是合并请求 + + {item.name} + {item.trend_type} +

+ } + + + {item.user_name} + { item.created_at && 创建于{item.created_at}} +

+ + ) } } diff --git a/public/react/src/forge/Activity/activity.css b/public/react/src/forge/Activity/activity.css index c9fa87e58..e9ba6ebaa 100644 --- a/public/react/src/forge/Activity/activity.css +++ b/public/react/src/forge/Activity/activity.css @@ -98,4 +98,11 @@ height: 22px; line-height: 22px; border-radius: 50%; +} +.change{ + color: black; + cursor: pointer; +} +.change:hover{ + color: #4183c4; } \ No newline at end of file