diff --git a/public/react/src/modules/courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js index 67daa9189..6dc14b983 100644 --- a/public/react/src/modules/courses/boards/BoardsNew.js +++ b/public/react/src/modules/courses/boards/BoardsNew.js @@ -3,7 +3,7 @@ import React,{ Component } from "react"; import { Form, Input, InputNumber, Switch, Radio, Slider, Button, Upload, Icon, Rate, Checkbox, message, - Row, Col, Select, Modal, Divider + Row, Col, Select, Modal, Divider,Tooltip } from 'antd'; import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; import axios from 'axios' @@ -29,7 +29,8 @@ class BoardsNew extends Component{ fileList: [], boards: [], title_num: 0, - email_notify:false + email_notify:false, + isemail_notify:false } } addSuccess = () => { @@ -98,7 +99,7 @@ class BoardsNew extends Component{ } }) - this.setState({ fileList: _fileList, board_name: data.board_name, title_num: parseInt(data.subject.length) }) + this.setState({ fileList: _fileList, board_name: data.board_name, title_num: parseInt(data.subject.length) ,isemail_notify:response.data.data.email_notify}) } } }) @@ -136,6 +137,7 @@ class BoardsNew extends Component{ select_board_id: values.select_board_id, content: values.content, sticky: values.sticky, + email_notify:this.state.isemail_notify, attachment_ids, }) .then((response) => { @@ -160,7 +162,7 @@ class BoardsNew extends Component{ axios.post(url, { ...values, - email_notify:this.state.email_notify, + email_notify:this.state.isemail_notify, course_id: cid, attachment_ids, }) @@ -253,7 +255,7 @@ class BoardsNew extends Component{ setemailchange=(e)=>{ this.setState({ - email_notify:e.target.checked + isemail_notify:e.target.checked }) } render() { @@ -299,6 +301,7 @@ class BoardsNew extends Component{ const isCourseEnd = this.props.isCourseEnd(); document.title=this.props.coursedata&&this.props.coursedata.name; + // console.log(this.state) return(
+ {this.state.boardsdata&&this.state.boardsdata.email_notify===true?this.props.isAdminOrTeacher()===true? + 发送邮件提醒 + :"":""} + { isAdmin && {getFieldDecorator('sticky', { valuePropName: 'checked', })( isAdmin && 置顶 )} @@ -411,9 +418,7 @@ class BoardsNew extends Component{ )} - {this.state.boardsdata&&this.state.boardsdata.email_notify===true?this.props.isAdminOrTeacher()===true?this.isEdit ?"": - 发送邮件提醒 - :"":""} + {/* { isAdmin &&