|
|
@@ -61,7 +61,6 @@
|
|
|
<script setup>
|
|
|
import { useExamStore } from '@/store/exam'
|
|
|
import examPaperApi from '@/api/student/examPaper'
|
|
|
- import taskApi from '@/api/student/examPaper'
|
|
|
import { useRoute } from 'vue-router'
|
|
|
import tool from '@/utils/tool'
|
|
|
import { parseTime } from '@/utils/exam'
|
|
|
@@ -118,25 +117,15 @@
|
|
|
ellipsis: true
|
|
|
}
|
|
|
]
|
|
|
- const taskColumns = computed(() =>
|
|
|
- taskAllColumns.value.filter((r) => r.columnsType.includes(parseFloat(examType.value)))
|
|
|
- )
|
|
|
- const taskAllColumns = ref([
|
|
|
- { title: '课程名称', dataIndex: 'courseName', key: 'courseName', columnsType: [4] },
|
|
|
- { title: '章节名称', dataIndex: 'chapterName', key: 'chapterName', columnsType: [4] },
|
|
|
- { title: '课时名称', dataIndex: 'hourName', key: 'hourName', columnsType: [4] },
|
|
|
- { title: '作业名称', dataIndex: 'name', key: 'name', columnsType: [4] },
|
|
|
- { title: '试卷类型', dataIndex: 'paperType', key: 'paperType', width: 120, columnsType: [4] },
|
|
|
+ const taskColumns = ref([
|
|
|
+ { title: '问卷名称', dataIndex: 'examName', key: 'examName' },
|
|
|
+ { title: '问卷类型', dataIndex: 'examType', key: 'examType', width: 120 },
|
|
|
+ { title: '开始时间', dataIndex: 'startTime', key: 'startTime', width: 180 },
|
|
|
+ { title: '结束时间', dataIndex: 'endTime', key: 'endTime', width: 180 },
|
|
|
|
|
|
- { title: '问卷名称', dataIndex: 'examName', key: 'examName', columnsType: [1, 2, 3] },
|
|
|
- { title: '问卷类型', dataIndex: 'examType', key: 'examType', width: 120, columnsType: [1, 2, 3] },
|
|
|
- { title: '开始时间', dataIndex: 'startTime', key: 'startTime', width: 180, columnsType: [1, 2, 3] },
|
|
|
- { title: '结束时间', dataIndex: 'endTime', key: 'endTime', width: 180, columnsType: [1, 2, 3] },
|
|
|
-
|
|
|
- { title: '状态', dataIndex: 'status', key: 'status', width: 90, columnsType: [1, 2, 3, 4] },
|
|
|
- { title: '操作', key: 'action', align: 'right', width: 120, columnsType: [1, 2, 3, 4] }
|
|
|
+ { title: '状态', dataIndex: 'status', key: 'status', width: 90},
|
|
|
+ { title: '操作', key: 'action', align: 'right', width: 120}
|
|
|
])
|
|
|
-
|
|
|
const statusTextFormatter = (status) => {
|
|
|
if (status === 0) return '未答题'
|
|
|
if (status === 1) return '待判分'
|
|
|
@@ -161,11 +150,7 @@
|
|
|
paperType: paperType.value,
|
|
|
examType: examType.value
|
|
|
}
|
|
|
- if (examType.value == 4) {
|
|
|
- res = await examPaperApi.newPageList(params)
|
|
|
- } else {
|
|
|
- res = await taskApi.pageExamList(params)
|
|
|
- }
|
|
|
+ res = await examPaperApi.pageExamList(params)
|
|
|
|
|
|
taskList.value = res?.records || []
|
|
|
pagination.value.total = res.total
|