【新增】知识点前端,试题导入按钮,学生身份证字段
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Dialog v-model="dialogVisible" title="用户导入" width="400">
|
||||
<Dialog v-model="dialogVisible" title="试题导入" width="400">
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
v-model:file-list="fileList"
|
||||
@@ -18,10 +18,10 @@
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip text-center">
|
||||
<div class="el-upload__tip">
|
||||
<!-- <div class="el-upload__tip">
|
||||
<el-checkbox v-model="updateSupport" />
|
||||
是否更新已经存在的用户数据
|
||||
</div>
|
||||
</div> -->
|
||||
<span>仅允许导入 xls、xlsx 格式文件。</span>
|
||||
<el-link
|
||||
:underline="false"
|
||||
@@ -41,7 +41,7 @@
|
||||
</Dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import * as QuestionApi from '@/api/paper/question'
|
||||
import { getAccessToken, getTenantId } from '@/utils/auth'
|
||||
import download from '@/utils/download'
|
||||
|
||||
@@ -53,7 +53,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const formLoading = ref(false) // 表单的加载中
|
||||
const uploadRef = ref()
|
||||
const importUrl =
|
||||
import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/system/student/import'
|
||||
import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/exam/question/import'
|
||||
const uploadHeaders = ref() // 上传 Header 头
|
||||
const fileList = ref([]) // 文件列表
|
||||
const updateSupport = ref(0) // 是否更新已经存在的用户数据
|
||||
@@ -132,7 +132,7 @@ const handleExceed = (): void => {
|
||||
|
||||
/** 下载模板操作 */
|
||||
const importTemplate = async () => {
|
||||
const res = await UserApi.importUserTemplate()
|
||||
download.excel(res, '用户导入模版.xls')
|
||||
const res = await QuestionApi.importQueTemplate()
|
||||
download.excel(res, '试题导入模板.xls')
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user