diff --git a/client/containers/Group/GroupList/GroupList.js b/client/containers/Group/GroupList/GroupList.js index ab38626e..548ec699 100644 --- a/client/containers/Group/GroupList/GroupList.js +++ b/client/containers/Group/GroupList/GroupList.js @@ -167,11 +167,13 @@ export default class GroupList extends Component { showConfirm =()=> { let that = this; confirm({ - title: "确认删除"+that.props.currGroup.group_name+"分组吗?", + title: "确认删除 "+that.props.currGroup.group_name+" 分组吗?", content:
- -
请输入分组名称确认此操作:
+
+

请输入分组名称确认此操作:

+ +
, onOk() { let groupName = document.getElementById('group_name').value; diff --git a/client/containers/Project/Setting/ProjectMember/ProjectMember.js b/client/containers/Project/Setting/ProjectMember/ProjectMember.js index 2e48feb7..f381cd0a 100644 --- a/client/containers/Project/Setting/ProjectMember/ProjectMember.js +++ b/client/containers/Project/Setting/ProjectMember/ProjectMember.js @@ -140,12 +140,11 @@ class ProjectMember extends Component { @autobind onUserSelect(childState) { - console.log(childState); this.setState({ inputUid: childState.uid }) } - + async componentWillMount() { const groupMemberList = await this.props.fetchGroupMemberList(this.props.projectMsg.group_id); const rojectMsg = await this.props.getProjectMsg(this.props.projectId); @@ -159,8 +158,6 @@ class ProjectMember extends Component { } render () { - console.log(this.props); - console.log(this.state); const columns = [{ title: ' 项目成员 ('+this.state.projectMemberList.length + ') 人', dataIndex: 'username', diff --git a/client/containers/Project/Setting/ProjectMessage/ProjectMessage.js b/client/containers/Project/Setting/ProjectMessage/ProjectMessage.js index 637f52eb..1bfd1326 100644 --- a/client/containers/Project/Setting/ProjectMessage/ProjectMessage.js +++ b/client/containers/Project/Setting/ProjectMessage/ProjectMessage.js @@ -1,5 +1,5 @@ import React, { Component } from 'react' -import { Form, Input, Icon, Tooltip, Select, Button, Row, Col, message, Card, Radio } from 'antd'; +import { Form, Input, Icon, Tooltip, Select, Button, Row, Col, message, Card, Radio, Alert, Modal } from 'antd'; import PropTypes from 'prop-types'; import { updateProject, delProject, getProjectMsg } from '../../../../reducer/modules/project'; import { fetchGroupMsg } from '../../../../reducer/modules/group'; @@ -8,6 +8,7 @@ const { TextArea } = Input; const FormItem = Form.Item; const Option = Select.Option; const RadioGroup = Radio.Group; +const confirm = Modal.confirm; import '../Setting.scss'; // layout @@ -138,6 +139,38 @@ class ProjectMessage extends Component { }); } + showConfirm = () => { + let that = this; + confirm({ + title: "确认删除 "+that.props.projectMsg.name+" 分组吗?", + content:
+ +
+

请输入项目名称确认此操作:

+ +
+
, + onOk() { + let groupName = document.getElementById('project_name').value; + if(that.props.projectMsg.name !== groupName){ + message.error('分组名称有误') + return new Promise((resolve, reject)=>{ + reject('error') + }) + }else{ + that.props.delProject(that.props.projectId).then((res) => { + if (res.payload.data.errcode == 0) { + message.success('删除成功!'); + } + }); + } + + }, + iconType: 'delete', + onCancel() { } + }); + } + async componentWillMount() { await this.props.getProjectMsg(this.props.projectId); const groupMsg = await this.props.fetchGroupMsg(this.props.projectMsg.group_id); @@ -369,7 +402,7 @@ class ProjectMessage extends Component {

删除项目

项目一旦删除,将无法恢复数据,请慎重操作!

- +