| | |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true"> |
| | | <el-table-column label="序号" type="index" align="center" width="80" /> |
| | | <el-table-column label="用户名" prop="username" align="center" /> |
| | | <el-table-column label="姓名" prop="name" align="center" /> |
| | | <el-table-column label="用户名" prop="username" align="center"/> |
| | | <el-table-column label="姓名" prop="name" align="center"/> |
| | | <el-table-column label="年龄" prop="age" align="center"/> |
| | | <el-table-column label="职称" prop="positional" align="center"/> |
| | | <el-table-column label="人员类别" prop="personType" align="center"> |
| | | <template #default="scope"> |
| | | {{ scope.row.personType == 1?'技术':scope.row.personType == 2?'管理':'行政' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="身份证号" prop="idCard" align="center" /> |
| | | <el-table-column label="入职时间" prop="entryTime" align="center"/> |
| | | <el-table-column label="部门" prop="deptName" align="center"/> |
| | |
| | | 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) |
| | | } |
| | | }) |
| | |
| | | companyId: null |
| | | }) |
| | | if(res.code == 200){ |
| | | data.expertData = res.data.list.map((item,index) => { |
| | | data.expertData = res.data.list?.map((item,index) => { |
| | | 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); |