From b54fb1e8e57662336126002f1949b6b190949cca Mon Sep 17 00:00:00 2001 From: hxr <1490493387@qq.com> Date: Thu, 17 Aug 2023 23:59:33 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20:recycle:=20=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=96=B9=E6=B3=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 35fa3ebfb81a57bd3621bd9f5150da2c97e2fdec --- src/views/system/user/index.vue | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) 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(() => {