| | |
| | | user_id: string |
| | | username: string |
| | | organization_name: string |
| | | workspace_name: string |
| | | project: string |
| | | create_time: string |
| | | user_role: string |
| | |
| | | } |
| | | const workspaceId: string = localStorage.getItem(ELocalStorageKey.WorkspaceId)! |
| | | const store = useMyStore() |
| | | const projectId:string = store.state.common.projectId |
| | | |
| | | onMounted(() => { |
| | | getAllUsers({ projectId }, body) |
| | | getAllUsers(workspaceId, body) |
| | | }) |
| | | |
| | | function refreshData (page: Pagination) { |
| | | body.page = page?.current! |
| | | body.page_size = page?.pageSize! |
| | | getAllUsers({ projectId }, body) |
| | | getAllUsers(workspaceId, body) |
| | | } |
| | | |
| | | function getAllUsers (params:any, page: IPage) { |
| | | getUserPage(params, page).then(res => { |
| | | const resData = res.data |
| | | data.member = resData.list |
| | | |
| | | paginationProp.total = resData.total |
| | | paginationProp.current = resData.pageNum |
| | | }).catch(err => { |
| | | console.log(err) |
| | | function getAllUsers (workspaceId: string, page: IPage) { |
| | | getAllUsersInfo(workspaceId, page).then(res => { |
| | | const userList: Member[] = res.data.list |
| | | data.member = userList |
| | | paginationProp.total = res.data.pagination.total |
| | | paginationProp.current = res.data.pagination.page |
| | | }) |
| | | } |
| | | |