From 92fea708c48a27cd2fddb7ebb096dddc248129ca Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Wed, 19 Feb 2020 11:59:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/forge/Activity/Activity.js | 126 +++++++++++++++++++ public/react/src/forge/Activity/activity.css | 66 ++++++++++ 2 files changed, 192 insertions(+) create mode 100644 public/react/src/forge/Activity/Activity.js create mode 100644 public/react/src/forge/Activity/activity.css 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 = ( +
+ ); + + return( +