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

bug fixes

上级 05ff60fb
......@@ -68,17 +68,7 @@
</div>
</div>
<div class="buttons">
<!-- 驳回的提交 -->
<el-popover placement="bottom" width="170" v-model="popoverVisible" v-if="detail.status === 1">
<p>本次作业提交后不可修改,您确认提交吗?</p>
<div style="text-align: right; margin-top: 10px">
<el-button size="mini" type="text" @click="popoverVisible = false">取消</el-button>
<el-button type="primary" size="mini" @click="onSubmit">确定提交</el-button>
</div>
<el-button type="primary" :disabled="disabled" slot="reference">{{ submitText }}</el-button>
</el-popover>
<!-- 正常提交 -->
<el-tooltip :content="$t('viewerWork.workSubmitButtonTips')" placement="right" v-else>
<el-tooltip :content="$t('viewerWork.workSubmitButtonTips')" placement="right">
<el-button type="primary" :disabled="disabled" :loading="submitLoading" @click="onSubmit">{{
submitText
}}</el-button>
......@@ -343,6 +333,18 @@ export default {
this.messageInstance = this.$message.error(this.$t('viewerWork.examSubmitError'))
return
}
// 驳回提交
if (this.detail.status === 1) {
this.$confirm('本次作业提交后不可修改,您确认提交吗?', '提示', {
confirmButtonText: '确定提交',
type: 'warning'
}).then(this.handleSubmit)
} else {
// 正常提交
this.handleSubmit()
}
},
handleSubmit() {
// 计算答题时间
const duration = Math.floor((new Date().getTime() - this.startTime) / 1000)
// 提交的答案数据
......@@ -390,10 +392,12 @@ export default {
// 重新编辑
onReEdit() {
this.dialogVisible = false
if (this.detail.status === 1) {
window.location.hash = '#work'
return
}
if (this.detail.status2 === 1) {
window.location.hash = '#comment'
} else {
window.location.hash = '#work'
}
}
},
......
......@@ -21,19 +21,7 @@
></el-form>
</template>
<div class="button">
<!-- 驳回的提交 -->
<el-popover placement="bottom" width="170" v-model="popoverVisible" v-if="status === 1">
<p>本次作业提交后不可修改,您确认提交吗?</p>
<div style="text-align: right; margin-top: 10px">
<el-button size="mini" type="text" @click="popoverVisible = false">取消</el-button>
<el-button type="primary" size="mini" @click="handleSubmit">确定提交</el-button>
</div>
<el-button type="primary" :disabled="disabled" slot="reference">{{
$t('viewerWork.commentSubmitText')
}}</el-button>
</el-popover>
<!-- 正常提交 -->
<el-button type="primary" :disabled="disabled" @click="handleSubmit" v-else>{{
<el-button type="primary" :disabled="disabled" @click="handleSubmit">{{
$t('viewerWork.commentSubmitText')
}}</el-button>
<p>{{ $t('viewerWork.commentSubmitTips', { date: endDate }) }}</p>
......@@ -121,7 +109,16 @@ export default {
this.messageInstance = this.$message.error(this.$t('viewerWork.examSubmitError'))
return
}
// 驳回提交
if (this.status === 1) {
this.$confirm('本次作业提交后不可修改,您确认提交吗?', '提示', {
confirmButtonText: '确定提交',
type: 'warning'
}).then(this.handleSubmitReqeuest)
} else {
// 正常提交
this.handleSubmitReqeuest()
}
},
handleSubmitReqeuest() {
const params = this.list.map(({ id, comment }) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论