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

修改互评模块

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