feat: 营养管理模块页面重构及新增检验页面,创建其他终端目录结构

- 新增营养质检-新增检验二级页面(prod-qc-nutrition-add.html)
- 重构餐品总库、食物成分、餐品新增等页面
- 删除已废弃的 din-dish-composition.html
- 新增数据库设计文档
- 创建 other-module 目录结构(小程序/应急大屏/医疗PAD)
- 更新项目背景文档新增其他终端模块定义
- 同步更新 index.html SITE_MAP

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
冯普
2026-05-13 11:33:15 +08:00
co-authored by Claude Opus 4.6
parent be6f5a7f81
commit 0a99f44ec7
15 changed files with 6107 additions and 1408 deletions
+20 -6
View File
@@ -57,7 +57,7 @@ body { background: var(--background); font-family: -apple-system, BlinkMacSystem
/* ===== 模块网格 ===== */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; align-items: stretch; }
.module-grid--center { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; max-width: 960px; margin: 0 auto; align-items: stretch; }
.module-grid--center { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin: 0 auto; align-items: stretch; }
/* ===== 角色分组 ===== */
.role-group { margin-bottom: 28px; text-align: center; }
@@ -71,6 +71,9 @@ body { background: var(--background); font-family: -apple-system, BlinkMacSystem
.role-icon--onsite { background: linear-gradient(135deg, #faad14, #ffc53d); }
.role-icon--admin { background: linear-gradient(135deg, #eb2f96, #ff85c0); }
.role-icon--shared { background: linear-gradient(135deg, #13c2c2, #5cdbd3); }
.role-icon--miniprogram { background: linear-gradient(135deg, #52c41a, #95de64); }
.role-icon--screen { background: linear-gradient(135deg, #722ED1, #b37feb); }
.role-icon--pad { background: linear-gradient(135deg, #1677FF, #69b1ff); }
/* ===== 呼吸灯动画 ===== */
@keyframes breathe {
@@ -165,12 +168,13 @@ const ICONS = {
web: '<svg class="tab-nav__icon" viewBox="0 0 18 18" fill="none"><rect x="1" y="2" width="16" height="12" rx="2" stroke="currentColor" stroke-width="1.5"/><line x1="5" y1="16" x2="13" y2="16" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><line x1="9" y1="14" x2="9" y2="16" stroke="currentColor" stroke-width="1.5"/></svg>',
app: '<svg class="tab-nav__icon" viewBox="0 0 18 18" fill="none"><rect x="4" y="1" width="10" height="16" rx="2" stroke="currentColor" stroke-width="1.5"/><line x1="7.5" y1="14" x2="10.5" y2="14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',
emergency: '<svg class="tab-nav__icon" viewBox="0 0 18 18" fill="none"><path d="M9 1L2 6.5V16h5v-4h4v4h5V6.5L9 1z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M9 7v3M9 11.5v.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',
other: '<svg class="tab-nav__icon" viewBox="0 0 18 18" fill="none"><rect x="1" y="3" width="7" height="5" rx="1" stroke="currentColor" stroke-width="1.3"/><rect x="10" y="3" width="7" height="5" rx="1" stroke="currentColor" stroke-width="1.3"/><rect x="1" y="10" width="7" height="5" rx="1" stroke="currentColor" stroke-width="1.3"/><rect x="10" y="10" width="7" height="5" rx="1" stroke="currentColor" stroke-width="1.3"/></svg>',
page: '<svg width="14" height="14" viewBox="0 0 12 12" fill="none"><path d="M3 1h4l3 3v7H3V1z" stroke="currentColor" stroke-width="1.1"/><path d="M7 1v3h3" stroke="currentColor" stroke-width="1.1"/></svg>',
dialog: '<svg width="14" height="14" viewBox="0 0 12 12" fill="none"><rect x="1.5" y="2" width="9" height="8" rx="1.5" stroke="currentColor" stroke-width="1.1"/><line x1="4" y1="5" x2="8" y2="5" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/><line x1="4" y1="7.5" x2="6.5" y2="7.5" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/></svg>',
empty: '<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><circle cx="8" cy="8" r="6.5" stroke="currentColor" stroke-width="1.2" stroke-dasharray="3 2"/><path d="M8 5.5v3M8 10v.5" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/></svg>',
prd: '<svg class="tab-nav__icon" viewBox="0 0 18 18" fill="none"><path d="M4 1h7l4 4v12H4V1z" stroke="currentColor" stroke-width="1.5"/><path d="M11 1v4h4" stroke="currentColor" stroke-width="1.5"/><line x1="7" y1="9" x2="13" y2="9" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/><line x1="7" y1="12" x2="11" y2="12" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/></svg>',
prdSmall: '<svg width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M2.5 1h5l2.5 2.5v7.5h-7.5V1z" stroke="currentColor" stroke-width="1"/><path d="M7.5 1v2.5h2.5" stroke="currentColor" stroke-width="1"/></svg>',
role: { expert:'👨‍⚕', assistant:'🤖', operator:'📋', professional:'👷', onsite:'🏥', admin:'⚙', shared:'🔗' }
role: { expert:'👨‍⚕', assistant:'🤖', operator:'📋', professional:'👷', onsite:'🏥', admin:'⚙', shared:'🔗', miniprogram:'📱', screen:'🖥', pad:'📋' }
};
const SITE_MAP = [
@@ -277,6 +281,7 @@ const SITE_MAP = [
{ file:'prod-proc-stats.html', label:'加工统计' },
{ file:'prod-qc-daily.html', label:'日常质检' },
{ file:'prod-qc-nutrition.html', label:'营养质检' },
{ file:'prod-qc-nutrition-add.html', label:'营养质检-新增' },
{ file:'ano-dirty.html', label:'系统脏数据' },
{ file:'ano-result.html', label:'结果异常' }
]},
@@ -638,7 +643,14 @@ const SITE_MAP = [
{file:'index.html',label:'消息列表'},{file:'contacts.html',label:'通讯录'},{file:'im-chat.html',label:'聊天'}
]}
]
}
},
{ id:'other-terminals', label:'其他终端', icon:'other', color:'#b37feb', modules:[
{ name:'营养管理小程序', dir:'other-terminals/mini-program', pages:[] },
{ name:'西安应急中心大屏', dir:'other-terminals/emergency-screen/xian-center', pages:[] },
{ name:'标准版中心大屏', dir:'other-terminals/emergency-screen/standard-center', pages:[] },
{ name:'九厂应急中心大屏', dir:'other-terminals/emergency-screen/jiuchang-center', pages:[] },
{ name:'医疗点PAD端', dir:'other-terminals/medical-pad', pages:[] }
]}
];
/* ===== 渲染逻辑 ===== */
@@ -741,9 +753,11 @@ SITE_MAP.forEach((t, i) => {
html += r.modules.map(m => cardHTML(m, 'u' + uidCounter++)).join('');
html += '</div></div>';
});
html += `<div class="role-group"><div class="role-group__title"><span class="role-icon role-icon--shared">${ICONS.role.shared}</span>全角色共享</div><div class="module-grid module-grid--center">`;
html += t.shared.map(m => cardHTML(m, 'u' + uidCounter++)).join('');
html += '</div></div>';
if (t.shared && t.shared.length > 0) {
html += `<div class="role-group"><div class="role-group__title"><span class="role-icon role-icon--shared">${ICONS.role.shared}</span>全角色共享</div><div class="module-grid module-grid--center">`;
html += t.shared.map(m => cardHTML(m, 'u' + uidCounter++)).join('');
html += '</div></div>';
}
}
div.innerHTML = html;
tabContents.appendChild(div);