This commit is contained in:
喻希里 2017-09-15 21:23:53 +08:00
commit dea94bc39f
7 changed files with 33 additions and 23 deletions

View File

@ -12,8 +12,15 @@
transform: translateY(-4px);
}
.m-card .ant-card-body {
background-color: $color-bg-gray;
box-shadow: 0 4px 8px rgba(50, 50, 93, 0.11), 0 4px 6px rgba(0, 0, 0, 0.08);
}
.card-btns .icon {
color: rgba(39, 56, 72, 0.85);
}
.card-btns .icon.active {
color: #fac200;
}
}
&:active {
.m-card, .card-btns {
@ -40,23 +47,25 @@
position: absolute;
right: 0;
top: 0;
color: #fff;
}
.icon.active {
color: #fac200;
color: #fff;
}
}
}
.m-card {
cursor: pointer;
text-align: center;
margin-bottom: .36rem;
margin-bottom: .16rem;
transition: all .4s;
position: relative;
.ant-card-body {
background-color: $color-bg-gray;
background-color: #fff;
border-radius: 4px;
padding-top: .24rem + .16rem + 1rem;
box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
box-shadow: 0 4px 6px rgba(255,255,255,.11), 0 1px 3px rgba(255,255,255,.08);
// box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
transition: all .2s;
}
.ui-logo {

View File

@ -10,7 +10,7 @@ import ErrMsg from '../../../components/ErrMsg/ErrMsg.js';
import UsernameAutoComplete from '../../../components/UsernameAutoComplete/UsernameAutoComplete.js';
const Option = Select.Option;
const arrayAddKey = (arr) => {
function arrayAddKey (arr) {
return arr.map((item, index) => {
return {
...item,
@ -137,6 +137,9 @@ class MemberList extends Component {
componentWillReceiveProps(nextProps) {
if(this._groupId !== this._groupId){
return null;
}
if (this.props.currGroup !== nextProps.currGroup) {
this.props.fetchGroupMemberList(nextProps.currGroup._id).then((res) => {
this.setState({
@ -152,7 +155,7 @@ class MemberList extends Component {
}
componentDidMount() {
const currGroupId = this.props.currGroup._id;
const currGroupId = this._groupId = this.props.currGroup._id;
this.props.fetchGroupMsg(currGroupId).then((res) => {
this.setState({
role: res.payload.data.data.role
@ -195,8 +198,8 @@ class MemberList extends Component {
if (this.state.role === 'owner' || this.state.role === 'admin') {
return (
<div>
<Select defaultValue={record.role+'-'+record.uid} className="select" onChange={this.changeUserRole}>
<Option value={'owner-'+record.uid}>组长</Option>
<Select value={ record.role+'-'+record.uid} className="select" onChange={this.changeUserRole}>
<Option value={ 'owner-'+record.uid}>组长</Option>
<Option value={'dev-'+record.uid}>开发者</Option>
</Select>
<Popconfirm placement="topRight" title="你确定要删除吗? " onConfirm={this.deleteConfirm(record.uid)} okText="确定" cancelText="">

View File

@ -120,7 +120,7 @@ class ProjectList extends Component {
<Row gutter={16}>
{projectData.length ? projectData.map((item, index) => {
return (
<Col span={8} key={index}>
<Col span={6} key={index}>
<ProjectCard projectData={item} callbackResult={this.receiveRes} />
</Col>);
}) : <ErrMsg type="noProject" />}

View File

@ -183,7 +183,7 @@ class ProjectMember extends Component {
if (this.state.role === 'owner' || this.state.role === 'admin') {
return (
<div>
<Select defaultValue={record.role+'-'+record.uid} className="select" onChange={this.changeUserRole}>
<Select value={record.role+'-'+record.uid} className="select" onChange={this.changeUserRole}>
<Option value={'owner-'+record.uid}>组长</Option>
<Option value={'dev-'+record.uid}>开发者</Option>
</Select>

View File

@ -97,15 +97,14 @@ class List extends Component {
data = this.state.data;
}
let columns = [{
title: 'UID',
dataIndex: '_id',
key: '_id',
width: 100
}, {
title: '用户名',
dataIndex: 'username',
key: 'username',
width: 180
width: 180,
render: (username, item)=>{
console.log(item)
return <Link to={"/user/profile/" + item._id} >{item.username}</Link>
}
}, {
title: 'Email',
dataIndex: 'email',
@ -126,8 +125,7 @@ class List extends Component {
width: "90px",
render: (item) => {
return (
<span>
<Link to={"/user/profile/" + item._id} >查看</Link>
<span>
<span className="ant-divider" />
<Popconfirm title="确认删除此用户?" onConfirm={() => { this.confirm(item._id) }} okText="确定" cancelText="取消">
<a href="#">删除</a>

View File

@ -16,10 +16,10 @@ function mock(mockJSON, context) {
if (!p.hasOwnProperty(i)) {
continue;
}
if (typeof p[i] === 'object') {
if (p[i] && typeof p[i] === 'object') {
c[i] = (p[i].constructor === Array) ? [] : {};
parse(p[i], c[i]);
} else {
} else if(p[i] && typeof p[i] === 'string'){
p[i] = handleStr(p[i]);
var filters = i.split(mockSplit), newFilters = [].concat(filters);
c[i] = p[i];
@ -34,6 +34,8 @@ function mock(mockJSON, context) {
}
}
}
}else{
c[i] = p[i];
}
}
return c;

View File

@ -43,9 +43,7 @@ function postman(importDataModule){
if(query&&query.length){
for(let item in query){
res.push({
name: query[item].key,
desc: query[item].description,
required: query[item].enable
name: query[item].name
});
}
}