1)侧边栏菜单上方新增搜索框:按关键字过滤菜单项(如输「快递应付」直接定位), 无匹配时给出提示,Esc 清空。 2)页面顶部新增「已打开页面」标签栏:点开过的业务页面并排固定在页面上方, 点标签直接切回(回到最近一次带筛选的地址);同一张页面按路径去重; 标签按账号存在浏览器本地(localStorage),没退出登录就一直保留; 支持单个关闭和「清空(保留当前页)」,最多并排 15 个,超出横向滚动。 钉钉单页入口模式下不显示这个标签栏。
117 lines
4.8 KiB
PHP
117 lines
4.8 KiB
PHP
<!DOCTYPE html>
|
||
<html dir="{{ language()->direction() }}" lang="{{ app()->getLocale() }}">
|
||
@php
|
||
// 钉钉工作台「财务系统」入口:在「财务经营风险管控」目录下隐藏全局菜单,
|
||
// 只保留该目录自己的页签(店铺违规信息预警 / 流程统计…),
|
||
// 让钉钉里点进来就只是这一块内容;网页端登录(非钉钉容器)不受影响。
|
||
// 也支持显式 ?focus=1,便于以后给别的入口做同样的单页模式。
|
||
// 路由参数在部分上下文取不到时退回按路径段判断(与目录表同一套兼容写法)。
|
||
$focusSection = (string) (request()->route('section') ?: request()->segment(3));
|
||
$focusEntry = in_array($focusSection, ['financial-risk-control'], true)
|
||
&& (request()->boolean('focus') || str_contains((string) request()->userAgent(), 'DingTalk'));
|
||
@endphp
|
||
|
||
<x-layouts.admin.head>
|
||
@if (! empty($metaTitle))
|
||
<x-slot name="metaTitle">
|
||
{!! !empty($metaTitle->attributes->has('title')) ? $metaTitle->attributes->get('title') : $metaTitle !!}
|
||
</x-slot>
|
||
@endif
|
||
|
||
<x-slot name="title">
|
||
{!! !empty($title->attributes->has('title')) ? $title->attributes->get('title') : $title !!}
|
||
</x-slot>
|
||
</x-layouts.admin.head>
|
||
|
||
@mobile
|
||
<body class="bg-body">
|
||
@elsemobile
|
||
<body class="bg-body overflow-y-overlay">
|
||
@endmobile
|
||
|
||
@stack('body_start')
|
||
|
||
@unless ($focusEntry)
|
||
<x-layouts.admin.menu />
|
||
@endunless
|
||
|
||
<!-- loading component will add this line -->
|
||
|
||
<div class="main-content {{ $focusEntry ? '' : 'xl:ltr:ml-64 xl:rtl:mr-64' }} transition-all ease-in-out" id="panel">
|
||
<div id="main-body">
|
||
<div class="container">
|
||
<x-layouts.admin.header>
|
||
<x-slot name="title">
|
||
{!! ! empty($title->attributes->has('title')) ? $title->attributes->get('title') : $title !!}
|
||
</x-slot>
|
||
|
||
@if (! empty($status))
|
||
<x-slot name="status">
|
||
{!! $status !!}
|
||
</x-slot>
|
||
@endif
|
||
|
||
@if (! empty($info))
|
||
<x-slot name="info">
|
||
{!! $info !!}
|
||
</x-slot>
|
||
@endif
|
||
|
||
@if (! empty($favorite) || (! empty($favorite) && $favorite->attributes->has('title')))
|
||
@if (! $favorite->attributes->has('title'))
|
||
<x-slot name="favorite">
|
||
{!! $favorite !!}
|
||
</x-slot>
|
||
@else
|
||
@php
|
||
$favorite = [
|
||
'title' => $favorite->attributes->get('title'),
|
||
'icon' => $favorite->attributes->get('icon'),
|
||
'route' => !empty($favorite->attributes->has('route')) ? $favorite->attributes->get('route') : '',
|
||
'url' => !empty($favorite->attributes->has('url')) ? $favorite->attributes->get('url') : '',
|
||
];
|
||
@endphp
|
||
|
||
<x-slot name="favorite">
|
||
<x-menu.favorite
|
||
:title="$favorite['title']"
|
||
:icon="$favorite['icon']"
|
||
:route="$favorite['route']"
|
||
:url="$favorite['url']"
|
||
/>
|
||
</x-slot>
|
||
@endif
|
||
@endif
|
||
|
||
<x-slot name="buttons">
|
||
{!! $buttons ?? '' !!}
|
||
</x-slot>
|
||
|
||
<x-slot name="moreButtons">
|
||
{!! $moreButtons ?? '' !!}
|
||
</x-slot>
|
||
</x-layouts.admin.header>
|
||
|
||
@unless ($focusEntry)
|
||
@include('business.pages.partials.open-page-tabs')
|
||
@endunless
|
||
|
||
<x-layouts.admin.content>
|
||
<livewire:notification.browser />
|
||
|
||
<x-layouts.admin.notifications />
|
||
|
||
{!! $content !!}
|
||
</x-layouts.admin.content>
|
||
|
||
<x-layouts.admin.footer />
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
@stack('body_end')
|
||
|
||
<x-layouts.admin.scripts />
|
||
</body>
|
||
</html>
|