From 192227edeaba254f6dcbbdc3671369dc1555e13c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=9D=E5=85=88=E7=91=9E?= <1490493387@qq.com> Date: Sat, 30 Apr 2022 10:28:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(user.vue):=20=E7=94=A8=E6=88=B7=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=A1=A8=E5=8D=95=E7=8A=B6=E6=80=81=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 56cae685d77801726409a5ec162e8304baa3a7b7 --- src/views/system/user/index.vue | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 46ea225a..100a1a9f 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -56,9 +56,9 @@ import { // DOM元素的引用声明定义 ,变量名和DOM的ref属性值一致 const deptTreeRef = ref(ElTree); // 部门树 -const queryFormRef = ref(ElForm); // 部门树 -const dataFormRef = ref(ElForm); // 部门树 -const importFormRef = ref(ElForm); // 导入 +const queryFormRef = ref(ElForm); // 查询表单 +const dataFormRef = ref(ElForm); // 用户表单 +const importFormRef = ref(ElForm); // 导入表单 const { proxy }: any = getCurrentInstance(); @@ -88,7 +88,9 @@ const state = reactive({ // 角色选项 roleOptions: [] as RoleItem[], // 表单参数 - formData: {} as UserFormData, + formData: { + status:1 + } as UserFormData, // 查询参数 queryParams: { pageNum: 1, @@ -392,7 +394,11 @@ async function showImportDialog() { state.importDialog.visible = true } -// Excel文件上传 +/** + * Excel文件change事件 + * + * @param file + */ function handleExcelChange(file: UploadFile) { if (!/\.(xlsx|xls|XLSX|XLS)$/.test(file.name)) { ElMessage.warning('上传Excel只能为xlsx、xls格式'); @@ -403,6 +409,9 @@ function handleExcelChange(file: UploadFile) { state.excelFile = file.raw } +/** + * Excel文件上传 + */ function submitImportForm() { importFormRef.value.validate((valid: any) => { if (valid) { @@ -562,7 +571,7 @@ onMounted(() => { - +