husq
2023-09-13 8b2796fffef8d0436639b997b662a8b5790404e5
src/pages/page-web/projects/members.vue
@@ -52,6 +52,7 @@
    user_id: string
    username: string
    organization_name: string
    workspace_name: string
    project: string
    create_time: string
    user_role: string
@@ -106,27 +107,23 @@
}
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
  })
}