@ -2,6 +2,7 @@ import React,{ Component } from "react";
import { Modal , Checkbox , Upload , Button , Icon , message , Input , Radio } from "antd" ;
import { WordNumberTextarea , markdownToHTML } from 'educoder' ;
import axios from 'axios' ;
import './style.css' ;
class ShowAppraiseList extends Component {
constructor ( props ) {
@ -11,16 +12,12 @@ class ShowAppraiseList extends Component{
}
}
componentDidMount ( ) {
}
render ( ) {
let { data , work _comment , work _comment _hidden } = this . props ;
console . log ( data )
let { data , work _comment , work _comment _hidden } = this . props ;
let work _commenttype = work _comment === undefined || work _comment === null || work _comment === "" ;
let work _comment _hiddentype = work _comment === undefined || work _comment === null || work _comment === "" ;
return (
< div >
< style >
@ -38,123 +35,124 @@ class ShowAppraiseList extends Component{
text - align : center ;
line - height : 22 px ;
}
. markdown - body {
padding - bottom : 10 px ;
}
. borderbom {
margin - bottom : 15 px ;
border - bottom : 2 px solid # fafafa ;
}
`
}
< / s t y l e >
{ data === undefined ? "" : work _comment === undefined || work _comment === null || work _comment === "" ? "" :
{ data === undefined ? "" : work _comment type=== true && work _comment _hiddentype === true ? "" :
< div className = "stud-class-set mt17" >
< div className = "clearfix edu-back-white poll_list" >
< div className = "font-16 color-dark-21 shixunreporttitleboxtop pd20 color333" >
< span className = { "appraisebox" } > 总体评阅 < / s p a n > 评 阅 内 容
{ this . props && this . props . isAdmin OrTeacher ( ) === true ? < a className = "color-blue font-14 fr ml20"
onClick = { ( ) => this . props . isdeleteModal ( data . comment _id , true )}
{ this . props && this . props . isAdmin ( ) === true ? < a className = "color-blue font-14 fr ml20"
onClick = { ( ) => this . props . isdeleteModal ( data . comment _id , true ,"main" )}
> 删除 < / a > : " " }
{ this . props && this . props . isAdmin OrTeacher ( ) === true ? < a className = "color-blue font-14 fr"
{ this . props && this . props . isAdmin ( ) === true ? < a className = "color-blue font-14 fr"
onClick = { ( ) => this . props . showAppraiseModal ( "main" , undefined , work _comment , work _comment _hidden ) }
> 编辑 < / a > : " " }
< / d i v >
< div className = "font-16 color-dark-21 shixunreporttitleboxbom pd30" >
< div style = { { minHeight : '50px' } } >
< div className = { "personalsummary" } >
< div className = { "markdown-body" }
dangerouslySetInnerHTML = { { _ _html : markdownToHTML ( work _comment ) . replace ( /▁/g , "▁▁▁" ) } } > < / d i v >
{ this . props && this . props . isAdmin ( ) === true ?
< div className = "font-16 color-dark-21 shixunreporttitleboxbom pd30bt" >
< div >
< span className = { "z000" } > 学生可见 < span className = { "z666" } > ( 学生可查看老师的评阅内容 ) < / s p a n > < / s p a n >
< / d i v >
< div className = { "borderbom" } style = { { minHeight : '40px' } } >
{ work _comment === true ? "" : < div className = { "personalsummary" } >
< div className = { "markdown-body" }
dangerouslySetInnerHTML = { { _ _html : markdownToHTML ( work _comment ) . replace ( /▁/g , "▁▁▁" ) } } > < / d i v >
< / d i v > }
< / d i v >
< / d i v >
< / d i v >
< / d i v >
< / d i v > }
{ data === undefined ? "" : work _comment _hidden === undefined || work _comment _hidden === null || work _comment _hidden === "" ? "" : this . props && this . props . isAdminOrTeacher ( ) === true ?
< div className = "stud-class-set mt17" >
< div className = "clearfix edu-back-white poll_list" >
< div className = "font-16 color-dark-21 shixunreporttitleboxtop pd20 color333" >
< span className = { "appraisebox" } > 总体评阅 < / s p a n > 评 阅 内 容 < s p a n > ( 仅 对 课 堂 老 师 可 见 ) < / s p a n >
{ this . props && this . props . isAdminOrTeacher ( ) === true ? < a className = "color-blue font-14 fr ml20"
onClick = { ( ) => this . props . isdeleteModal ( data . comment _id , false ) }
> 删除 < / a > : " " }
{ this . props && this . props . isAdminOrTeacher ( ) === true ? < a className = "color-blue font-14 fr"
onClick = { ( ) => this . props . showAppraiseModal ( "main" , undefined , work _comment , work _comment _hidden ) }
> 编辑 < / a > : " " }
< div >
< span className = { "z000" } > 学生不可见 < span className = { "z666" } > ( 仅对课堂老师可见 ) < / s p a n > < / s p a n >
< / d i v >
< div style = { { minHeight : '40px' } } >
{ work _comment _hidden === true ? "" : < div className = { "personalsummary" } >
< div className = { "markdown-body" }
dangerouslySetInnerHTML = { { _ _html : markdownToHTML ( work _comment _hidden ) . replace ( /▁/g , "▁▁▁" ) } } > < / d i v >
< / d i v > }
< / d i v >
< / d i v >
< div className = "font-16 color-dark-21 shixunreporttitleboxbom pd30" >
< div style = { { minHeight : '50px' } } >
< / d i v > : < d i v c l a s s N a m e = " f o n t - 1 6 c o l o r - d a r k - 2 1 s h i x u n r e p o r t t i t l e b o x b o m p d 3 0 " >
< div style = { { minHeight : '40px' } } >
< div className = { "personalsummary" } >
< div className = { "markdown-body" }
dangerouslySetInnerHTML = { { _ _html : markdownToHTML ( work _comment _hidden ) . replace ( /▁/g , "▁▁▁" ) } } > < / d i v >
dangerouslySetInnerHTML = { { _ _html : markdownToHTML ( work _comment ) . replace ( /▁/g , "▁▁▁" ) } } > < / d i v >
< / d i v >
< / d i v >
< / d i v >
< / d i v > }
< / d i v >
< / d i v > : " " }
< / d i v > }
{ data === undefined ? "" : data . stage _list . map ( ( item , key ) => {
let challenge _comment _hidden = item . challenge _comment _hidden === undefined || item . challenge _comment _hidden === null || item . challenge _comment _hidden === "" ;
let challenge _comment = item . challenge _comment === undefined || item . challenge _comment === null || item . challenge _comment === "" ;
return (
< div >
{ challenge _comment === false ?< div className = "stud-class-set mt17" key = { key } >
< div key = { key } >
{ challenge _comment === false &&challenge _comment _hidden == false ?< div className = "stud-class-set mt17" >
< div className = "clearfix edu-back-white poll_list" >
< div className = "font-16 color-dark-21 shixunreporttitleboxtop pd20 color333" >
< span className = { "appraisebox" } > 第 { key + 1 } 关 < / s p a n > 评阅 内 容
{ this . props && this . props . isAdmin OrTeacher ( ) === true ? < a className = "color-blue font-14 fr ml20"
onClick = { ( ) => this . props . isdeleteModal ( item . comment _id , true )}
< span className = { "appraisebox" } > 第 { key + 1 } 关 < / s p a n > {i t e m . n a m e }
{ this . props && this . props . isAdmin ( ) === true ? < a className = "color-blue font-14 fr ml20"
onClick = { ( ) => this . props . isdeleteModal ( item . comment _id , true ,"child" )}
> 删除 < / a > : " " }
{ this . props && this . props . isAdmin OrTeacher ( ) === true ? < a className = "color-blue font-14 fr"
{ this . props && this . props . isAdmin ( ) === true ? < a className = "color-blue font-14 fr"
onClick = { ( ) => this . props . showAppraiseModal ( "child" , item . challenge _id , item . challenge _comment , item . challenge _comment _hidden ) }
> 编辑 < / a > : " " }
< / d i v >
< div className = "font-16 color-dark-21 shixunreporttitleboxbom pd30" >
< div style = { { minHeight : '50px' } } >
< div className = { "personalsummary" } >
< div className = { "markdown-body" }
dangerouslySetInnerHTML = { { _ _html : markdownToHTML ( item . challenge _comment ) . replace ( /▁/g , "▁▁▁" ) } } > < / d i v >
< / d i v >
< / d i v >
< / d i v >
< / d i v >
< / d i v > : " " }
{ challenge _comment _hidden === false && this . props && this . props . isAdminOrTeacher ( ) === true ? < div className = "stud-class-set mt17" key = { key } >
< div className = "clearfix edu-back-white poll_list" >
< div className = "font-16 color-dark-21 shixunreporttitleboxtop pd20 color333" >
< span className = { "appraisebox" } > 第 { key + 1 } 关 < / s p a n > 评 阅 内 容 < s p a n > ( 仅 对 课 堂 老 师 可 见 ) < / s p a n >
{ this . props && this . props . isAdmin ( ) === true ?
< div className = "font-16 color-dark-21 shixunreporttitleboxbom pd30bt" >
< div >
< span className = { "z000" } > 学生可见 < span className = { "z666" } > ( 学生可查看老师的评阅内容 ) < / s p a n > < / s p a n >
< / d i v >
< div className = { "borderbom" } style = { { minHeight : '40px' } } >
{ challenge _comment === true ? "" : < div className = { "personalsummary" } >
< div className = { "markdown-body" }
dangerouslySetInnerHTML = { { _ _html : markdownToHTML ( item . challenge _comment ) . replace ( /▁/g , "▁▁▁" ) } } > < / d i v >
< / d i v > }
< / d i v >
{ this . props && this . props . isAdminOrTeacher ( ) === true ? < a className = "color-blue font-14 fr ml20"
onClick = { ( ) => this . props . isdeleteModal ( item . comment _id , false ) }
> 删除 < / a > : " " }
< div >
< span className = { "z000" } > 学生不可见 < span className = { "z666" } > ( 仅对课堂老师可见 ) < / s p a n > < / s p a n >
< / d i v >
< div style = { { minHeight : '40px' } } >
{ challenge _comment _hidden === true ? "" : < div className = { "personalsummary" } >
< div className = { "markdown-body" }
dangerouslySetInnerHTML = { { _ _html : markdownToHTML ( item . challenge _comment _hidden ) . replace ( /▁/g , "▁▁▁" ) } } > < / d i v >
< / d i v > }
< / d i v >
{ this . props && this . props . isAdminOrTeacher ( ) === true ? < a className = "color-blue font-14 fr"
onClick = { ( ) => this . props . showAppraiseModal ( "child" , item . challenge _id , item . challenge _comment , item . challenge _comment _hidden ) }
> 编辑 < / a > : " " }
< / d i v >
< div className = "font-16 color-dark-21 shixunreporttitleboxbom pd30" >
< div style = { { minHeight : '50px' } } >
< div className = { "personalsummary" } >
< div className = { "markdown-body" }
dangerouslySetInnerHTML = { { _ _html : markdownToHTML ( item . challenge _comment _hidden ) . replace ( /▁/g , "▁▁▁" ) } } > < / d i v >
< / d i v > : < d i v c l a s s N a m e = " f o n t - 1 6 c o l o r - d a r k - 2 1 s h i x u n r e p o r t t i t l e b o x b o m p d 3 0 " >
< div style = { { minHeight : '40px' } } >
< div className = { "personalsummary" } >
< div className = { "markdown-body" }
dangerouslySetInnerHTML = { { _ _html : markdownToHTML ( item . challenge _comment ) . replace ( /▁/g , "▁▁▁" ) } } > < / d i v >
< / d i v >
< / d i v >
< / d i v >
< / d i v >
< / d i v > }
< / d i v >
< / d i v > : " " }