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(() => { - +