diff --git a/src/components/Charts/index.less b/src/components/Charts/index.less
index cc4387d0c4eec09aed7c5d25b6d422df5755259d..33547992a95a4e71a021df5d5e69a9bd97eee4d9 100644
--- a/src/components/Charts/index.less
+++ b/src/components/Charts/index.less
@@ -1,4 +1,5 @@
.miniChart {
+ overflow: hidden;
position: relative;
width: 100%;
& > div {
diff --git a/src/routes/Dashboard/Analysis.less b/src/routes/Dashboard/Analysis.less
index 390941ae3d2dc32c8fab542df5f6ec1140a0f175..54476f4a13fad8942a3bdaa8eaa56820c8ee4a48 100644
--- a/src/routes/Dashboard/Analysis.less
+++ b/src/routes/Dashboard/Analysis.less
@@ -72,6 +72,9 @@
}
@media screen and (max-width: @screen-lg) {
+ .salesExtra {
+ display: none;
+ }
.rankingList {
li {
span:first-child {
diff --git a/src/routes/Dashboard/Monitor.js b/src/routes/Dashboard/Monitor.js
index b8b20568cf654de55a99c90732ab9334eb6a55c4..b7977e734da06340efc768f737323f50505ba6e2 100644
--- a/src/routes/Dashboard/Monitor.js
+++ b/src/routes/Dashboard/Monitor.js
@@ -3,7 +3,6 @@ import { connect } from 'dva';
import { Row, Col, Card } from 'antd';
import numeral from 'numeral';
-import PageHeaderLayout from '../../layouts/PageHeaderLayout';
import { NumberInfo, MiniArea, Pie, WaterWave, Gauge } from '../../components/Charts';
import MapChart from '../../components/MapChart';
import TagCloud from '../../components/TagCloud';
@@ -45,12 +44,10 @@ export default class Monitor extends PureComponent {
const { tags } = monitor;
return (
-
+
-
+
-
+
);
}
}
diff --git a/src/routes/List/BasicList.js b/src/routes/List/BasicList.js
index 90063e51aa82b1c3618b666d4a62fcb798558dc2..b3e9a8d29b6bc86daf082c9d5d6c766fb9eca077 100644
--- a/src/routes/List/BasicList.js
+++ b/src/routes/List/BasicList.js
@@ -95,7 +95,7 @@ export default class BasicList extends PureComponent {
return (
-
+
@@ -110,6 +110,7 @@ export default class BasicList extends PureComponent {
-
+
);
@@ -53,37 +53,35 @@ export default class CardList extends PureComponent {
extraContent={extraContent}
>
- {
- loading ?
-
- :
-
-
-
-
- {
- list && list.map(item => (
-
- 操作一, 操作二]}
- >
- }
- title={item.title}
- description={(
-
- {item.description}
-
- )}
- />
-
-
- ))
- }
-
- }
+
+
+
+
+ {
+ list && list.map(item => (
+
+ 操作一, 操作二]}
+ >
+ }
+ title={item.title}
+ description={(
+
+ {item.description}
+
+ )}
+ />
+
+
+ ))
+ }
+
);
diff --git a/src/routes/List/CardList.less b/src/routes/List/CardList.less
index 664da00647ad71d4fe1d1cd16da0a769fd6402a3..e8b4c44ab34d9c9f5a36ec1be95d7cc2861ea6f2 100644
--- a/src/routes/List/CardList.less
+++ b/src/routes/List/CardList.less
@@ -12,6 +12,10 @@
.extraImg {
margin-top: -60px;
text-align: center;
+ width: 195px;
+ img {
+ width: 100%;
+ }
}
.newButton {
diff --git a/src/routes/List/CoverCardList.js b/src/routes/List/CoverCardList.js
index 00cb75f09d2e361f6e83d5d0dddbcaa905560418..e0869866ef60bc335957ff4792381cf4516c0b20 100644
--- a/src/routes/List/CoverCardList.js
+++ b/src/routes/List/CoverCardList.js
@@ -1,7 +1,8 @@
import React, { PureComponent } from 'react';
import moment from 'moment';
import { connect } from 'dva';
-import { Row, Col, Form, Card, Select, Spin } from 'antd';
+import { routerRedux } from 'dva/router';
+import { Row, Col, Form, Card, Select, List } from 'antd';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';
import StandardFormRow from '../../components/StandardFormRow';
@@ -49,15 +50,35 @@ export default class CoverCardList extends PureComponent {
}, 0);
}
+ handleTabChange = (key) => {
+ const { dispatch } = this.props;
+ switch (key) {
+ case 'doc':
+ dispatch(routerRedux.push('/list/search'));
+ break;
+ case 'app':
+ dispatch(routerRedux.push('/list/filter-card-list'));
+ break;
+ case 'project':
+ dispatch(routerRedux.push('/list/cover-card-list'));
+ break;
+ default:
+ break;
+ }
+ }
+
render() {
const { list: { list = [], loading }, form } = this.props;
const { getFieldDecorator } = form;
const cardList = list ? (
-
+
{
list.map(item => (
-
+
}
>
@@ -82,15 +103,15 @@ export default class CoverCardList extends PureComponent {
-
+
))
}
-
+
) : null;
const tabList = [
{
- key: 'docs',
+ key: 'doc',
tab: '文章',
},
{
@@ -100,6 +121,7 @@ export default class CoverCardList extends PureComponent {
{
key: 'project',
tab: '项目',
+ default: true,
},
];
@@ -121,9 +143,11 @@ export default class CoverCardList extends PureComponent {
title="带封面的卡片列表"
content={pageHeaderContent}
tabList={tabList}
+ onTabChange={this.handleTabChange}
>
- {
- loading && (list.length > 0) &&
- {cardList}
-
- }
- {
- loading && (list.length < 1) &&
- }
- {
- !loading && cardList
- }
+
+ { cardList }
+
);
diff --git a/src/routes/List/CoverCardList.less b/src/routes/List/CoverCardList.less
index d4c7eadeaa34d9819b51cad25f5d734950300451..d2b9d1625fa575eacbb142f8d5a167c0aec2b1be 100644
--- a/src/routes/List/CoverCardList.less
+++ b/src/routes/List/CoverCardList.less
@@ -21,4 +21,7 @@
flex: 0 1 auto;
}
}
+ .cardList {
+ margin-top: 24px;
+ }
}
diff --git a/src/routes/List/FilterCardList.js b/src/routes/List/FilterCardList.js
index 6f26beb7bcfd63c74aedbb98f4a9940c9f18edbd..81710b9925f9eb2a1d6ad12c2cef022bb3578bbe 100644
--- a/src/routes/List/FilterCardList.js
+++ b/src/routes/List/FilterCardList.js
@@ -1,6 +1,7 @@
import React, { PureComponent } from 'react';
import numeral from 'numeral';
import { connect } from 'dva';
+import { routerRedux } from 'dva/router';
import { Row, Col, Form, Card, Select, Spin, Icon, Avatar } from 'antd';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';
@@ -60,22 +61,39 @@ export default class FilterCardList extends PureComponent {
}, 0);
}
+ handleTabChange = (key) => {
+ const { dispatch } = this.props;
+ switch (key) {
+ case 'doc':
+ dispatch(routerRedux.push('/list/search'));
+ break;
+ case 'app':
+ dispatch(routerRedux.push('/list/filter-card-list'));
+ break;
+ case 'project':
+ dispatch(routerRedux.push('/list/cover-card-list'));
+ break;
+ default:
+ break;
+ }
+ }
+
render() {
const { list: { list, loading }, form } = this.props;
const { getFieldDecorator } = form;
const tabList = [
{
- key: 'docs',
+ key: 'doc',
tab: '文章',
},
{
- key: 'apps',
+ key: 'app',
tab: '应用',
default: true,
},
{
- key: 'projects',
+ key: 'project',
tab: '项目',
},
];
@@ -112,10 +130,12 @@ export default class FilterCardList extends PureComponent {
title="带筛选卡片列表"
content={pageHeaderContent}
tabList={tabList}
+ onTabChange={this.handleTabChange}
>