补充工具区回摘要概览入口

This commit is contained in:
萝卜
2026-03-19 10:07:10 +08:00
parent abebf57104
commit 0888be7672
2 changed files with 38 additions and 1 deletions

View File

@@ -655,7 +655,7 @@
</div>
@endif
<div class="grid-3 mb-20">
<div class="grid-3 mb-20" id="po-summary-cards" data-role="po-summary-cards">
<div class="card">
<h3>平台订单总数</h3>
<div class="metric-number">
@@ -1199,6 +1199,7 @@
<div class="tool-grid" data-role="po-tools-grid" aria-label="平台订单工具区网格">
<div class="muted muted-xs mb-10" data-role="po-tools-grid-intro" aria-label="平台订单工具区说明">当前工具区承载导出、批量治理与失败标记清理,请先缩小筛选范围再执行动作;也可使用上方快速定位导航直达目标工具组。</div>
<div class="actions gap-10 mb-10" data-role="po-tools-grid-jump-links" aria-label="平台订单工具区快速定位导航">
<a class="btn btn-secondary btn-sm" data-role="po-tools-jump-summary" aria-label="定位到订单摘要概览" href="#po-summary-cards">摘要概览</a>
<a class="btn btn-secondary btn-sm" data-role="po-tools-jump-filters" aria-label="定位到筛选条件" href="#filters">筛选条件</a>
<a class="btn btn-secondary btn-sm" data-role="po-tools-jump-export" aria-label="定位到导出工具组" href="#po-tools-export">导出</a>
<span class="muted muted-xs" data-role="po-tools-grid-jump-links-note" aria-label="平台订单工具区快速导航说明" title="快速导航仅负责定位工具组,不会直接执行批量动作">快速定位只负责跳转到工具组,不会直接执行动作;如需先调整范围,可先<a class="link" data-role="po-tools-grid-jump-links-go-filters" aria-label="回到筛选条件" title="先回筛选再执行工具动作" href="#filters">回到筛选条件</a></span>

View File

@@ -0,0 +1,36 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderIndexToolGridJumpLinksShouldIncludeSummaryShortcutTest extends TestCase
{
use RefreshDatabase;
protected function loginAsPlatformAdmin(): void
{
$this->seed();
$this->post('/admin/login', [
'email' => 'platform.admin@demo.local',
'password' => 'Platform@123456',
])->assertRedirect('/admin');
}
public function test_platform_orders_tool_grid_jump_links_should_include_summary_shortcut(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="po-summary-cards"', $html);
$this->assertStringContainsString('data-role="po-tools-jump-summary"', $html);
$this->assertStringContainsString('aria-label="定位到订单摘要概览"', $html);
$this->assertStringContainsString('href="#po-summary-cards"', $html);
$this->assertStringContainsString('>摘要概览<', $html);
}
}