From a9f3b3338d702285f2fadb5b37c0fa9a8beafa46 Mon Sep 17 00:00:00 2001 From: zuiidea Date: Wed, 21 Dec 2016 21:57:34 +0800 Subject: [PATCH] COMPLETED --- mock/dashboard.js | 4 ++-- src/components/dashboard/completed.js | 13 ++++++------- src/components/dashboard/sales.js | 2 +- src/routes/dashboard.js | 4 ++-- src/utils/theme.js | 4 +++- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/mock/dashboard.js b/mock/dashboard.js index 3bb313b..ed64c19 100644 --- a/mock/dashboard.js +++ b/mock/dashboard.js @@ -9,8 +9,8 @@ let dataKey = mockStorge('Dashboard', Mock.mock({ { 'name|+1': 2008, 'Clothes|200-500': 1, - 'Food|180-700': 1, - 'Electronics|300-850': 1 + 'Food|180-400': 1, + 'Electronics|300-550': 1 } ], 'completed|12': [ diff --git a/src/components/dashboard/completed.js b/src/components/dashboard/completed.js index 3165c27..26ad531 100644 --- a/src/components/dashboard/completed.js +++ b/src/components/dashboard/completed.js @@ -2,14 +2,14 @@ import React, { PropTypes } from 'react' import { Icon } from 'antd' import styles from './completed.less' import {color} from '../../utils' -import {LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer} from 'recharts' +import {AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer} from 'recharts' function Completed(props) { return (
TEAM TOTAL COMPLETED
- + { const { payload } = props @@ -19,17 +19,16 @@ function Completed(props) { }}/> - + { const list = content.payload.map((item,key) =>
  • {item.name+':'+item.value}
  • ) return

    {content.label}

      {list}
    }}/> - - - -
    + + +
    ) diff --git a/src/components/dashboard/sales.js b/src/components/dashboard/sales.js index c7e5796..b270339 100644 --- a/src/components/dashboard/sales.js +++ b/src/components/dashboard/sales.js @@ -19,7 +19,7 @@ function Sales(props) { }}/> - + { diff --git a/src/routes/dashboard.js b/src/routes/dashboard.js index 01b7674..d66986d 100644 --- a/src/routes/dashboard.js +++ b/src/routes/dashboard.js @@ -8,7 +8,7 @@ import Sales from '../components/dashboard/sales' import Weather from '../components/dashboard/weather' import RecentSales from '../components/dashboard/recentSales' import Comments from '../components/dashboard/comments' -// import Completed from '../components/dashboard/completed' +import Completed from '../components/dashboard/completed' import styles from './dashboard.less' import {color} from '../utils' @@ -70,7 +70,7 @@ function Dashboard({dashboard}) { - {/* */} + diff --git a/src/utils/theme.js b/src/utils/theme.js index b2c3225..06d2035 100644 --- a/src/utils/theme.js +++ b/src/utils/theme.js @@ -7,6 +7,8 @@ module.exports = { yellow:'#f8c82e', peach:'#f797d6', borderBase:'#e5e5e5', - borderSplit:'#f4f4f4' + borderSplit:'#f4f4f4', + grass:"#d6fbb5", + sky:'#c1e0fc' } };