diff --git a/public/react/src/forge/Activity/Activity.js b/public/react/src/forge/Activity/Activity.js new file mode 100644 index 000000000..38008a4fc --- /dev/null +++ b/public/react/src/forge/Activity/Activity.js @@ -0,0 +1,126 @@ +import React , { Component } from 'react'; +import { Dropdown , Menu , Icon} from 'antd'; +import { Link } from 'react-router-dom'; + +import '../css/index.css'; +import '../Branch/branch.css'; +import './activity.css'; + +import axios from 'axios'; +const ARRAY = [ + { + id:1, + name:'1天' + }, + { + id:3, + name:'3天' + }, + { + id:7, + name:'1周' + }, + { + id:30, + name:'1个月' + } +] +class Activity extends Component{ + constructor(props){ + super(props); + this.state={ + time:'1天', + type:undefined, + state:undefined, + page:1 + } + } + componentDidMount=()=>{ + const { time,type,status,page } = this.state; + this.getInfo(time,type,status,page); + } + + getInfo =(time,type,status,page)=>{ + const { projectsId } = this.props.match.params; + const url = `/projects/${projectsId}/project_trends.json`; + axios.get(url,{ + params:{ + time,type,status,page + } + }).then(result=>{ + if(result){ + + } + }).catch(error=>{ + console.log(error); + }) + } + render(){ + const { time } = this.state; + + const menu = ( + + { + ARRAY && ARRAY.map((item,key)=>{ + return( + {item.name} + ) + }) + } + + ); + + return( +
+
+
+ 周期: + + + {time} + + +
+
+
+
概览
+
+
+
+

+

+
+ 0合并请求 +
+
+
+

+

+
+ 0工单 +
+
+ +
+
+ ) + } +} +export default Activity; \ No newline at end of file diff --git a/public/react/src/forge/Activity/activity.css b/public/react/src/forge/Activity/activity.css new file mode 100644 index 000000000..fda172acc --- /dev/null +++ b/public/react/src/forge/Activity/activity.css @@ -0,0 +1,66 @@ +.trendsTop{ + padding-bottom: 15px; + border-bottom:1px solid #ddd; + margin-bottom: 15px; +} +.normalBox{ + border-radius: 4px; + border:1px solid #ddd; +} +.normalBox-title{ + padding:10px; + background-color: #f4f4f4; + line-height: 18px; +} + +.orderInfo{ + padding:15px; + display: flex; + justify-content: space-between; +} +.orderInfo > div{ + width: 45%; +} +.percentLine{ + width: 100%; + display:flex; + height: 8px; + border-radius: 2px; + background: #888; +} +.percent_green{ + background-color: #6cc644; + color: #6cc644; +} +.percent_purple{ + background-color: #6e5494; + color: #6e5494; +} +.percent_red{ + background-color: #d95c5c; +} +.green{ + color: #6cc644; +} +.purple{ + color: #6e5494; +} +.red{ + color: #d95c5c; +} +.percentBox{ + display: flex; + border-top: 1px solid #f4f4f4; +} +.percentBox > li{ + display: flex; + flex-direction: column; + text-align: center; + flex: 1; + border-right: 1px solid #f4f4f4; + padding:20px 0px; + color: #4183c4; +} +.percentBox > li:last-child{ + border-right: none; +} \ No newline at end of file