|
@@ -56,6 +56,7 @@
|
|
|
bordered
|
|
bordered
|
|
|
style="margin-top: 16px"
|
|
style="margin-top: 16px"
|
|
|
tableLayout="fixed"
|
|
tableLayout="fixed"
|
|
|
|
|
+ :scroll="{ x: 'max-content' }"
|
|
|
>
|
|
>
|
|
|
<a-table-column title="Id" data-index="id" key="id" width="90px" />
|
|
<a-table-column title="Id" data-index="id" key="id" width="90px" />
|
|
|
<a-table-column
|
|
<a-table-column
|
|
@@ -72,7 +73,7 @@
|
|
|
width="90px"
|
|
width="90px"
|
|
|
:customRender="questionTypeFormatter"
|
|
:customRender="questionTypeFormatter"
|
|
|
/>
|
|
/>
|
|
|
- <a-table-column title="题干" data-index="shortTitle" key="shortTitle" ellipsis />
|
|
|
|
|
|
|
+ <a-table-column title="题干" data-index="shortTitle" key="shortTitle" ellipsis width="350px" />
|
|
|
<a-table-column title="分数" data-index="score" key="score" width="90px" />
|
|
<a-table-column title="分数" data-index="score" key="score" width="90px" />
|
|
|
<a-table-column title="难度" data-index="difficult" key="difficult" width="110px">
|
|
<a-table-column title="难度" data-index="difficult" key="difficult" width="110px">
|
|
|
<template #default="{ text }">
|
|
<template #default="{ text }">
|
|
@@ -80,7 +81,11 @@
|
|
|
<StarOutlined v-for="n in 5 - Number(text)" :key="'empty' + n" style="color: #e8e8e8" />
|
|
<StarOutlined v-for="n in 5 - Number(text)" :key="'empty' + n" style="color: #e8e8e8" />
|
|
|
</template>
|
|
</template>
|
|
|
</a-table-column>
|
|
</a-table-column>
|
|
|
- <a-table-column title="创建时间" data-index="createTime" key="createTime" width="120px" />
|
|
|
|
|
|
|
+ <a-table-column title="创建时间" data-index="createTime" key="createTime" width="180px">
|
|
|
|
|
+ <template #default="{ text }">
|
|
|
|
|
+ {{ parseTime(text, '{y}-{m}-{d} {h}:{i}:{s}') }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-table-column>
|
|
|
<a-table-column title="操作" key="action" width="200px">
|
|
<a-table-column title="操作" key="action" width="200px">
|
|
|
<template #default="{ record }">
|
|
<template #default="{ record }">
|
|
|
<a-button size="small" style="margin-right: 8px" @click="showQuestion(record)">预览</a-button>
|
|
<a-button size="small" style="margin-right: 8px" @click="showQuestion(record)">预览</a-button>
|
|
@@ -94,9 +99,10 @@
|
|
|
:total="total"
|
|
:total="total"
|
|
|
:page-size="queryParam.pageSize"
|
|
:page-size="queryParam.pageSize"
|
|
|
:current="queryParam.pageIndex"
|
|
:current="queryParam.pageIndex"
|
|
|
|
|
+ :showSizeChanger="true"
|
|
|
@change="onPageChange"
|
|
@change="onPageChange"
|
|
|
@showSizeChange="onPageSizeChange"
|
|
@showSizeChange="onPageSizeChange"
|
|
|
- style="margin-top: 16px; text-align: right"
|
|
|
|
|
|
|
+ style="margin-top: 16px; text-align: right; display: flex; justify-content: center"
|
|
|
/>
|
|
/>
|
|
|
<a-modal v-model:visible="questionShow.dialog" width="800px" :footer="null" :bodyStyle="{ padding: '24px' }">
|
|
<a-modal v-model:visible="questionShow.dialog" width="800px" :footer="null" :bodyStyle="{ padding: '24px' }">
|
|
|
<div v-if="questionShow.loading" style="text-align: center; padding: 40px 0">
|
|
<div v-if="questionShow.loading" style="text-align: center; padding: 40px 0">
|
|
@@ -143,6 +149,7 @@
|
|
|
import customPagination from '@/components/customPagination.vue'
|
|
import customPagination from '@/components/customPagination.vue'
|
|
|
import { StarFilled, StarOutlined } from '@ant-design/icons-vue'
|
|
import { StarFilled, StarOutlined } from '@ant-design/icons-vue'
|
|
|
import { Modal } from 'ant-design-vue'
|
|
import { Modal } from 'ant-design-vue'
|
|
|
|
|
+ import { parseTime } from '@/utils/exam'
|
|
|
|
|
|
|
|
const examStore = useExamStore()
|
|
const examStore = useExamStore()
|
|
|
|
|
|
|
@@ -151,8 +158,8 @@
|
|
|
questionType: null,
|
|
questionType: null,
|
|
|
level: null,
|
|
level: null,
|
|
|
subjectId: null,
|
|
subjectId: null,
|
|
|
- current: 1,
|
|
|
|
|
- size: 10
|
|
|
|
|
|
|
+ pageIndex: 1,
|
|
|
|
|
+ pageSize: 10
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const subjectFilter = ref([])
|
|
const subjectFilter = ref([])
|
|
@@ -203,10 +210,15 @@
|
|
|
|
|
|
|
|
const search = () => {
|
|
const search = () => {
|
|
|
listLoading.value = true
|
|
listLoading.value = true
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ ...queryParam,
|
|
|
|
|
+ current: queryParam.pageIndex,
|
|
|
|
|
+ size: queryParam.pageSize
|
|
|
|
|
+ }
|
|
|
|
|
+ delete params.pageIndex
|
|
|
|
|
+ delete params.pageSize
|
|
|
tQuestionApi
|
|
tQuestionApi
|
|
|
- .pageList({
|
|
|
|
|
- ...queryParam
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ .pageList(params)
|
|
|
.then((data) => {
|
|
.then((data) => {
|
|
|
const re = data
|
|
const re = data
|
|
|
tableData.value = re.records
|
|
tableData.value = re.records
|