【新增】 学生模板导入

This commit is contained in:
DESKTOP-932OMT8\REN
2025-05-27 14:23:11 +08:00
committed by 陆光LG
parent 5ce98a1e7f
commit 9efe51987e

View File

@@ -1,5 +1,5 @@
<template> <template>
<Dialog v-model="dialogVisible" title="用户导入" width="400"> <Dialog v-model="dialogVisible" title="学生导入" width="400">
<el-upload <el-upload
ref="uploadRef" ref="uploadRef"
v-model:file-list="fileList" v-model:file-list="fileList"
@@ -53,7 +53,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const formLoading = ref(false) // 表单的加载中 const formLoading = ref(false) // 表单的加载中
const uploadRef = ref() const uploadRef = ref()
const importUrl = 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 + '/system/user/importStu'
const uploadHeaders = ref() // 上传 Header 头 const uploadHeaders = ref() // 上传 Header 头
const fileList = ref([]) // 文件列表 const fileList = ref([]) // 文件列表
const updateSupport = ref(0) // 是否更新已经存在的用户数据 const updateSupport = ref(0) // 是否更新已经存在的用户数据
@@ -132,7 +132,7 @@ const handleExceed = (): void => {
/** 下载模板操作 */ /** 下载模板操作 */
const importTemplate = async () => { const importTemplate = async () => {
const res = await UserApi.importUserTemplate() const res = await UserApi.importUserTemplateStu()
download.excel(res, '学生导入模版.xls') download.excel(res, '学生导入模版.xls')
} }
</script> </script>