diff --git a/public/react/src/modules/courses/shixunHomework/style.css b/public/react/src/modules/courses/shixunHomework/style.css
index c2affa32c..c3976515b 100644
--- a/public/react/src/modules/courses/shixunHomework/style.css
+++ b/public/react/src/modules/courses/shixunHomework/style.css
@@ -53,4 +53,17 @@
}
.ysyslxh{
background: #fafafa;
+}
+
+.z666{
+ color: #666;
+ font-size:14px;
+}
+.z000{
+ color: #000;
+ font-size:16px;
+}
+
+.pd30bt{
+ padding: 10px 30px 0px 30px;
}
\ No newline at end of file
From ccb64e8b3f8739d09ca2034124a30dac81905cc0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 9 Sep 2019 22:39:01 +0800
Subject: [PATCH 15/21] b
---
.../courses/coursesPublic/AppraiseModal.js | 3 +-
.../shixunHomework/ShixunWorkReport.js | 37 +++++++++++--------
2 files changed, 22 insertions(+), 18 deletions(-)
diff --git a/public/react/src/modules/courses/coursesPublic/AppraiseModal.js b/public/react/src/modules/courses/coursesPublic/AppraiseModal.js
index f1ee18bb7..120e57b2b 100644
--- a/public/react/src/modules/courses/coursesPublic/AppraiseModal.js
+++ b/public/react/src/modules/courses/coursesPublic/AppraiseModal.js
@@ -72,9 +72,8 @@ class AppraiseModal extends Component{
challenge_id:challenge_id
}).then((response) => {
if(response.data.status===0){
- debugger
- this.props.showNotification(response.data.message)
this.props.showCancel(comment,hidden_comment,challenge_id,response.data.comment_id)
+ this.props.showNotification(response.data.message)
}else{
this.props.showNotification(response.data.message)
}
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
index 0f1264865..bb8ccae4a 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
@@ -216,10 +216,13 @@ class ShixunWorkReport extends Component {
}
isdeleteModal=(comment_id,visible_comment,type)=>{
+ let newcomment_id=comment_id;
+ let newvisible_comment=visible_comment;
+ let newtype=type;
this.setState({
modalsType: true,
modalsTopval:"是否确认删除?",
- modalSave: ()=>this.isdeleteModals(comment_id,visible_comment,type),
+ modalSave: ()=>this.isdeleteModals(newcomment_id,newvisible_comment,newtype),
modalCancel:()=>this.hideisdeleteModals(),
})
}
@@ -278,22 +281,24 @@ class ShixunWorkReport extends Component {
let newcomment_id=comment_id;
let newvisible_comment=visible_comment;
let newtype=type;
+ if(comment_id!=null){
+ let url =`/student_works/${this.props.match.params.homeworkid}/destroy_work_comment.json`
+ axios.delete(url, { data: {
+ comment_id:comment_id,
+ }}).then((response) => {
+ // const { status } = response.data;
+ if(response.data.status===0){
+ this.props.showNotification(response.data.message)
+ this.hideisdeleteModal(newcomment_id,newvisible_comment,newtype)
+ }else{
+ this.props.showNotification(response.data.message)
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
- let url =`/student_works/${this.props.match.params.homeworkid}/destroy_work_comment.json`
- axios.delete(url, { data: {
- comment_id:comment_id,
- }}).then((response) => {
- // const { status } = response.data;
- if(response.data.status===0){
- this.props.showNotification(response.data.message)
- this.hideisdeleteModal(newcomment_id,newvisible_comment,newtype)
- }else{
- this.props.showNotification(response.data.message)
- }
- })
- .catch(function (error) {
- console.log(error);
- });
}
render() {
let{data,showAppraiseModaltype,work_comment_hidden,work_comment} =this.state;
From e6caa48ff7b91dd0ff00943a9e6df947cac7cbb0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 9 Sep 2019 22:44:00 +0800
Subject: [PATCH 16/21] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/courses/shixunHomework/ShowAppraiseList.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js b/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js
index 1a5b4a136..660c8e796 100644
--- a/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js
+++ b/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js
@@ -16,8 +16,8 @@ class ShowAppraiseList extends Component{
render(){
let {data, work_comment,work_comment_hidden}=this.props;
- let work_commenttype=this.props&&this.props.isAdmin()===true?false:work_comment===undefined||work_comment===null||work_comment==="";
- let work_comment_hiddentype=this.props&&this.props.isAdmin()===true?false:work_comment===undefined||work_comment===null||work_comment==="";
+ let work_commenttype=work_comment===undefined||work_comment===null||work_comment==="";
+ let work_comment_hiddentype=work_comment===undefined||work_comment===null||work_comment==="";
return(