From d560f26ea1865179429e243617802c53d7ebf0d7 Mon Sep 17 00:00:00 2001 From: zrh050423 <14331304+zrh050423@user.noreply.gitee.com> Date: Tue, 24 Dec 2024 12:24:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=80=E7=BB=88=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Header.vue | 54 --------------------------------------- 1 file changed, 54 deletions(-) diff --git a/src/components/Header.vue b/src/components/Header.vue index 011dd4d..3e030ed 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -39,21 +39,6 @@

性别:{{ userInfo.gender }}

权限:{{ userInfo.permission }}

- - - - - - - - - - - - 提交 - - - @@ -68,45 +53,6 @@ const doctorFormVisible = ref(false); const showUserInfoDialog = () => { userInfoDialogVisible.value = true; }; -const resetDoctorForm = () => { - doctorForm.value = { - username: '', - password: '' // 重置密码字段 - // 重置其他字段 - }; -}; -const doctorRules = { - username: [ - { required: true, message: '请输入用户名', trigger: 'blur' } - ], - pwd: [ - { required: true, message: '请输入密码', trigger: 'blur' }, - { min: 6, message: '密码长度不能少于6位', trigger: 'blur' } - ] - // 可以根据需要添加其他验证规则 -}; -const doctorForm = ref({ - username: '', - pwd: '' - // 可以根据需要添加其他字段 -}); -const submitDoctorForm = () => { - // 这里应该调用后端API来注册新医生用户 - axiosInstance.post('/user/register', doctorForm.value) - .then(response => { - // 处理成功响应 - console.log('医生用户注册成功', response); - // 可以在这里关闭对话框,清空表单等 - doctorFormVisible.value = false; // 关闭对话框 - resetDoctorForm(); // 清空表单 - }) - .catch(error => { - // 处理错误响应 - console.error('医生用户注册失败', error); - }); -}; - - const roleDisplay = computed(() => { switch (sessionStorage.getItem('permission')) { case '0':