From 42827796c79dcead20ab7b48b146766fc2beeab3 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 20 Jun 2024 10:28:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=86=85=E6=95=99=E5=B8=88=E8=A7=92=E8=89=B2=E5=8F=AA=E8=83=BD?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AD=A6=E7=94=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/index.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 55a13b0e..04832269 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -441,6 +441,11 @@ function fnModalOk() { .then(() => { modalState.confirmLoading = true; const from = toRaw(modalState.from); + // 教师角色只能新增学生 + if (!from.userId && userStore.roles.includes('teacher')) { + from.postIds = ['3']; + from.roleIds = ['4']; + } const user = from.userId ? updateUser(from) : addUser(from); const key = 'user'; message.loading({ content: t('common.loading'), key });