ui(dashboard): integrate northstar bars and text spec into one block
This commit is contained in:
@@ -536,8 +536,44 @@
|
||||
$goSyncFailed = (int) ($ops['govern_sync_failed'] ?? 0);
|
||||
@endphp
|
||||
|
||||
@php
|
||||
// 北极星指标图形化:给运营“规模感/健康感”,但不引入额外分类维度。
|
||||
$merchantsTotal = (int) ($stats['merchants'] ?? 0);
|
||||
$pctActivePaidMerchants = $merchantsTotal > 0 ? min(100, max(0, round(($activePaidMerchants / $merchantsTotal) * 100, 1))) : 0;
|
||||
@endphp
|
||||
|
||||
<div class="mt-10" data-role="platform-ops-northstar-bars">
|
||||
<div class="muted">
|
||||
<strong>北极星指标</strong>
|
||||
<span class="muted muted-xs">(点击展开口径说明)</span>
|
||||
</div>
|
||||
|
||||
@include('admin.components.mini_bar_row', [
|
||||
'class' => 'mt-6',
|
||||
'rowRole' => 'ops-northstar-active-paid-merchants-row',
|
||||
'barRole' => 'ops-northstar-active-paid-merchants-bar',
|
||||
'href' => (string) ($opsLinks['active_paid_merchants_subscriptions'] ?? $billingEntryLinks['site_subscriptions']),
|
||||
'ariaLabel' => '进入活跃付费站点订阅集合',
|
||||
'label' => '付费渗透',
|
||||
'pct' => $pctActivePaidMerchants,
|
||||
'title' => $activePaidMerchants . ' / ' . $merchantsTotal . '(' . $pctActivePaidMerchants . '%)',
|
||||
'value' => $pctActivePaidMerchants . '%(' . $activePaidMerchants . ')',
|
||||
])
|
||||
|
||||
@include('admin.components.mini_bar_row', [
|
||||
'class' => 'mt-6',
|
||||
'rowRole' => 'ops-northstar-renewal-rate-row',
|
||||
'barRole' => 'ops-northstar-renewal-rate-bar',
|
||||
'href' => (string) ($opsLinks['renewal_orders_30d'] ?? $billingEntryLinks['platform_orders']),
|
||||
'ariaLabel' => '进入近30天续费订单集合',
|
||||
'label' => '续费成功率',
|
||||
'pct' => $renewalRate30d,
|
||||
'title' => $renewalRate30d . '%(' . $renewalSuccess30d . ' / ' . $renewalCreated30d . ')',
|
||||
'value' => $renewalRate30d . '%',
|
||||
])
|
||||
|
||||
<details class="mt-10" data-role="platform-ops-northstar-details" data-storage-key="admin.dashboard.platform_ops_northstar_details">
|
||||
<summary class="muted"><strong>北极星指标</strong> <span class="muted muted-xs">(点击展开文字口径)</span></summary>
|
||||
<summary class="muted">北极星指标口径说明</summary>
|
||||
|
||||
<table class="mt-10">
|
||||
<tr>
|
||||
@@ -567,42 +603,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</details>
|
||||
|
||||
@php
|
||||
// 北极星指标图形化:给运营“规模感/健康感”,但不引入额外分类维度。
|
||||
$merchantsTotal = (int) ($stats['merchants'] ?? 0);
|
||||
$pctActivePaidMerchants = $merchantsTotal > 0 ? min(100, max(0, round(($activePaidMerchants / $merchantsTotal) * 100, 1))) : 0;
|
||||
@endphp
|
||||
|
||||
<div class="mt-10" data-role="platform-ops-northstar-bars">
|
||||
<div class="muted"><strong>北极星指标</strong></div>
|
||||
|
||||
@include('admin.components.mini_bar_row', [
|
||||
'class' => 'mt-6',
|
||||
'rowRole' => 'ops-northstar-active-paid-merchants-row',
|
||||
'barRole' => 'ops-northstar-active-paid-merchants-bar',
|
||||
'href' => (string) ($opsLinks['active_paid_merchants_subscriptions'] ?? $billingEntryLinks['site_subscriptions']),
|
||||
'ariaLabel' => '进入活跃付费站点订阅集合',
|
||||
'label' => '付费渗透',
|
||||
'pct' => $pctActivePaidMerchants,
|
||||
'title' => $activePaidMerchants . ' / ' . $merchantsTotal . '(' . $pctActivePaidMerchants . '%)',
|
||||
'value' => $pctActivePaidMerchants . '%(' . $activePaidMerchants . ')',
|
||||
])
|
||||
|
||||
@include('admin.components.mini_bar_row', [
|
||||
'class' => 'mt-6',
|
||||
'rowRole' => 'ops-northstar-renewal-rate-row',
|
||||
'barRole' => 'ops-northstar-renewal-rate-bar',
|
||||
'href' => (string) ($opsLinks['renewal_orders_30d'] ?? $billingEntryLinks['platform_orders']),
|
||||
'ariaLabel' => '进入近30天续费订单集合',
|
||||
'label' => '续费成功率',
|
||||
'pct' => $renewalRate30d,
|
||||
'title' => $renewalRate30d . '%(' . $renewalSuccess30d . ' / ' . $renewalCreated30d . ')',
|
||||
'value' => $renewalRate30d . '%',
|
||||
])
|
||||
|
||||
<div class="muted muted-xs mt-6">说明:付费渗透 = 活跃付费站点 / 站点总数;续费成功率按近30天续费单计算。</div>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
@php
|
||||
|
||||
Reference in New Issue
Block a user