feat: 试卷下载
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
This commit is contained in:
parent
6a32ff3030
commit
1feb6dd264
@ -15,6 +15,7 @@ import {
|
||||
} from '#/components/mj/mj-table'
|
||||
import { grade_map, subject_map } from '#/store/basic-data'
|
||||
import obj from '#/utils/obj'
|
||||
import { downloadFile } from '#/utils/tool'
|
||||
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
|
||||
@ -389,6 +390,15 @@ const onTaskCreated = () => {
|
||||
taskMgrVisible.value = false
|
||||
router.push('/question-bank/task-mgr')
|
||||
}
|
||||
// 下载试卷
|
||||
const downloadPaper = (row: any) => {
|
||||
if (!row.fileUrl) {
|
||||
ElMessage.warning('暂无试卷文件可下载')
|
||||
return
|
||||
}
|
||||
downloadFile(row.fileUrl, row.name)
|
||||
}
|
||||
|
||||
// 删除试卷
|
||||
const deletePaper = (row: any) => {
|
||||
ElMessageBox.confirm('确定删除吗?', '提示', {
|
||||
@ -487,6 +497,9 @@ onMounted(() => {
|
||||
>
|
||||
上传试题
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="downloadPaper(row)">
|
||||
下载试卷
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="deletePaper(row)">
|
||||
删除试卷
|
||||
</el-dropdown-item>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user