feat(works): 新增成品「开发文档中心 · 甄房」

- 回收 ZhenOS-SH/ruoyi-ui public/devdoc 静态站(16 文件 / 3.69 MB)到 works/devdoc
- 目录页 5 分类 21 条文档 + 10 个子页(业务全流程流程图 mermaid / 菜单图标选型 / 头像素材规范等)
- works.js 追加索引(文档类),works.html 版本 bump
This commit is contained in:
sgp
2026-11-15 22:48:48 +08:00
parent e801e14575
commit 12f8b65e1c
18 changed files with 8286 additions and 1 deletions
+300
View File
@@ -0,0 +1,300 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>开发文档中心 · 甄房</title>
<style>
:root {
--ink: #1f2329;
--ink-2: #5c6670;
--ink-3: #8a939e;
--line: #e6e9ee;
--bg: #f6f7f9;
--panel: #ffffff;
--brand: #2b6de5;
--brand-soft: #eef3fe;
--nav: #ffffff;
--nav-2: #f1f4f8;
--nav-ink: #4b5563;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
background: var(--bg);
color: var(--ink);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
"Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
font-size: 14px;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
.shell { display: flex; min-height: 100vh; align-items: stretch; }
/* ---------------- 左侧模块清单 ---------------- */
.side {
flex: 0 0 238px;
background: var(--nav);
color: var(--nav-ink);
border-right: 1px solid var(--line);
padding: 22px 12px 28px;
position: sticky;
top: 0;
align-self: flex-start;
height: 100vh;
overflow: auto;
}
.brand { padding: 0 10px 16px; border-bottom: 1px solid var(--line); }
.brand h1 { margin: 0; font-size: 15.5px; font-weight: 600; color: var(--ink); letter-spacing: .3px; }
.brand p { margin: 5px 0 0; font-size: 12px; color: var(--ink-3); }
.nav-label {
margin: 20px 10px 8px; font-size: 11px; letter-spacing: 1.2px;
color: var(--ink-3); text-transform: uppercase;
}
.cat {
display: flex; align-items: center; justify-content: space-between;
padding: 9px 12px; margin: 3px 0; border-radius: 7px;
color: var(--ink-2); cursor: pointer; user-select: none;
border-left: 3px solid transparent;
transition: background .15s, color .15s, border-color .15s;
}
.cat:hover { background: var(--nav-2); color: var(--ink); }
.cat.active { background: var(--brand-soft); color: var(--brand); border-left-color: var(--brand); font-weight: 600; }
.cat .name { font-size: 13.5px; }
.cat .count {
font-size: 11px; min-width: 20px; text-align: center;
padding: 1px 6px; border-radius: 10px;
background: #eef1f5; color: var(--ink-3);
}
.cat.active .count { background: #d9e6fd; color: var(--brand); }
.side-foot { margin: 22px 10px 0; font-size: 11px; color: var(--ink-3); line-height: 1.8; }
/* ---------------- 右侧文档列表 ---------------- */
.main { flex: 1 1 auto; min-width: 0; padding: 26px 30px 56px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head h2 { margin: 0; font-size: 22px; font-weight: 600; }
.head .sub { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; }
.search { position: relative; }
.search input {
width: 260px; height: 36px; padding: 0 12px 0 34px;
border: 1px solid var(--line); border-radius: 8px; background: #fff;
font-size: 13px; color: var(--ink); outline: none;
}
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search svg { position: absolute; left: 11px; top: 10px; width: 15px; height: 15px; fill: var(--ink-3); }
.stats { display: flex; gap: 26px; margin: 18px 0 6px; padding: 14px 18px;
background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.stat b { font-size: 18px; font-weight: 600; }
.stat span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.group { margin-top: 26px; }
.group-title { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.group-title h3 { margin: 0; font-size: 15px; font-weight: 600; }
.group-title .bar { width: 3px; height: 15px; background: var(--brand); border-radius: 2px; }
.group-title .n { font-size: 12px; color: var(--ink-3); }
.doc {
display: grid;
grid-template-columns: 112px 150px 1fr 26px;
align-items: center;
gap: 14px;
padding: 14px 18px;
margin-bottom: 8px;
background: var(--panel);
border: 1px solid var(--line);
border-radius: 10px;
cursor: pointer;
transition: border-color .15s, box-shadow .15s, transform .15s;
}
.doc:hover { border-color: #b9cdf6; box-shadow: 0 4px 14px rgba(43,109,229,.08); transform: translateY(-1px); }
.doc .date { color: var(--ink-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.doc .module { font-size: 13px; font-weight: 600; color: var(--ink); }
.doc .summary { color: var(--ink-2); font-size: 12.8px; line-height: 1.65; }
.doc .arrow { color: #b7c0cb; font-size: 18px; text-align: right; transition: color .15s, transform .15s; }
.doc:hover .arrow { color: var(--brand); transform: translateX(2px); }
.empty { padding: 60px 0; text-align: center; color: var(--ink-3); font-size: 13px; }
@media (max-width: 900px) {
.shell { display: block; }
.side { position: static; height: auto; width: 100%; padding: 14px; }
.brand { padding-bottom: 12px; }
.nav-label { display: none; }
.cat { display: inline-flex; gap: 8px; margin: 4px 6px 0 0; padding: 7px 12px; }
.side-foot { display: none; }
.main { padding: 18px 14px 40px; }
.search input { width: 100%; }
.doc { grid-template-columns: 96px 1fr 20px; }
.doc .summary { grid-column: 1 / -1; }
}
</style>
</head>
<body>
<div class="shell">
<aside class="side">
<div class="brand">
<h1>开发文档中心</h1>
<p>甄房 · 产品与技术设计库</p>
</div>
<div class="nav-label">模块清单</div>
<div id="nav"></div>
<div class="side-foot">
文档随前端发布,与代码同版本。<br />
仅平台管理员可见。
</div>
</aside>
<main class="main">
<div class="head">
<div>
<h2 id="pageTitle">全部文档</h2>
<p class="sub" id="pageSub">按业务模块归档的设计方案、流程说明与底层规范。</p>
</div>
<div class="search">
<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.47 6.47 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0A4.5 4.5 0 1 1 14 9.5 4.49 4.49 0 0 1 9.5 14z"/></svg>
<input id="q" type="search" placeholder="搜索模块或关键词" autocomplete="off" />
</div>
</div>
<div class="stats">
<div class="stat"><b id="statDocs">0</b><span>文档总数</span></div>
<div class="stat"><b id="statCats">0</b><span>模块分类</span></div>
<div class="stat"><b id="statDate">—</b><span>最近建档</span></div>
</div>
<div id="list"></div>
</main>
</div>
<script>
/* 文档清单:日期 / 模块 / 说明 / 详情页 */
var CATS = [
{ id: 'base', name: '基础业务' },
{ id: 'newhouse', name: '新房业务' },
{ id: 'marketing', name: '外网营销' },
{ id: 'ai', name: 'AI 赋能' },
{ id: 'foundation',name: '底层设计' }
];
var DOCS = [
/* 基础业务 */
{ cat: 'base', date: '2026-09-20', module: '房源管理', summary: '二手房 / 商业 / 新房三态录入、状态机、楼盘四级级联、媒体与委托管理。', url: 'base-business.html#listing' },
{ cat: 'base', date: '2026-09-20', module: '客源管理', summary: '客户建档、公私客池流转、跟进与带看计数联动、标签与分配日志。', url: 'base-business.html#customer' },
{ cat: 'base', date: '2026-09-20', module: '交易与合同', summary: '交易节点推进、合同签署、资金台账与应收同步。', url: 'base-business.html#transaction' },
{ cat: 'base', date: '2026-09-20', module: '薪酬结算', summary: '佣金规则、公司/部门/个人三级分成、结算单与工资单。', url: 'base-business.html#commission' },
/* 新房业务 */
{ cat: 'newhouse', date: '2026-11-12', module: '业务全流程', summary: '入驻 → 录盘 → 审核 → 分发 → 咨询 → 线索 → 转客源,覆盖四端全链路与状态机。', url: 'newhouse-business-flows/index.html' },
{ cat: 'newhouse', date: '2026-10-10', module: '调研与设计方案', summary: '命名方案、需求拆解、行业调研、账号模型(专用租户 8)与数据模型。', url: 'newhouse-design.html' },
{ cat: 'newhouse', date: '2026-11-14', module: '渠道入驻与建号', summary: 'C 端申请、平台审核、建 sys_user 入组织架构、停用恢复与企微绑定。', url: 'newhouse-business-flows/index.html#onboarding' },
{ cat: 'newhouse', date: '2026-11-14', module: '新盘审核与上下架', summary: 'PENDING / AUDITED / OFF_SHELF / REJECTED 状态机、批量审核与回收站。', url: 'newhouse-business-flows/index.html#audit' },
{ cat: 'newhouse', date: '2026-11-14', module: '线索与转客源', summary: '两类线索来源、跟进五态、转派、转正式客源与查看日志。', url: 'newhouse-business-flows/index.html#lead' },
/* 外网营销 */
{ cat: 'marketing', date: '2026-11-14', module: 'C 端获客链路', summary: '小程序 / H5 浏览、留资、企微直连,频控与去重策略。', url: 'external-marketing.html#acquire' },
{ cat: 'marketing', date: '2026-11-14', module: '分享归因', summary: 'state 归因串、shareId 白名单校验、分享复用窗口与防伪造。', url: 'external-marketing.html#attribution' },
{ cat: 'marketing', date: '2026-11-14', module: '开放 API 与外部渠道', summary: '开放式接口密钥、调用日志、外部渠道体系与数据边界。', url: 'external-marketing.html#openapi' },
/* AI 赋能 */
{ cat: 'ai', date: '2026-11-14', module: 'AI 赋能矩阵', summary: 'AI 营销助手 / 经管助手 / 赋能助手三类场景与菜单结构。', url: 'ai-enable.html#matrix' },
{ cat: 'ai', date: '2026-11-14', module: 'NL2SQL 与语义视图', summary: '13 个 v_bi_* 视图、SQL 护栏、权限范围收口与多轮纠错。', url: 'ai-enable.html#nl2sql' },
{ cat: 'ai', date: '2026-11-14', module: '算力与定时简报', summary: '算力账户计费、报告归档、定时任务与企业微信推送。', url: 'ai-enable.html#credit' },
/* 底层设计 */
{ cat: 'foundation', date: '2026-11-14', module: '多租户与数据隔离', summary: 'tenant_id 注入、平台 / 业务租户 / 渠道租户 8 的边界与只读共享。', url: 'foundation.html#tenant' },
{ cat: 'foundation', date: '2026-11-14', module: '权限与菜单体系', summary: 'RBAC、@PreAuthorize、菜单 8400 / 10509 / 10620 的授权口径。', url: 'foundation.html#rbac' },
{ cat: 'foundation', date: '2026-11-14', module: '数据库迁移机制', summary: 'DatabaseMigration 幂等建表、字典、菜单与版本门禁。', url: 'foundation.html#migration' },
{ cat: 'foundation', date: '2026-11-14', module: '构建、端口与部署', summary: '8631 / 8632 / 8635 / 8637 端口约定、统一部署脚本与上线校验。', url: 'foundation.html#deploy' },
{ cat: 'foundation', date: '2026-11-15', module: '一级菜单图标选型', summary: '每个一级菜单 10 个候选图标,跨概念 / 跨线条风格对照,点击即复制 SVG 源码。', url: 'menu-icons/index.html' },
{ cat: 'foundation', date: '2026-11-15', module: '默认头像素材库', summary: '线框半身 20 色 + 浅色渐变背景 20 款,含色值、文件清单、随机分配与兜底规则。', url: 'avatars.html' }
];
(function () {
var state = { cat: 'all', q: '' };
var navEl = document.getElementById('nav');
var listEl = document.getElementById('list');
function esc(s) {
return String(s == null ? '' : s).replace(/[&<>"']/g, function (c) {
return { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c];
});
}
function renderNav() {
var html = '<div class="cat' + (state.cat === 'all' ? ' active' : '') + '" data-cat="all">' +
'<span class="name">全部文档</span><span class="count">' + DOCS.length + '</span></div>';
CATS.forEach(function (c) {
var n = DOCS.filter(function (d) { return d.cat === c.id; }).length;
html += '<div class="cat' + (state.cat === c.id ? ' active' : '') + '" data-cat="' + c.id + '">' +
'<span class="name">' + esc(c.name) + '</span><span class="count">' + n + '</span></div>';
});
navEl.innerHTML = html;
}
function renderList() {
var q = state.q.trim().toLowerCase();
var items = DOCS.filter(function (d) {
if (state.cat !== 'all' && d.cat !== state.cat) return false;
if (!q) return true;
return (d.module + ' ' + d.summary + ' ' + d.date).toLowerCase().indexOf(q) >= 0;
});
if (!items.length) {
listEl.innerHTML = '<div class="empty">没有匹配的文档</div>';
return;
}
var groups = state.cat === 'all' ? CATS : CATS.filter(function (c) { return c.id === state.cat; });
var html = '';
groups.forEach(function (c) {
var rows = items.filter(function (d) { return d.cat === c.id; });
if (!rows.length) return;
html += '<section class="group"><div class="group-title"><span class="bar"></span><h3>' +
esc(c.name) + '</h3><span class="n">' + rows.length + ' 篇</span></div>';
rows.forEach(function (d) {
html += '<div class="doc" data-url="' + esc(d.url) + '">' +
'<div class="date">' + esc(d.date) + '</div>' +
'<div class="module">' + esc(d.module) + '</div>' +
'<div class="summary">' + esc(d.summary) + '</div>' +
'<div class="arrow">›</div></div>';
});
html += '</section>';
});
listEl.innerHTML = html;
Array.prototype.forEach.call(listEl.querySelectorAll('.doc'), function (el) {
el.addEventListener('click', function () { window.location.href = el.getAttribute('data-url'); });
});
}
function renderHead() {
var all = state.cat === 'all';
var name = all ? '全部文档' : (CATS.filter(function (c) { return c.id === state.cat; })[0] || {}).name;
document.getElementById('pageTitle').textContent = name;
document.getElementById('pageSub').textContent = all
? '按业务模块归档的设计方案、流程说明与底层规范。'
: '当前模块下的设计文档,点击条目查看详情。';
}
navEl.addEventListener('click', function (e) {
var el = e.target.closest('.cat');
if (!el) return;
state.cat = el.getAttribute('data-cat');
renderNav(); renderHead(); renderList();
});
document.getElementById('q').addEventListener('input', function (e) {
state.q = e.target.value || '';
renderList();
});
document.getElementById('statDocs').textContent = DOCS.length;
document.getElementById('statCats').textContent = CATS.length;
document.getElementById('statDate').textContent = DOCS.map(function (d) { return d.date; }).sort().pop();
renderNav(); renderHead(); renderList();
})();
</script>
</body>
</html>