| | |
| | | </el-table-column> |
| | | <el-table-column label="用户类型" prop="userType" align="center"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.userType == 0 ?'管理员':scope.row.userType == 1 ? '企业用户':'普通用户'}}</span> |
| | | <span>{{scope.row.userType == 0 ?'管理员':scope.row.userType == 1 ? '企业用户':scope.row.userType ==2 ? '普通用户' : '监管用户'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | <el-button link type="danger" v-if="!isAdmin" @click="handleDelete(scope.row)">删除</el-button> |
| | | <el-button link type="primary" @click="openDialog('pwd',scope.row)">修改密码</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | |
| | | }); |
| | | |
| | | const isAdmin = ref(false) |
| | | const { queryParams, total, dataList } = toRefs(data); |
| | | const userInfo = ref() |
| | | onMounted(()=>{ |
| | | userInfo.value = JSON.parse(Cookies.get('userInfo')) |
| | | isAdmin.value = userInfo.value.userType === 0; |
| | | |
| | | getList() |
| | | }) |
| | | |