|
@@ -4,6 +4,9 @@
|
|
<template #type="{display}">
|
|
<template #type="{display}">
|
|
{{ translateType(display) }}
|
|
{{ translateType(display) }}
|
|
</template>
|
|
</template>
|
|
|
|
+ <template #title="{row, display}">
|
|
|
|
+ {{ display }}({{ row.remark }})
|
|
|
|
+ </template>
|
|
<template #doneTime="{row, display}">
|
|
<template #doneTime="{row, display}">
|
|
<span>{{ row.isDo ? row.doneTime : '' }}</span>
|
|
<span>{{ row.isDo ? row.doneTime : '' }}</span>
|
|
</template>
|
|
</template>
|
|
@@ -11,7 +14,7 @@
|
|
{{ row.isDo ? '已完成' : '未完成' }}
|
|
{{ row.isDo ? '已完成' : '未完成' }}
|
|
</template>
|
|
</template>
|
|
<template #rate="{row, display}">
|
|
<template #rate="{row, display}">
|
|
- {{ row.isDo ? display + '%' : '' }}
|
|
|
|
|
|
+ {{ row.isDo && display ? display + '%' : '' }}
|
|
</template>
|
|
</template>
|
|
<template #action="{row}">
|
|
<template #action="{row}">
|
|
<el-button v-if="isPaperDone(row)" type="text" icon="el-icon-view"
|
|
<el-button v-if="isPaperDone(row)" type="text" icon="el-icon-view"
|
|
@@ -31,19 +34,26 @@ import HomeworkPaper from '@/views/questioncenter/components/homework-paper'
|
|
export default {
|
|
export default {
|
|
name: 'paper-work-history-detail',
|
|
name: 'paper-work-history-detail',
|
|
components: { HomeworkPaper, DynamicTable },
|
|
components: { HomeworkPaper, DynamicTable },
|
|
- props: ['workId'],
|
|
|
|
|
|
+ props: ['workId', 'type'],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- columns: [
|
|
|
|
|
|
+ rows: []
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ useVideo() {
|
|
|
|
+ return !!consts.enum.homeworkTypes.find(t => t.value == this.type)?.useVideo
|
|
|
|
+ },
|
|
|
|
+ columns() {
|
|
|
|
+ return [
|
|
{ prop: 'id', label: 'ID', width: '80px', sortable: true },
|
|
{ prop: 'id', label: 'ID', width: '80px', sortable: true },
|
|
{ prop: 'type', label: '类型', width: '120px', slotBody: 'type' },
|
|
{ prop: 'type', label: '类型', width: '120px', slotBody: 'type' },
|
|
- { prop: 'title', label: '学生' },
|
|
|
|
|
|
+ { prop: 'title', label: '学生', slotBody: 'title' },
|
|
{ prop: 'doneTime', label: '完成时间', width: '180px', slotBody: 'doneTime' },
|
|
{ prop: 'doneTime', label: '完成时间', width: '180px', slotBody: 'doneTime' },
|
|
{ prop: 'isDo', label: '状态', width: '120px', slotBody: 'status', sortable: true },
|
|
{ prop: 'isDo', label: '状态', width: '120px', slotBody: 'status', sortable: true },
|
|
- { prop: 'scoreRate', label: '正确率', width: '90px', slotBody: 'rate', sortable: true },
|
|
|
|
- { prop: 'action', label: '操作', width: '80px', slotBody: 'action' }
|
|
|
|
- ],
|
|
|
|
- rows: []
|
|
|
|
|
|
+ { prop: 'scoreRate', label: this.useVideo ? '观看比例' : '正确率', width: '100px', slotBody: 'rate', sortable: true },
|
|
|
|
+ { prop: 'action', label: '操作', width: '80px', slotBody: 'action', hidden: this.useVideo }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|