diff --git a/client/containers/ProjectGroups/GroupList/GroupList.js b/client/containers/ProjectGroups/GroupList/GroupList.js index 828091e0..a13c8675 100644 --- a/client/containers/ProjectGroups/GroupList/GroupList.js +++ b/client/containers/ProjectGroups/GroupList/GroupList.js @@ -1,13 +1,12 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' -import { Button, Icon, Modal, Input, message, Menu, Row, Col } from 'antd' +import { Button, Icon, Popconfirm, Modal, Input, message, Menu, Row, Col } from 'antd' import { autobind } from 'core-decorators'; import axios from 'axios'; import { withRouter } from 'react-router'; const { TextArea } = Input; const Search = Input.Search; -const confirm = Modal.confirm; const TYPE_EDIT = 'edit'; import { @@ -164,21 +163,15 @@ export default class GroupList extends Component { deleteGroup() { const self = this; const { currGroup } = self.props; - confirm({ - title: `你确定要删除分组 ${currGroup.group_name}?`, - content: `分组简介:${currGroup.group_desc}`, - onOk() { - axios.post('/group/del', {id: currGroup._id}).then(res => { - if (res.data.errcode) { - message.error(res.data.errmsg); - } else { - message.success('删除成功'); - self.props.fetchGroupList().then(() => { - const currGroup = self.props.groupList[0] || { group_name: '', group_desc: '' }; - self.setState({groupList: self.props.groupList}); - self.props.setCurrGroup(currGroup) - }); - } + axios.post('/group/del', {id: currGroup._id}).then(res => { + if (res.data.errcode) { + message.error(res.data.errmsg); + } else { + message.success('删除成功'); + self.props.fetchGroupList().then(() => { + const currGroup = self.props.groupList[0] || { group_name: '', group_desc: '' }; + self.setState({groupList: self.props.groupList}); + self.props.setCurrGroup(currGroup) }); } }); @@ -205,7 +198,9 @@ export default class GroupList extends Component {
{currGroup.group_name}
this.showModal(TYPE_EDIT)}/> - + + +
简介:{currGroup.group_desc}