Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 6 years ago
commit 6e184654e8

@ -40,11 +40,15 @@ function getScoreTip(score, dom) {
}
function buildColumns(that, student_works) {
let gotWorkGroup = false;
let gotProjectInfo = false;
if (student_works) {
student_works.forEach(item => {
if (item.work_group) {
gotWorkGroup = true
}
if (item.project_info && item.project_info.name) {
gotProjectInfo = true;
}
})
}
let courseId= that.props.match.params.coursesId;
@ -136,6 +140,22 @@ function buildColumns(that, student_works) {
),
})
}
if (gotProjectInfo) {
columns.push({
width: 72,
title: '关联项目',
dataIndex: 'project_info',
key: 'project_info',
render: (project_info, record) => (
<span>
{project_info && project_info.name && <a href={`/projects/${project_info.id}`} target="_blank"
className="overflowHidden1" style={{color:'#4CACFF', width: '80px', margin: '0 auto', display: 'block'}} title={project_info.name}
>{project_info.name}</a>}
</span>
),
})
}
columns = columns.concat([{
width: 88,
title: '提交状态',
@ -176,7 +196,7 @@ function buildColumns(that, student_works) {
}])
if (!niPingAndIsStudent) {
columns.push({
width: 72,
width: 70,
title: '教师评分',
key: 'teacher_score',
dataIndex: 'teacher_score',
@ -192,7 +212,7 @@ function buildColumns(that, student_works) {
})
columns.push({
width: 72,
width: 70,
title: '助教评分',
key: 'teaching_asistant_score',
dataIndex: 'teaching_asistant_score',
@ -251,7 +271,7 @@ function buildColumns(that, student_works) {
if (that.state.anonymous_appeal) {
columns.push({
width: 72,
width: 70,
title: '匿评申诉',
key: 'appeal_all_count',
dataIndex: 'appeal_all_count',
@ -271,7 +291,7 @@ function buildColumns(that, student_works) {
}
if (!niPingAndIsStudent) {
columns.push({
width: 72,
width: 70,
title: '最终成绩',
key: 'work_score',
dataIndex: 'work_score',

@ -205,6 +205,7 @@ class CommonWorkAppraiseReply extends Component{
const isAdmin = this.props.isAdmin()
const isNiPing = homework_status && homework_status.indexOf('匿评中') != -1
const isGroup = this.props.isGroup()
/**
isAdmin || 评阅入口超级管理员老师和助教显示 - 改成admin也不显示
匿评人匿评期间显示
@ -276,6 +277,7 @@ class CommonWorkAppraiseReply extends Component{
showModulationtype={this.showModulationtype}
addSuccess={this.addSuccess} ref={this.editorRef} totalCount={comment_scores.length}
onReply={this.onReply} placeholder={"请在此输入对本作品的评语最大限制2000个字符"}
showSameScore={isGroup}
></GraduationTasksappraiseMainEditor> }
</div>
{/* ${!!comment_scores.length ? 'bor-bottom-greyE' : ''} */}

@ -329,7 +329,7 @@ class CCommentItem extends Component{
<div className="cl"></div>
</div>
</div>}
{!_content && <span className="color656565 mt2 color-grey-9 font-12 mr8">{"暂未写评语"}</span>}
{!_content && <span className="color656565 mt2 color-grey-9 font-12 mr8" style={{ display: 'inline-block'}}>{"暂未写评语"}</span>}
<div className="mt6">
{attachments && attachments.map((attaItem, key)=>{
return(

@ -26,7 +26,7 @@ class GraduationTasksappraiseMainEditor extends Component{
onSubmit = () => {
const { score, same_score } = this.state
let category_id= this.props.match.params.category_id;
const url = this.props.replyUrl || `/graduation_works/${category_id}/add_score.json`
const url = `/graduation_works/${category_id}/add_score.json`
const attachment_ids = this.state.fileList.map(item => {
return item.response ? item.response.id : item.id
})
@ -153,7 +153,7 @@ class GraduationTasksappraiseMainEditor extends Component{
}
render(){
let { total_count, comments, pageCount, fileList, score, same_score, errorMessage, numberErrorMessage } = this.state
const { current_user, memo, task_type, placeholder } = this.props
const { current_user, memo, showSameScore, placeholder } = this.props
const isAdmin = this.props.isAdmin()
const commentUploadProp = {
width: 600,
@ -205,7 +205,7 @@ class GraduationTasksappraiseMainEditor extends Component{
{this.props.title && <span className="mainEditorTitle color-grey-6">{this.props.title}</span>}
<TPMMDEditor ref={this.mdRef} mdID={'appraiseEditor'} placeholder={placeholder || "请在此输入对本作品的评语最大限制2000个字符"}
watch={false} height={160} className={errorMessage ? 'editorInputError' : ''}></TPMMDEditor>
{ task_type == 2 && <div>
{ showSameScore == true && <div>
<Checkbox value={same_score} onChange={this.same_score_change}>整组同评</Checkbox>
<span className={"font-14 color-grey-9"}>(选中则本次评阅对象指小组全部成员否则仅评阅此成员1人 )</span>
</div> }

@ -76,7 +76,8 @@ class GraduationTasksappraiseReplyChild extends Component{
</div>}
{this.props.ultimate===true ? "": isAdmin && <GraduationTasksappraiseMainEditor {...this.props}
addSuccess={() => this.props.addSuccess()}
addSuccess={() => this.props.addSuccess()}
showSameScore={true}
></GraduationTasksappraiseMainEditor> }
</div>

@ -55,7 +55,7 @@ class GraduationTasksnew extends Component {
for (var list of fileList) {
listid.push(list.response.id)
}
if (GraduationTasksnewtype === true) {
// if (GraduationTasksnewtype === true) {
this.props.form.validateFields((err, values) => {
if (!err) {
if (values.tasktype === undefined) {
@ -87,18 +87,20 @@ class GraduationTasksnew extends Component {
attachment_ids: listid,
}
).then((response) => {
if (response.status === 200) {
GraduationTasksnewtype = false;
// if (response.status === 200) {
// GraduationTasksnewtype = false;
// this.goback();
if(response!==undefined){
this.props.history.push("/courses/" + this.props.match.params.coursesId + "/graduation_tasks/" + this.props.match.params.category_id + "/" + response.data.task_id + "/setting");
}
// }
}).catch((error) => {
console.log(error)
})
}
});
}
// }
}
@ -392,7 +394,7 @@ class GraduationTasksnew extends Component {
>
{getFieldDecorator('description', {
rules: [{
required: true, message: '请输入帖子内容',
required: true, message: '请输入内容',
}, {
max: 5000, message: '最大限制为5000个字符',
}],

@ -151,7 +151,8 @@ class CommitSummary extends Component{
<Form labelCol={{span: 5}}layout='vertical' onSubmit={this.handleSubmit} wrapperCol={{span: 12}}>
<Form.Item
>
<div style={{ "background": "#fff","padding-bottom":"20px","padding-left":"20px","padding-right":"20px"}}>
<div style={{ "background": "#fff","padding-bottom":"20px","padding-left":"20px","padding-right":"20px"}}
className="mdInForm">
{getFieldDecorator('description', {
rules: [{
required: true, message: '请输入帖子内容',

Loading…
Cancel
Save