From 9eb28db680deabc435ad0dfeffc24f89af0ad057 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Tue, 25 Jun 2019 16:32:36 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9B=AE=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
 .../src/modules/courses/boards/AddDirModal.js | 78 +++++++++++++++++++
 .../src/modules/courses/boards/BoardsNew.js   | 45 ++++++++---
 .../modules/courses/members/teacherList.js    |  8 +-
 3 files changed, 119 insertions(+), 12 deletions(-)
 create mode 100644 public/react/src/modules/courses/boards/AddDirModal.js
diff --git a/public/react/src/modules/courses/boards/AddDirModal.js b/public/react/src/modules/courses/boards/AddDirModal.js
new file mode 100644
index 000000000..89ff6dfeb
--- /dev/null
+++ b/public/react/src/modules/courses/boards/AddDirModal.js
@@ -0,0 +1,78 @@
+import React,{ Component } from "react";
+import {Tooltip, Modal, Input } from 'antd'
+import moment from 'moment'
+import { getUrl, WordsBtn } from 'educoder'
+import axios from 'axios'
+class AddDirModal extends Component{
+  constructor(props){
+    super(props);
+    this.state = {
+
+    }
+  }
+  onInput = (e) => {
+    this.setState({
+      inputValue: e.target.value
+    })
+  }
+  open = () => {
+    this.setState({ visible: true, inputValue: '' })
+  }
+  onSave = () => {
+    let coursesId = this.props.match.params.coursesId;
+    const url = `/courses/${coursesId}/boards.json`
+    let { inputValue } = this.state;
+
+    axios.post(url,{
+        name: inputValue
+      }).then((response)=>{
+      if (response.data.status == 0) {
+        this.onCancel()
+        this.props.showNotification('添加成功')
+        this.props.addSuccess && this.props.addSuccess()
+      }
+    }).catch((error)=>{
+      console.log(error)
+    })
+  }
+  onCancel = () => {
+    this.setState({ visible: false, inputValue: '' })
+  }
+  render(){
+    let { inputValue, visible } = this.state;
+    const { title } = this.props;
+    return(
+        
+             
+                
{this.props.label}:
+                
+