|
@@ -185,6 +185,7 @@
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { ref, reactive, computed, onMounted, unref} from 'vue'
|
|
import { ref, reactive, computed, onMounted, unref} from 'vue'
|
|
|
|
|
+ import { message } from 'ant-design-vue'
|
|
|
import { DownOutlined } from '@ant-design/icons-vue'
|
|
import { DownOutlined } from '@ant-design/icons-vue'
|
|
|
import { getDepartmentMembers } from '@/api/course/courseDetail'
|
|
import { getDepartmentMembers } from '@/api/course/courseDetail'
|
|
|
import studentDetailsApi from '@/api/courseCenter/studentDetails.js'
|
|
import studentDetailsApi from '@/api/courseCenter/studentDetails.js'
|
|
@@ -361,11 +362,16 @@
|
|
|
// 调用API接口
|
|
// 调用API接口
|
|
|
const res = await studentDetailsApi.importStudents(formData)
|
|
const res = await studentDetailsApi.importStudents(formData)
|
|
|
console.log(res)
|
|
console.log(res)
|
|
|
- message.success(`成功导入 ${res.data.count} 条数据`)
|
|
|
|
|
|
|
+ message.info(
|
|
|
|
|
+ `成功导入 ${res.data.successCount} 条数据,导入失败:${
|
|
|
|
|
+ res.data.errorCount
|
|
|
|
|
+ } 条数据,失败下标为: ${res.data.errorDetail.map((item) => item.index).join(',')}`
|
|
|
|
|
+ )
|
|
|
onSuccess(res, file)
|
|
onSuccess(res, file)
|
|
|
getList() // 刷新列表
|
|
getList() // 刷新列表
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
- message.error(`导入失败: ${error.message}`)
|
|
|
|
|
|
|
+ console.log(error)
|
|
|
|
|
+ message.error(`导入失败: ${error}`)
|
|
|
onError(error)
|
|
onError(error)
|
|
|
} finally {
|
|
} finally {
|
|
|
importLoading.value = false
|
|
importLoading.value = false
|