diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index b5cb6949..48914fff 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -294,13 +294,6 @@ function downloadTemplate() { }); } -/** 打开导入弹窗 */ -async function openImportDialog() { - await getDeptOptions(); - importDeptId.value = undefined; - importDialog.visible = true; -} - /** * Excel文件change事件 * @@ -316,8 +309,22 @@ function handleExcelChange(file: UploadFile) { excelFile.value = file.raw; } +/** 打开导入弹窗 */ +async function openImportDialog() { + await getDeptOptions(); + importDeptId.value = undefined; + importDialog.visible = true; +} + +/** 关闭导入弹窗 */ +function closeImportDialog() { + importDialog.visible = false; + excelFile.value = undefined; + excelFilelist.value = []; +} + /** 导入用户提交 */ -function handleUserImport() { +function handleImport() { if (importDeptId.value) { if (!excelFile.value) { ElMessage.warning("上传Excel文件不能为空"); @@ -331,15 +338,8 @@ function handleUserImport() { } } -/** 关闭导入弹窗 */ -function closeImportDialog() { - importDialog.visible = false; - excelFile.value = undefined; - excelFilelist.value = []; -} - /** 导出用户 */ -function handleUserExport() { +function handleExport() { exportUser(queryParams).then((response: any) => { const blob = new Blob([response.data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8", @@ -457,7 +457,7 @@ onMounted(() => { - 导出 @@ -695,7 +695,7 @@ onMounted(() => {