1
데이터베이스에서 데이터를 가져 오는 페이지를 클릭하는 위치 애플리케이션을 만들었지 만 일부 이상한 이유로 브라우저에 표시되지 않습니다. 작업 종류가 충돌하고 특정 페이지를 클릭하면 콘솔이나 모든 오류/예외를 기록하도록 설계된 텍스트 파일이 아닌 어디에서나 오류가 기록됩니다.데이터가 클라이언트 측에 도착하지 못했습니다.
서버 측에서 C# 코드를 디버깅하고 행이 성공적으로로드되었음을 알았지 만 브라우저에 표시되지 않고 오류없이 작동이 중단됩니다. 도와주세요. 내가 뭘 잘못하고 있는지 모르겠다. 데이터를 가져 오는 유사한 접근법이 다른 페이지에 사용되었고 매우 잘 작동합니다.
서버 측
public PagedResultDto<GoodsRequestDto> GetGoodsRequestPaged(GoodsRequestListInput input)
{
var goodsRequests = _goodsRequestRepo.GetAllIncluding(g => g.GoodsQuotes)
.WhereIf(input.UserId.HasValue, g => g.CreatedBy == input.UserId)
.OrderBy(d => d.Id)
.PageBy(input)
.ToList();
return new PagedResultDto<GoodsRequestDto>
{
TotalCount = goodsRequests.Count,
Items = goodsRequests.MapTo<List<GoodsRequestDto>>()
};
}
각도 컨트롤러
vm.loadGoodsRequests = function() {
var skipCount = 0;
abp.ui.setBusy(null,
projectService.getGoodsRequestPaged({
skipCount: skipCount,
userId: appSession.user.id
}).success(function (data) {
vm.goodsRequests = data.items;
})
);
}
을 HTML
<div ng-if="vm.goodsRequests.length" ng-repeat="gr in vm.goodsRequests" class="classInfo-list-item col-md-6">
<div class="classInfo-body">
<h3 class="classInfo-title">
{{gr.categoryItem.name + "_" + gr.brand.name + "_" + gr.product.name | cut:true:50:' ...'}}
</h3>
<p class="classInfo-description">Quantity: {{gr.quantity}} {{gr.unit}}</p>
<p class="classInfo-description">Payment Term: {{gr.paymentTerm}}</p>
<div class="classInfo-registration-info">
{{gr.goodsQuotes.length}} Quote(s).
</div>
<div class="classInfo-actions">
<a class="btn btn-sm btn-info" ng-href="#/my-goods-requests/{{gr.id}}">@L("Details") <i class="fa fa-arrow-circle-right"></i></a>
</div>
<span ng-class="vm.statusClass(gr.statusString)" class="classInfo-date"> {{gr.statusString }}</span>
</div>
</div>
이 3 번째 오늘이 문제에 관해서. 나는 도움이 절실합니다.
응답 해 주셔서 감사합니다. 신속하게 되돌릴 수없는 것에 대해 유감스럽게 여기는 이미 이미 늦었습니다. 나는 그 방법을 API에서 다른 것으로 대체했기 때문에 이것이 문제라고 생각하지 않으며'data.items'에서도 작동했습니다. 뭔가 다른 문제가있을 수 있으며 심지어 디버그를 사용하여 얻을 수 없습니다. –