diff --git a/mock/chart.js b/mock/chart.js index d28c55218a3277d891ef78be9eeda3a0f8fefc79..43eec3cf815811d02ed717f480c87fcdd35f5503 100644 --- a/mock/chart.js +++ b/mock/chart.js @@ -3,7 +3,7 @@ import moment from 'moment'; // mock data const visitData = []; const beginDay = new Date().getTime(); -for (let i = 0; i < 20; i += 1) { +for (let i = 0; i < 7; i += 1) { visitData.push({ x: moment(new Date(beginDay + (1000 * 60 * 60 * 24 * i))).format('YYYY-MM-DD'), y: Math.floor(Math.random() * 100) + 10, diff --git a/src/components/ActiveChart/index.js b/src/components/ActiveChart/index.js index e615d66239c427f4549a5a46f71bf8f882c5f0c2..916a322d70b3fae170720dd31f86eca0c27be906 100644 --- a/src/components/ActiveChart/index.js +++ b/src/components/ActiveChart/index.js @@ -46,7 +46,9 @@ export default class ActiveChart extends PureComponent { { + const item = ev.items[0]; + const { title } = item; + item.title = ''; + item.name = ''; + item.value = `${title} : ${item.value}`; + }); + if (line) { - chart.line().position('x*y').color(color).shape('smooth'); + const view2 = chart.createView(); + view2.source(data, dataConfig); + view2.line().position('x*y').color(borderColor).size(borderWidth) + .shape('smooth'); + view2.tooltip(false); } chart.render(); diff --git a/src/components/Charts/NumberInfo/index.js b/src/components/Charts/NumberInfo/index.js index 473796b2da065d4f50a0a15b45d3e0c17a6520fd..507d9d5e77a5c8495296971a42c5efc69c60deca 100644 --- a/src/components/Charts/NumberInfo/index.js +++ b/src/components/Charts/NumberInfo/index.js @@ -4,7 +4,7 @@ import classNames from 'classnames'; import styles from './index.less'; -export default ({ theme, title, subTitle, total, subTotal, status, ...rest }) => ( +export default ({ theme, title, subTitle, total, subTotal, status, suffix, ...rest }) => (
}
{subTitle}
- {total} + {total}{suffix && {suffix}} { (status || subTotal) && ( diff --git a/src/components/Charts/NumberInfo/index.less b/src/components/Charts/NumberInfo/index.less index c1dfcba8bb2b2c9f3d1064bdff9e4f8ba4396177..0ee56f91c00a61dabce0575bfc59aec3d11f92e5 100644 --- a/src/components/Charts/NumberInfo/index.less +++ b/src/components/Charts/NumberInfo/index.less @@ -2,6 +2,12 @@ @import "../../../utils/utils.less"; .numberInfo { + .suffix { + color: @text-color; + font-size: 16px; + font-style: normal; + margin-left: 4px; + } h4 { color: @heading-color; margin-bottom: 16px; diff --git a/src/components/Charts/Radar/index.js b/src/components/Charts/Radar/index.js index 351a1010b6ad5bc5a14dd4fdb99d7bb97796b50b..1da52c3813c1a8770ad788c0a06d7d45606a3466 100644 --- a/src/components/Charts/Radar/index.js +++ b/src/components/Charts/Radar/index.js @@ -55,6 +55,8 @@ class Radar extends PureComponent { tickCount = 4, margin = [16, 30, 16, 30] } = this.props; + const colors = ['#1890FF', '#FACC14', '#2FC25B']; + if (!data || (data && data.length < 1)) { return; } @@ -93,8 +95,8 @@ class Radar extends PureComponent { }, }); - chart.line().position('label*value').color('name'); - chart.point().position('label*value').color('name').shape('circle'); + chart.line().position('label*value').color('name', colors); + chart.point().position('label*value').color('name', colors).shape('circle'); chart.render(); diff --git a/src/routes/Dashboard/Analysis.js b/src/routes/Dashboard/Analysis.js index ef3dd84e751d91a3bbffd67883809ab1256a173a..4a9dca74d1fc81dd9dfeb6362803d88dbfd95867 100644 --- a/src/routes/Dashboard/Analysis.js +++ b/src/routes/Dashboard/Analysis.js @@ -208,8 +208,7 @@ export default class Analysis extends Component { contentHeight={46} > @@ -335,7 +334,8 @@ export default class Analysis extends Component { /> @@ -349,7 +349,8 @@ export default class Analysis extends Component { /> @@ -371,17 +372,24 @@ export default class Analysis extends Component { + {iconGroup} +
+ + 全部渠道 + 线上 + 门店 + +
+
+ )} style={{ marginTop: 24 }} > - - 全部渠道 - 线上 - 门店 - -
+
- + @@ -60,16 +61,17 @@ export default class Monitor extends PureComponent {
- map + map
- + @@ -81,13 +83,13 @@ export default class Monitor extends PureComponent { > { - switch (val) { + switch (parseInt(val, 10)) { case 20: return '差'; case 40: return '中'; case 60: - return '量'; + return '良'; case 80: return '优'; default: @@ -95,14 +97,14 @@ export default class Monitor extends PureComponent { } }} title="核销率" - height={164} + height={180} percent={87} />
- + - + - + } - title={{item.title}} + title={( + + + {item.title} + + )} description={item.description} />
diff --git a/src/routes/Dashboard/Workplace.less b/src/routes/Dashboard/Workplace.less index 586a7ffb4f4ce8d6880ca72396fb6e9a1e3895a0..467242f4e504fee3e0053b1de453a9e46f009a12 100644 --- a/src/routes/Dashboard/Workplace.less +++ b/src/routes/Dashboard/Workplace.less @@ -107,16 +107,31 @@ .projectList { :global { .ant-card-meta-description { + color: @text-color-secondary; font-size: 12px; min-height: 36px; } } + .cardTitle { + :global { + .ant-avatar { + position: relative; + top: 5px; + } + } + a { + color: @heading-color; + margin-left: 12px; + &:hover { + color: @primary-color; + } + } + } .projectGrid { width: 33.33%; } .projectItemContent { display: flex; - padding-left: 48px; margin-top: 12px; overflow: hidden; font-size: 12px;