From d8a1818125dcf62d11df0c26a8ba53686079205f 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:43:13 +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
---
.../courses/questionbank/Generaljobanswer.js | 20 ++--
.../questionbank/Generaljobbankdetails.js | 92 +++++++++++++++++--
.../courses/questionbank/Generaljobdetails.js | 25 ++---
.../courses/questionbank/questionbank.css | 3 +
4 files changed, 103 insertions(+), 37 deletions(-)
diff --git a/public/react/src/modules/courses/questionbank/Generaljobanswer.js b/public/react/src/modules/courses/questionbank/Generaljobanswer.js
index 3fdfe8363..0024290f8 100644
--- a/public/react/src/modules/courses/questionbank/Generaljobanswer.js
+++ b/public/react/src/modules/courses/questionbank/Generaljobanswer.js
@@ -13,6 +13,7 @@ import {
import GroupPackage from '../groupjobbank/GroupPackage'
import './questionbank.css';
import AttachmentsList from '../../../common/components/attachment/AttachmentList';
+import NoneData from '../../courses/coursesPublic/NoneData'
class Generaljobanswer extends Component {
@@ -62,26 +63,21 @@ class Generaljobanswer extends Component {
{
datas&&(datas.reference_answer===null?
-
-
-
暂时还没有相关数据哦!
-
+
:datas.reference_answer==="null"?
-
-
-
暂时还没有相关数据哦!
-
+
+ :
+ datas.reference_answer===""?
+
:
)
}
{/*
*/}
-
+
{datas.attachments === undefined ? "" :
}
-
+
{/*{datas.attachments === undefined ? "" : datas.attachments.map((item, key) => {*/}
{/* return (*/}
diff --git a/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js
index c355d241a..f64d9fde0 100644
--- a/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js
+++ b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js
@@ -9,6 +9,8 @@ import {
import CoursesListType from '../coursesPublic/CoursesListType';
import Generaljobdetails from './Generaljobdetails';
import Generaljobanswer from './Generaljobanswer';
+import SendTopics from '../../modals/SendTopics';
+import Modals from '../../modals/Modals';
import '../css/members.css';
import "../common/formCommon.css";
import '../css/Courses.css';
@@ -25,6 +27,7 @@ class Generaljobbankdetails extends Component {
workid:1,
isSpin:false,
datas:[],
+ visible:false
}
}
@@ -128,21 +131,92 @@ class Generaljobbankdetails extends Component {
});
}
+//发送至相关
+ sendTopics=()=>{
+ this.setState({
+ visible:true
+ })
+ }
- bindRef = ref => { this.child = ref }
-///////////////教师截止
+ 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:"normal"
+ }})
+ .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()}
+ />:""
+ }
{/*
*/}
@@ -168,9 +242,9 @@ class Generaljobbankdetails extends Component {
diff --git a/public/react/src/modules/courses/questionbank/Generaljobdetails.js b/public/react/src/modules/courses/questionbank/Generaljobdetails.js
index 8c870dd68..c8fcc6a83 100644
--- a/public/react/src/modules/courses/questionbank/Generaljobdetails.js
+++ b/public/react/src/modules/courses/questionbank/Generaljobdetails.js
@@ -13,7 +13,7 @@ import {
import GroupPackage from '../groupjobbank/GroupPackage'
import './questionbank.css';
import AttachmentsList from "../../../common/components/attachment/AttachmentList";
-
+import NoneData from '../../courses/coursesPublic/NoneData'
//内容详情
class Generaljobdetails extends Component {
@@ -62,25 +62,18 @@ class Generaljobdetails extends Component {
{
datas&&(datas.description===null?
-
-
-
暂时还没有相关数据哦!
-
+
:datas.description==="null"?
-
-
-
暂时还没有相关数据哦!
-
- :
+
+ :datas&&datas.description===""?
+
:
)
}
- {datas.attachments === undefined ? "" :
-
}
-
-
+
+ {datas.attachments === undefined ? "" :
+
}
+
diff --git a/public/react/src/modules/courses/questionbank/questionbank.css b/public/react/src/modules/courses/questionbank/questionbank.css
index 43dcfa9c6..1114f2824 100644
--- a/public/react/src/modules/courses/questionbank/questionbank.css
+++ b/public/react/src/modules/courses/questionbank/questionbank.css
@@ -23,4 +23,7 @@
.ysltextcolor99999{
color: #999999;
font-size: 16px;
+}
+.mt16px{
+ margin-top: 16px;
}
\ No newline at end of file