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

chore: update

上级 fe1a9699
...@@ -11,15 +11,25 @@ ...@@ -11,15 +11,25 @@
ref="form" ref="form"
> >
<el-form-item prop="comment"> <el-form-item prop="comment">
<chapter-work-comment-item :data="item" :index="index" :disabled="disabled" :key="item.id" @update="getList" /> </el-form-item <chapter-work-comment-item
:data="item"
:index="index"
:disabled="disabled"
:key="item.id"
@update="getList"
/> </el-form-item
></el-form> ></el-form>
</template> </template>
<!-- <p style="color: #f00;margin: 20px 0;">{{ $t('viewerWork.commentSubmitTips', { date: endTime }) }}</p> -->
<p class="help" style="margin: 20px 0;color: #999;line-height: 28px;">
已于 {{ submitTime }} 提交,等待老师批改中。
</p>
<div class="button" v-if="status !== 0"> <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 style="color: #f00" v-if="status === 1">注:重新提交后不可修改,请检查好作业内容再做提交。</p>
<p v-else>{{ $t('viewerWork.commentSubmitTips', { date: endTime }) }}</p> <!-- <p style="color: #f00" v-else>{{ $t('viewerWork.commentSubmitTips', { date: endTime }) }}</p> -->
</div> </div>
<slot></slot> <slot></slot>
<div class="more" v-if="false"> <div class="more" v-if="false">
...@@ -44,7 +54,7 @@ export default { ...@@ -44,7 +54,7 @@ export default {
return { return {
list: [], list: [],
rules: { rules: {
comment: [{ required: true, message: '请输入评内容', trigger: 'change' }] comment: [{ required: true, message: '请输入评内容', trigger: 'change' }]
}, },
popoverVisible: false popoverVisible: false
} }
...@@ -78,11 +88,14 @@ export default { ...@@ -78,11 +88,14 @@ export default {
// return false // return false
// } // }
// return !this.isSubmitTime // return !this.isSubmitTime
},
submitTime() {
return this.list[0]?.created_time
} }
}, },
methods: { methods: {
getList() { getList() {
api.getChapterHomeworkOther(this.sid, this.cid, this.pid).then(response => { api.getChapterHomeworkOther(this.sid, this.cid, this.pid).then((response) => {
this.list = response this.list = response
}) })
}, },
...@@ -90,7 +103,7 @@ export default { ...@@ -90,7 +103,7 @@ export default {
checkSubmit() { checkSubmit() {
let result = true let result = true
for (let i = 0; i < this.list.length; i++) { for (let i = 0; i < this.list.length; i++) {
this.$refs.form[i].validate(valid => { this.$refs.form[i].validate((valid) => {
if (!valid) { if (!valid) {
result = valid result = valid
return result return result
...@@ -124,12 +137,12 @@ export default { ...@@ -124,12 +137,12 @@ export default {
}) })
api api
.addChapterHomeworkComment(params) .addChapterHomeworkComment(params)
.then(response => { .then((response) => {
this.$message({ type: 'success', message: response.message }) this.$message({ type: 'success', message: response.message })
this.getList() this.getList()
this.$emit('update') this.$emit('update')
}) })
.catch(error => { .catch((error) => {
this.$message({ type: 'error', message: error.message }) this.$message({ type: 'error', message: error.message })
}) })
} }
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
</div> </div>
<div class="chapter-work-comment-and-reply-tools"> <div class="chapter-work-comment-and-reply-tools">
<el-button size="small" @click="showComment = !showComment">评论</el-button> <el-button size="small" @click="showComment = !showComment">回复</el-button>
<template v-if="showComment"> <template v-if="showComment">
<div style="flex:1;"> <div style="flex:1;">
<v-editor v-model="comment"></v-editor> <v-editor v-model="comment"></v-editor>
......
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
commentTitle: '评论同学作业', commentTitle: '评论同学作业',
commentSubmitTips: '提交评论截止时间为:{date},截止时间前均可修改。', commentSubmitTips: '提交评论截止时间为:{date},截止时间前均可修改。',
commentMyTitle: '我的评论', commentMyTitle: '我的评论',
commentSubmitText: '提交评', commentSubmitText: '提交评',
answerMoreButtonText: '去看其他同学作业', answerMoreButtonText: '去看其他同学作业',
submittedAssignments: '同学提交的作业', submittedAssignments: '同学提交的作业',
student: '同学', student: '同学',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论