提交 0a2ec083 authored 作者: 王鹏飞's avatar 王鹏飞

修改互评模块

上级 bc817a72
......@@ -20,32 +20,11 @@
</el-form>
</template>
</div>
<p style="color: red" v-if="deadline && detail.status !== 1">
{{ $t('viewerWork.deadline', { date: deadline }) }}
</p>
<!-- 驳回状态 -->
<template v-if="detail.status === 8">
<div class="work-bottom">
<div class="info">
<div class="paper-check">
<h4>{{ $t('viewerWork.rejectTips') }}</h4>
<div class="paper-check-item">
<b>{{ $t('viewerWork.rejectTime') }}</b>
{{ detail.checker_time }}
</div>
<div class="paper-check-item">
<b>{{ $t('viewerWork.rejectContent') }}</b>
<div class="edit_html" v-html="detail.check_comments"></div>
</div>
</div>
</div>
</div>
<div class="buttons">
<el-button type="primary" @click="onReEdit">{{ $t('viewerWork.reEdit') }}</el-button>
</div>
</template>
<!-- 正常状态 -->
<template v-else>
<!-- 有互评的,批改后不显示 -->
<template v-if="!(hasComment && isRevised)">
<p style="color: red" v-if="deadline && detail.status !== 1">
{{ $t('viewerWork.deadline', { date: deadline }) }}
</p>
<div class="work-bottom" v-if="detail.status !== 1">
<div class="info">
<template v-if="isRevised">
......@@ -80,19 +59,41 @@
<span>提交后不可修改,请检查好作业内容再做提交。</span>
</template>
<template v-else>
<span v-if="hasComment">{{ $t('viewerWork.commentTips') }}</span>
<span v-if="hasComment && !isRevised">{{ $t('viewerWork.commentTips') }}</span>
</template>
</div>
</template>
</container>
<chapter-work-comment
id="comment"
:endDate="commentEndDate"
:status="detail.status2"
@update="$emit('updateHomework')"
v-if="showComment"
id="comment"
/>
>
<!-- 已批改 -->
<template v-if="isRevised">
<div class="work-bottom">
<div class="info">
<div class="paper-check">
<p>{{ $t('viewerWork.correctionTime') }}{{ detail.checker_time }}</p>
<div class="paper-check-item" v-if="hasScore">
<b>{{ $t('viewerWork.score') }}</b>
{{ detail.score }}
</div>
<div class="paper-check-item">
<b>{{ $t('viewerWork.comments') }}</b>
<div class="edit_html" v-html="detail.check_comments"></div>
</div>
</div>
</div>
</div>
<div class="buttons">
<el-button type="primary" :disabled="disabled">{{ submitText }}</el-button>
</div>
</template>
</chapter-work-comment>
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="500px">
<div class="paper-check-item">
......@@ -221,7 +222,7 @@ export default {
showComment() {
const currentTime = new Date().getTime()
const endTime = +new Date(this.deadline)
return this.hasComment && currentTime > endTime
return this.hasComment && currentTime > endTime && this.detail.status !== 1
},
disabled() {
if (this.detail.status === 1) {
......@@ -247,7 +248,7 @@ export default {
getDeadline() {
api.getChapterHomeworkDeadline(this.sid, this.cid, this.pid).then(response => {
this.deadline = response.dead_line
this.hasUpload = !!response.pdf
this.hasUpload = response.pdf !== 0
this.isAnonymous = !!response.anonymous
this.hasComment = !!response.comment
this.commentEndDate = response.comment_end
......
......@@ -20,14 +20,14 @@
/> </el-form-item
></el-form>
</template>
<div class="button">
<div class="button" v-if="status !== 0">
<el-button type="primary" :disabled="disabled" @click="handleSubmit">{{
$t('viewerWork.commentSubmitText')
}}</el-button>
<p v-if="status === 1">注:重新提交后不可修改,请检查好作业内容再做提交。</p>
<p v-else>{{ $t('viewerWork.commentSubmitTips', { date: endDate }) }}</p>
</div>
<slot></slot>
<div class="more">
<router-link :to="`${$route.path}/answers`" target="_blank">
<el-button round>{{ $t('viewerWork.answerMoreButtonText') }}</el-button>
......
<!--课程考核-->
<template>
<div class="course-assess-standard">
<div class="course-assess-standard" v-if="checkList.length">
<div class="subtitle">
<span>{{ $t('pages.learn.courseDetail.Courseassessmentstandard') }}</span>
</div>
......
......@@ -33,7 +33,7 @@
<el-tab-pane lazy :label="$t('pages.learn.courseDetail.Courseassessment')">
<course-assessment :course="detail"></course-assessment>
</el-tab-pane>
<el-tab-pane lazy label="课程直播">
<el-tab-pane lazy label="课程直播" v-if="detail.meetings && detail.meetings.length">
<course-live :course="detail"></course-live>
</el-tab-pane>
</el-tabs>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论