Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 6 years ago
commit 0d9fa58a3e

@ -86,7 +86,7 @@ class CommonWorkAnswer extends Component{
{/* 内容区 */} {/* 内容区 */}
<div className="padding40 memoContent new_li"> <div className="padding40 memoContent new_li">
{reference_answer ? <MarkdownToHtml content={reference_answer || "还未设置答案。"}></MarkdownToHtml> : {reference_answer ? <MarkdownToHtml content={reference_answer || "还未设置答案。"}></MarkdownToHtml> :
reference_answer === undefined ? '' : <NoneData></NoneData>} reference_answer === undefined ? '' : ((!attachments || attachments.length == 0) && <NoneData></NoneData>)}
{ attachments && attachments.map((item) => { { attachments && attachments.map((item) => {
return ( <div className="color-grey"> return ( <div className="color-grey">

@ -190,7 +190,7 @@ class CommonWorkAppraise extends Component{
<div className={"color-grey-6 h20 mb20 font-16"}> <div className={"color-grey-6 h20 mb20 font-16"}>
内容 内容
</div> </div>
<div className={"ml20"} className="markdown-body" dangerouslySetInnerHTML={{__html: markdownToHTML(description)}}> <div className="markdown-body ml20" dangerouslySetInnerHTML={{__html: markdownToHTML(description)}}>
</div> </div>
{attachments.map((item,key)=>{ {attachments.map((item,key)=>{

@ -64,7 +64,9 @@ function buildColumns(that, student_works) {
key: 'id', key: 'id',
render: (text, record, index) => { render: (text, record, index) => {
return ( return (
<span style={{ minWidth: '50px', display: 'inline-block', textAlign: 'center' }} >{(that.state.page - 1) * PAGE_SIZE + index + 1}</span> <span style={{ minWidth: '50px', display: 'inline-block', textAlign: 'center' }} >
{record.isMine == true ? '我' : (that.state.page - 1) * PAGE_SIZE + index + 1}
</span>
)}, )},
}, { }, {
title: '姓名', title: '姓名',
@ -78,7 +80,7 @@ function buildColumns(that, student_works) {
overflow: 'hidden', overflow: 'hidden',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
maxWidth: '98px' width: '98px'
}} title={text}> }} title={text}>
{/* <Tooltip placement="bottom" title={text}> {/* <Tooltip placement="bottom" title={text}>
</Tooltip> */} </Tooltip> */}
@ -97,7 +99,7 @@ function buildColumns(that, student_works) {
<span> <span>
<a href="javascript:;" <a href="javascript:;"
title={record.student_id} title={record.student_id}
style={{color:'#9A9A9A', 'text-overflow': 'ellipsis', 'white-space': 'nowrap', 'max-width': '100px', display: 'block', overflow: 'hidden'}} style={{color:'#9A9A9A', 'text-overflow': 'ellipsis', 'white-space': 'nowrap', 'width': '100px', display: 'block', overflow: 'hidden'}}
>{record.student_id}</a> >{record.student_id}</a>
</span> </span>
), ),
@ -232,7 +234,7 @@ function buildColumns(that, student_works) {
<span> <span>
<Tooltip title={ <Tooltip title={
getScoreTip(student_score, getScoreTip(student_score,
<div> isNiPing ? `你的评阅分数:${record.student_score}` : <div>
{record.student_comment_count && <div>{`${record.student_comment_count}名学生进行了匿评`}</div>} {record.student_comment_count && <div>{`${record.student_comment_count}名学生进行了匿评`}</div>}
<div>有效平均分{record.student_score}</div> <div>有效平均分{record.student_score}</div>
</div> </div>
@ -547,7 +549,7 @@ class CommonWorkList extends Component{
StudentData=isStudent ? [{ id, user_name, user_login, student_id, group_name, work_status, update_time, teacher_score, teaching_asistant_score, student_score, StudentData=isStudent ? [{ id, user_name, user_login, student_id, group_name, work_status, update_time, teacher_score, teaching_asistant_score, student_score,
ultimate_score, work_score, student_comment_count, appeal_all_count, appeal_deal_count, ultimate_score, work_score, student_comment_count, appeal_all_count, appeal_deal_count,
late_penalty, absence_penalty, appeal_penalty, late_penalty, absence_penalty, appeal_penalty,
work_group: '' }] : [] work_group: '', isMine: true }] : []
} }
let params = this._getRequestParams() let params = this._getRequestParams()
let exportUrl = `/api/homework_commons/${workId}/works_list.zip?${queryString.stringify(params)}`; let exportUrl = `/api/homework_commons/${workId}/works_list.zip?${queryString.stringify(params)}`;

@ -40,6 +40,7 @@
.course-message .comment_item_cont:last-child { .course-message .comment_item_cont:last-child {
/* 作品评阅需要 */ /* 作品评阅需要 */
border-bottom: none; border-bottom: none;
padding-bottom: 0px;
} }
.course-message .memoMore { .course-message .memoMore {

@ -46,24 +46,30 @@ const buildColumns = (that) => {
key: 'login', key: 'login',
align:'center', align:'center',
className:"color-grey-6", className:"color-grey-6",
// render: (name, record) => { render: (name, record) => {
// return <a className="color-dark" target="_blank" href={`/users/${record.login}`}>{name}</a> return <span className="color-dark overflowHidden1" style={{maxWidth: '110px'}}>{name}</span>
// } }
}, { }, {
title: '姓名', title: '姓名',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
align:'center', align:'center',
width:"10%",
className:"color-grey-6", className:"color-grey-6",
render: (name, record) => { render: (name, record) => {
return <a className="color-dark" target="_blank" href={`/users/${record.login}`}>{name}</a> return <a className="color-dark overflowHidden1" target="_blank"
style={{maxWidth: '120px'}} href={`/users/${record.login}`}>{name}</a>
} }
}, { }, {
title: '学号', title: '学号',
dataIndex: 'student_id', dataIndex: 'student_id',
key: 'student_id', key: 'student_id',
align:'center', align:'center',
className:"color-grey-6" className:"color-grey-6",
render: (student_id, record) => {
return <span className="color-dark overflowHidden1"
style={{maxWidth: '110px'}} >{student_id}</span>
}
}, { }, {
title: '分班', title: '分班',
dataIndex: 'course_group_name', dataIndex: 'course_group_name',

@ -1757,7 +1757,7 @@ class PollNew extends Component {
}) })
} }
//上移到服务器中 //上移到服务器中
Upanddownmovementof = (bool, poll_question_id) => { Upanddownmovementof = (bool, poll_question_id) => {
// console.log("调用了Upanddownmovementofr") // console.log("调用了Upanddownmovementofr")
// console.log(poll_question_id) // console.log(poll_question_id)
@ -1769,7 +1769,7 @@ class PollNew extends Component {
}).then((result) => { }).then((result) => {
try { try {
if (result.data.status === 0) { if (result.data.status === 0) {
this.props.showNotification(`已完成`); this.props.showNotification(`上移成功`);
thiss.thisinitializationdatanew(); thiss.thisinitializationdatanew();
} }
// console.log(JSON.stringify(result)) // console.log(JSON.stringify(result))
@ -1787,7 +1787,7 @@ class PollNew extends Component {
try { try {
if (result.data.status === 0) { if (result.data.status === 0) {
// message.success("下移题目成功", 1) // message.success("下移题目成功", 1)
this.props.showNotification(`已完成`); this.props.showNotification(`下移成功`);
thiss.thisinitializationdatanew(); thiss.thisinitializationdatanew();
} }
// console.log(JSON.stringify(result)) // console.log(JSON.stringify(result))
@ -2483,7 +2483,7 @@ class PollNew extends Component {
} }
</p> </p>
<p className="mt20"> <span className="font-16 flex1" style={{"white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word"}}>{item.question.question_title}</span></p> <p className="mt20"> <span className="font-16 flex1" style={item.question.question_type === 1?{"white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1116px"}:item.question.question_type === 2? {"white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1120px"}: {"white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word"}}>{item.question.question_title}</span></p>
{/*<pre className="mt20 mb20 font-16 break_word flex1">{item.question.question_title}</pre>*/} {/*<pre className="mt20 mb20 font-16 break_word flex1">{item.question.question_title}</pre>*/}
{item.question.question_type === 1 ? {item.question.question_type === 1 ?
(<RadioGroup defaultChecked={false} disabled> (<RadioGroup defaultChecked={false} disabled>
@ -2823,9 +2823,9 @@ class PollNew extends Component {
}} }}
> >
<li className="clearfix mt30 mb50"> <li className="clearfix mt30 mb50">
<a type="primary" className="defalutSubmitbtn fl mr20" <a className="defalutSubmitbtn fl mr20"onClick={() => this.props.history.goBack()}>取消</a>
<a type="primary" className="defalutCancelbtn fl"
onClick={() => this.submitQuestionnaire()}>提交</a> onClick={() => this.submitQuestionnaire()}>提交</a>
<a className="defalutCancelbtn fl" onClick={() => this.props.history.goBack()}>取消</ a>
</li> </li>
</div> </div>
} }

@ -1377,7 +1377,7 @@ class Listofworks extends Component {
classroom: game_list[i].score, classroom: game_list[i].score,
complete_status: game_list[i].complete_status, complete_status: game_list[i].complete_status,
}) })
experience=game_list[i].complete_status+experience; experience=game_list[i].score+experience;
if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){ if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){
boolgalist=false; boolgalist=false;

@ -394,7 +394,7 @@ class Listofworksstudentone extends Component {
classroom: game_list[i].score, classroom: game_list[i].score,
complete_status: game_list[i].complete_status, complete_status: game_list[i].complete_status,
}) })
experience=game_list[i].complete_status+experience; experience=game_list[i].score+experience;
if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){ if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){
boolgalist=false; boolgalist=false;

@ -51,6 +51,26 @@ class TraineetraininginformationModal extends Component {
componentDidMount() { componentDidMount() {
// this.seacthdata(); // this.seacthdata();
}
componentWillReceiveProps(nextProps) {
// console.log("46");
// console.log(nextProps);
// console.log(this.props);
if (nextProps.boolgalist != this.props.boolgalist) {
// console.log("50");
// console.log(nextProps.user);
if (nextProps.boolgalist !== undefined) {
// console.log("53");
// console.log(nextProps.user);
this.setState({
boolgalist: nextProps.boolgalist,
})
}
}
} }
LimitNumber=(txt)=> { LimitNumber=(txt)=> {
var str = txt; var str = txt;
@ -61,7 +81,7 @@ class TraineetraininginformationModal extends Component {
} }
render() { render() {
var columns; var columns;
if(this.props.boolgalis&&this.props.boolgalist === true) { if(this.state.boolgalist&&this.state.boolgalist === true) {
columns = [ columns = [
{ {
title: '关卡', title: '关卡',

@ -546,6 +546,7 @@ class Newshixuns extends Component {
// const { id } = response.data; // const { id } = response.data;
// if (id) { // if (id) {
if(this.state.file !== undefined){ if(this.state.file !== undefined){
console.log("549");
this.deleteAttachment(this.state.file); this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file:undefined,
@ -577,6 +578,7 @@ class Newshixuns extends Component {
postapplyvisible: false, postapplyvisible: false,
}) })
if(this.state.file !== undefined){ if(this.state.file !== undefined){
console.log("580");
this.deleteAttachment(this.state.file); this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file:undefined,
@ -662,6 +664,7 @@ class Newshixuns extends Component {
cancelText: '取消', cancelText: '取消',
// content: 'Some descriptions', // content: 'Some descriptions',
onOk: () => { onOk: () => {
console.log("665")
this.deleteAttachment(file) this.deleteAttachment(file)
}, },
onCancel() { onCancel() {
@ -671,7 +674,7 @@ class Newshixuns extends Component {
return false; return false;
} }
deleteAttachment = (file) => { deleteAttachment = (file) => {
// console.log(file); console.log(file);
let id=file.response ==undefined ? file.id : file.response.id let id=file.response ==undefined ? file.id : file.response.id
const url = `/attachments/${id}.json` const url = `/attachments/${id}.json`
axios.delete(url, { axios.delete(url, {
@ -760,6 +763,7 @@ class Newshixuns extends Component {
} }
if(thiss.state.file !== undefined){ if(thiss.state.file !== undefined){
console.log("763")
thiss.deleteAttachment(thiss.state.file); thiss.deleteAttachment(thiss.state.file);
thiss.setState({ thiss.setState({
file:file file:file

Loading…
Cancel
Save