MyFistPage.razor.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using AntDesign;
  2. using Microsoft.AspNetCore.Components;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Threading.Tasks;
  7. using wispro.sp.entity;
  8. using wispro.sp.share;
  9. using wispro.sp.web.Services;
  10. namespace wispro.sp.web.Pages.AppCase
  11. {
  12. public partial class MyFistPage
  13. {
  14. private List<PerformanceItem> _Datas;
  15. private bool _loading = false;
  16. private int _total;
  17. [Inject] public PerformanceItemServices _ItemService { get; set; }
  18. [Inject] public MessageService _message { get; set; }
  19. [Inject] protected NavigationManager NavigationManager { get; set; }
  20. [Inject] protected IUserService _userService { get; set; }
  21. protected async override Task OnInitializedAsync()
  22. {
  23. _loading = true;
  24. //System.Diagnostics.Debug.WriteLine(_userService.CurrentUser.Userid);
  25. var data = await _ItemService.GetMyList(_userService.CurrentUser.Userid.Value,jxType.doing);
  26. _Datas = data.Results;
  27. _total = data.TotalCount;
  28. _loading = false;
  29. //StateHasChanged();
  30. }
  31. }
  32. }