From e4bed9c53cef94680b2b4290238804b608fc8db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 31 Aug 2019 21:09:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=BB=84=E4=BD=9C=E4=B8=9A=E9=A2=98?= =?UTF-8?q?=E5=BA=93=E5=8F=91=E9=80=81=E5=92=8C=E5=88=A0=E9=99=A4=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../groupjobbank/Groupjobbandetails.js | 4 + .../courses/groupjobbank/GroupjobbankPage.js | 93 +++++++++++++++++-- .../courses/groupjobbank/questionbanks.css | 5 +- 3 files changed, 93 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js b/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js index 7e73d6546..a1d877a13 100644 --- a/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js +++ b/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js @@ -88,9 +88,13 @@ class Groupjobbandetails extends Component { {/* */} {/* )*/} {/*})}*/} +
{datas.attachments === undefined ? "" : } +
+ + diff --git a/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js b/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js index 14512f44f..3e8ec9c02 100644 --- a/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js +++ b/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js @@ -9,6 +9,9 @@ import { import CoursesListType from '../coursesPublic/CoursesListType'; import Groupjobbandetails from './Groupjobbandetails'; import Groupjobquesanswer from './Groupjobquesanswer'; +import SendTopics from '../../modals/SendTopics'; +import Modals from '../../modals/Modals'; + import '../css/members.css'; import "../common/formCommon.css"; import '../css/Courses.css'; @@ -26,6 +29,7 @@ class GroupjobbankPage extends Component { workid:1, isSpin:false, datas:[], + visible:false } } @@ -132,18 +136,91 @@ class GroupjobbankPage extends Component { } - bindRef = ref => { this.child = ref } -///////////////教师截止 +//发送至相关 + sendTopics=()=>{ + this.setState({ + visible:true + }) + } + + topicscancelmodel=()=>{ + this.setState({ + Modalstype:false, + Loadtype:false, + visible:false, + Modalstopval:"", + ModalCancel:"", + ModalSave:"", + checkBoxValues:[], + checkedtype:false + }) + } + + //删除相关 + + 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:"group" + }}) + .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 {tab,datas} = this.state; + let {tab,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()} + />:"" + }
@@ -170,9 +247,9 @@ class GroupjobbankPage extends Component {
this.ChangeTab(0)}>内容详情 this.ChangeTab(1)}>参考答案 - 发送 - 编辑 - 删除 + this.sendTopics()}>发送 + 编辑 + this.deletecheckBoxValues()}>删除
diff --git a/public/react/src/modules/courses/groupjobbank/questionbanks.css b/public/react/src/modules/courses/groupjobbank/questionbanks.css index 13426cbc3..8fdca01ce 100644 --- a/public/react/src/modules/courses/groupjobbank/questionbanks.css +++ b/public/react/src/modules/courses/groupjobbank/questionbanks.css @@ -30,7 +30,7 @@ } .ml47text{ margin-left: 17px; - margin-top: 28px; + margin-top: 33px; padding-bottom: 37px; } .ysltextcolor99999{ @@ -39,4 +39,7 @@ } .yslahover { color: #999999 ; +} +.mt24{ + margin-top: 24px !important ; } \ No newline at end of file