|
@@ -63,6 +63,9 @@
|
|
|
<template #paperName="{row}">
|
|
<template #paperName="{row}">
|
|
|
<span class="paper-name-link" @click="handleShowPaperDetail(row)">{{ row.paperName || '-' }}</span>
|
|
<span class="paper-name-link" @click="handleShowPaperDetail(row)">{{ row.paperName || '-' }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <template #download="{row}">
|
|
|
|
|
+ <el-button type="primary" link @click="handleDownload(row.paperId, row.paperName)" v-hasPermi="['learn:paper:download']">下载</el-button>
|
|
|
|
|
+ </template>
|
|
|
</Table>
|
|
</Table>
|
|
|
|
|
|
|
|
<!-- 题目类型详情弹窗 -->
|
|
<!-- 题目类型详情弹窗 -->
|
|
@@ -117,6 +120,7 @@ import DictTag from '@/components/DictTag/index.vue'
|
|
|
import consts from "@/utils/consts.js"
|
|
import consts from "@/utils/consts.js"
|
|
|
import { listToMap } from "@/utils/index.js"
|
|
import { listToMap } from "@/utils/index.js"
|
|
|
import { useProvidePaperBatchCondition } from "@/views/dz/papers/hooks/usePaperBatchCondition.js"
|
|
import { useProvidePaperBatchCondition } from "@/views/dz/papers/hooks/usePaperBatchCondition.js"
|
|
|
|
|
+import { usePaperDownload } from "@/views/dz/papers/hooks/usePaperDownload.js"
|
|
|
import { parseTime } from "@/utils/ruoyi.js"
|
|
import { parseTime } from "@/utils/ruoyi.js"
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance()
|
|
const { proxy } = getCurrentInstance()
|
|
@@ -140,6 +144,9 @@ const queryParams = ref({
|
|
|
pageSize: 10
|
|
pageSize: 10
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+// 下载功能
|
|
|
|
|
+const { handleDownload } = usePaperDownload(queryParams)
|
|
|
|
|
+
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
|
const rules = {}
|
|
const rules = {}
|
|
|
|
|
|
|
@@ -268,7 +275,8 @@ const columns = [
|
|
|
{ label: '试卷类型', prop: 'paperType', width: 120 },
|
|
{ label: '试卷类型', prop: 'paperType', width: 120 },
|
|
|
{ label: '题数/总分', prop: 'questionInfo', width: 100, type: 'slot', slotName: 'questionInfo' },
|
|
{ label: '题数/总分', prop: 'questionInfo', width: 100, type: 'slot', slotName: 'questionInfo' },
|
|
|
{ label: '时长(分钟)', prop: 'duration', width: 120, type: 'slot', slotName: 'duration' },
|
|
{ label: '时长(分钟)', prop: 'duration', width: 120, type: 'slot', slotName: 'duration' },
|
|
|
- { label: '创建时间', prop: 'createTime', width: 160, type: 'slot', slotName: 'createTime' }
|
|
|
|
|
|
|
+ { label: '创建时间', prop: 'createTime', width: 160, type: 'slot', slotName: 'createTime' },
|
|
|
|
|
+ { label: '下载', prop: 'download', width: 80, type: 'slot', slotName: 'download' }
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
// 操作按钮
|
|
// 操作按钮
|