ui(platform-orders): render batch activation last_result summary
This commit is contained in:
@@ -1398,9 +1398,23 @@
|
||||
$batchScope = (string) (data_get($batchActivation, 'scope') ?? '');
|
||||
$batchScopeText = $batchScope === 'all' ? '全量' : ($batchScope === 'filtered' ? '筛选' : ($batchScope !== '' ? $batchScope : '-'));
|
||||
@endphp
|
||||
@php
|
||||
$lastResult = (array) (data_get($batchActivation, 'last_result', []) ?? []);
|
||||
$lrRunId = (string) (data_get($lastResult, 'run_id') ?? '');
|
||||
$lrSuccess = (int) (data_get($lastResult, 'success') ?? 0);
|
||||
$lrFailed = (int) (data_get($lastResult, 'failed') ?? 0);
|
||||
$lrTopReason = (string) (data_get($lastResult, 'top_reasons.0.reason') ?? '');
|
||||
$lrTopReasonCount = (int) (data_get($lastResult, 'top_reasons.0.count') ?? 0);
|
||||
@endphp
|
||||
<div>{{ $batchAt }}</div>
|
||||
<div class="muted">管理员:{{ $batchAdminId ?: '-' }}</div>
|
||||
<div class="muted muted-xs">范围:{{ $batchScopeText }};方式:{{ $batchModeText }}</div>
|
||||
@if($lrRunId !== '')
|
||||
<div class="muted muted-xs">结果:成功{{ $lrSuccess }} / 失败{{ $lrFailed }}</div>
|
||||
@if($lrTopReason !== '')
|
||||
<div class="muted muted-xs">Top:{{ mb_substr($lrTopReason, 0, 40) }}({{ $lrTopReasonCount }})</div>
|
||||
@endif
|
||||
@endif
|
||||
@else
|
||||
<span class="muted">-</span>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user