| | |
| | | }); |
| | | |
| | | 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 { |
| | |
| | | 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); |
| | | } |
| | | |