diff --git a/docs/design-requirements.md b/docs/design-requirements.md
index e7ae07c..91a0aa0 100644
--- a/docs/design-requirements.md
+++ b/docs/design-requirements.md
@@ -8,7 +8,9 @@
日常业务使用唯一首页、订单中心和邮件批次。首页显示双开关、连续窗口、下一时点、未配置与实际阻塞;订单中心合并执行任务和通知订单,详情按进度、来源、PDF/归档、批次和核验展开。邮件批次统一未终结与历史,prepared跨窗口保留,具体历史追溯带scope=all;旧hash兼容跳转。业务列表服务端分页25/50/100,显式查询,按账号保留已应用状态,后台只提示更新;关闭详情取消迟到响应,按钮、Escape和遮罩统一未保存保护。工具收纳到达/PDF台账、共享文件和可选助手。
-业务横栏:分类通知规则、字段映射。系统横栏:BPM连接、邮箱管理、助手设置、系统健康、团队账号、操作记录。团队账号仅管理员可见;个人改密在右上角。助手主页面只保留对话和授权操作卡片。
+订单中心和邮件批次各自是左侧一级页面,不再显示彼此的顶部页签或“返回订单通知管理”。通知配置归入业务设置,进入后侧栏高亮业务设置;旧订单/批次地址继续兼容。
+
+业务横栏:分类通知规则、字段映射、通知配置。通知配置内部保留发送计划、业务日历、邮件模板和发送设置。系统横栏:BPM连接、邮箱管理、助手设置、系统健康、团队账号、操作记录。团队账号仅管理员可见;个人改密在右上角。助手主页面只保留对话和授权操作卡片。
订单与导出记录采用用户确认的A台账方案:顶部流程到达记录/PDF导出记录复用同一Tabler分段导航,对应`#records`/`#records-pdf`。到达记录默认现有连接、订单相关流程及全部到达类型,统一表格每页25条;来源与日期放更多筛选,长标题和完整来源信息在详情侧栏。历史是累计到达台账,不宣称当前待办。删除BPM连接在同一事务保留安全来源档案,关联记录进入历史归档;停用仍属现有来源,旧孤立来源保留ID且不猜账号。PDF导出状态、本地文件可下载与实际存储归档回执分别显示,无连接关联时不按订单号猜测归属。详见[台账设计](superpowers/specs/2026-10-20-records-ledger-design.md)及[验收](records-ledger-verification-2026-10-20.md)。
diff --git a/docs/web-action-inventory.md b/docs/web-action-inventory.md
index 10438c7..a8d3ffc 100644
--- a/docs/web-action-inventory.md
+++ b/docs/web-action-inventory.md
@@ -4,6 +4,10 @@
操作归属:业务设置维护规则/字段映射;订单通知管理维护运行任务、通知订单、批次、发送记录和计划/日历/模板/发送设置;系统设置维护服务与账号。导出记录保留只读到达历史和PDF任务,与通知订单互相链接。
+## 一级业务导航去重(2026-10-21)
+
+订单中心、邮件批次只保留左侧一级入口,进入后不再显示重复的顶部切换或旧管理页返回链接。业务设置包含分类通知规则、字段映射、通知配置;计划、日历、模板与发送设置在通知配置内切换。侧栏选中、旧地址、查询状态、前后退、刷新及离页保护一并验收。
+
## 本轮新增与统一入口
| 操作 | 权限与结果 | 验证 |
diff --git a/tests/app/business-query-ui.test.cjs b/tests/app/business-query-ui.test.cjs
index 5e61991..4b66068 100644
--- a/tests/app/business-query-ui.test.cjs
+++ b/tests/app/business-query-ui.test.cjs
@@ -6,3 +6,10 @@ test('business list state preserves whitelisted filters and account separation',
test('retired supervisor entry delegates to health without a write form',async()=>{
let renders=0;const context={window:{HealthViews:{render:async()=>renders++}}};vm.runInNewContext(fs.readFileSync('web/modules/workspace/view.js','utf8'),context);await context.window.WorkspaceViews.supervisor({},()=>true);assert.equal(renders,1);
});
+
+test('primary order routes stay outside settings groups and configuration belongs to business settings',()=>{
+ const context={window:{addEventListener(){}}};vm.runInNewContext(fs.readFileSync('web/modules/navigation/view.js','utf8'),context);const nav=context.window.AppNavigation;
+ for(const route of ['notification-orders','notification-batches','notification-execution','notification-history'])assert.equal(nav.sectionFor(route),null,route);
+ for(const route of ['schedule','calendar','templates','notification-settings'])assert.equal(nav.sectionFor(route),'business-settings',route);
+ assert.deepEqual(Array.from(nav.groups['business-settings']),['order-rules','rule-fields','schedule']);assert.equal(nav.groups['order-notifications'],undefined);
+});
diff --git a/tests/app/navigation-ui.test.cjs b/tests/app/navigation-ui.test.cjs
index 41931f6..5e89108 100644
--- a/tests/app/navigation-ui.test.cjs
+++ b/tests/app/navigation-ui.test.cjs
@@ -11,11 +11,11 @@ test('compact navigation groups settings, retains deep links and role boundaries
await page.goto(base+'/#system-settings');await page.getByLabel('账号',{exact:true}).fill(role);await page.getByLabel('密码',{exact:true}).fill(password);await page.getByRole('button',{name:'登录',exact:true}).click();
await page.getByRole('heading',{name:'BPM 连接',exact:true}).first().waitFor();assert.equal(await page.locator('#sidebar-menu [data-view]').count(),7);
assert.equal(await page.locator('#settings-tabs a[href="#users"]').count(),role==='admin'?1:0);
- await page.getByRole('link',{name:'邮件批次',exact:true}).click();await page.getByRole('link',{name:'通知配置',exact:true}).click();await page.locator('#schedule-form').waitFor();
- assert.equal(await page.locator('#sidebar-menu [aria-current="page"]').getAttribute('href'),'#notification-batches');
+ await page.getByRole('link',{name:'业务设置',exact:true}).click();await page.getByRole('link',{name:'通知配置',exact:true}).click();await page.locator('#schedule-form').waitFor();
+ assert.equal(await page.locator('#sidebar-menu [aria-current="page"]').getAttribute('href'),'#business-settings');
await page.getByRole('link',{name:'业务设置',exact:true}).click();await page.getByRole('heading',{name:'分类通知规则',exact:true}).waitFor();
await page.goto(base+'/#users');await page.getByRole('heading',{name:role==='admin'?'团队账号':'业务首页',exact:true}).first().waitFor();
- await page.goto(base+'/#calendar');await page.getByRole('heading',{name:'业务日历',exact:true}).waitFor();assert.equal(await page.locator('#sidebar-menu [aria-current="page"]').getAttribute('href'),'#notification-batches');
+ await page.goto(base+'/#calendar');await page.getByRole('heading',{name:'业务日历',exact:true}).waitFor();assert.equal(await page.locator('#sidebar-menu [aria-current="page"]').getAttribute('href'),'#business-settings');
await page.goto(base+'/#system-settings');await page.setViewportSize({width:390,height:844});await page.getByRole('button',{name:'展开菜单',exact:true}).click();
await page.locator('#sidebar-menu').getByRole('link',{name:'业务设置',exact:true}).click();await page.getByRole('heading',{name:'分类通知规则',exact:true}).waitFor();
await page.waitForFunction(()=>!document.querySelector('#sidebar-menu').classList.contains('collapsing'));assert.equal(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth),true);assert.equal(await page.locator('#sidebar-menu').evaluate(el=>el.classList.contains('show')),false);assert.equal(await page.getByRole('button',{name:'展开菜单',exact:true}).getAttribute('aria-expanded'),'false');
diff --git a/tests/app/notification-navigation.test.cjs b/tests/app/notification-navigation.test.cjs
index 3f24038..69db407 100644
--- a/tests/app/notification-navigation.test.cjs
+++ b/tests/app/notification-navigation.test.cjs
@@ -3,6 +3,14 @@ const test=require('node:test'),assert=require('node:assert/strict'),fs=require(
const {startTestDashboard,login}=require('../fixtures/dashboard-runtime.cjs');
const {loadPlaywright,browserOptions}=require('../../src/platform/browser.cjs');
async function fixture(t){const dir=await fs.mkdtemp(path.join(os.tmpdir(),'notification-navigation-')),runtime=await startTestDashboard({stateDir:dir,mailHistory:true}),browser=await loadPlaywright().chromium.launch(browserOptions());t.after(async()=>{await browser.close();await runtime.close();await fs.rm(dir,{recursive:true,force:true});});return {runtime,browser,base:'http://127.0.0.1:'+runtime.server.address().port};}
+
+test('independent sidebar order entries have no duplicate top tabs and configuration stays in business settings',{timeout:90000},async t=>{
+ const {runtime,browser,base}=await fixture(t);runtime.store.addUser({username:'viewer',password:'Test-password-123',role:'viewer'},'admin');
+ for(const role of ['admin','viewer']){const page=await browser.newPage({viewport:{width:1280,height:900}});page.setDefaultTimeout(6000);await page.goto(base+'/#overview');await page.getByLabel('账号',{exact:true}).fill(role);await page.getByLabel('密码',{exact:true}).fill('Test-password-123');await page.getByRole('button',{name:'登录',exact:true}).click();
+ for(const [route,title]of [['notification-orders','订单中心'],['notification-batches','邮件批次'],['notification-orders','订单中心']]){await page.locator('#sidebar-menu a[data-view='+route+']').click();await page.locator('[data-record-count]').waitFor();assert.equal(await page.locator('#view-title').innerText(),title);assert.equal(await page.locator('#settings-tabs').isVisible(),false);assert.equal(await page.locator('#settings-tabs a').count(),0);assert.equal(await page.locator('#view-breadcrumb').isVisible(),false);assert.equal(await page.locator('#sidebar-menu [aria-current=page]').count(),1);assert.equal(await page.locator('#sidebar-menu a[data-view='+route+']').getAttribute('aria-current'),'page');await page.locator('#sidebar-menu a[data-view='+route+']').click();assert.equal(new URL(page.url()).hash,'#'+route);}
+ await page.setViewportSize({width:390,height:844});await page.getByRole('button',{name:'展开菜单',exact:true}).click();await page.locator('#sidebar-menu a[data-view=business-settings]').click();await page.locator('#order-rules-panel').waitFor();await page.locator('#settings-tabs').getByRole('link',{name:'通知配置',exact:true}).click();await page.locator('#schedule-form').waitFor();assert.equal(await page.locator('#sidebar-menu a[data-view=business-settings]').getAttribute('aria-current'),'page');assert.deepEqual(await page.locator('#settings-tabs a').allTextContents(),['分类通知规则','字段映射','通知配置']);assert.equal(await page.locator('#settings-tabs a[aria-current=page]').innerText(),'通知配置');assert.equal(await page.locator('#notification-config-tabs a').count(),4);await page.locator('#notification-config-tabs').getByRole('link',{name:'业务日历',exact:true}).click();await page.getByRole('heading',{name:'业务日历',exact:true}).waitFor();await page.goBack();await page.locator('#schedule-form').waitFor();await page.reload();await page.locator('#schedule-form').waitFor();assert.equal(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth),true);await page.close();
+ }
+});
test('one business homepage and canonical order/batch routes preserve old deep links and configuration navigation',{timeout:90000},async t=>{
const {runtime,browser,base}=await fixture(t),page=await browser.newPage();page.setDefaultTimeout(6000);const errors=[],writes=[],full=[];page.on('pageerror',e=>errors.push(e.message));page.on('request',r=>{if(r.method()==='POST'&&!r.url().endsWith('/login'))writes.push(r.url());if(r.url()===base+'/api/order-rules')full.push(r.url());});await page.goto(base+'/#order-notifications');await login(page);await page.getByRole('heading',{name:'业务首页',exact:true}).waitFor();assert.equal(new URL(page.url()).hash,'#overview');assert.equal(await page.locator('#sidebar-menu [data-view]').count(),7);
for(const [route,title,canonical]of [['notification-execution','订单中心','notification-orders'],['notification-orders','订单中心','notification-orders'],['notification-history','邮件批次','notification-batches'],['notification-batches','邮件批次','notification-batches'],['schedule','发送计划','schedule'],['calendar','业务日历','calendar'],['templates','邮件模板','templates'],['notification-settings','发送设置','notification-settings']]){await page.goto(base+'/#'+route);await page.locator('#view-title').getByText(title,{exact:true}).waitFor();assert.equal(new URL(page.url()).hash,'#'+canonical+(route==='notification-history'?'?scope=all':''));if(['schedule','calendar','templates','notification-settings'].includes(route))await page.locator('#notification-config-tabs [aria-current=page]').waitFor();}
diff --git a/tests/app/web-closure-ui.test.cjs b/tests/app/web-closure-ui.test.cjs
index 6f2cc88..02fb6c0 100644
--- a/tests/app/web-closure-ui.test.cjs
+++ b/tests/app/web-closure-ui.test.cjs
@@ -3,7 +3,7 @@ const {test}=require('node:test'),assert=require('node:assert/strict'),fs=requir
const {startTestDashboard,login}=require('../fixtures/dashboard-runtime.cjs');
const {loadPlaywright,browserOptions}=require('../../src/platform/browser.cjs');
async function fixture(t,hash='schedule') {const dir=await fs.mkdtemp(path.join(os.tmpdir(),'web-closure-'));const runtime=await startTestDashboard({stateDir:dir,mailHistory:true});const browser=await loadPlaywright().chromium.launch(browserOptions());t.after(async()=>{await browser.close();await runtime.close();await fs.rm(dir,{recursive:true,force:true});});const page=await browser.newPage({viewport:{width:1440,height:1000}});page.setDefaultTimeout(5000);await page.goto('http://127.0.0.1:'+runtime.server.address().port+'/#'+hash);await login(page);return {page,runtime};}
-test('settings open directly with horizontal tabs, retired hashes redirect, and mobile stays inside viewport',{timeout:45000},async t=>{const {page}=await fixture(t,'business-settings');await page.locator('#order-rules-panel').waitFor();assert.equal(await page.locator('#settings-tabs a').count(),2);await page.getByRole('link',{name:'邮件批次',exact:true}).click();await page.getByRole('link',{name:'通知配置',exact:true}).first().click();await page.locator('#schedule-form').waitFor();assert.equal(await page.locator('#send-mode').count(),0);await page.goBack();await page.goBack();await page.locator('#order-rules-panel').waitFor();for(const [hash,title] of [['supervisor','系统健康'],['connections','系统健康'],['notifications','分类通知规则']]){await page.evaluate(h=>location.hash=h,hash);await page.getByRole('heading',{name:title,exact:true}).first().waitFor();}await page.evaluate(()=>location.hash='system-settings');await page.getByRole('heading',{name:'BPM 连接',exact:true}).first().waitFor();assert.equal(await page.locator('#settings-tabs a').count(),6);await page.setViewportSize({width:390,height:844});assert.equal(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth),true);assert.equal(await page.locator('#settings-tabs').evaluate(e=>getComputedStyle(e).overflowX),'auto');});
+test('settings open directly with horizontal tabs, retired hashes redirect, and mobile stays inside viewport',{timeout:45000},async t=>{const {page}=await fixture(t,'business-settings');await page.locator('#order-rules-panel').waitFor();assert.equal(await page.locator('#settings-tabs a').count(),3);await page.getByRole('link',{name:'业务设置',exact:true}).click();await page.getByRole('link',{name:'通知配置',exact:true}).first().click();await page.locator('#schedule-form').waitFor();assert.equal(await page.locator('#send-mode').count(),0);await page.goBack();await page.goBack();await page.locator('#order-rules-panel').waitFor();for(const [hash,title] of [['supervisor','系统健康'],['connections','系统健康'],['notifications','分类通知规则']]){await page.evaluate(h=>location.hash=h,hash);await page.getByRole('heading',{name:title,exact:true}).first().waitFor();}await page.evaluate(()=>location.hash='system-settings');await page.getByRole('heading',{name:'BPM 连接',exact:true}).first().waitFor();assert.equal(await page.locator('#settings-tabs a').count(),6);await page.setViewportSize({width:390,height:844});assert.equal(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth),true);assert.equal(await page.locator('#settings-tabs').evaluate(e=>getComputedStyle(e).overflowX),'auto');});
test('dirty navigation offers stay discard save, suppresses duplicate saves and preserves failed inputs',{timeout:45000},async t=>{const {page}=await fixture(t);await page.locator('#schedule-form').waitFor();await page.locator('#time-first').fill('09:11');await page.getByRole('link',{name:'业务日历',exact:true}).first().click();await page.getByRole('dialog',{name:'未保存的修改'}).waitFor();await page.getByRole('button',{name:'留在此页',exact:true}).click();assert.equal(await page.locator('#time-first').inputValue(),'09:11');await page.getByRole('link',{name:'业务日历',exact:true}).first().click();await page.getByRole('button',{name:'放弃并继续',exact:true}).click();await page.locator('#day-form').waitFor();await page.getByRole('link',{name:'发送计划',exact:true}).first().click();await page.locator('#time-first').fill('09:12');let requests=0;await page.route('**/api/settings',async route=>{if(route.request().method()==='GET')return route.continue();requests++;await new Promise(r=>setTimeout(r,100));await route.fulfill({status:409,json:{error:'版本已更新,请核对'}});});await page.getByRole('button',{name:'保存发送计划',exact:true}).dblclick();await page.getByRole('alert').getByText('版本已更新,请核对',{exact:true}).waitFor();assert.equal(requests,1);assert.equal(await page.locator('#time-first').inputValue(),'09:12');await page.unroute('**/api/settings');await page.getByRole('link',{name:'业务日历',exact:true}).first().click();await page.getByRole('button',{name:'保存并继续',exact:true}).click();await page.locator('#day-form').waitFor();await page.getByRole('link',{name:'发送计划',exact:true}).first().click();assert.equal(await page.locator('#time-first').inputValue(),'09:12');});
test('password creation is discard-only and assistant settings have a distinct route',{timeout:45000},async t=>{const {page}=await fixture(t,'account');await page.route('**/api/assistant',route=>route.fulfill({json:{settings:{version:1,runtimePath:'',apiBase:'',model:'',timeoutSeconds:60,dailyLimit:30,enabled:false,allowActions:false},conversations:[],usage:{calls:0,limit:30}}}));await page.locator('#account-current').fill('unsaved-test-secret');await page.getByRole('link',{name:'系统设置',exact:true}).click();await page.getByRole('dialog',{name:'未保存的修改'}).waitFor();assert.equal(await page.getByRole('button',{name:'保存并继续',exact:true}).count(),0);await page.getByRole('button',{name:'放弃并继续',exact:true}).click();await page.getByRole('link',{name:'助手设置',exact:true}).click();await page.locator('#assistant-settings-form').waitFor();await page.getByRole('link',{name:'工具',exact:true}).click();await page.getByRole('link',{name:'ZCode 助手',exact:true}).click();await page.locator('#assistant-compose').waitFor();assert.equal(await page.locator('#assistant-settings-form').count(),0);});
test('execution scan, evidence-only field draft and check emit versioned contracts',{timeout:45000},async t=>{
diff --git a/tests/mail/mail-ui.test.cjs b/tests/mail/mail-ui.test.cjs
index 29340df..bf6704c 100644
--- a/tests/mail/mail-ui.test.cjs
+++ b/tests/mail/mail-ui.test.cjs
@@ -3,6 +3,6 @@ test('mail management saves a real config, previews template under CSP and confi
const dir=fs.mkdtempSync(path.join(os.tmpdir(),'mail-ui-')),store=new Store(path.join(dir,'users'));store.bootstrap('admin','Test-password-123');const mailStore=new MailStore(path.join(dir,'mail')),mail=new MailService({store:mailStore});const server=createDashboard({store,mail,outputDir:dir});let browser;
t.after(async()=>{await browser?.close();await mail.stop();await new Promise(r=>server.close(r));mailStore.close();fs.rmSync(dir,{recursive:true,force:true});});await new Promise(r=>server.listen(0,'127.0.0.1',r));const base='http://127.0.0.1:'+server.address().port;browser=await loadPlaywright().chromium.launch(browserOptions());const page=await browser.newPage({viewport:{width:1360,height:950}});const errors=[];page.on('pageerror',e=>errors.push(e.message));await page.goto(base+'/#mail');await page.getByLabel('账号',{exact:true}).fill('admin');await page.getByLabel('密码',{exact:true}).fill('Test-password-123');await page.getByRole('button',{name:'登录',exact:true}).click();await page.getByRole('button',{name:'添加邮箱',exact:true}).click({timeout:5000});
await page.getByLabel('邮箱名称',{exact:true}).fill('通知邮箱');await page.getByLabel('邮箱地址',{exact:true}).fill('orders@company.test');for(const type of ['SMTP','IMAP']){await page.getByLabel(type+' 服务器',{exact:true}).fill(type.toLowerCase()+'.company.test');await page.getByLabel(type+' 登录账号',{exact:true}).fill('orders');await page.getByLabel(type+' 密码 / 授权码',{exact:true}).fill('Secret-mail-123');}await page.getByLabel('允许提交模板的发件人',{exact:true}).fill('author@company.test');await page.getByRole('button',{name:'保存邮箱',exact:true}).click();await page.getByText('通知邮箱',{exact:true}).waitFor();assert.equal(mailStore.channels().length,1);
- const c=mailStore.channels()[0],raw=Buffer.from('From: author@company.test\r\nTo: orders@company.test\r\nSubject: [模板]Notice\r\nMIME-Version: 1.0\r\nContent-Type: text/html\r\n\r\n
');const draft=mailStore.ingest(c.id,'1',1,await parseTemplate(raw,c),raw,1);await page.locator('#sidebar-menu a[data-view=notification-batches]').click();await page.getByRole('link',{name:'通知配置',exact:true}).click();await page.locator('#notification-config-tabs').getByRole('link',{name:'邮件模板',exact:true}).click();await page.getByRole('button',{name:'预览并确认',exact:true}).click();await page.frameLocator('iframe[title="邮件正文预览"]').getByText('Template body',{exact:true}).waitFor();assert.equal(mailStore.template(draft.id).status,'pending');await page.getByLabel('发信标题',{exact:true}).fill('Confirmed notice');await page.getByRole('button',{name:'确认生效',exact:true}).click();await page.getByText('模板已确认生效。',{exact:true}).waitFor();assert.equal(mailStore.template(draft.id).status,'active');
+ const c=mailStore.channels()[0],raw=Buffer.from('From: author@company.test\r\nTo: orders@company.test\r\nSubject: [模板]Notice\r\nMIME-Version: 1.0\r\nContent-Type: text/html\r\n\r\n
');const draft=mailStore.ingest(c.id,'1',1,await parseTemplate(raw,c),raw,1);await page.locator('#sidebar-menu a[data-view=business-settings]').click();await page.getByRole('link',{name:'通知配置',exact:true}).click();await page.locator('#notification-config-tabs').getByRole('link',{name:'邮件模板',exact:true}).click();await page.getByRole('button',{name:'预览并确认',exact:true}).click();await page.frameLocator('iframe[title="邮件正文预览"]').getByText('Template body',{exact:true}).waitFor();assert.equal(mailStore.template(draft.id).status,'pending');await page.getByLabel('发信标题',{exact:true}).fill('Confirmed notice');await page.getByRole('button',{name:'确认生效',exact:true}).click();await page.getByText('模板已确认生效。',{exact:true}).waitFor();assert.equal(mailStore.template(draft.id).status,'active');
await page.setViewportSize({width:390,height:844});assert.equal(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth),true);assert.deepEqual(errors,[]);
});
diff --git a/web/app.js b/web/app.js
index 35aebfd..e245873 100644
--- a/web/app.js
+++ b/web/app.js
@@ -104,8 +104,8 @@ async function renderView() {
historyIndex=Number.isInteger(history.state?.appIndex)?history.state.appIndex:historyIndex;history.replaceState({...history.state,appIndex:historyIndex},'',window.RecordState.isRecord(location.hash)?location.hash:'#'+currentView+(['exceptions'].includes(currentView)&&location.hash.includes('?')?location.hash.slice(location.hash.indexOf('?')):''));
const section=window.AppNavigation.sectionFor(currentView);
window.AppNavigation.renderTabs(document.querySelector('#settings-tabs'),{id:currentView,user:currentUser,views,esc});
- document.querySelectorAll('[data-view]').forEach(link=>{const active=link.dataset.view===(['notification-orders','notification-batches'].includes(currentView)?currentView:section==='order-notifications'?'notification-batches':section||currentView);link.classList.toggle('active',active);if(active)link.setAttribute('aria-current','page');else link.removeAttribute('aria-current');});
- const sectionTitle=section==='order-notifications'?'订单通知管理':views[section]?.[0];
+ document.querySelectorAll('[data-view]').forEach(link=>{const active=link.dataset.view===(section||currentView);link.classList.toggle('active',active);if(active)link.setAttribute('aria-current','page');else link.removeAttribute('aria-current');});
+ const sectionTitle=views[section]?.[0];
const breadcrumb=document.querySelector('#view-breadcrumb');breadcrumb.hidden=!section||section===currentView||section==='records';breadcrumb.innerHTML=breadcrumb.hidden?'':`← ${sectionTitle} / ${esc(views[currentView][0])}`;
document.querySelector('#view-title').textContent=views[currentView][0];document.querySelector('#view-description').textContent=views[currentView][1];
const container=document.querySelector('#content');if(!(wasRecord&&['records','records-pdf'].includes(currentView)))container.innerHTML='';
diff --git a/web/modules/navigation/view.js b/web/modules/navigation/view.js
index cb1b473..18eba14 100644
--- a/web/modules/navigation/view.js
+++ b/web/modules/navigation/view.js
@@ -3,8 +3,7 @@ window.AppNavigation=(()=>{
const primary=[['overview','overview'],['notification-orders','file'],['notification-batches','mail'],['tools','spark'],['exceptions','alert'],['business-settings','rules'],['system-settings','settings']];
const groups={
tools:['records','records-pdf','assistant','storage'],
- 'order-notifications':['notification-orders','notification-batches','schedule'],
- 'business-settings':['order-rules','rule-fields'],
+ 'business-settings':['order-rules','rule-fields','schedule'],
'system-settings':['bpm','mail','assistant-settings','health','users','audit']
};
const configuration=['schedule','calendar','templates','notification-settings'];
@@ -28,7 +27,7 @@ window.AppNavigation=(()=>{
const routeIcons={records:'history','records-pdf':'file','order-notifications':'overview','notification-execution':'play','notification-orders':'file','notification-batches':'batches','notification-history':'history',schedule:'calendar',calendar:'calendar',templates:'mail','notification-settings':'settings','order-rules':'rules','rule-fields':'fields',bpm:'link',mail:'mail',storage:'batches','assistant-settings':'spark',health:'alert',users:'users',audit:'history'};
const resolve=id=>aliases[id]||id;
const isConfiguration=id=>configuration.includes(resolve(id));
- function sectionFor(id){id=resolve(id);if(isConfiguration(id))return 'order-notifications';return Object.keys(groups).find(section=>groups[section].includes(id))||null;}
+ function sectionFor(id){id=resolve(id);if(isConfiguration(id))return 'business-settings';return Object.keys(groups).find(section=>groups[section].includes(id))||null;}
function icon(name){return ``;}
function reveal(container){
const active=container.querySelector('.active');if(!active)return;
@@ -39,7 +38,7 @@ window.AppNavigation=(()=>{
function links(ids,active,{views,esc},labels={}){return ids.map(id=>`${icon(routeIcons[id])}${esc(labels[id]||views[id][0])}`).join('');}
function renderTabs(container,{id,user,views,esc}){
const section=sectionFor(id);container.hidden=!section;
- container.className='nav nav-segmented settings-tabs';container.setAttribute('aria-label',section==='tools'?'工具导航':section==='records'?'记录导航':section==='order-notifications'?'订单通知管理导航':section==='business-settings'?'业务设置导航':'系统设置导航');
+ container.className='nav nav-segmented settings-tabs';container.setAttribute('aria-label',section==='tools'?'工具导航':section==='records'?'记录导航':section==='business-settings'?'业务设置导航':'系统设置导航');
container.innerHTML=section?links(groups[section].filter(item=>item!=='users'||user.role==='admin'),isConfiguration(id)?'schedule':id,{views,esc},{schedule:'通知配置',records:'流程到达记录','records-pdf':'PDF 导出记录'}):'';
reveal(container);
}