修改细节
This commit is contained in:
Binary file not shown.
@@ -9,6 +9,13 @@ export function Header({ onOpenHistory }: { onOpenHistory: () => void }) {
|
|||||||
<strong>订单需求评审智能体</strong>
|
<strong>订单需求评审智能体</strong>
|
||||||
</div>
|
</div>
|
||||||
<div className="topbar-right">
|
<div className="topbar-right">
|
||||||
|
<a
|
||||||
|
className="btn"
|
||||||
|
href="/mod-assets/baode-web/demo-text.zip"
|
||||||
|
download="演示文档.zip"
|
||||||
|
>
|
||||||
|
演示文档下载
|
||||||
|
</a>
|
||||||
<button type="button" className="btn" onClick={onOpenHistory}>
|
<button type="button" className="btn" onClick={onOpenHistory}>
|
||||||
评审历史
|
评审历史
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -351,6 +351,7 @@
|
|||||||
transition: background 0.18s, border-color 0.18s, color 0.18s;
|
transition: background 0.18s, border-color 0.18s, color 0.18s;
|
||||||
}
|
}
|
||||||
.baode-root .btn:hover { border-color: var(--brand); color: var(--brand-600); }
|
.baode-root .btn:hover { border-color: var(--brand); color: var(--brand-600); }
|
||||||
|
.baode-root a.btn { text-decoration: none; display: inline-flex; align-items: center; }
|
||||||
.baode-root .btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
|
.baode-root .btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
|
||||||
.baode-root .btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
|
.baode-root .btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
|
||||||
.baode-root .btn-danger { background: var(--fail); border-color: var(--fail); color: #fff; font-weight: 600; }
|
.baode-root .btn-danger { background: var(--fail); border-color: var(--fail); color: #fff; font-weight: 600; }
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/* ===== 顶栏:Logo / 导航 / 主题切换 ===== */
|
/* ===== 顶栏:Logo / 导航 / 主题切换 ===== */
|
||||||
import { useApp } from '../store/AppStore';
|
import { useApp } from '../store/AppStore';
|
||||||
import type { PageId } from '../store/AppStore';
|
import type { PageId } from '../store/AppStore';
|
||||||
|
import { getUserInfo } from '@/shared/services/iamAuth';
|
||||||
|
|
||||||
const NAVS: { id: PageId; label: string }[] = [
|
const NAVS: { id: PageId; label: string }[] = [
|
||||||
{ id: 'work', label: '智能匹配工作台' },
|
{ id: 'work', label: '智能匹配工作台' },
|
||||||
@@ -15,6 +16,14 @@ export default function TopBar() {
|
|||||||
const auditCnt = derived.counts.s2;
|
const auditCnt = derived.counts.s2;
|
||||||
const rfqCnt = derived.rfqActive;
|
const rfqCnt = derived.rfqActive;
|
||||||
|
|
||||||
|
// 当前真实登录者(IAM 会话);IAM 未提供角色字段时不展示角色行
|
||||||
|
const sessionUser = getUserInfo();
|
||||||
|
const displayName = sessionUser?.userName ?? sessionUser?.userId ?? '未登录';
|
||||||
|
const displayRole = (sessionUser?.roleName as string | undefined)
|
||||||
|
?? (sessionUser?.title as string | undefined)
|
||||||
|
?? '';
|
||||||
|
const avatarChar = displayName.charAt(0).toUpperCase();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header id="topbar">
|
<header id="topbar">
|
||||||
<div className="logo">
|
<div className="logo">
|
||||||
@@ -35,10 +44,10 @@ export default function TopBar() {
|
|||||||
</nav>
|
</nav>
|
||||||
<div className="top-right">
|
<div className="top-right">
|
||||||
<div className="user-info">
|
<div className="user-info">
|
||||||
<span className="user-avatar">蕫</span>
|
<span className="user-avatar">{avatarChar}</span>
|
||||||
<span className="user-meta">
|
<span className="user-meta">
|
||||||
<span className="user-name">蕫书康</span>
|
<span className="user-name">{displayName}</span>
|
||||||
<span className="user-role">采购专员</span>
|
{displayRole && <span className="user-role">{displayRole}</span>}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<button className="top-btn icon-btn" onClick={api.toggleTheme} title={state.dark ? '切换浅色' : '切换深色'}>
|
<button className="top-btn icon-btn" onClick={api.toggleTheme} title={state.dark ? '切换浅色' : '切换深色'}>
|
||||||
|
|||||||
Reference in New Issue
Block a user