|
@@ -6,12 +6,6 @@
|
|
|
<h3 style="border-left: solid 4px #3651d4; padding-left: 8px; margin-bottom: 12px; font-size: 18px">
|
|
<h3 style="border-left: solid 4px #3651d4; padding-left: 8px; margin-bottom: 12px; font-size: 18px">
|
|
|
<div>{{ examName }}</div>
|
|
<div>{{ examName }}</div>
|
|
|
</h3>
|
|
</h3>
|
|
|
- <div style="display: flex; align-items: center" class="mb-4" v-if="examType == 4">
|
|
|
|
|
- <div class="mr-4">学科分类</div>
|
|
|
|
|
- <a-select ref="select" v-model:value="tabId" style="width: 120px" allowClear @change="handleChange">
|
|
|
|
|
- <a-select-option :value="item.id" v-for="(item, idx) in subjectList">{{ item.name }}</a-select-option>
|
|
|
|
|
- </a-select>
|
|
|
|
|
- </div>
|
|
|
|
|
<a-spin :spinning="taskLoading">
|
|
<a-spin :spinning="taskLoading">
|
|
|
<a-table
|
|
<a-table
|
|
|
ref="paperTableRef"
|
|
ref="paperTableRef"
|
|
@@ -48,7 +42,7 @@
|
|
|
<a-button type="link" size="small">填写{{ examName }}</a-button>
|
|
<a-button type="link" size="small">填写{{ examName }}</a-button>
|
|
|
</router-link>
|
|
</router-link>
|
|
|
<router-link
|
|
<router-link
|
|
|
- v-if="record.examType != 3 && record.status == 2"
|
|
|
|
|
|
|
+ v-if="record.status == 2"
|
|
|
:to="{ path: '/student/read', query: { id: record.answerId } }"
|
|
:to="{ path: '/student/read', query: { id: record.answerId } }"
|
|
|
target="_blank"
|
|
target="_blank"
|
|
|
>
|
|
>
|
|
@@ -63,9 +57,6 @@
|
|
|
<template v-if="column.key === 'paperType'">
|
|
<template v-if="column.key === 'paperType'">
|
|
|
{{ paperTypeEnum(record.paperType) }}
|
|
{{ paperTypeEnum(record.paperType) }}
|
|
|
</template>
|
|
</template>
|
|
|
- <template v-if="column.key === 'subjectId'">
|
|
|
|
|
- {{ subjectName(record.subjectId) || '--' }}
|
|
|
|
|
- </template>
|
|
|
|
|
<template v-if="column.key === 'action'">
|
|
<template v-if="column.key === 'action'">
|
|
|
<router-link
|
|
<router-link
|
|
|
v-if="!record.status"
|
|
v-if="!record.status"
|
|
@@ -98,6 +89,7 @@
|
|
|
import { useRoute } from 'vue-router'
|
|
import { useRoute } from 'vue-router'
|
|
|
import tool from '@/utils/tool'
|
|
import tool from '@/utils/tool'
|
|
|
import { parseTime } from '@/utils/exam'
|
|
import { parseTime } from '@/utils/exam'
|
|
|
|
|
+ import EventBus from '@/utils/EventBus'
|
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
|
const formatDateTime = (val) => {
|
|
const formatDateTime = (val) => {
|
|
|
if (!val) return ''
|
|
if (!val) return ''
|
|
@@ -154,9 +146,8 @@
|
|
|
taskAllColumns.value.filter((r) => r.examType.includes(parseFloat(examType.value)))
|
|
taskAllColumns.value.filter((r) => r.examType.includes(parseFloat(examType.value)))
|
|
|
)
|
|
)
|
|
|
const taskAllColumns = ref([
|
|
const taskAllColumns = ref([
|
|
|
- { title: '问卷名称', dataIndex: 'name', key: 'name', examType: [4] },
|
|
|
|
|
|
|
+ { title: '作业名称', dataIndex: 'name', key: 'name', examType: [4] },
|
|
|
{ title: '试卷类型', dataIndex: 'paperType', key: 'paperType', width: 120, examType: [4] },
|
|
{ title: '试卷类型', dataIndex: 'paperType', key: 'paperType', width: 120, examType: [4] },
|
|
|
- { title: '学科', dataIndex: 'subjectId', key: 'subjectId', width: 120, examType: [4] },
|
|
|
|
|
|
|
|
|
|
{ title: '问卷名称', dataIndex: 'examName', key: 'examName', examType: [1, 2, 3] },
|
|
{ title: '问卷名称', dataIndex: 'examName', key: 'examName', examType: [1, 2, 3] },
|
|
|
{ title: '问卷类型', dataIndex: 'examType', key: 'examType', width: 120, examType: [1, 2, 3] },
|
|
{ title: '问卷类型', dataIndex: 'examType', key: 'examType', width: 120, examType: [1, 2, 3] },
|
|
@@ -212,17 +203,6 @@
|
|
|
getTaskList()
|
|
getTaskList()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- const tabId = ref('')
|
|
|
|
|
- const subjectList = ref([])
|
|
|
|
|
- const initSubject = async () => {
|
|
|
|
|
- await examStore.initSubject()
|
|
|
|
|
- subjectList.value = examStore.subjects
|
|
|
|
|
- }
|
|
|
|
|
- const subjectName = computed(() => {
|
|
|
|
|
- return (id) => {
|
|
|
|
|
- return subjectList.value.filter((r) => r.id == id)[0]?.name
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
const handleChange = (value) => {
|
|
const handleChange = (value) => {
|
|
|
pagination.value.subjectId = value
|
|
pagination.value.subjectId = value
|
|
|
getTaskList()
|
|
getTaskList()
|
|
@@ -230,9 +210,10 @@
|
|
|
// lifecycle
|
|
// lifecycle
|
|
|
const examType = ref()
|
|
const examType = ref()
|
|
|
const paperType = ref(2)
|
|
const paperType = ref(2)
|
|
|
|
|
+ EventBus.off('getTaskList', getTaskList)
|
|
|
|
|
+ EventBus.on('getTaskList', getTaskList)
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
examType.value = route.params && route.params.examType
|
|
examType.value = route.params && route.params.examType
|
|
|
- initSubject()
|
|
|
|
|
getTaskList()
|
|
getTaskList()
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|