|
|
@@ -34,29 +34,22 @@
|
|
|
<template v-if="column.key === 'endTime'">
|
|
|
{{ formatDateTime(record.endTime) }}
|
|
|
</template>
|
|
|
- <template v-if="column.key === 'examStatus'">
|
|
|
- <a-tag :color="statusTagFormatter(record.examStatus)" size="small">
|
|
|
- {{ statusTextFormatter(record.examStatus) }}
|
|
|
+ <template v-if="column.key === 'status'">
|
|
|
+ <a-tag :color="statusTagFormatter(record.status)" size="small">
|
|
|
+ {{ statusTextFormatter(record.status) }}
|
|
|
</a-tag>
|
|
|
</template>
|
|
|
<template v-if="column.key === 'action'">
|
|
|
<router-link
|
|
|
- v-if="record.examStatus === 0"
|
|
|
- :to="{ path: '/student/do', query: { id: record.paperId } }"
|
|
|
- target="_blank"
|
|
|
- >
|
|
|
- <a-button type="link" size="small">查看{{ examName }}</a-button>
|
|
|
- </router-link>
|
|
|
- <router-link
|
|
|
- v-if="record.examStatus === 1"
|
|
|
+ v-if="record.status === 0"
|
|
|
:to="{ path: '/student/do', query: { id: record.paperId } }"
|
|
|
target="_blank"
|
|
|
>
|
|
|
<a-button type="link" size="small">填写{{ examName }}</a-button>
|
|
|
</router-link>
|
|
|
<router-link
|
|
|
- v-if="record.examStatus === 2"
|
|
|
- :to="{ path: '/student/read', query: { id: record.paperId } }"
|
|
|
+ v-if="record.status === 2"
|
|
|
+ :to="{ path: '/student/read', query: { id: record.answerId } }"
|
|
|
target="_blank"
|
|
|
>
|
|
|
<a-button type="link" size="small">查看结果</a-button>
|
|
|
@@ -155,20 +148,20 @@
|
|
|
{ title: '问卷类型', dataIndex: 'examType', key: 'examType', width: 120, examType: [1, 2, 3] },
|
|
|
{ title: '开始时间', dataIndex: 'startTime', key: 'startTime', width: 180, examType: [1, 2, 3] },
|
|
|
{ title: '结束时间', dataIndex: 'endTime', key: 'endTime', width: 180, examType: [1, 2, 3] },
|
|
|
- { title: '状态', dataIndex: 'examStatus', key: 'examStatus', width: 90, examType: [1, 2, 3] },
|
|
|
+ { title: '状态', dataIndex: 'status', key: 'status', width: 90, examType: [1, 2, 3] },
|
|
|
{ title: '操作', key: 'action', align: 'right', width: 120, examType: [1, 2, 3, 4] }
|
|
|
])
|
|
|
|
|
|
const statusTextFormatter = (status) => {
|
|
|
- if (status === 0) return '未开始'
|
|
|
- if (status === 1) return '已开始'
|
|
|
- if (status === 2) return '已结束'
|
|
|
+ if (status === 0) return '未答题'
|
|
|
+ if (status === 1) return '待判分'
|
|
|
+ if (status === 2) return '已完成'
|
|
|
return ''
|
|
|
}
|
|
|
const statusTagFormatter = (status) => {
|
|
|
- if (status === 0) return 'blue'
|
|
|
+ if (status === 2) return 'blue'
|
|
|
if (status === 1) return 'green'
|
|
|
- if (status === 2) return 'gray'
|
|
|
+ if (status === 0) return 'gray'
|
|
|
return 'default'
|
|
|
}
|
|
|
const getTaskList = async () => {
|