| | |
| | | data.dataList = res.data.list.map(item => { |
| | | return { |
| | | ...item, |
| | | userTypeName: item.userType === 0 ? '管理员' : item.userType === 1 ? '企业级' : item.userType === 2 ? '部门级' : item.userType === 3 ? '车间级' :'其他', |
| | | userTypeName: item.userType === 0 ? '系统管理员' : (item.userType === 1 || item.userType === 2 || item.userType === 3) ? '企业用户': item.userType === 6 ? '企业管理员':'其他', |
| | | entryTime: item.entryTime?.substring(0, 10) |
| | | } |
| | | }) |
| | |
| | | return { |
| | | ...item, |
| | | index: index + 1, |
| | | userTypeName: item.userType === 0 ? '管理员' : item.userType === 1 ? '企业级' : item.userType === 2 ? '部门级' : item.userType === 3 ? '车间级' :'其他', |
| | | userTypeName: item.userType === 0 ? '系统管理员' : (item.userType === 1 || item.userType === 2 || item.userType === 3) ? '企业用户': item.userType === 6 ? '企业管理员':'其他', |
| | | entryTime: item.entryTime?.substring(0, 10) |
| | | } |
| | | }) |
| | |
| | | } |
| | | |
| | | const openDialog = (type, value) => { |
| | | if(userInfo.value.userType === 3){ |
| | | ElMessage.warning('车间级用户不能新增') |
| | | if(userInfo.value.userType !== 0 && userInfo.value.userType !== 6){ |
| | | ElMessage.warning('非管理员身份不可操作') |
| | | return; |
| | | } |
| | | dialogRef.value.openDialog(type, value, data.queryParams.companyId); |