From 79f08099c190a78beb676c6895804530739c2a0b Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期五, 29 十一月 2024 14:48:35 +0800
Subject: [PATCH] 修改首页

---
 src/views/onlineEducation/people/index.vue |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/views/onlineEducation/people/index.vue b/src/views/onlineEducation/people/index.vue
index 93459d9..91ccbc4 100644
--- a/src/views/onlineEducation/people/index.vue
+++ b/src/views/onlineEducation/people/index.vue
@@ -100,10 +100,11 @@
 });
 
 const { queryParams, total, dataList } = toRefs(data);
-
+const userType = ref()
 onMounted(async ()=>{
   const userInfo = JSON.parse(Cookies.get('userInfo'))
   console.log("userInfo",userInfo)
+  userType.value = userInfo.userType
   if(userInfo.userType === 0){
     data.isAdmin = true;
   }else {
@@ -130,7 +131,11 @@
 const openDialog = (type, value) => {
   if(type == 'add' && data.isAdmin){
     ElMessage.warning('监管部门请联系企业创建企业学员')
-  }else{
+  }
+  // else if(userType.value !== 3 && (type == 'add' || type == 'edit')) {
+  //   ElMessage.warning(' 只有车间级用户才能新增和编辑')
+  // }
+  else{
     dialogRef.value.openDialog(type, value);
   }
 

--
Gitblit v1.9.2