diff --git a/mock/api.js b/mock/api.js index 75fb66aec48130374ce4478f9c2f6ee57c5049d0..e53d1824d4b7a327c74ceb8884a6c4aaa517e7ec 100644 --- a/mock/api.js +++ b/mock/api.js @@ -2,13 +2,13 @@ import { imgMap, getUrlParams } from './utils'; export function fakeList(count) { const titles = [ - '凤蝶', + 'Vue', 'AntDesignPro', 'DesignLab', - 'Basement', + 'Angular', 'AntDesign', - '云雀', - '体验云', + 'React', + 'Alipay', 'AntDesignMobile', ]; const avatars = [ @@ -18,10 +18,10 @@ export function fakeList(count) { 'https://gw.alipayobjects.com/zos/rmsportal/VcmdbCBcwPTGYgbYeMzX.png', // DesignLab ]; const covers = [ - 'https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png', - 'https://gw.alipayobjects.com/zos/rmsportal/xMPpMvGSIXusgtgUPAdw.png', - 'https://gw.alipayobjects.com/zos/rmsportal/hQReiajgtqzIVFjLXjHp.png', - 'https://gw.alipayobjects.com/zos/rmsportal/nczfTaXEzhSpvgZZjBev.png', + 'https://gw.alipayobjects.com/zos/rmsportal/nQIAJyTLNeVJfUpTskWk.png', + 'https://gw.alipayobjects.com/zos/rmsportal/pnhtvpOTzypPvmHVrfKN.png', + 'https://gw.alipayobjects.com/zos/rmsportal/SVrKVZEFDnhDTNpkplZj.png', + 'https://gw.alipayobjects.com/zos/rmsportal/bUIOUkPTHgfGdDhgsAgE.png', ]; const list = []; @@ -48,20 +48,16 @@ export function fakeList(count) { content: '段落示意:蚂蚁金服设计平台 design.alipay.com,用最小的工作量,无缝接入蚂蚁金服生态,提供跨越设计与开发的体验解决方案。蚂蚁金服设计平台 design.alipay.com,用最小的工作量,无缝接入蚂蚁金服生态,提供跨越设计与开发的体验解决方案。', members: [ { - avatar: 'https://gw.alipayobjects.com/zos/rmsportal/WPOxPBHGyqsgKPsFtVlJ.png', - name: '王昭君', - }, - { - avatar: 'https://gw.alipayobjects.com/zos/rmsportal/WPOxPBHGyqsgKPsFtVlJ.png', - name: '王昭君', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png', + name: '曲丽丽', }, { - avatar: 'https://gw.alipayobjects.com/zos/rmsportal/WPOxPBHGyqsgKPsFtVlJ.png', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png', name: '王昭君', }, { - avatar: 'https://gw.alipayobjects.com/zos/rmsportal/WPOxPBHGyqsgKPsFtVlJ.png', - name: '王昭君', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png', + name: '董娜娜', }, ], }); @@ -136,7 +132,7 @@ export const getNotice = [ logo: imgMap.c, description: '这是一条描述信息这是一条描述信息', updatedAt: new Date('2017-07-23 06:23:00'), - member: '成都超级小分队', + member: '成都小分队', }, ]; diff --git a/mock/rule.js b/mock/rule.js index 1c494ca3dff559fda2c71327c37ca791b02a90af..ad046b805ad9da937e6e1a7df193270503e1d477 100644 --- a/mock/rule.js +++ b/mock/rule.js @@ -5,6 +5,7 @@ let tableListDataSource = []; for (let i = 0; i < 46; i += 1) { tableListDataSource.push({ key: i, + disabled: ((i % 6) === 0), href: 'https://ant.design', avatar: ['https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png', 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png'][i % 2], no: `TradeCode ${i}`, @@ -12,7 +13,7 @@ for (let i = 0; i < 46; i += 1) { owner: '曲丽丽', description: '这是一段描述', callNo: Math.floor(Math.random() * 1000), - status: Math.floor(Math.random() * 10) % 2, + status: Math.floor(Math.random() * 10) % 4, updatedAt: new Date(`2017-07-${Math.floor(i / 2) + 1} ${Math.floor(i / 2) + 1}:00:00`), createdAt: new Date(`2017-07-${Math.floor(i / 2) + 1} ${Math.floor(i / 2) + 1}:00:00`), progress: Math.ceil(Math.random() * 100), diff --git a/src/components/AvatarList/index.less b/src/components/AvatarList/index.less index ba720535748491e8a35fba97fd688ed632d4f07d..531e673d3cdb2d40c03c9dea2cf299b8152298e5 100644 --- a/src/components/AvatarList/index.less +++ b/src/components/AvatarList/index.less @@ -10,8 +10,8 @@ } .avatarItem { + border: 1px solid #fff; display: inline-block; - overflow: hidden; font-size: @font-size-base; margin-left: -8px; width: @avatar-size-base; diff --git a/src/components/StandardTable/index.js b/src/components/StandardTable/index.js index ef855758713b9e9673d3afe23a538f13c12a03de..80979b75699831de17b154d638d67267f8e1084a 100644 --- a/src/components/StandardTable/index.js +++ b/src/components/StandardTable/index.js @@ -3,6 +3,7 @@ import moment from 'moment'; import { Table, Alert, Badge } from 'antd'; import styles from './index.less'; +const statusMap = ['default', 'processing', 'success', 'error']; class StandardTable extends PureComponent { state = { selectedRowKeys: [], @@ -43,7 +44,7 @@ class StandardTable extends PureComponent { const { selectedRowKeys, totalCallNo } = this.state; const { data: { list, pagination }, loading } = this.props; - const status = ['关闭', '运行中']; + const status = ['关闭', '运行中', '已上线', '异常']; const columns = [ { @@ -76,13 +77,17 @@ class StandardTable extends PureComponent { text: status[1], value: 1, }, + { + text: status[2], + value: 2, + }, + { + text: status[3], + value: 3, + }, ], render(val) { - if (val === 0) { - return ; - } else { - return ; - } + return ; }, }, { @@ -112,6 +117,9 @@ class StandardTable extends PureComponent { const rowSelection = { selectedRowKeys, onChange: this.handleRowSelectChange, + getCheckboxProps: record => ({ + disabled: record.disabled, + }), }; return ( diff --git a/src/routes/List/BasicList.js b/src/routes/List/BasicList.js index c6f89a3a18bda8ebe0ae713147d0377365e40429..87c370c8036178a9a509dd236d9f2ba2957cd299 100644 --- a/src/routes/List/BasicList.js +++ b/src/routes/List/BasicList.js @@ -112,10 +112,11 @@ export default class BasicList extends PureComponent { - - 这是一个标题 + 这是一个标题 ); @@ -58,12 +58,12 @@ export default class CardList extends PureComponent { (item ? ( - 操作一, 操作二]}> + 操作一, 操作二]}> } title={item.title} diff --git a/src/routes/List/CardList.less b/src/routes/List/CardList.less index b67801360642e4ef86393b8d85054ba5ccf5c783..8a5c958c66aa19b9de99fdb3094b8fc5ce8ea958 100644 --- a/src/routes/List/CardList.less +++ b/src/routes/List/CardList.less @@ -2,6 +2,7 @@ @import "../../utils/utils.less"; .cardList { + margin-bottom: -24px; :global { .ant-card-meta-content { margin-top: 0; @@ -19,14 +20,11 @@ } .newButton { - background-color: transparent; + background-color: #fff; border-color: @border-color-base; color: @text-color-secondary; width: 100%; height: 178px; - &:hover { - background-color: transparent; - } } .cardDescription { diff --git a/src/routes/List/CoverCardList.js b/src/routes/List/CoverCardList.js index 19916d7d07c922e94f932153934690becd665675..0ad34b5db1d0944a819433a7305a77c876bfb781 100644 --- a/src/routes/List/CoverCardList.js +++ b/src/routes/List/CoverCardList.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react'; import moment from 'moment'; import { connect } from 'dva'; -import { routerRedux } from 'dva/router'; +import { Link, routerRedux } from 'dva/router'; import { Row, Col, Form, Card, Select, List, Input } from 'antd'; import PageHeaderLayout from '../../layouts/PageHeaderLayout'; @@ -74,34 +74,37 @@ export default class CoverCardList extends PureComponent { ( - } - > - -
- {moment(item.updatedAt).fromNow()} -
- - { - item.members.map((member, i) => ( - - )) - } - + + } + > + +
+ {moment(item.updatedAt).fromNow()} +
+ + { + item.members.map((member, i) => ( + + )) + } + +
-
- + + )} /> @@ -179,7 +182,7 @@ export default class CoverCardList extends PureComponent { grid last > - + span { + color: @disabled-color; flex: 1; font-size: 12px; - color: @disabled-color; } .avatarList { flex: 0 1 auto; diff --git a/src/routes/List/FilterCardList.js b/src/routes/List/FilterCardList.js index 9a07387f2cd968bc383ca2ed816b8d2ee8da9ba0..542ef5aa4e6d5cc3885dcd9aa8e1c25f34ce2be2 100644 --- a/src/routes/List/FilterCardList.js +++ b/src/routes/List/FilterCardList.js @@ -2,7 +2,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, Icon, Avatar, List, Tooltip, Input } from 'antd'; +import { Row, Col, Form, Card, Select, Icon, Avatar, List, Tooltip, Input, Dropdown, Menu } from 'antd'; import PageHeaderLayout from '../../layouts/PageHeaderLayout'; import StandardFormRow from '../../components/StandardFormRow'; @@ -102,7 +102,6 @@ export default class FilterCardList extends PureComponent {

活跃用户

{activeUser}

-

新增用户

@@ -130,6 +129,20 @@ export default class FilterCardList extends PureComponent { }, }; + const itemMenu = ( + + + 1st menu item + + + 2nd menu item + + + 3d menu item + + + ); + return ( ( , - , - , - , + , + , + , + , ]} > } + avatar={} title={item.title} />
diff --git a/src/routes/List/FilterCardList.less b/src/routes/List/FilterCardList.less index 679cec4596059ccddbfe680f8cd0ab06982bb64b..d8cf0dc747898e0a3684ede42b1b5d4366974dd3 100644 --- a/src/routes/List/FilterCardList.less +++ b/src/routes/List/FilterCardList.less @@ -2,43 +2,30 @@ @import "../../utils/utils.less"; .filterCardList { + margin-bottom: -24px; :global { - .ant-card-meta-title { - position: relative; - top: 8px; - } .ant-card-meta-content { margin-top: 0; } } .cardInfo { .clearfix(); - border: 1px solid @border-color-base; - border-radius: @border-radius-base; - padding: 8px 0; - margin-top: 16px; - width: 100%; + margin-top: 12px; + margin-left: 40px; & > div { position: relative; - text-align: center; + text-align: left; float: left; width: 50%; - & > span { - background-color: @border-color-split; - position: absolute; - top: 0; - right: 0; - width: 1px; - height: 44px; - } p { - color: @text-color-secondary; + color: @text-color; line-height: 32px; font-size: 24px; } p:first-child { font-size: 12px; line-height: 20px; + margin-bottom: 4px; } } } diff --git a/src/routes/List/SearchList.js b/src/routes/List/SearchList.js index f4d080cb27af74bf52d9ad6f58f738985d103f6a..2319fbeb8ddef52c80d0a471e15a9a0a467424d5 100644 --- a/src/routes/List/SearchList.js +++ b/src/routes/List/SearchList.js @@ -167,7 +167,7 @@ export default class SearchList extends Component { }; const loadMore = showLoadMore ? ( -
+