| | |
| | | <template #action="{ record }"> |
| | | <div class="editable-row-operations"> |
| | | <span v-if="editableData[record.user_id]"> |
| | | <a-tooltip title="Confirm changes"> |
| | | <a-tooltip title="保存"> |
| | | <span @click="save(record)" style="color: #28d445;"><CheckOutlined /></span> |
| | | </a-tooltip> |
| | | <a-tooltip title="Modification canceled"> |
| | | <a-tooltip title="取消"> |
| | | <span @click="() => delete editableData[record.user_id]" class="ml15" style="color: #e70102;"><CloseOutlined /></span> |
| | | </a-tooltip> |
| | | </span> |
| | |
| | | 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 |
| | | }) |
| | | } |
| | | |