diff --git a/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js b/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js index fd37b7b42..ba02e05fd 100644 --- a/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js +++ b/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js @@ -164,7 +164,6 @@ class Completetaskpage extends Component { let user_type=this.props.current_user&&this.props.current_user.user_identity; let targetuserid=this.props.data&&this.props.data.id; - debugger return (
diff --git a/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js b/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js index abe8f3e36..f4291a5df 100644 --- a/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js +++ b/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js @@ -8,6 +8,8 @@ import { } from "antd"; import CoursesListType from '../coursesPublic/CoursesListType'; import Completetopicdetails from './Completetopicdetails'; +import SendTopics from '../../modals/SendTopics'; +import Modals from '../../modals/Modals'; import '../css/members.css'; import "../common/formCommon.css"; import '../css/Courses.css'; @@ -23,6 +25,8 @@ class CompletetopicdePage extends Component { workid:1, isSpin:false, datas:[], + visible:false + } } @@ -93,19 +97,89 @@ class CompletetopicdePage extends Component { }); } - /// 确认是否下载 + //发送至相关 + sendTopics=()=>{ + this.setState({ + visible:true + }) + } + + topicscancelmodel=()=>{ + this.setState({ + Modalstype:false, + Loadtype:false, + visible:false, + Modalstopval:"", + ModalCancel:"", + ModalSave:"", + checkBoxValues:[], + checkedtype:false + }) + } + //删除相关 - bindRef = ref => { this.child = ref } -///////////////教师截止 + deletecheckBoxValues=()=>{ + + this.setState({ + Modalstype:true, + Modalstopval:"是否确认删除?", + ModalCancel:this.topicscancelmodel, + ModalSave:this.topicssavedelete, + }) + + } + + topicssavedelete=()=>{ + + const url = `/question_banks/multi_delete.json`; + axios.delete(url, { data: { + object_id: [this.props.match.params.workid], + object_type:"gtopic" + }}) + .then((response) => { + if(response.data.status===0){ + this.props.showNotification(response.data.message) + window.location.href=`/users/${this.props.current_user.login}/topics/personal`; + }else{ + this.props.showNotification(response.data.message) + } + }) + .catch(function (error) { + console.log(error); + }); + this.topicscancelmodel() + } render() { - let{datas}=this.state; + let{datas,visible}=this.state; // console.log(119) - + let user_id=this.props.current_user&&this.props.current_user.user_id; + let user_type=this.props.current_user&&this.props.current_user.user_identity; + let targetuserid=this.props.data&&this.props.data.id; return (
+ {this.state.Modalstype&&this.state.Modalstype===true?:""} + {/*发送至弹窗*/} + { + visible&&visible===true? + this.topicscancelmodel()} + />:"" + }
@@ -132,9 +206,9 @@ class CompletetopicdePage extends Component {