提交
This commit is contained in:
1 parent
59fafb92d5
commit
6abfb6e251
1512 files changed
+1565614
-275592
No files matched your search
@@ -0,0 +1,628 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>侧栏目录 + 右侧叶子 Tab Demo</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
||||
<style>
|
||||
:root {
|
||||
--primary: #10b981;
|
||||
--primary-dark: #059669;
|
||||
--primary-bg: #ecfdf5;
|
||||
--text: #1e293b;
|
||||
--text-muted: #64748b;
|
||||
--border: #d9e8e2;
|
||||
--bg-page: #f8fafc;
|
||||
--surface: #ffffff;
|
||||
--table-head: #f8fafc;
|
||||
--row-alt: #f1f5f9;
|
||||
--shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
||||
--radius: 10px;
|
||||
--sidebar-w: 220px;
|
||||
--header-h: 56px;
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
html, body { height: 100%; }
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
color: var(--text);
|
||||
background: var(--bg-page);
|
||||
}
|
||||
button { font-family: inherit; }
|
||||
|
||||
.page {
|
||||
max-width: 1280px;
|
||||
margin: 0 auto;
|
||||
padding: 20px 20px 48px;
|
||||
}
|
||||
.intro h1 {
|
||||
margin: 0 0 6px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.intro p {
|
||||
margin: 0 0 12px;
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
max-width: 860px;
|
||||
}
|
||||
.intro ul {
|
||||
margin: 0 0 16px;
|
||||
padding: 10px 14px 10px 28px;
|
||||
background: #fff;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
font-size: 13px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
.intro li { margin: 3px 0; }
|
||||
.intro b { color: var(--text); font-weight: 600; }
|
||||
|
||||
.shell {
|
||||
display: grid;
|
||||
grid-template-columns: var(--sidebar-w) 1fr;
|
||||
grid-template-rows: var(--header-h) minmax(560px, calc(100vh - 220px));
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
background: var(--surface);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
.header {
|
||||
grid-column: 1 / -1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
height: var(--header-h);
|
||||
padding: 0 16px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: #fff;
|
||||
}
|
||||
.brand {
|
||||
width: var(--sidebar-w);
|
||||
margin-left: -16px;
|
||||
padding-left: 16px;
|
||||
font-weight: 700;
|
||||
color: var(--primary-dark);
|
||||
}
|
||||
.crumb {
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
.crumb strong { color: var(--text); font-weight: 600; }
|
||||
|
||||
.sidebar {
|
||||
border-right: 1px solid var(--border);
|
||||
background: #fff;
|
||||
overflow: auto;
|
||||
padding: 10px 8px 16px;
|
||||
}
|
||||
.side-label {
|
||||
padding: 6px 10px 8px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--text-muted);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.tree-item { margin: 2px 0; }
|
||||
.tree-btn {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--text);
|
||||
text-align: left;
|
||||
padding: 8px 10px;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
.tree-btn:hover { background: var(--row-alt); }
|
||||
.tree-btn.is-active {
|
||||
background: var(--primary-bg);
|
||||
color: var(--primary-dark);
|
||||
font-weight: 600;
|
||||
}
|
||||
.tree-btn .chev {
|
||||
width: 14px;
|
||||
color: var(--text-muted);
|
||||
font-size: 11px;
|
||||
flex: 0 0 14px;
|
||||
}
|
||||
.tree-btn.is-active .chev { color: var(--primary-dark); }
|
||||
.tree-btn.l1 { font-weight: 600; }
|
||||
.tree-children {
|
||||
padding-left: 18px;
|
||||
display: none;
|
||||
}
|
||||
.tree-children.open { display: block; }
|
||||
|
||||
.main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
background: var(--bg-page);
|
||||
}
|
||||
.tabs {
|
||||
display: flex;
|
||||
padding: 12px 16px 8px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.tabs-track {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
padding: 4px;
|
||||
background: #fff;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 1px 2px rgba(30, 41, 59, 0.04), 0 8px 24px rgba(30, 41, 59, 0.04);
|
||||
}
|
||||
.tab {
|
||||
appearance: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 32px;
|
||||
padding: 0 12px;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #4b5563;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.tab:hover { color: var(--text); background: #f3f6f4; }
|
||||
.tab.is-on {
|
||||
color: var(--primary-dark);
|
||||
font-weight: 600;
|
||||
background: var(--primary-bg, #ecfdf5);
|
||||
}
|
||||
.tab .dot {
|
||||
display: inline-block;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 99px;
|
||||
background: #cbd5e1;
|
||||
margin-right: 6px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.tab.is-on .dot { background: var(--primary); }
|
||||
.tab.is-loaded .dot { background: #94a3b8; }
|
||||
.tab.is-on.is-loaded .dot { background: var(--primary); }
|
||||
|
||||
.panel-wrap {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
padding: 16px;
|
||||
}
|
||||
.empty {
|
||||
height: 100%;
|
||||
min-height: 360px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
border: 1px dashed var(--border);
|
||||
border-radius: var(--radius);
|
||||
background: #fff;
|
||||
}
|
||||
.view {
|
||||
display: none;
|
||||
background: #fff;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
min-height: 360px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.view.is-show { display: block; }
|
||||
.view-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: var(--table-head);
|
||||
}
|
||||
.view-head h2 {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.view-head h2::before {
|
||||
content: "";
|
||||
width: 3px;
|
||||
height: 14px;
|
||||
border-radius: 2px;
|
||||
background: var(--primary);
|
||||
}
|
||||
.badge {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
color: var(--primary-dark);
|
||||
background: var(--primary-bg);
|
||||
border-radius: 999px;
|
||||
padding: 2px 8px;
|
||||
}
|
||||
.view-body { padding: 16px; }
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 13px;
|
||||
}
|
||||
th, td {
|
||||
padding: 10px 12px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
th {
|
||||
color: var(--text-muted);
|
||||
font-weight: 600;
|
||||
background: var(--table-head);
|
||||
}
|
||||
tbody tr:nth-child(even) { background: #fafefe; }
|
||||
.tag {
|
||||
display: inline-block;
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
background: #059669;
|
||||
}
|
||||
.tag.warn { background: #d97706; }
|
||||
.tag.info {
|
||||
background: transparent;
|
||||
color: var(--text);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.kv {
|
||||
display: grid;
|
||||
grid-template-columns: 140px 1fr;
|
||||
gap: 8px 16px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.kv dt { color: var(--text-muted); }
|
||||
.kv dd { margin: 0; }
|
||||
|
||||
.mask {
|
||||
display: none;
|
||||
position: absolute;
|
||||
inset: 16px;
|
||||
border-radius: var(--radius);
|
||||
background: rgba(255, 255, 255, 0.72);
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.mask.show { display: flex; }
|
||||
.spin {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border: 2px solid #cbd5e1;
|
||||
border-top-color: var(--primary-dark);
|
||||
border-radius: 50%;
|
||||
margin-right: 8px;
|
||||
animation: rot 0.8s linear infinite;
|
||||
}
|
||||
@keyframes rot { to { transform: rotate(360deg); } }
|
||||
|
||||
.log {
|
||||
margin-top: 14px;
|
||||
background: #fff;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 10px 12px;
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
max-height: 120px;
|
||||
overflow: auto;
|
||||
}
|
||||
.log b { color: var(--text); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page">
|
||||
<div class="intro">
|
||||
<h1>侧栏非叶子目录 + 右侧叶子 Tab</h1>
|
||||
<p>
|
||||
交互演示(非真实业务页):左侧只展示目录(非叶子)。点击<strong>最后一层非叶子</strong>后,右侧用 Tab 打开其全部叶子菜单。
|
||||
切换目录会清空上一组 Tab。默认加载第一个 Tab;再点哪个 Tab 才加载哪个界面。
|
||||
</p>
|
||||
<ul>
|
||||
<li>试一下:点 <b>报销管理 → 基础配置</b>,再点 <b>备用金</b>,观察右侧 Tab 整组替换。</li>
|
||||
<li>Tab 上的灰点表示尚未加载;点过一次后视为已加载(本 Demo 做缓存,切回不再重复请求)。</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="shell">
|
||||
<header class="header">
|
||||
<div class="brand">山峡化工</div>
|
||||
<div class="crumb" id="crumb">请选择左侧最后一层目录</div>
|
||||
</header>
|
||||
<aside class="sidebar" id="sidebar"></aside>
|
||||
<section class="main">
|
||||
<div class="tabs" id="tabs"></div>
|
||||
<div class="panel-wrap">
|
||||
<div class="empty" id="empty">点击左侧「基础配置 / 备用金 / 报销 / 视图中心」打开叶子菜单 Tab</div>
|
||||
<div id="views"></div>
|
||||
<div class="mask" id="mask"><span class="spin"></span><span id="maskText">正在加载界面…</span></div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="log" id="log"><b>加载日志</b>:尚未操作</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const MENU = [
|
||||
{
|
||||
id: "bx",
|
||||
title: "报销管理",
|
||||
children: [
|
||||
{
|
||||
id: "bx-config",
|
||||
title: "基础配置",
|
||||
leaves: [
|
||||
{ id: "expense-item", title: "费用项目管理", kind: "table",
|
||||
rows: [["差旅费", "费用", "启用"], ["招待费", "费用", "启用"], ["运费", "费用", "停用"]] },
|
||||
{ id: "wf-advance", title: "工作流配置(备用金)", kind: "kv",
|
||||
fields: [["流程名称", "备用金审批流程"], ["状态", "启用"], ["节点", "部门负责人 → 财务"]] },
|
||||
{ id: "wf-reimburse", title: "工作流配置(报销单)", kind: "kv",
|
||||
fields: [["流程名称", "报销单审批流程"], ["状态", "启用"], ["节点", "直属上级 → 财务 → 出纳"]] }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: "bx-advance",
|
||||
title: "备用金",
|
||||
leaves: [
|
||||
{ id: "adv-apply", title: "备用金申请", kind: "table",
|
||||
rows: [["BYJ20260819002", "汪璇", "50000.00", "已通过"], ["BYJ20260819001", "汪璇", "50768.30", "已驳回"]] },
|
||||
{ id: "adv-approve", title: "备用金审批", kind: "table",
|
||||
rows: [["BYJ20260722001", "汪璇", "待审批", "部门负责人"], ["BYJ20260806001", "汪璇", "待审批", "财务"]] },
|
||||
{ id: "adv-issue", title: "备用金发放", kind: "table",
|
||||
rows: [["BYJ20260522002", "汪璇", "50000.00", "已发放"], ["BYJ20260703001", "汪璇", "20000.00", "已发放"]] }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: "bx-reimburse",
|
||||
title: "报销",
|
||||
leaves: [
|
||||
{ id: "rb-apply", title: "报销申请", kind: "table",
|
||||
rows: [["BX20260901001", "张三", "1280.00", "待提交"], ["BX20260902002", "李四", "3560.50", "审批中"]] },
|
||||
{ id: "rb-approve", title: "报销审批", kind: "table",
|
||||
rows: [["BX20260902002", "李四", "3560.50", "待审批"]] },
|
||||
{ id: "rb-pay", title: "支付发放冲抵", kind: "table",
|
||||
rows: [["BX20260815001", "王五", "890.00", "待发放"]] },
|
||||
{ id: "inv-admin", title: "发票夹管理", kind: "kv",
|
||||
fields: [["待核验", "12 张"], ["已入账", "86 张"], ["异常", "2 张"]] },
|
||||
{ id: "inv-mine", title: "我的发票夹", kind: "kv",
|
||||
fields: [["本月上传", "4 张"], ["可报销", "3 张"], ["已占用", "1 张"]] }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: "bx-view",
|
||||
title: "视图中心",
|
||||
leaves: [
|
||||
{ id: "view-mine", title: "我的视图", kind: "kv",
|
||||
fields: [["默认视图", "本月报销汇总"], ["自定义", "2 个"]] },
|
||||
{ id: "view-team", title: "部门视图", kind: "kv",
|
||||
fields: [["可见范围", "本部门及下级"], ["刷新", "每日 08:00"]] }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
const sidebar = document.getElementById("sidebar")
|
||||
const tabsEl = document.getElementById("tabs")
|
||||
const viewsEl = document.getElementById("views")
|
||||
const emptyEl = document.getElementById("empty")
|
||||
const crumbEl = document.getElementById("crumb")
|
||||
const maskEl = document.getElementById("mask")
|
||||
const maskText = document.getElementById("maskText")
|
||||
const logEl = document.getElementById("log")
|
||||
|
||||
let openL1 = "bx"
|
||||
let activeGroupId = null
|
||||
let activeLeafId = null
|
||||
let loaded = new Set()
|
||||
let loadTimer = null
|
||||
const logs = []
|
||||
|
||||
function log(msg) {
|
||||
const t = new Date().toLocaleTimeString("zh-CN", { hour12: false })
|
||||
logs.unshift(t + " " + msg)
|
||||
logEl.innerHTML = "<b>加载日志</b><br>" + logs.slice(0, 8).join("<br>")
|
||||
}
|
||||
|
||||
function findGroup(id) {
|
||||
for (const l1 of MENU) {
|
||||
const g = l1.children.find((c) => c.id === id)
|
||||
if (g) return { l1, g }
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
function renderSidebar() {
|
||||
sidebar.innerHTML = '<div class="side-label">业务目录</div>'
|
||||
MENU.forEach((l1) => {
|
||||
const wrap = document.createElement("div")
|
||||
wrap.className = "tree-item"
|
||||
wrap.innerHTML =
|
||||
'<button class="tree-btn l1" data-l1="' + l1.id + '">' +
|
||||
'<span class="chev">' + (openL1 === l1.id ? "▼" : "▶") + "</span>" +
|
||||
l1.title + "</button>"
|
||||
const kids = document.createElement("div")
|
||||
kids.className = "tree-children" + (openL1 === l1.id ? " open" : "")
|
||||
l1.children.forEach((g) => {
|
||||
const b = document.createElement("button")
|
||||
b.className = "tree-btn" + (g.id === activeGroupId ? " is-active" : "")
|
||||
b.innerHTML = '<span class="chev"></span>' + g.title
|
||||
b.addEventListener("click", () => openGroup(g.id))
|
||||
kids.appendChild(b)
|
||||
})
|
||||
wrap.querySelector("[data-l1]").addEventListener("click", () => {
|
||||
openL1 = openL1 === l1.id ? "" : l1.id
|
||||
renderSidebar()
|
||||
})
|
||||
wrap.appendChild(kids)
|
||||
sidebar.appendChild(wrap)
|
||||
})
|
||||
}
|
||||
|
||||
function openGroup(groupId) {
|
||||
if (activeGroupId === groupId) return
|
||||
const found = findGroup(groupId)
|
||||
if (!found) return
|
||||
loaded = new Set()
|
||||
activeGroupId = groupId
|
||||
activeLeafId = found.g.leaves[0].id
|
||||
crumbEl.innerHTML =
|
||||
"<strong>" + found.l1.title + "</strong> / " + found.g.title +
|
||||
" · 叶子 " + found.g.leaves.length + " 个"
|
||||
emptyEl.style.display = "none"
|
||||
renderSidebar()
|
||||
renderTabs(found.g)
|
||||
renderViews(found.g)
|
||||
log("切换目录「" + found.g.title + "」,清空上一组 Tab,准备打开 " +
|
||||
found.g.leaves.map((x) => x.title).join(" / "))
|
||||
loadLeaf(found.g.leaves[0], true)
|
||||
}
|
||||
|
||||
function renderTabs(group) {
|
||||
tabsEl.innerHTML = ""
|
||||
if (!group || group.leaves.length <= 1) return
|
||||
const track = document.createElement("div")
|
||||
track.className = "tabs-track"
|
||||
group.leaves.forEach((leaf) => {
|
||||
const b = document.createElement("button")
|
||||
b.className = "tab" +
|
||||
(leaf.id === activeLeafId ? " is-on" : "") +
|
||||
(loaded.has(leaf.id) ? " is-loaded" : "")
|
||||
b.innerHTML = '<span class="dot"></span>' + leaf.title
|
||||
b.addEventListener("click", () => selectLeaf(leaf.id))
|
||||
track.appendChild(b)
|
||||
})
|
||||
tabsEl.appendChild(track)
|
||||
}
|
||||
|
||||
function tableHtml(leaf) {
|
||||
const isStatus = leaf.rows[0] && leaf.rows[0].length === 4
|
||||
const heads = isStatus
|
||||
? (leaf.id.indexOf("adv") === 0 || leaf.id.indexOf("rb") === 0
|
||||
? ["单号", "申请人", leaf.rows[0][2].indexOf(".") >= 0 ? "金额" : "状态", "状态/节点"]
|
||||
: ["名称", "类型", "状态"])
|
||||
: ["列1", "列2", "列3"]
|
||||
if (leaf.id === "expense-item") {
|
||||
return headTable(["项目名称", "类型", "状态"], leaf.rows, (c, i) =>
|
||||
i === 2 ? tagHtml(c) : escapeHtml(c))
|
||||
}
|
||||
if (leaf.rows[0].length === 4) {
|
||||
return headTable(
|
||||
leaf.id === "adv-approve"
|
||||
? ["单号", "申请人", "状态", "当前节点"]
|
||||
: ["单号", "申请人", "金额", "状态"],
|
||||
leaf.rows,
|
||||
(c, i) => i === 3 || (leaf.id === "adv-approve" && i === 2) ? tagHtml(c) : escapeHtml(c)
|
||||
)
|
||||
}
|
||||
return headTable(heads, leaf.rows, (c) => escapeHtml(c))
|
||||
}
|
||||
|
||||
function headTable(heads, rows, cellFn) {
|
||||
let h = "<table><thead><tr>" + heads.map((x) => "<th>" + x + "</th>").join("") + "</tr></thead><tbody>"
|
||||
rows.forEach((r) => {
|
||||
h += "<tr>" + r.map((c, i) => "<td>" + cellFn(c, i) + "</td>").join("") + "</tr>"
|
||||
})
|
||||
return h + "</tbody></table>"
|
||||
}
|
||||
|
||||
function tagHtml(text) {
|
||||
const t = String(text)
|
||||
let cls = "tag"
|
||||
if (t.indexOf("驳回") >= 0 || t.indexOf("停用") >= 0) cls += " warn"
|
||||
if (t.indexOf("待") >= 0) cls += " info"
|
||||
return '<span class="' + cls + '">' + escapeHtml(t) + "</span>"
|
||||
}
|
||||
|
||||
function kvHtml(leaf) {
|
||||
return '<dl class="kv">' + leaf.fields.map(function (f) {
|
||||
return "<dt>" + escapeHtml(f[0]) + "</dt><dd>" + escapeHtml(f[1]) + "</dd>"
|
||||
}).join("") + "</dl>"
|
||||
}
|
||||
|
||||
function escapeHtml(s) {
|
||||
return String(s).replace(/[&<>]/g, function (ch) {
|
||||
return ({ "&": "&", "<": "<", ">": ">" })[ch]
|
||||
})
|
||||
}
|
||||
|
||||
function renderViews(group) {
|
||||
viewsEl.innerHTML = ""
|
||||
group.leaves.forEach((leaf) => {
|
||||
const el = document.createElement("div")
|
||||
el.className = "view" + (leaf.id === activeLeafId ? " is-show" : "")
|
||||
el.id = "view-" + leaf.id
|
||||
const body = loaded.has(leaf.id)
|
||||
? (leaf.kind === "kv" ? kvHtml(leaf) : tableHtml(leaf))
|
||||
: '<p style="color:#64748b;margin:0">尚未加载。切换到该 Tab 后才会请求并渲染本界面。</p>'
|
||||
el.innerHTML =
|
||||
'<div class="view-head"><h2>' + escapeHtml(leaf.title) +
|
||||
'</h2><span class="badge">' + (loaded.has(leaf.id) ? "已加载" : "未加载") +
|
||||
"</span></div><div class=\"view-body\">" + body + "</div>"
|
||||
viewsEl.appendChild(el)
|
||||
})
|
||||
}
|
||||
|
||||
function selectLeaf(leafId) {
|
||||
const found = findGroup(activeGroupId)
|
||||
if (!found) return
|
||||
const leaf = found.g.leaves.find((x) => x.id === leafId)
|
||||
if (!leaf) return
|
||||
activeLeafId = leafId
|
||||
renderTabs(found.g)
|
||||
Array.from(viewsEl.children).forEach((el) => {
|
||||
el.classList.toggle("is-show", el.id === "view-" + leafId)
|
||||
})
|
||||
if (loaded.has(leafId)) {
|
||||
log("切换到「" + leaf.title + "」(已缓存,不再请求)")
|
||||
return
|
||||
}
|
||||
loadLeaf(leaf, false)
|
||||
}
|
||||
|
||||
function loadLeaf(leaf, isDefault) {
|
||||
if (loadTimer) clearTimeout(loadTimer)
|
||||
maskText.textContent = "正在加载「" + leaf.title + "」…"
|
||||
maskEl.classList.add("show")
|
||||
log((isDefault ? "默认打开第一个 Tab:" : "切换 Tab,按需加载:") + "「" + leaf.title + "」")
|
||||
loadTimer = setTimeout(function () {
|
||||
loaded.add(leaf.id)
|
||||
maskEl.classList.remove("show")
|
||||
const found = findGroup(activeGroupId)
|
||||
renderTabs(found.g)
|
||||
renderViews(found.g)
|
||||
log("「" + leaf.title + "」加载完成")
|
||||
}, 420)
|
||||
}
|
||||
|
||||
renderSidebar()
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,242 @@
|
||||
-- CRM 管理下增加四级分组目录,叶子菜单改挂到对应分组
|
||||
-- 产品管理 / 报价单管理 / 合同管理 / 客户管理
|
||||
-- 2026-10-04
|
||||
|
||||
INSERT INTO `sys_menu` (
|
||||
`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`,
|
||||
`visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`,
|
||||
`create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
'CRM00000000000000000000000000010' AS `id`,
|
||||
'产品管理' AS `menu_name`,
|
||||
'CRM00000000000000000000000000001' AS `parent_id`,
|
||||
'M' AS `menu_type`,
|
||||
'product-group' AS `path`,
|
||||
NULL AS `component`,
|
||||
NULL AS `perms`,
|
||||
1 AS `is_frame`,
|
||||
'1' AS `visible`,
|
||||
'1' AS `status`,
|
||||
'shanxia2.0' AS `tenant_no`,
|
||||
1 AS `order_num`,
|
||||
'CRM 产品管理分组' AS `remark`,
|
||||
'system' AS `create_by`,
|
||||
'' AS `create_dept_id`,
|
||||
NOW() AS `create_time`,
|
||||
NULL AS `update_by`,
|
||||
NOW() AS `update_time`,
|
||||
0 AS `del_flag`
|
||||
) AS tmp
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `sys_menu` WHERE `id` = 'CRM00000000000000000000000000010'
|
||||
);
|
||||
|
||||
INSERT INTO `sys_menu` (
|
||||
`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`,
|
||||
`visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`,
|
||||
`create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
'CRM00000000000000000000000000020' AS `id`,
|
||||
'报价单管理' AS `menu_name`,
|
||||
'CRM00000000000000000000000000001' AS `parent_id`,
|
||||
'M' AS `menu_type`,
|
||||
'quote-group' AS `path`,
|
||||
NULL AS `component`,
|
||||
NULL AS `perms`,
|
||||
1 AS `is_frame`,
|
||||
'1' AS `visible`,
|
||||
'1' AS `status`,
|
||||
'shanxia2.0' AS `tenant_no`,
|
||||
2 AS `order_num`,
|
||||
'CRM 报价单管理分组' AS `remark`,
|
||||
'system' AS `create_by`,
|
||||
'' AS `create_dept_id`,
|
||||
NOW() AS `create_time`,
|
||||
NULL AS `update_by`,
|
||||
NOW() AS `update_time`,
|
||||
0 AS `del_flag`
|
||||
) AS tmp
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `sys_menu` WHERE `id` = 'CRM00000000000000000000000000020'
|
||||
);
|
||||
|
||||
INSERT INTO `sys_menu` (
|
||||
`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`,
|
||||
`visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`,
|
||||
`create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
'CRM00000000000000000000000000030' AS `id`,
|
||||
'合同管理' AS `menu_name`,
|
||||
'CRM00000000000000000000000000001' AS `parent_id`,
|
||||
'M' AS `menu_type`,
|
||||
'contract-group' AS `path`,
|
||||
NULL AS `component`,
|
||||
NULL AS `perms`,
|
||||
1 AS `is_frame`,
|
||||
'1' AS `visible`,
|
||||
'1' AS `status`,
|
||||
'shanxia2.0' AS `tenant_no`,
|
||||
3 AS `order_num`,
|
||||
'CRM 合同管理分组' AS `remark`,
|
||||
'system' AS `create_by`,
|
||||
'' AS `create_dept_id`,
|
||||
NOW() AS `create_time`,
|
||||
NULL AS `update_by`,
|
||||
NOW() AS `update_time`,
|
||||
0 AS `del_flag`
|
||||
) AS tmp
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `sys_menu` WHERE `id` = 'CRM00000000000000000000000000030'
|
||||
);
|
||||
|
||||
INSERT INTO `sys_menu` (
|
||||
`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`,
|
||||
`visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`,
|
||||
`create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
'CRM00000000000000000000000000040' AS `id`,
|
||||
'客户管理' AS `menu_name`,
|
||||
'CRM00000000000000000000000000001' AS `parent_id`,
|
||||
'M' AS `menu_type`,
|
||||
'customer-group' AS `path`,
|
||||
NULL AS `component`,
|
||||
NULL AS `perms`,
|
||||
1 AS `is_frame`,
|
||||
'1' AS `visible`,
|
||||
'1' AS `status`,
|
||||
'shanxia2.0' AS `tenant_no`,
|
||||
4 AS `order_num`,
|
||||
'CRM 客户管理分组' AS `remark`,
|
||||
'system' AS `create_by`,
|
||||
'' AS `create_dept_id`,
|
||||
NOW() AS `create_time`,
|
||||
NULL AS `update_by`,
|
||||
NOW() AS `update_time`,
|
||||
0 AS `del_flag`
|
||||
) AS tmp
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `sys_menu` WHERE `id` = 'CRM00000000000000000000000000040'
|
||||
);
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'CRM00000000000000000000000000010', `order_num` = 1, `update_time` = NOW()
|
||||
WHERE `id` = 'CRM00000000000000000000000000003' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'CRM00000000000000000000000000010', `order_num` = 2, `update_time` = NOW()
|
||||
WHERE `id` = 'CRM00000000000000000000000000002' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'CRM00000000000000000000000000020', `order_num` = 1, `update_time` = NOW()
|
||||
WHERE `id` = 'CRM3000000000000000000000000010' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'CRM00000000000000000000000000020', `order_num` = 2, `update_time` = NOW()
|
||||
WHERE `id` = 'CRM3000000000000000000000000016' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'CRM00000000000000000000000000020', `update_time` = NOW()
|
||||
WHERE `id` = 'CRM3000000000000000000000000015' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'CRM00000000000000000000000000030', `order_num` = 1, `update_time` = NOW()
|
||||
WHERE `id` = 'CRM3000000000000000000000000020' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'CRM00000000000000000000000000030', `order_num` = 2, `update_time` = NOW()
|
||||
WHERE `id` = 'CRM3000000000000000000000000021' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'CRM00000000000000000000000000030', `order_num` = 3, `update_time` = NOW()
|
||||
WHERE `id` = 'CRM3000000000000000000000000030' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'CRM00000000000000000000000000030', `update_time` = NOW()
|
||||
WHERE `id` = 'CRM3000000000000000000000000026' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'CRM00000000000000000000000000040', `order_num` = 1, `update_time` = NOW()
|
||||
WHERE `id` = 'CRM1000000000000000000000000002' AND `del_flag` = 0;
|
||||
|
||||
-- 已授权叶子的角色补上新分组目录,避免有子无父
|
||||
INSERT INTO `sys_role_menu` (
|
||||
`id`, `role_id`, `menu_id`, `tenant_no`, `order_num`, `remark`,
|
||||
`create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT
|
||||
MD5(CONCAT(src.`role_id`, '-', src.`group_menu_id`)),
|
||||
src.`role_id`,
|
||||
src.`group_menu_id`,
|
||||
src.`tenant_no`,
|
||||
0,
|
||||
NULL,
|
||||
src.`create_by`,
|
||||
'',
|
||||
NOW(),
|
||||
src.`create_by`,
|
||||
NOW(),
|
||||
0
|
||||
FROM (
|
||||
SELECT DISTINCT
|
||||
rm.`role_id`,
|
||||
rm.`tenant_no`,
|
||||
rm.`create_by`,
|
||||
'CRM00000000000000000000000000010' AS `group_menu_id`
|
||||
FROM `sys_role_menu` rm
|
||||
WHERE rm.`del_flag` = 0
|
||||
AND rm.`menu_id` IN (
|
||||
'CRM00000000000000000000000000002',
|
||||
'CRM00000000000000000000000000003'
|
||||
)
|
||||
UNION
|
||||
SELECT DISTINCT
|
||||
rm.`role_id`,
|
||||
rm.`tenant_no`,
|
||||
rm.`create_by`,
|
||||
'CRM00000000000000000000000000020'
|
||||
FROM `sys_role_menu` rm
|
||||
WHERE rm.`del_flag` = 0
|
||||
AND rm.`menu_id` IN (
|
||||
'CRM3000000000000000000000000010',
|
||||
'CRM3000000000000000000000000015',
|
||||
'CRM3000000000000000000000000016'
|
||||
)
|
||||
UNION
|
||||
SELECT DISTINCT
|
||||
rm.`role_id`,
|
||||
rm.`tenant_no`,
|
||||
rm.`create_by`,
|
||||
'CRM00000000000000000000000000030'
|
||||
FROM `sys_role_menu` rm
|
||||
WHERE rm.`del_flag` = 0
|
||||
AND rm.`menu_id` IN (
|
||||
'CRM3000000000000000000000000020',
|
||||
'CRM3000000000000000000000000021',
|
||||
'CRM3000000000000000000000000026',
|
||||
'CRM3000000000000000000000000030'
|
||||
)
|
||||
UNION
|
||||
SELECT DISTINCT
|
||||
rm.`role_id`,
|
||||
rm.`tenant_no`,
|
||||
rm.`create_by`,
|
||||
'CRM00000000000000000000000000040'
|
||||
FROM `sys_role_menu` rm
|
||||
WHERE rm.`del_flag` = 0
|
||||
AND rm.`menu_id` = 'CRM1000000000000000000000000002'
|
||||
) src
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM `sys_role_menu` exist
|
||||
WHERE exist.`role_id` = src.`role_id`
|
||||
AND exist.`menu_id` = src.`group_menu_id`
|
||||
AND exist.`del_flag` = 0
|
||||
);
|
||||
@@ -0,0 +1,87 @@
|
||||
-- 运输管理:在「运输计划」与「库存管理」之间新增「运输归档」分组,
|
||||
-- 并将「运输计划归档」从运输计划下改挂到运输归档下。
|
||||
-- 2026-10-04
|
||||
|
||||
INSERT INTO `sys_menu` (
|
||||
`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`,
|
||||
`visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`,
|
||||
`create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
'PL_GROUP_ARCHIVE' AS `id`,
|
||||
'运输归档' AS `menu_name`,
|
||||
'PL_MENU_ROOT' AS `parent_id`,
|
||||
'M' AS `menu_type`,
|
||||
'archive-module' AS `path`,
|
||||
NULL AS `component`,
|
||||
NULL AS `perms`,
|
||||
1 AS `is_frame`,
|
||||
'1' AS `visible`,
|
||||
'1' AS `status`,
|
||||
'shanxia2.0' AS `tenant_no`,
|
||||
2 AS `order_num`,
|
||||
'运输归档分组' AS `remark`,
|
||||
'system' AS `create_by`,
|
||||
'' AS `create_dept_id`,
|
||||
NOW() AS `create_time`,
|
||||
NULL AS `update_by`,
|
||||
NOW() AS `update_time`,
|
||||
0 AS `del_flag`
|
||||
) AS tmp
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `sys_menu` WHERE `id` = 'PL_GROUP_ARCHIVE'
|
||||
);
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `order_num` = 3, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_GROUP_STOCK' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'PL_GROUP_ARCHIVE', `order_num` = 1, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_PLAN_ARCHIVE' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `order_num` = 2, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_PLAN_CONTRACT' AND `del_flag` = 0;
|
||||
|
||||
INSERT INTO `sys_role_menu` (
|
||||
`id`, `role_id`, `menu_id`, `tenant_no`, `order_num`, `remark`,
|
||||
`create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT
|
||||
MD5(CONCAT(src.`role_id`, '-', src.`group_menu_id`)),
|
||||
src.`role_id`,
|
||||
src.`group_menu_id`,
|
||||
src.`tenant_no`,
|
||||
0,
|
||||
NULL,
|
||||
src.`create_by`,
|
||||
'',
|
||||
NOW(),
|
||||
src.`create_by`,
|
||||
NOW(),
|
||||
0
|
||||
FROM (
|
||||
SELECT DISTINCT
|
||||
rm.`role_id`,
|
||||
rm.`tenant_no`,
|
||||
rm.`create_by`,
|
||||
'PL_GROUP_ARCHIVE' AS `group_menu_id`
|
||||
FROM `sys_role_menu` rm
|
||||
WHERE rm.`del_flag` = 0
|
||||
AND rm.`menu_id` IN (
|
||||
'PL_PLAN_ARCHIVE',
|
||||
'PL_PLAN_ARCHIVE_Q',
|
||||
'PL_PLAN_ARCHIVE_E',
|
||||
'PL_PLAN_ARCHIVE_A',
|
||||
'PL_PLAN_ARCHIVE_PRICE'
|
||||
)
|
||||
) src
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM `sys_role_menu` exist
|
||||
WHERE exist.`role_id` = src.`role_id`
|
||||
AND exist.`menu_id` = src.`group_menu_id`
|
||||
AND exist.`del_flag` = 0
|
||||
);
|
||||
@@ -0,0 +1,49 @@
|
||||
-- 基础信息库:从运输管理改挂到车辆管理(车辆维保管理之后)
|
||||
-- 2026-10-04
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'PL_GROUP_VEHICLE', `order_num` = 4, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_GROUP_BASE' AND `del_flag` = 0;
|
||||
|
||||
INSERT INTO `sys_role_menu` (
|
||||
`id`, `role_id`, `menu_id`, `tenant_no`, `order_num`, `remark`,
|
||||
`create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT
|
||||
MD5(CONCAT(src.`role_id`, '-', src.`group_menu_id`)),
|
||||
src.`role_id`,
|
||||
src.`group_menu_id`,
|
||||
src.`tenant_no`,
|
||||
0,
|
||||
NULL,
|
||||
src.`create_by`,
|
||||
'',
|
||||
NOW(),
|
||||
src.`create_by`,
|
||||
NOW(),
|
||||
0
|
||||
FROM (
|
||||
SELECT DISTINCT
|
||||
rm.`role_id`,
|
||||
rm.`tenant_no`,
|
||||
rm.`create_by`,
|
||||
'PL_GROUP_VEHICLE' AS `group_menu_id`
|
||||
FROM `sys_role_menu` rm
|
||||
WHERE rm.`del_flag` = 0
|
||||
AND rm.`menu_id` IN (
|
||||
'PL_GROUP_BASE',
|
||||
'PL_CARRIER',
|
||||
'PL_VEHICLE',
|
||||
'PL_PERSONNEL_CARRIER',
|
||||
'PL_SELF_VEHICLE',
|
||||
'PL_DRIVER',
|
||||
'PL_TRANSPORT_ADDRESS'
|
||||
)
|
||||
) src
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM `sys_role_menu` exist
|
||||
WHERE exist.`role_id` = src.`role_id`
|
||||
AND exist.`menu_id` = src.`group_menu_id`
|
||||
AND exist.`del_flag` = 0
|
||||
);
|
||||
@@ -0,0 +1,24 @@
|
||||
-- 运输管理二级菜单顺序:
|
||||
-- 运输计划 → 运输归档 → 危化品证上传 → 运费管理 → 证件提醒 → 库存管理
|
||||
-- 2026-10-04
|
||||
|
||||
UPDATE `sys_menu` SET `order_num` = 1, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_GROUP_PLAN' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu` SET `order_num` = 2, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_GROUP_ARCHIVE' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu` SET `order_num` = 3, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_GROUP_CERT' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu` SET `order_num` = 3, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_PLAN_CERT' AND `parent_id` = 'PL_MENU_ROOT' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu` SET `order_num` = 4, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_GROUP_FREIGHT' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu` SET `order_num` = 5, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_GROUP_DOC' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu` SET `order_num` = 6, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_GROUP_STOCK' AND `del_flag` = 0;
|
||||
@@ -0,0 +1,365 @@
|
||||
-- 运费管理改名;车辆管理提升为 Web 一级模块;车辆下拆三个二级分组
|
||||
-- 2026-10-04
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `menu_name` = '运费管理', `update_time` = NOW()
|
||||
WHERE `id` = 'PL_GROUP_FREIGHT' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET
|
||||
`parent_id` = '2',
|
||||
`path` = '/vehicle-mgmt',
|
||||
`order_num` = 3,
|
||||
`update_time` = NOW()
|
||||
WHERE `id` = 'PL_GROUP_VEHICLE' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu` SET `order_num` = 4, `update_time` = NOW()
|
||||
WHERE `id` = 'DB00000000000000000000000000001' AND `del_flag` = 0;
|
||||
UPDATE `sys_menu` SET `order_num` = 5, `update_time` = NOW()
|
||||
WHERE `id` = 'BX00000000000000000000000000001' AND `del_flag` = 0;
|
||||
UPDATE `sys_menu` SET `order_num` = 6, `update_time` = NOW()
|
||||
WHERE `id` = 'DUTY000000000000000000000000000' AND `del_flag` = 0;
|
||||
UPDATE `sys_menu` SET `order_num` = 7, `update_time` = NOW()
|
||||
WHERE `id` = 'SYSM000000000000000000000000000001' AND `del_flag` = 0;
|
||||
UPDATE `sys_menu` SET `order_num` = 8, `update_time` = NOW()
|
||||
WHERE `id` = 'WKF00000000000000000000000000001' AND `del_flag` = 0;
|
||||
|
||||
INSERT INTO `sys_menu` (
|
||||
`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`,
|
||||
`visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`,
|
||||
`create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
'PL_GROUP_VEH_RECHARGE' AS `id`,
|
||||
'ETC/加油充值管理' AS `menu_name`,
|
||||
'PL_GROUP_VEHICLE' AS `parent_id`,
|
||||
'M' AS `menu_type`,
|
||||
'etc-recharge' AS `path`,
|
||||
NULL AS `component`,
|
||||
NULL AS `perms`,
|
||||
1 AS `is_frame`,
|
||||
'1' AS `visible`,
|
||||
'1' AS `status`,
|
||||
'shanxia2.0' AS `tenant_no`,
|
||||
1 AS `order_num`,
|
||||
'ETC/加油充值分组' AS `remark`,
|
||||
'system' AS `create_by`,
|
||||
'' AS `create_dept_id`,
|
||||
NOW() AS `create_time`,
|
||||
NULL AS `update_by`,
|
||||
NOW() AS `update_time`,
|
||||
0 AS `del_flag`
|
||||
) AS tmp
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `sys_menu` WHERE `id` = 'PL_GROUP_VEH_RECHARGE'
|
||||
);
|
||||
|
||||
INSERT INTO `sys_menu` (
|
||||
`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`,
|
||||
`visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`,
|
||||
`create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
'PL_GROUP_VEH_FUEL' AS `id`,
|
||||
'加油登记管理' AS `menu_name`,
|
||||
'PL_GROUP_VEHICLE' AS `parent_id`,
|
||||
'M' AS `menu_type`,
|
||||
'fuel-register' AS `path`,
|
||||
NULL AS `component`,
|
||||
NULL AS `perms`,
|
||||
1 AS `is_frame`,
|
||||
'1' AS `visible`,
|
||||
'1' AS `status`,
|
||||
'shanxia2.0' AS `tenant_no`,
|
||||
2 AS `order_num`,
|
||||
'加油登记分组' AS `remark`,
|
||||
'system' AS `create_by`,
|
||||
'' AS `create_dept_id`,
|
||||
NOW() AS `create_time`,
|
||||
NULL AS `update_by`,
|
||||
NOW() AS `update_time`,
|
||||
0 AS `del_flag`
|
||||
) AS tmp
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `sys_menu` WHERE `id` = 'PL_GROUP_VEH_FUEL'
|
||||
);
|
||||
|
||||
INSERT INTO `sys_menu` (
|
||||
`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`,
|
||||
`visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`,
|
||||
`create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
'PL_GROUP_VEH_MAINT' AS `id`,
|
||||
'车辆维保管理' AS `menu_name`,
|
||||
'PL_GROUP_VEHICLE' AS `parent_id`,
|
||||
'M' AS `menu_type`,
|
||||
'maintenance' AS `path`,
|
||||
NULL AS `component`,
|
||||
NULL AS `perms`,
|
||||
1 AS `is_frame`,
|
||||
'1' AS `visible`,
|
||||
'1' AS `status`,
|
||||
'shanxia2.0' AS `tenant_no`,
|
||||
3 AS `order_num`,
|
||||
'车辆维保分组' AS `remark`,
|
||||
'system' AS `create_by`,
|
||||
'' AS `create_dept_id`,
|
||||
NOW() AS `create_time`,
|
||||
NULL AS `update_by`,
|
||||
NOW() AS `update_time`,
|
||||
0 AS `del_flag`
|
||||
) AS tmp
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `sys_menu` WHERE `id` = 'PL_GROUP_VEH_MAINT'
|
||||
);
|
||||
|
||||
INSERT INTO `sys_menu` (
|
||||
`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`,
|
||||
`visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`,
|
||||
`create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
'PL_VEH_RECHARGE_APPROVAL' AS `id`,
|
||||
'ETC/加油充值审批' AS `menu_name`,
|
||||
'PL_GROUP_VEH_RECHARGE' AS `parent_id`,
|
||||
'C' AS `menu_type`,
|
||||
'vehicle-recharge-approval' AS `path`,
|
||||
'pl/vehicle-recharge-approval/index' AS `component`,
|
||||
'pl:vehicle-recharge-approval:list' AS `perms`,
|
||||
1 AS `is_frame`,
|
||||
'1' AS `visible`,
|
||||
'1' AS `status`,
|
||||
'shanxia2.0' AS `tenant_no`,
|
||||
2 AS `order_num`,
|
||||
NULL AS `remark`,
|
||||
'system' AS `create_by`,
|
||||
'' AS `create_dept_id`,
|
||||
NOW() AS `create_time`,
|
||||
NULL AS `update_by`,
|
||||
NOW() AS `update_time`,
|
||||
0 AS `del_flag`
|
||||
) AS tmp
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `sys_menu` WHERE `id` = 'PL_VEH_RECHARGE_APPROVAL'
|
||||
);
|
||||
|
||||
INSERT INTO `sys_menu` (
|
||||
`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`,
|
||||
`visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`,
|
||||
`create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
'PL_VEH_RECHARGE_WF' AS `id`,
|
||||
'ETC/加油充值审批人设置' AS `menu_name`,
|
||||
'PL_GROUP_VEH_RECHARGE' AS `parent_id`,
|
||||
'C' AS `menu_type`,
|
||||
'vehicle-recharge-workflow' AS `path`,
|
||||
'pl/vehicle-recharge-workflow/index' AS `component`,
|
||||
'pl:vehicle-recharge-workflow:list' AS `perms`,
|
||||
1 AS `is_frame`,
|
||||
'1' AS `visible`,
|
||||
'1' AS `status`,
|
||||
'shanxia2.0' AS `tenant_no`,
|
||||
4 AS `order_num`,
|
||||
NULL AS `remark`,
|
||||
'system' AS `create_by`,
|
||||
'' AS `create_dept_id`,
|
||||
NOW() AS `create_time`,
|
||||
NULL AS `update_by`,
|
||||
NOW() AS `update_time`,
|
||||
0 AS `del_flag`
|
||||
) AS tmp
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `sys_menu` WHERE `id` = 'PL_VEH_RECHARGE_WF'
|
||||
);
|
||||
|
||||
INSERT INTO `sys_menu` (
|
||||
`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`,
|
||||
`visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`,
|
||||
`create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
'PL_VEH_FUEL_REG' AS `id`,
|
||||
'加油登记' AS `menu_name`,
|
||||
'PL_GROUP_VEH_FUEL' AS `parent_id`,
|
||||
'C' AS `menu_type`,
|
||||
'vehicle-fuel-register' AS `path`,
|
||||
'pl/vehicle-fuel-register/index' AS `component`,
|
||||
'pl:vehicle-fuel-register:list' AS `perms`,
|
||||
1 AS `is_frame`,
|
||||
'1' AS `visible`,
|
||||
'1' AS `status`,
|
||||
'shanxia2.0' AS `tenant_no`,
|
||||
1 AS `order_num`,
|
||||
NULL AS `remark`,
|
||||
'system' AS `create_by`,
|
||||
'' AS `create_dept_id`,
|
||||
NOW() AS `create_time`,
|
||||
NULL AS `update_by`,
|
||||
NOW() AS `update_time`,
|
||||
0 AS `del_flag`
|
||||
) AS tmp
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `sys_menu` WHERE `id` = 'PL_VEH_FUEL_REG'
|
||||
);
|
||||
|
||||
INSERT INTO `sys_menu` (
|
||||
`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`,
|
||||
`visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`,
|
||||
`create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
'PL_VEH_FUEL_SUM' AS `id`,
|
||||
'加油信息汇总' AS `menu_name`,
|
||||
'PL_GROUP_VEH_FUEL' AS `parent_id`,
|
||||
'C' AS `menu_type`,
|
||||
'vehicle-fuel-summary' AS `path`,
|
||||
'pl/vehicle-fuel-summary/index' AS `component`,
|
||||
'pl:vehicle-fuel-summary:list' AS `perms`,
|
||||
1 AS `is_frame`,
|
||||
'1' AS `visible`,
|
||||
'1' AS `status`,
|
||||
'shanxia2.0' AS `tenant_no`,
|
||||
2 AS `order_num`,
|
||||
NULL AS `remark`,
|
||||
'system' AS `create_by`,
|
||||
'' AS `create_dept_id`,
|
||||
NOW() AS `create_time`,
|
||||
NULL AS `update_by`,
|
||||
NOW() AS `update_time`,
|
||||
0 AS `del_flag`
|
||||
) AS tmp
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `sys_menu` WHERE `id` = 'PL_VEH_FUEL_SUM'
|
||||
);
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'PL_GROUP_VEH_RECHARGE', `order_num` = 1, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_VEH_RECHARGE_APPLY' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'PL_GROUP_VEH_RECHARGE', `order_num` = 2, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_VEH_RECHARGE_APPROVAL' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'PL_GROUP_VEH_RECHARGE', `order_num` = 3, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_VEH_RECHARGE_RECORD' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET
|
||||
`parent_id` = 'PL_GROUP_VEH_RECHARGE',
|
||||
`menu_name` = 'ETC/加油充值审批人设置',
|
||||
`order_num` = 4,
|
||||
`update_time` = NOW()
|
||||
WHERE `id` = 'PL_VEH_RECHARGE_WF' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'PL_GROUP_VEH_FUEL', `order_num` = 1, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_VEH_FUEL_REG' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'PL_GROUP_VEH_FUEL', `order_num` = 2, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_VEH_FUEL_SUM' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'PL_GROUP_VEH_MAINT', `order_num` = 1, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_VEH_MAINT_APPLY' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `parent_id` = 'PL_GROUP_VEH_MAINT', `order_num` = 2, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_VEH_MAINT_PROCESS' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `order_num` = 4, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_VEH_UREA_APPLY' AND `del_flag` = 0;
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET `order_num` = 5, `update_time` = NOW()
|
||||
WHERE `id` = 'PL_VEH_UREA_DISBURSE' AND `del_flag` = 0;
|
||||
|
||||
INSERT INTO `sys_role_menu` (
|
||||
`id`, `role_id`, `menu_id`, `tenant_no`, `order_num`, `remark`,
|
||||
`create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT
|
||||
MD5(CONCAT(src.`role_id`, '-', src.`group_menu_id`)),
|
||||
src.`role_id`,
|
||||
src.`group_menu_id`,
|
||||
src.`tenant_no`,
|
||||
0,
|
||||
NULL,
|
||||
src.`create_by`,
|
||||
'',
|
||||
NOW(),
|
||||
src.`create_by`,
|
||||
NOW(),
|
||||
0
|
||||
FROM (
|
||||
SELECT DISTINCT
|
||||
rm.`role_id`,
|
||||
rm.`tenant_no`,
|
||||
rm.`create_by`,
|
||||
'PL_GROUP_VEHICLE' AS `group_menu_id`
|
||||
FROM `sys_role_menu` rm
|
||||
WHERE rm.`del_flag` = 0
|
||||
AND rm.`menu_id` IN (
|
||||
'PL_GROUP_VEHICLE',
|
||||
'PL_VEH_RECHARGE_APPLY',
|
||||
'PL_VEH_RECHARGE_RECORD',
|
||||
'PL_VEH_RECHARGE_APPROVAL',
|
||||
'PL_VEH_RECHARGE_WF',
|
||||
'PL_VEH_FUEL_REG',
|
||||
'PL_VEH_FUEL_SUM',
|
||||
'PL_VEH_MAINT_APPLY',
|
||||
'PL_VEH_MAINT_PROCESS',
|
||||
'PL_VEH_UREA_APPLY',
|
||||
'PL_VEH_UREA_DISBURSE'
|
||||
)
|
||||
UNION ALL
|
||||
SELECT DISTINCT
|
||||
rm.`role_id`,
|
||||
rm.`tenant_no`,
|
||||
rm.`create_by`,
|
||||
'PL_GROUP_VEH_RECHARGE' AS `group_menu_id`
|
||||
FROM `sys_role_menu` rm
|
||||
WHERE rm.`del_flag` = 0
|
||||
AND rm.`menu_id` IN (
|
||||
'PL_VEH_RECHARGE_APPLY',
|
||||
'PL_VEH_RECHARGE_RECORD',
|
||||
'PL_VEH_RECHARGE_APPROVAL',
|
||||
'PL_VEH_RECHARGE_WF'
|
||||
)
|
||||
UNION ALL
|
||||
SELECT DISTINCT
|
||||
rm.`role_id`,
|
||||
rm.`tenant_no`,
|
||||
rm.`create_by`,
|
||||
'PL_GROUP_VEH_FUEL' AS `group_menu_id`
|
||||
FROM `sys_role_menu` rm
|
||||
WHERE rm.`del_flag` = 0
|
||||
AND rm.`menu_id` IN ('PL_VEH_FUEL_REG', 'PL_VEH_FUEL_SUM')
|
||||
UNION ALL
|
||||
SELECT DISTINCT
|
||||
rm.`role_id`,
|
||||
rm.`tenant_no`,
|
||||
rm.`create_by`,
|
||||
'PL_GROUP_VEH_MAINT' AS `group_menu_id`
|
||||
FROM `sys_role_menu` rm
|
||||
WHERE rm.`del_flag` = 0
|
||||
AND rm.`menu_id` IN ('PL_VEH_MAINT_APPLY', 'PL_VEH_MAINT_PROCESS')
|
||||
) src
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM `sys_role_menu` exist
|
||||
WHERE exist.`role_id` = src.`role_id`
|
||||
AND exist.`menu_id` = src.`group_menu_id`
|
||||
AND exist.`del_flag` = 0
|
||||
);
|
||||
@@ -0,0 +1,47 @@
|
||||
-- Web 侧栏最顶部增加「首页」菜单(/#/home)
|
||||
-- 2026-10-04
|
||||
|
||||
INSERT INTO `sys_menu` (
|
||||
`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`,
|
||||
`visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`,
|
||||
`create_time`, `update_by`, `update_time`, `del_flag`
|
||||
)
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
'HOME00000000000000000000000000002' AS `id`,
|
||||
'首页' AS `menu_name`,
|
||||
'2' AS `parent_id`,
|
||||
'C' AS `menu_type`,
|
||||
'/home' AS `path`,
|
||||
'portal/home/index' AS `component`,
|
||||
NULL AS `perms`,
|
||||
1 AS `is_frame`,
|
||||
'1' AS `visible`,
|
||||
'1' AS `status`,
|
||||
'shanxia2.0' AS `tenant_no`,
|
||||
0 AS `order_num`,
|
||||
'门户启动器首页' AS `remark`,
|
||||
'system' AS `create_by`,
|
||||
'' AS `create_dept_id`,
|
||||
NOW() AS `create_time`,
|
||||
NULL AS `update_by`,
|
||||
NOW() AS `update_time`,
|
||||
0 AS `del_flag`
|
||||
) AS tmp
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `sys_menu` WHERE `id` = 'HOME00000000000000000000000000002'
|
||||
);
|
||||
|
||||
UPDATE `sys_menu`
|
||||
SET
|
||||
`menu_name` = '首页',
|
||||
`parent_id` = '2',
|
||||
`menu_type` = 'C',
|
||||
`path` = '/home',
|
||||
`component` = 'portal/home/index',
|
||||
`visible` = '1',
|
||||
`status` = '1',
|
||||
`order_num` = 0,
|
||||
`del_flag` = 0,
|
||||
`update_time` = NOW()
|
||||
WHERE `id` = 'HOME00000000000000000000000000002';
|
||||
@@ -0,0 +1,10 @@
|
||||
-- 左侧一级菜单顺序:CRM → 运输 → 地磅 → 报销 → 值班 → 系统 → 工作流
|
||||
-- 2026-10-04
|
||||
|
||||
UPDATE `sys_menu` SET `order_num` = 1 WHERE `id` = 'CRM00000000000000000000000000001' AND `del_flag` = 0;
|
||||
UPDATE `sys_menu` SET `order_num` = 2 WHERE `id` = 'PL_MENU_ROOT' AND `del_flag` = 0;
|
||||
UPDATE `sys_menu` SET `order_num` = 3 WHERE `id` = 'DB00000000000000000000000000001' AND `del_flag` = 0;
|
||||
UPDATE `sys_menu` SET `order_num` = 4 WHERE `id` = 'BX00000000000000000000000000001' AND `del_flag` = 0;
|
||||
UPDATE `sys_menu` SET `order_num` = 5 WHERE `id` = 'DUTY000000000000000000000000000' AND `del_flag` = 0;
|
||||
UPDATE `sys_menu` SET `order_num` = 6 WHERE `id` = 'SYSM000000000000000000000000000001' AND `del_flag` = 0;
|
||||
UPDATE `sys_menu` SET `order_num` = 7 WHERE `id` = 'WKF00000000000000000000000000001' AND `del_flag` = 0;
|
||||
+22
-12
@@ -33634,6 +33634,7 @@ INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `co
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('106', '菜单管理', 'SYSM000000000000000000000000000010', 'C', 'menu', '/system/menu/index', 'system:menu:list', 1, '1', '1', 'shanxia2.0', 3, NULL, NULL, '', '2026-05-27 16:26:30', NULL, '2026-08-09 21:01:51', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('108', '职位管理', 'SYSM000000000000000000000000000010', 'C', 'post', '/system/post/index', 'system:post:list', 1, '1', '1', 'shanxia2.0', 7, NULL, NULL, '', '2026-05-27 16:26:30', NULL, '2026-08-09 21:01:52', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('2', 'Web端', '0', 'M', '/web', NULL, NULL, 1, '1', '1', 'shanxia2.0', 1, NULL, NULL, '', '2026-05-27 16:26:29', NULL, '2026-05-30 17:06:32', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('HOME00000000000000000000000000002', '首页', '2', 'C', '/home', 'portal/home/index', NULL, 1, '1', '1', 'shanxia2.0', 0, '门户启动器首页', 'system', '', '2026-10-04 23:16:00', NULL, '2026-10-04 23:16:00', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('BX00000000000000000000000000001', '报销管理', '2', 'M', '/bx', NULL, NULL, 1, '1', '1', 'shanxia2.0', 2, 'bx 报销业务模块', NULL, '', '2026-06-06 21:22:32', NULL, '2026-06-06 21:22:32', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('BX00000000000000000000000000002', '基础配置', 'BX00000000000000000000000000001', 'M', 'config', NULL, NULL, 1, '1', '1', 'shanxia2.0', 1, NULL, NULL, '', '2026-06-06 21:22:32', NULL, '2026-06-06 21:22:32', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('BX00000000000000000000000000003', '费用项目管理', 'BX00000000000000000000000000002', 'C', 'expense-item', '/bx/expense-item/index', 'bx:expenseItem:list', 1, '1', '1', 'shanxia2.0', 1, NULL, NULL, '', '2026-06-06 21:22:32', NULL, '2026-06-06 21:22:32', 0);
|
||||
@@ -33747,13 +33748,22 @@ INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `co
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_FREIGHT_Q', '查询', 'PL_FREIGHT', 'F', '', '', 'pl:freight:query', 1, '1', '1', 'shanxia2.0', 1, NULL, 'system', '', '2026-06-25 06:29:42', NULL, '2026-06-25 06:29:42', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_FREIGHT_S', '提交审批', 'PL_FREIGHT', 'F', '', '', 'pl:freight:submit', 1, '1', '1', 'shanxia2.0', 4, NULL, 'system', '', '2026-06-25 06:29:42', NULL, '2026-06-25 06:29:42', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_FREIGHT_W', '撤回', 'PL_FREIGHT', 'F', '', '', 'pl:freight:withdraw', 1, '1', '1', 'shanxia2.0', 6, NULL, 'system', '', '2026-06-25 06:29:42', NULL, '2026-06-25 06:29:42', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_BASE', '基础信息库', 'PL_MENU_ROOT', 'M', 'base-info', NULL, NULL, 1, '1', '1', 'shanxia2.0', 7, NULL, 'system', '', '2026-07-05 21:00:00', NULL, '2026-07-19 11:38:46', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_BASE', '基础信息库', 'PL_GROUP_VEHICLE', 'M', 'base-info', NULL, NULL, 1, '1', '1', 'shanxia2.0', 4, NULL, 'system', '', '2026-07-05 21:00:00', NULL, '2026-07-19 11:38:46', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_CERT', '危化品证上传', 'PL_MENU_ROOT', 'M', 'cert-upload', NULL, NULL, 1, '1', '1', 'shanxia2.0', 3, '已废弃:页面已扁平化至 PL_MENU_ROOT', 'system', '', '2026-07-05 21:00:00', 'system', '2026-09-03 14:00:00', 1);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_DOC', '证件提醒', 'PL_MENU_ROOT', 'M', 'document-reminder-module', NULL, NULL, 1, '1', '1', 'shanxia2.0', 6, NULL, 'system', '', '2026-07-05 21:00:00', NULL, '2026-07-19 11:38:46', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_FREIGHT', '运输费用', 'PL_MENU_ROOT', 'M', 'freight-fee', NULL, NULL, 1, '1', '1', 'shanxia2.0', 4, NULL, 'system', '', '2026-07-05 21:00:00', NULL, '2026-07-19 11:38:46', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_DOC', '证件提醒', 'PL_MENU_ROOT', 'M', 'document-reminder-module', NULL, NULL, 1, '1', '1', 'shanxia2.0', 5, NULL, 'system', '', '2026-07-05 21:00:00', NULL, '2026-07-19 11:38:46', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_FREIGHT', '运费管理', 'PL_MENU_ROOT', 'M', 'freight-fee', NULL, NULL, 1, '1', '1', 'shanxia2.0', 4, NULL, 'system', '', '2026-07-05 21:00:00', NULL, '2026-07-19 11:38:46', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_PLAN', '运输计划', 'PL_MENU_ROOT', 'M', 'plan-module', NULL, NULL, 1, '1', '1', 'shanxia2.0', 1, NULL, 'system', '', '2026-07-05 21:00:00', NULL, '2026-07-05 21:00:00', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_STOCK', '库存管理', 'PL_MENU_ROOT', 'M', 'stock-module', NULL, NULL, 1, '1', '1', 'shanxia2.0', 2, '入库/出库单', 'system', '', '2026-07-19 10:33:17', NULL, '2026-07-19 11:38:45', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_VEHICLE', '车辆管理', 'PL_MENU_ROOT', 'M', 'vehicle-mgmt', NULL, NULL, 1, '1', '1', 'shanxia2.0', 5, NULL, 'system', '', '2026-07-05 21:00:00', NULL, '2026-07-19 11:38:46', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_ARCHIVE', '运输归档', 'PL_MENU_ROOT', 'M', 'archive-module', NULL, NULL, 1, '1', '1', 'shanxia2.0', 2, '运输归档分组', 'system', '', '2026-10-04 22:00:00', NULL, '2026-10-04 22:00:00', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_STOCK', '库存管理', 'PL_MENU_ROOT', 'M', 'stock-module', NULL, NULL, 1, '1', '1', 'shanxia2.0', 6, '入库/出库单', 'system', '', '2026-07-19 10:33:17', NULL, '2026-07-19 11:38:45', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_VEHICLE', '车辆管理', '2', 'M', '/vehicle-mgmt', NULL, NULL, 1, '1', '1', 'shanxia2.0', 3, NULL, 'system', '', '2026-07-05 21:00:00', NULL, '2026-07-19 11:38:46', 0);
|
||||
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_VEH_RECHARGE', 'ETC/加油充值管理', 'PL_GROUP_VEHICLE', 'M', 'etc-recharge', NULL, NULL, 1, '1', '1', 'shanxia2.0', 1, 'ETC/加油充值分组', 'system', '', '2026-10-04 22:50:00', NULL, '2026-10-04 22:50:00', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_VEH_FUEL', '加油登记管理', 'PL_GROUP_VEHICLE', 'M', 'fuel-register', NULL, NULL, 1, '1', '1', 'shanxia2.0', 2, '加油登记分组', 'system', '', '2026-10-04 22:50:00', NULL, '2026-10-04 22:50:00', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_GROUP_VEH_MAINT', '车辆维保管理', 'PL_GROUP_VEHICLE', 'M', 'maintenance', NULL, NULL, 1, '1', '1', 'shanxia2.0', 3, '车辆维保分组', 'system', '', '2026-10-04 22:50:00', NULL, '2026-10-04 22:50:00', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_VEH_RECHARGE_APPROVAL', 'ETC/加油充值审批', 'PL_GROUP_VEH_RECHARGE', 'C', 'vehicle-recharge-approval', 'pl/vehicle-recharge-approval/index', 'pl:vehicle-recharge-approval:list', 1, '1', '1', 'shanxia2.0', 2, NULL, 'system', '', '2026-10-04 22:50:00', NULL, '2026-10-04 22:50:00', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_VEH_RECHARGE_WF', 'ETC/加油充值审批人设置', 'PL_GROUP_VEH_RECHARGE', 'C', 'vehicle-recharge-workflow', 'pl/vehicle-recharge-workflow/index', 'pl:vehicle-recharge-workflow:list', 1, '1', '1', 'shanxia2.0', 4, NULL, 'system', '', '2026-10-04 22:50:00', NULL, '2026-10-04 22:50:00', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_VEH_FUEL_REG', '加油登记', 'PL_GROUP_VEH_FUEL', 'C', 'vehicle-fuel-register', 'pl/vehicle-fuel-register/index', 'pl:vehicle-fuel-register:list', 1, '1', '1', 'shanxia2.0', 1, NULL, 'system', '', '2026-10-04 22:50:00', NULL, '2026-10-04 22:50:00', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_VEH_FUEL_SUM', '加油信息汇总', 'PL_GROUP_VEH_FUEL', 'C', 'vehicle-fuel-summary', 'pl/vehicle-fuel-summary/index', 'pl:vehicle-fuel-summary:list', 1, '1', '1', 'shanxia2.0', 2, NULL, 'system', '', '2026-10-04 22:50:00', NULL, '2026-10-04 22:50:00', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_INBOUND', '入库单', 'PL_GROUP_STOCK', 'C', 'inbound', 'pl/inbound/index', 'pl:inbound:list', 1, '1', '1', 'shanxia2.0', 1, NULL, 'system', '', '2026-07-19 10:33:17', NULL, '2026-07-19 11:38:45', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_INBOUND_E', '编辑', 'PL_INBOUND', 'F', '', '', 'pl:inbound:edit', 1, '1', '1', 'shanxia2.0', 2, NULL, 'system', '', '2026-07-19 10:33:17', NULL, '2026-07-19 11:38:45', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_INBOUND_Q', '查询', 'PL_INBOUND', 'F', '', '', 'pl:inbound:query', 1, '1', '1', 'shanxia2.0', 1, NULL, 'system', '', '2026-07-19 10:33:17', NULL, '2026-07-19 11:38:45', 0);
|
||||
@@ -33763,24 +33773,24 @@ INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `co
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_OUTBOUND_Q', '查询', 'PL_OUTBOUND', 'F', '', '', 'pl:outbound:query', 1, '1', '1', 'shanxia2.0', 1, NULL, 'system', '', '2026-07-19 10:33:17', NULL, '2026-07-19 11:38:45', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PERSONNEL_CARRIER', '三方驾押人员', 'PL_GROUP_BASE', 'C', 'personnel-carrier', 'pl/personnel/index', 'pl:personnel-carrier:list', 1, '1', '1', 'shanxia2.0', 3, '非山峡驾押人员', 'system', '', '2026-07-25 12:58:26', NULL, '2026-07-25 12:58:26', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN', '运输计划', 'PL_GROUP_PLAN', 'C', 'plan', 'pl/plan/index', 'pl:plan:list', 1, '1', '1', 'shanxia2.0', 1, NULL, 'system', '', '2026-06-11 05:17:12', NULL, '2026-06-11 05:17:12', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN_ARCHIVE', '运输计划归档', 'PL_GROUP_PLAN', 'C', 'plan-archive', 'pl/plan-archive/index', 'pl:plan-archive:list', 1, '1', '1', 'shanxia2.0', 2, NULL, 'system', '', '2026-06-25 06:14:17', NULL, '2026-06-25 06:14:17', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN_ARCHIVE', '运输计划归档', 'PL_GROUP_ARCHIVE', 'C', 'plan-archive', 'pl/plan-archive/index', 'pl:plan-archive:list', 1, '1', '1', 'shanxia2.0', 1, NULL, 'system', '', '2026-06-25 06:14:17', NULL, '2026-06-25 06:14:17', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN_ARCHIVE_A', '归档', 'PL_PLAN_ARCHIVE', 'F', '', '', 'pl:plan-archive:archive', 1, '1', '1', 'shanxia2.0', 3, NULL, 'system', '', '2026-06-25 06:14:17', NULL, '2026-06-25 06:14:17', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN_ARCHIVE_E', '编辑', 'PL_PLAN_ARCHIVE', 'F', '', '', 'pl:plan-archive:edit', 1, '1', '1', 'shanxia2.0', 2, NULL, 'system', '', '2026-06-25 06:14:17', NULL, '2026-06-25 06:14:17', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN_ARCHIVE_Q', '查询', 'PL_PLAN_ARCHIVE', 'F', '', '', 'pl:plan-archive:query', 1, '1', '1', 'shanxia2.0', 1, NULL, 'system', '', '2026-06-25 06:14:17', NULL, '2026-06-25 06:14:17', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN_ARCHIVE_PRICE', '查看单价金额', 'PL_PLAN_ARCHIVE', 'F', '', '', 'pl:plan-archive:price', 1, '1', '1', 'shanxia2.0', 4, NULL, 'system', '', '2026-06-25 06:14:17', NULL, '2026-06-25 06:14:17', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN_CERT', '危化品证上传', 'PL_MENU_ROOT', 'C', 'plan-cert', 'pl/plan-cert/index', 'pl:plan-cert:list', 1, '1', '1', 'shanxia2.0', 1, '危化品购买证/合法使用证明上传', 'system', '', '2026-06-20 18:18:10', 'system', '2026-07-31 03:46:16', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN_CERT', '危化品证上传', 'PL_MENU_ROOT', 'C', 'plan-cert', 'pl/plan-cert/index', 'pl:plan-cert:list', 1, '1', '1', 'shanxia2.0', 3, '危化品购买证/合法使用证明上传', 'system', '', '2026-06-20 18:18:10', 'system', '2026-07-31 03:46:16', 0);
|
||||
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN_CERT_U', '上传证书', 'PL_PLAN_CERT', 'F', '', '', 'pl:plan-cert:upload', 1, '1', '1', 'shanxia2.0', 1, NULL, 'system', '', '2026-06-20 18:18:10', NULL, '2026-06-20 18:18:10', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN_CERT_R', '证书齐备', 'PL_PLAN_CERT', 'F', '', '', 'pl:plan-cert:ready', 1, '1', '1', 'shanxia2.0', 2, '含取消齐备', 'system', '', '2026-06-20 18:18:10', NULL, '2026-06-20 18:18:10', 0);INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN_CONTRACT', '运输计划合同完善', 'PL_GROUP_PLAN', 'C', 'plan-contract', 'pl/plan-contract/index', 'pl:plan-contract:list', 1, '1', '1', 'shanxia2.0', 3, '缺合同运输计划补齐', 'system', '', '2026-08-20 22:19:26', NULL, '2026-08-20 22:19:26', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN_CERT_R', '证书齐备', 'PL_PLAN_CERT', 'F', '', '', 'pl:plan-cert:ready', 1, '1', '1', 'shanxia2.0', 2, '含取消齐备', 'system', '', '2026-06-20 18:18:10', NULL, '2026-06-20 18:18:10', 0);INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN_CONTRACT', '运输计划合同完善', 'PL_GROUP_PLAN', 'C', 'plan-contract', 'pl/plan-contract/index', 'pl:plan-contract:list', 1, '1', '1', 'shanxia2.0', 2, '缺合同运输计划补齐', 'system', '', '2026-08-20 22:19:26', NULL, '2026-08-20 22:19:26', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN_CONTRACT_UPD', '保存合同关联', 'PL_PLAN_CONTRACT', 'F', '', NULL, 'pl:plan-contract:update', 1, '1', '1', 'shanxia2.0', 1, NULL, 'system', '', '2026-08-20 22:19:26', NULL, '2026-08-20 22:19:26', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_PLAN_FORCE_FOLLOW', '强制修改跟进状态', 'PL_PLAN', 'F', '', NULL, 'pl:plan:force-follow-status', 1, '1', '1', 'shanxia2.0', 20, '运维纠错:仅改 follow_status,不联动作废/运输安排', 'system', '', '2026-08-21 12:10:16', NULL, '2026-08-21 12:10:16', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_CONTRACT_VIEW_PRODUCT_PRICE', '合同详情查看产品价格', 'PL_PLAN', 'F', '', NULL, 'pl:contract:view-product-price', 1, '1', '1', 'shanxia2.0', 21, '运输计划/归档/合同完善/危化品证上传:合同详情弹窗展示产品单价与金额', 'system', '', '2026-09-29 00:00:00', NULL, '2026-09-29 00:00:00', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_SELF_VEHICLE', '山峡自有车辆', 'PL_GROUP_BASE', 'C', 'self-vehicle', 'pl/self-vehicle/index', 'pl:self-vehicle:list', 1, '1', '1', 'shanxia2.0', 4, '展示全部自有类型车辆', 'system', '', '2026-06-20 08:07:00', NULL, '2026-07-25 12:58:26', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_TRANSPORT_ADDRESS', '运输地址库', 'PL_GROUP_BASE', 'C', 'transport-address', 'pl/transport-address/index', 'pl:transport-address:list', 1, '1', '1', 'shanxia2.0', 6, '运输通用地址库', 'system', '', '2026-07-01 19:54:09', NULL, '2026-07-25 12:58:26', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_VEH_MAINT_APPLY', '车辆维保申请', 'PL_GROUP_VEHICLE', 'C', 'vehicle-maintenance-apply', 'pl/vehicle-maintenance-apply/index', 'pl:vehicle-maintenance-apply:list', 1, '1', '1', 'shanxia2.0', 3, NULL, 'system', '', '2026-06-29 09:02:16', NULL, '2026-06-29 09:13:01', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_VEH_MAINT_PROCESS', '车辆维保处理登记', 'PL_GROUP_VEHICLE', 'C', 'vehicle-maintenance-process', 'pl/vehicle-maintenance-process/index', 'pl:vehicle-maintenance-process:list', 1, '1', '1', 'shanxia2.0', 4, NULL, 'system', '', '2026-06-29 09:02:16', NULL, '2026-06-29 09:13:01', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_VEH_RECHARGE_APPLY', 'ETC/加油充值申请', 'PL_GROUP_VEHICLE', 'C', 'vehicle-recharge-apply', 'pl/vehicle-recharge-apply/index', 'pl:vehicle-recharge-apply:list', 1, '1', '1', 'shanxia2.0', 1, NULL, 'system', '', '2026-06-29 08:32:30', NULL, '2026-06-29 08:37:03', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_VEH_RECHARGE_RECORD', 'ETC/加油充值发放管理', 'PL_GROUP_VEHICLE', 'C', 'vehicle-recharge-record', 'pl/vehicle-recharge-record/index', 'pl:vehicle-recharge-record:list', 1, '1', '1', 'shanxia2.0', 2, NULL, 'system', '', '2026-06-29 08:32:30', NULL, '2026-06-29 08:37:03', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_VEH_MAINT_APPLY', '车辆维保申请', 'PL_GROUP_VEH_MAINT', 'C', 'vehicle-maintenance-apply', 'pl/vehicle-maintenance-apply/index', 'pl:vehicle-maintenance-apply:list', 1, '1', '1', 'shanxia2.0', 1, NULL, 'system', '', '2026-06-29 09:02:16', NULL, '2026-06-29 09:13:01', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_VEH_MAINT_PROCESS', '车辆维保处理登记', 'PL_GROUP_VEH_MAINT', 'C', 'vehicle-maintenance-process', 'pl/vehicle-maintenance-process/index', 'pl:vehicle-maintenance-process:list', 1, '1', '1', 'shanxia2.0', 2, NULL, 'system', '', '2026-06-29 09:02:16', NULL, '2026-06-29 09:13:01', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_VEH_RECHARGE_APPLY', 'ETC/加油充值申请', 'PL_GROUP_VEH_RECHARGE', 'C', 'vehicle-recharge-apply', 'pl/vehicle-recharge-apply/index', 'pl:vehicle-recharge-apply:list', 1, '1', '1', 'shanxia2.0', 1, NULL, 'system', '', '2026-06-29 08:32:30', NULL, '2026-06-29 08:37:03', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_VEH_RECHARGE_RECORD', 'ETC/加油充值发放管理', 'PL_GROUP_VEH_RECHARGE', 'C', 'vehicle-recharge-record', 'pl/vehicle-recharge-record/index', 'pl:vehicle-recharge-record:list', 1, '1', '1', 'shanxia2.0', 3, NULL, 'system', '', '2026-06-29 08:32:30', NULL, '2026-06-29 08:37:03', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_VEH_UREA_APPLY', '车辆尿素申请', 'PL_GROUP_VEHICLE', 'C', 'vehicle-urea-apply', 'pl/vehicle-urea-apply/index', 'pl:vehicle-urea-apply:list', 1, '0', '1', 'shanxia2.0', 5, '侧栏不展示', 'system', '', '2026-06-29 09:26:30', NULL, '2026-07-11 17:00:48', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_VEH_UREA_DISBURSE', '车辆尿素发放登记', 'PL_GROUP_VEHICLE', 'C', 'vehicle-urea-disburse', 'pl/vehicle-urea-disburse/index', 'pl:vehicle-urea-disburse:list', 1, '0', '1', 'shanxia2.0', 6, '侧栏不展示', 'system', '', '2026-06-29 09:26:30', NULL, '2026-07-11 17:00:48', 0);
|
||||
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('PL_VEHICLE', '三方车辆', 'PL_GROUP_BASE', 'C', 'vehicle', 'pl/vehicle/index', 'pl:vehicle:list', 1, '1', '1', 'shanxia2.0', 2, '承运商/三方车辆', 'system', '', '2026-06-11 05:17:12', NULL, '2026-07-25 12:58:26', 0);
|
||||
|
||||
@@ -0,0 +1,439 @@
|
||||
# web-admin 列表工具栏「更多」溢出收纳 Implementation Plan
|
||||
|
||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||
|
||||
**Goal:** 在 HIGH/MEDIUM 列表页复用 `ListToolbarOverflow`,窄屏将次要操作收入「更多」;编辑/删除优先平铺,导出与清空列过滤最后收纳。
|
||||
|
||||
**Architecture:** 复用现有 `ListToolbarOverflow` 测量算法;新增纯函数工厂 `list-toolbar-overflow-items.ts` 统一 edit/delete/export/clearFilters;各列表页将次要按钮改为 `toolbarOverflowItems` + 可选 `#export` slot。主操作与 `ListToolbarEndActions` 留在溢出组件外。运输计划把 `clearFilters` 挪到溢出池末尾以对齐新约定。
|
||||
|
||||
**Tech Stack:** Vue 3、Element Plus、`ListToolbarOverflow`、Node `node:test`(与现有 `*.test.ts` 一致)
|
||||
|
||||
**规格:** `docs/superpowers/specs/2026-10-02-list-toolbar-overflow-design.md`
|
||||
|
||||
**Commit 约定:** 仅在用户明确要求时执行 `git commit`;计划中的 Commit 步骤表示「可提交的逻辑切点」,执行时默认跳过 unless 用户要求提交。
|
||||
|
||||
---
|
||||
|
||||
## File structure
|
||||
|
||||
| 文件 | 职责 |
|
||||
|------|------|
|
||||
| `web-admin/src/utils/list-toolbar-overflow-items.ts` | **新建**:edit/delete/clearFilters/export 工厂 |
|
||||
| `web-admin/src/utils/list-toolbar-overflow-items.test.ts` | **新建**:工厂单元测试 |
|
||||
| `web-admin/src/utils/list-toolbar-overflow.ts` | 已有算法,本变更不改逻辑 |
|
||||
| `web-admin/src/components/business/list-toolbar-overflow/*` | 已有组件,本变更原则上不改 |
|
||||
| `web-admin/src/views/pl/plan/index.vue` | 样板:`clearFilters` 移末尾 |
|
||||
| 规格清单中的各 `views/**/index.vue` 等 | 工具栏改造成 Overflow |
|
||||
|
||||
### 标准页改造清单(每页 Task 都执行)
|
||||
|
||||
对目标页:
|
||||
|
||||
1. `import ListToolbarOverflow` 与 `ListToolbarOverflowItem`(若尚未导入)。
|
||||
2. `import` 工厂:`overflowEditItem` / `overflowDeleteItem` / `overflowClearFiltersItem` / `overflowExportPlaceholder`(按需)。
|
||||
3. 模板:保留日期快捷、快捷搜索、**唯一** `btn-main`、末尾 `ListToolbarEndActions`;其余次要按钮删除,改为:
|
||||
|
||||
```vue
|
||||
<ListToolbarOverflow :items="toolbarOverflowItems">
|
||||
<template #export>
|
||||
<ListExportDropdown …原有 props… />
|
||||
</template>
|
||||
</ListToolbarOverflow>
|
||||
```
|
||||
|
||||
若该页导出已是 `children` 项(无 `ListExportDropdown`),则不要 `#export` slot,在 items 里放带 `children` 的 export 项。
|
||||
|
||||
4. `script` 增加 `toolbarOverflowItems` computed;**顺序** = 编辑/删除等行级 → 业务次要 → export → clearFilters(最末)。
|
||||
5. 若有日期 pills + 搜索导致挤占:给 `list-toolbar-row` 增加与 `pl-plan-list-toolbar-row` 等价的 `flex-wrap: nowrap; overflow: hidden; min-width: 0` 及子项 `flex-shrink: 0`(主按钮、搜索、EndActions),Overflow 根已 `flex: 1; min-width: 0`。
|
||||
6. 手工验收:宽屏平铺;缩窄后右侧先入「更多」;主按钮与刷新始终可见。
|
||||
|
||||
---
|
||||
|
||||
### Task 1: 溢出项工厂 + 单元测试
|
||||
|
||||
**Files:**
|
||||
- Create: `web-admin/src/utils/list-toolbar-overflow-items.ts`
|
||||
- Create: `web-admin/src/utils/list-toolbar-overflow-items.test.ts`
|
||||
|
||||
- [ ] **Step 1: 写失败测试**
|
||||
|
||||
```ts
|
||||
import assert from 'node:assert/strict'
|
||||
import { describe, it } from 'node:test'
|
||||
import { Edit, Delete, Filter, Download } from '@element-plus/icons-vue'
|
||||
import {
|
||||
overflowEditItem,
|
||||
overflowDeleteItem,
|
||||
overflowClearFiltersItem,
|
||||
overflowExportPlaceholder
|
||||
} from './list-toolbar-overflow-items'
|
||||
|
||||
describe('overflowEditItem', () => {
|
||||
it('uses key edit and wires onClick/disabled', () => {
|
||||
let clicked = false
|
||||
const item = overflowEditItem({
|
||||
disabled: true,
|
||||
onClick: () => {
|
||||
clicked = true
|
||||
}
|
||||
})
|
||||
assert.equal(item.key, 'edit')
|
||||
assert.equal(item.label, '编辑')
|
||||
assert.equal(item.disabled, true)
|
||||
assert.equal(item.icon, Edit)
|
||||
item.onClick?.()
|
||||
assert.equal(clicked, true)
|
||||
})
|
||||
})
|
||||
|
||||
describe('overflowDeleteItem', () => {
|
||||
it('uses danger type and key delete', () => {
|
||||
const item = overflowDeleteItem({ onClick: () => {} })
|
||||
assert.equal(item.key, 'delete')
|
||||
assert.equal(item.type, 'danger')
|
||||
assert.equal(item.icon, Delete)
|
||||
})
|
||||
})
|
||||
|
||||
describe('overflowClearFiltersItem', () => {
|
||||
it('hides when no active filters', () => {
|
||||
const hidden = overflowClearFiltersItem(false, () => {})
|
||||
assert.equal(hidden.key, 'clearFilters')
|
||||
assert.equal(hidden.hidden, true)
|
||||
assert.equal(hidden.icon, Filter)
|
||||
const shown = overflowClearFiltersItem(true, () => {})
|
||||
assert.equal(shown.hidden, false)
|
||||
})
|
||||
})
|
||||
|
||||
describe('overflowExportPlaceholder', () => {
|
||||
it('returns export key for slot rendering', () => {
|
||||
const item = overflowExportPlaceholder()
|
||||
assert.equal(item.key, 'export')
|
||||
assert.equal(item.label, '导出')
|
||||
assert.equal(item.icon, Download)
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
- [ ] **Step 2: 跑测试确认失败**
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
cd web-admin && node --import tsx --test src/utils/list-toolbar-overflow-items.test.ts
|
||||
```
|
||||
|
||||
Expected: FAIL(模块不存在)。若项目惯用其它 runner,查同目录其它 `*.test.ts` 的跑法并对齐(例如 `pnpm exec tsx --test …`)。
|
||||
|
||||
- [ ] **Step 3: 实现工厂**
|
||||
|
||||
创建 `web-admin/src/utils/list-toolbar-overflow-items.ts`:
|
||||
|
||||
```ts
|
||||
import type { Component } from 'vue'
|
||||
import { Delete, Download, Edit, Filter } from '@element-plus/icons-vue'
|
||||
import type { ListToolbarOverflowItem } from '@/components/business/list-toolbar-overflow/types'
|
||||
|
||||
type ClickOpts = {
|
||||
disabled?: boolean
|
||||
loading?: boolean
|
||||
label?: string
|
||||
icon?: Component
|
||||
onClick: () => void
|
||||
}
|
||||
|
||||
export function overflowEditItem(opts: ClickOpts): ListToolbarOverflowItem {
|
||||
return {
|
||||
key: 'edit',
|
||||
label: opts.label ?? '编辑',
|
||||
icon: opts.icon ?? Edit,
|
||||
disabled: opts.disabled,
|
||||
loading: opts.loading,
|
||||
onClick: opts.onClick
|
||||
}
|
||||
}
|
||||
|
||||
export function overflowDeleteItem(opts: ClickOpts): ListToolbarOverflowItem {
|
||||
return {
|
||||
key: 'delete',
|
||||
label: opts.label ?? '删除',
|
||||
icon: opts.icon ?? Delete,
|
||||
type: 'danger',
|
||||
disabled: opts.disabled,
|
||||
loading: opts.loading,
|
||||
onClick: opts.onClick
|
||||
}
|
||||
}
|
||||
|
||||
export function overflowClearFiltersItem(
|
||||
hasActive: boolean,
|
||||
onClear: () => void
|
||||
): ListToolbarOverflowItem {
|
||||
return {
|
||||
key: 'clearFilters',
|
||||
label: '清空列过滤',
|
||||
icon: Filter,
|
||||
hidden: !hasActive,
|
||||
onClick: onClear
|
||||
}
|
||||
}
|
||||
|
||||
export function overflowExportPlaceholder(
|
||||
label = '导出'
|
||||
): ListToolbarOverflowItem {
|
||||
return {
|
||||
key: 'export',
|
||||
label,
|
||||
icon: Download
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- [ ] **Step 4: 跑测试确认通过**
|
||||
|
||||
同一命令,Expected: PASS。
|
||||
|
||||
- [ ] **Step 5: Commit 切点(仅用户要求时)**
|
||||
|
||||
`feat(web-admin): add list toolbar overflow item factories`
|
||||
|
||||
---
|
||||
|
||||
### Task 2: 运输计划 — clearFilters 移到溢出池末尾
|
||||
|
||||
**Files:**
|
||||
- Modify: `web-admin/src/views/pl/plan/index.vue`(`toolbarOverflowItems` computed)
|
||||
|
||||
- [ ] **Step 1: 调整 items 顺序**
|
||||
|
||||
在 `toolbarOverflowItems` 中:
|
||||
|
||||
1. **删除**数组开头的 `clearFilters` 项。
|
||||
2. 在数组**最末**(`export` 项之后)追加:
|
||||
|
||||
```ts
|
||||
overflowClearFiltersItem(hasActiveFilters.value, () => clearAllFilters())
|
||||
```
|
||||
|
||||
或等价手写:
|
||||
|
||||
```ts
|
||||
{
|
||||
key: 'clearFilters',
|
||||
label: '清空列过滤',
|
||||
icon: Filter,
|
||||
hidden: !hasActiveFilters.value,
|
||||
onClick: () => clearAllFilters()
|
||||
}
|
||||
```
|
||||
|
||||
最终顺序应为:`copy` → `arrange` → `waitNotice` → `print` → `void` → `pasteCreate` → `export` → `clearFilters`。
|
||||
|
||||
若采用工厂,增加 import:
|
||||
|
||||
```ts
|
||||
import { overflowClearFiltersItem } from '@/utils/list-toolbar-overflow-items'
|
||||
```
|
||||
|
||||
- [ ] **Step 2: 浏览器抽查**
|
||||
|
||||
打开 `/#/pl/plan-module/plan`:有列过滤时「清空列过滤」仍可用;缩窄窗口时它应比「复制/安排运输」更早进入「更多」。
|
||||
|
||||
- [ ] **Step 3: Commit 切点(仅用户要求时)**
|
||||
|
||||
`fix(web-admin): move plan toolbar clear-filters to overflow end`
|
||||
|
||||
---
|
||||
|
||||
### Task 3: plan-cert 接入 Overflow
|
||||
|
||||
**Files:**
|
||||
- Modify: `web-admin/src/views/pl/plan-cert/index.vue`
|
||||
|
||||
**主操作(外):** 保留现有「证书齐备」「上传证书」按钮及主色切换逻辑(均在 Overflow 外)。
|
||||
|
||||
**溢出池顺序:**
|
||||
|
||||
1. `cancelReady` — 取消齐备(现有 `handleToolbarUnmarkCertReady`,`hidden`/`v-if` 对齐 `canCertReady`)
|
||||
2. `export` — `#export` + 现有 `ListExportDropdown`
|
||||
3. `clearFilters` — `overflowClearFiltersItem`
|
||||
|
||||
- [ ] **Step 1: 模板** — 去掉工具栏内「清空列过滤」「取消齐备」「ListExportDropdown」平铺;在主操作按钮后插入 `ListToolbarOverflow`;EndActions 不动。
|
||||
- [ ] **Step 2: script** — 增加 `toolbarOverflowItems`;import 组件与工厂。
|
||||
- [ ] **Step 3: 样式** — 已有 `pl-plan-list-toolbar-row` 则确认 Overflow 能收缩;否则按标准清单第 5 步补。
|
||||
- [ ] **Step 4: 抽查** `/#/…/plan-cert` 宽/窄屏。
|
||||
- [ ] **Step 5: Commit 切点** `feat(web-admin): overflow toolbar on plan-cert list`
|
||||
|
||||
---
|
||||
|
||||
### Task 4: plan-archive 接入 Overflow
|
||||
|
||||
**Files:**
|
||||
- Modify: `web-admin/src/views/pl/plan-archive/index.vue`
|
||||
|
||||
**主操作(外):** 「归档」/「调整」等现有 primary。
|
||||
|
||||
**溢出池:** 业务次要(如 ERP 录入)→ `export` → `clearFilters`。不要把主归档按钮放进池。
|
||||
|
||||
- [ ] 执行标准页改造清单;抽查归档列表宽/窄屏。
|
||||
- [ ] Commit 切点:`feat(web-admin): overflow toolbar on plan-archive list`
|
||||
|
||||
---
|
||||
|
||||
### Task 5: 报销申请 / 备用金申请
|
||||
|
||||
**Files:**
|
||||
- Modify: `web-admin/src/views/bx/reimburse/apply/index.vue`
|
||||
- Modify: `web-admin/src/views/bx/advance/apply/index.vue`
|
||||
|
||||
**报销 `toolbarOverflowItems` 顺序(主操作「新增报销申请」在外):**
|
||||
|
||||
1. `overflowEditItem` — 原编辑 disabled/handler
|
||||
2. `overflowDeleteItem` — 原删除
|
||||
3. `downloadTemplate` — 下载模板
|
||||
4. `import` — 批量导入
|
||||
5. `submit` — 提交审批
|
||||
6. `withdraw` — 撤回
|
||||
7. `viewFlow` — 查看审批流
|
||||
8. `overflowExportPlaceholder` + `#export`
|
||||
9. `overflowClearFiltersItem`
|
||||
|
||||
**备用金:** 无模板/导入则省略对应项;其余同构(编辑、删除、提交、撤回、查看审批流、导出、清空)。
|
||||
|
||||
- [ ] 两页按标准清单改造并抽查。
|
||||
- [ ] Commit 切点:`feat(web-admin): overflow toolbar on bx apply lists`
|
||||
|
||||
---
|
||||
|
||||
### Task 6: CRM 线索 / 产品
|
||||
|
||||
**Files:**
|
||||
- Modify: `web-admin/src/views/crm/clue/index.vue`
|
||||
- Modify: `web-admin/src/views/crm/product/index.vue`
|
||||
|
||||
**线索顺序:** 编辑 → 跟进 → 删除 → 批量分配 → 转为客户 → 标为无效 → export → clearFilters
|
||||
|
||||
**产品顺序:** 编辑 → 删除 → 批量上架 → 批量下架 → 导入 → 产品分类 → export → clearFilters
|
||||
|
||||
- [ ] 改造 + 抽查 `/#/crm/...` 对应路由。
|
||||
- [ ] Commit 切点:`feat(web-admin): overflow toolbar on crm clue and product`
|
||||
|
||||
---
|
||||
|
||||
### Task 7: 合同列表 / 报价列表
|
||||
|
||||
**Files:**
|
||||
- Modify: `web-admin/src/views/crm/contract/ContractListPage.vue`
|
||||
- Modify: `web-admin/src/views/crm/quote/QuoteListPage.vue`
|
||||
|
||||
**注意:** 管理模式与审批态按钮用 `hidden` 控制,勿用破坏测量的零散 `v-if` 平铺按钮。
|
||||
|
||||
**合同(示例顺序):** 合同复制 → 提交审批 → 作废/恢复 → 审批通过 → 驳回 → 上传扫描件 → export → clearFilters(按页现有按钮裁剪,编辑若存在则放最前)。
|
||||
|
||||
**报价:** 复制新增 → 提交审批 → 生成报价单 → 作废 → 审批(审批页)→ export → clearFilters。
|
||||
|
||||
- [ ] 改造 + 抽查管理/审批两种入口(若共用同一组件)。
|
||||
- [ ] Commit 切点:`feat(web-admin): overflow toolbar on contract and quote lists`
|
||||
|
||||
---
|
||||
|
||||
### Task 8: 其余 HIGH 页
|
||||
|
||||
对下表每一文件执行标准改造;主操作列在外,其余进池(编辑/删除靠前,export、clearFilters 最末)。
|
||||
|
||||
| 文件 | 主操作(外) |
|
||||
|------|--------------|
|
||||
| `web-admin/src/views/crm/contract/change/index.vue` | 新增变更 |
|
||||
| `web-admin/src/views/crm/price-letter/index.vue` | 新增调价函 |
|
||||
| `web-admin/src/views/pl/personnel/index.vue` | 新增人员 |
|
||||
| `web-admin/src/views/pl/vehicle/index.vue` | 新增车辆 |
|
||||
| `web-admin/src/views/pl/vehicle-recharge-apply/index.vue` | 新增申请 |
|
||||
| `web-admin/src/views/pl/freight/components/SettlementBillPanel.vue` | 现有主色按钮 |
|
||||
| `web-admin/src/views/bx/expense-item/index.vue` | 新增一级项目 |
|
||||
| `web-admin/src/views/system/role/index.vue` | 新增角色 |
|
||||
| `web-admin/src/views/system/dict/index.vue` | 新增(主表;子栏按钮多则同样接入) |
|
||||
| `web-admin/src/views/system/post/index.vue` | 新增职位 |
|
||||
|
||||
- [ ] 逐文件改造;每 2~3 个文件做一次宽/窄屏抽查。
|
||||
- [ ] Commit 切点:`feat(web-admin): overflow toolbar on remaining high-density lists`
|
||||
|
||||
---
|
||||
|
||||
### Task 9: MEDIUM 页
|
||||
|
||||
对下表执行标准改造;若打开文件后次要操作实际 ≤2,**跳过该文件**并在 PR/说明中注明。
|
||||
|
||||
| 文件 | 主操作(外) |
|
||||
|------|--------------|
|
||||
| `web-admin/src/views/crm/customer/index.vue` | 新增客户 |
|
||||
| `web-admin/src/views/crm/opportunity/index.vue` | 新增商机 |
|
||||
| `web-admin/src/views/crm/customer/pool/RuleIndex.vue` | 新增规则 |
|
||||
| `web-admin/src/views/crm/contract/template/index.vue` | 新增模板 |
|
||||
| `web-admin/src/views/pl/self-vehicle/index.vue` | 新增自有车辆 |
|
||||
| `web-admin/src/views/pl/vehicle-fuel-register/FuelRegisterListPage.vue` | 新增登记 |
|
||||
| `web-admin/src/views/pl/vehicle-maintenance-process/index.vue` | 处理 |
|
||||
| `web-admin/src/views/pl/vehicle-recharge-record/index.vue` | 发放 |
|
||||
| `web-admin/src/views/pl/vehicle-urea-disburse/index.vue` | 发放 |
|
||||
| `web-admin/src/views/system/user/index.vue` | 新增用户 |
|
||||
| `web-admin/src/views/system/tenant/index.vue` | 新增租户 |
|
||||
| `web-admin/src/views/system/leave/index.vue` | 新增请假 |
|
||||
| `web-admin/src/views/system/workflow/process/index.vue` | 新增流程 |
|
||||
| `web-admin/src/views/db/plans/index.vue` | 新增计划 |
|
||||
| `web-admin/src/views/db/inventory/index.vue` | 新增记录 |
|
||||
| `web-admin/src/views/db/weighing/index.vue` | 新增地磅单 |
|
||||
| `web-admin/src/views/pl/vehicle-maintenance-apply/index.vue` | 新增申请 |
|
||||
| `web-admin/src/views/pl/vehicle-urea-apply/index.vue` | 新增申请 |
|
||||
| `web-admin/src/views/system/dept/index.vue` | 新增 |
|
||||
| `web-admin/src/views/system/menu/index.vue` | 新增 |
|
||||
|
||||
- [x] 逐文件改造 + 抽查抽样页(建议:客户、用户、地磅)。
|
||||
- [ ] Commit 切点:`feat(web-admin): overflow toolbar on medium-density list pages`
|
||||
|
||||
---
|
||||
|
||||
### Task 10: 文档与图谱
|
||||
|
||||
**Files:**
|
||||
- Modify(可选一句): `docs/web-admin-ui-pattern-index.md` 或 `docs/web-admin-ui-spec-fresh-mint.md` 列表工具栏小节:注明次要操作使用 `ListToolbarOverflow`,顺序约定见设计文档。
|
||||
- Modify: `docs/superpowers/specs/2026-10-02-list-toolbar-overflow-design.md` 状态改为「已落地」或「实现中」。
|
||||
- Run: `./scripts/update-graph.sh frontend`(或仓库约定的 graphify 更新命令)。
|
||||
|
||||
- [x] 补一句 UI 约定文档(避免大段重写)。
|
||||
- [x] 更新图谱。
|
||||
- [ ] Commit 切点:`docs: note list toolbar overflow pattern`
|
||||
|
||||
---
|
||||
|
||||
## Spec coverage checklist
|
||||
|
||||
| 规格要求 | Task |
|
||||
|----------|------|
|
||||
| 方案 B 工厂 | Task 1 |
|
||||
| clearFilters 最末 + 对齐 pl/plan | Task 2 |
|
||||
| plan-cert / plan-archive | Task 3–4 |
|
||||
| 最挤业务(报销/线索/产品/合同/报价) | Task 5–7 |
|
||||
| 其余 HIGH | Task 8 |
|
||||
| MEDIUM | Task 9 |
|
||||
| 主操作在外、EndActions/日期/搜索不动 | 标准清单 |
|
||||
| 编辑/删除靠前 | 各页 items 顺序 |
|
||||
| 导出 slot | 标准清单 + 各 Task |
|
||||
| LOW / 流程配置跳过 | 未列入 Task |
|
||||
| 验收宽/窄屏 | 各 Task 抽查步骤 |
|
||||
|
||||
## Placeholder scan
|
||||
|
||||
无 TBD/TODO;工厂与测试代码完整;各页给出明确主操作与 items 顺序要点。
|
||||
|
||||
---
|
||||
|
||||
## Execution handoff
|
||||
|
||||
Plan complete and saved to `docs/superpowers/plans/2026-10-02-list-toolbar-overflow.md`.
|
||||
|
||||
**Two execution options:**
|
||||
|
||||
1. **Subagent-Driven(推荐)** — 每 Task 派生子代理,Task 间复核
|
||||
2. **Inline Execution** — 本会话按 `executing-plans` 连续执行,批次检查点停顿
|
||||
|
||||
Which approach?
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,204 @@
|
||||
# web-admin 列表工具栏「更多」溢出收纳设计
|
||||
|
||||
**日期**:2026-10-02
|
||||
**状态**:已落地(实现计划见 `docs/superpowers/plans/2026-10-02-list-toolbar-overflow.md`)
|
||||
**参考实现**:`web-admin/src/views/pl/plan/index.vue` + `web-admin/src/components/business/list-toolbar-overflow/`
|
||||
**范围**:`web-admin` HIGH + MEDIUM 列表页工具栏;不含小程序、不含 LOW 页、不含流程节点配置条。
|
||||
|
||||
## 背景与目标
|
||||
|
||||
运输计划列表已用 `ListToolbarOverflow`:宽度不足时,次要操作收入「更多」下拉。其它业务列表仍把大量 `el-button` / `ListExportDropdown` 平铺在工具栏,窄屏拥挤。
|
||||
|
||||
### 已确认决策
|
||||
|
||||
| 项 | 决策 |
|
||||
|----|------|
|
||||
| 覆盖范围 | HIGH + MEDIUM(约 30+ 页);LOW(次要操作 ≤2)跳过 |
|
||||
| 落地方式 | **方案 B**:复用现有 `ListToolbarOverflow`,抽公共工厂函数统一常见项;页面组装业务特有项 |
|
||||
| 主操作 | 唯一 `btn-main` / `type="primary"` **固定在溢出组件外** |
|
||||
| 编辑/删除 | 进溢出池,但排在**靠前**位置(宽屏优先平铺,窄屏较晚收入「更多」) |
|
||||
| 清空列过滤 | 溢出池**最末**(最易进「更多」);运输计划现有顺序一并调整对齐 |
|
||||
| 导出 | 用 `key: 'export'` + `#export` slot 挂 `ListExportDropdown`(与运输计划一致;若页内已是 children 式导出可保留 children) |
|
||||
| 不动 | 日期快捷、快捷搜索、`ListToolbarEndActions`(刷新/列设置) |
|
||||
| 本批不做 | 流程配置条(上移/下移/保存配置);仅 1~2 个次要按钮的 LOW 页 |
|
||||
|
||||
## 布局约定
|
||||
|
||||
工具栏从左到右:
|
||||
|
||||
```
|
||||
[日期快捷?] → [快捷搜索?] → [唯一主操作] → [ListToolbarOverflow] → [ListToolbarEndActions]
|
||||
```
|
||||
|
||||
- 主操作始终外显(如「新增*」「归档」「发放」「处理」;plan-cert 等互斥主按钮按页保留其现有主色切换逻辑,主色者在外、次要进池)。
|
||||
- 溢出池内从左到右 = 优先保留;算法从右侧收入「更多」(见 `calcListToolbarOverflowVisibleCount`)。
|
||||
|
||||
### 溢出池推荐顺序
|
||||
|
||||
1. **行级高频**:编辑、删除、复制、处理/发放/归档调整等
|
||||
2. **业务次要**:提交审批、撤回、批量上/下架、导入、下载模板、证书 ZIP、查看审批流等
|
||||
3. **导出**(slot 或 children)
|
||||
4. **清空列过滤**(`hidden: !hasActiveFilters`,始终排最末)
|
||||
|
||||
## 公共能力
|
||||
|
||||
### 已有(不改算法,仅复用)
|
||||
|
||||
| 路径 | 职责 |
|
||||
|------|------|
|
||||
| `components/business/list-toolbar-overflow/index.vue` | 测量宽度、平铺可见项、「更多」菜单 |
|
||||
| `components/business/list-toolbar-overflow/types.ts` | `ListToolbarOverflowItem` |
|
||||
| `components/business/list-toolbar-overflow/ToolbarOverflowAction.vue` | 默认按钮/子下拉渲染 |
|
||||
| `utils/list-toolbar-overflow.ts` | `calcListToolbarOverflowVisibleCount` |
|
||||
|
||||
### 新增工厂(建议路径)
|
||||
|
||||
`web-admin/src/utils/list-toolbar-overflow-items.ts`(纯函数,无 Vue 生命周期依赖)
|
||||
|
||||
提供可组合工厂,页面 `computed` 内组装数组,例如:
|
||||
|
||||
| 工厂 | 约定 |
|
||||
|------|------|
|
||||
| `overflowEditItem(opts)` | `key: 'edit'`,图标 `Edit`/`EditPen` 由 opts 传入,默认 `Edit` |
|
||||
| `overflowDeleteItem(opts)` | `key: 'delete'`,`type: 'danger'` |
|
||||
| `overflowClearFiltersItem(hasActive, onClear)` | `key: 'clearFilters'`,`hidden: !hasActive` |
|
||||
| `overflowExportPlaceholder()` | `{ key: 'export', label: '导出' }`,配合 `#export` slot;若不用 slot 可不调用 |
|
||||
|
||||
**不**做成强制「一个 composable 管全页」:特殊页(证件双主按钮、合同审批态按钮)可手写 items,只遵守顺序约定与类型。
|
||||
|
||||
运输计划可继续手写 `toolbarOverflowItems`,但须把 `clearFilters` 移到数组末尾以符合本约定。
|
||||
|
||||
## 页面改造模板
|
||||
|
||||
```vue
|
||||
<div class="list-toolbar-row">
|
||||
<!-- 日期 / 搜索(若有) -->
|
||||
<el-button class="btn-main" type="primary" @click="handleAdd">…新增…</el-button>
|
||||
|
||||
<ListToolbarOverflow :items="toolbarOverflowItems">
|
||||
<template #export>
|
||||
<ListExportDropdown … />
|
||||
</template>
|
||||
</ListToolbarOverflow>
|
||||
|
||||
<ListToolbarEndActions … />
|
||||
</div>
|
||||
```
|
||||
|
||||
```ts
|
||||
const toolbarOverflowItems = computed<ListToolbarOverflowItem[]>(() => [
|
||||
overflowEditItem({ disabled: selectedRows.value.length !== 1, onClick: handleToolbarEdit }),
|
||||
overflowDeleteItem({ disabled: selectedRows.value.length === 0, onClick: handleDelete }),
|
||||
// 业务特有项插在导出之前
|
||||
overflowExportPlaceholder(),
|
||||
overflowClearFiltersItem(hasActiveFilters.value, clearAllFilters)
|
||||
])
|
||||
```
|
||||
|
||||
行级 `list-toolbar-row` 若与运输计划同骨架(日期 pills + 搜索),须保证工具栏行 `min-width: 0`(可复用或对齐 `pl-plan-list-toolbar-row`),让 `ListToolbarOverflow` 的 `flex: 1` 吃到剩余宽度,避免整行换行导致测量失真。
|
||||
|
||||
## 目标页面清单
|
||||
|
||||
计数口径:业务操作(含条件性清空列过滤、导出);不含日期快捷、快捷搜索、EndActions。
|
||||
|
||||
### 批次 0 — 基建
|
||||
|
||||
- 新增 `list-toolbar-overflow-items.ts`
|
||||
- 调整 `pl/plan/index.vue`:`clearFilters` 移至溢出池末尾
|
||||
|
||||
### 批次 1 — PL 兄弟页(与 plan 同骨架)
|
||||
|
||||
| 路径 | 主操作(外) | 溢出池要点 |
|
||||
|------|--------------|------------|
|
||||
| `views/pl/plan-cert/index.vue` | 「证书齐备」/「上传证书」主色切换逻辑保留在外 | 取消齐备、导出、清空列过滤 |
|
||||
| `views/pl/plan-archive/index.vue` | 归档/调整 | 导出、ERP 录入、清空列过滤等次要 |
|
||||
|
||||
### 批次 2 — 最挤业务列表
|
||||
|
||||
| 路径 | 主操作(外) | 溢出池要点(编辑/删除靠前) |
|
||||
|------|--------------|------------------------------|
|
||||
| `views/bx/reimburse/apply/index.vue` | 新增报销申请 | 编辑、删除、下载模板、批量导入、提交/撤回、查看审批流、导出、清空 |
|
||||
| `views/bx/advance/apply/index.vue` | 新增备用金申请 | 同报销结构(无导入模板则省略) |
|
||||
| `views/crm/clue/index.vue` | 新增线索 | 编辑、跟进、删除、批量分配、转为客户、标无效、导出、清空 |
|
||||
| `views/crm/product/index.vue` | 新增产品 | 编辑、删除、批量上/下架、导入、产品分类、导出、清空 |
|
||||
| `views/crm/contract/ContractListPage.vue` | 新增 | 复制、提交审批、作废恢复、审批通过/驳回(审批态)、上传扫描件、导出、清空 |
|
||||
| `views/crm/quote/QuoteListPage.vue` | 新增 | 复制新增、提交审批、生成报价单、作废、审批(审批页)、导出、清空 |
|
||||
|
||||
### 批次 3 — 其余 HIGH
|
||||
|
||||
| 路径 | 主操作(外) |
|
||||
|------|--------------|
|
||||
| `views/crm/contract/change/index.vue` | 新增变更 |
|
||||
| `views/crm/price-letter/index.vue` | 新增调价函 |
|
||||
| `views/pl/personnel/index.vue` | 新增人员 |
|
||||
| `views/pl/vehicle/index.vue` | 新增车辆 |
|
||||
| `views/pl/vehicle-recharge-apply/index.vue` | 新增申请 |
|
||||
| `views/pl/freight/components/SettlementBillPanel.vue` | 编辑/发票信息(现有主色) |
|
||||
| `views/bx/expense-item/index.vue` | 新增一级项目 |
|
||||
| `views/system/role/index.vue` | 新增角色 |
|
||||
| `views/system/dict/index.vue` | 新增(主表;字典数据子栏若按钮多可同样接入) |
|
||||
| `views/system/post/index.vue` | 新增职位 |
|
||||
|
||||
### 批次 4 — MEDIUM
|
||||
|
||||
| 路径 | 主操作(外) |
|
||||
|------|--------------|
|
||||
| `views/crm/customer/index.vue` | 新增客户 |
|
||||
| `views/crm/opportunity/index.vue` | 新增商机 |
|
||||
| `views/crm/customer/pool/RuleIndex.vue` | 新增规则 |
|
||||
| `views/crm/contract/template/index.vue` | 新增模板 |
|
||||
| `views/pl/self-vehicle/index.vue` | 新增自有车辆 |
|
||||
| `views/pl/vehicle-fuel-register/FuelRegisterListPage.vue` | 新增登记 |
|
||||
| `views/pl/vehicle-maintenance-process/index.vue` | 处理 |
|
||||
| `views/pl/vehicle-recharge-record/index.vue` | 发放 |
|
||||
| `views/pl/vehicle-urea-disburse/index.vue` | 发放 |
|
||||
| `views/system/user/index.vue` | 新增用户 |
|
||||
| `views/system/tenant/index.vue` | 新增租户 |
|
||||
| `views/system/leave/index.vue` | 新增请假 |
|
||||
| `views/system/workflow/process/index.vue` | 新增流程 |
|
||||
| `views/db/plans/index.vue` | 新增计划 |
|
||||
| `views/db/inventory/index.vue` | 新增记录 |
|
||||
| `views/db/weighing/index.vue` | 新增地磅单 |
|
||||
| `views/pl/vehicle-maintenance-apply/index.vue` | 新增申请 |
|
||||
| `views/pl/vehicle-urea-apply/index.vue` | 新增申请 |
|
||||
| `views/system/dept/index.vue` | 新增 |
|
||||
| `views/system/menu/index.vue` | 新增 |
|
||||
|
||||
实施时可按实际按钮数微调:若某页次要操作已 ≤2,降为跳过。
|
||||
|
||||
### 明确跳过(本设计)
|
||||
|
||||
- `pl/plan-contract` 等 LOW
|
||||
- `bx/*/approve`、`bx/view/*` 等审批只读向、按钮少的页(除非验收时发现仍挤)
|
||||
- `bx/workflow/*`、`pl/vehicle-recharge-workflow` 流程节点配置条
|
||||
- Demo 页(`views/demo/*`)可选,非必须
|
||||
|
||||
## 实施约束
|
||||
|
||||
- **最小改动**:只改工具栏模板与 `toolbarOverflowItems`(及工厂文件);不重构列表查询/权限。
|
||||
- **图标**:溢出项按钮须带前置 `el-icon`(与 OpenSpec UI「按钮须携带图标」一致);工厂默认带图标。
|
||||
- **主色唯一**:工具栏行仍仅一个 `type="primary"`(在外);溢出池内默认 `btn-ghost`。
|
||||
- **样式**:需要收缩时给工具栏行 `min-width: 0`,保证 `ListToolbarOverflow` 的 `flex: 1` 能拿到剩余宽度。
|
||||
- **文档**:落地后可在 `docs/web-admin-ui-pattern-index.md` 或 Fresh Mint 列表工具栏小节补一句「次要操作使用 ListToolbarOverflow」;OpenSpec `ui-conventions` 若有工具栏 SHALL,同步一句(实现计划阶段再定是否写入)。
|
||||
|
||||
## 验收标准
|
||||
|
||||
1. 宽屏:编辑/删除等优先平铺;无「更多」或「更多」项很少。
|
||||
2. 逐步缩窄窗口:导出、清空列过滤先入「更多」;编辑/删除较晚。
|
||||
3. 主操作与 EndActions 始终可见。
|
||||
4. 「更多」内导出、带子菜单项可点击且 disabled 态正确。
|
||||
5. `pl/plan` 清空列过滤位于溢出池末尾,行为与改造前一致(仅收纳优先级变化)。
|
||||
|
||||
## 风险与缓解
|
||||
|
||||
| 风险 | 缓解 |
|
||||
|------|------|
|
||||
| 自定义导出组件测量宽度不准 | 与 plan 相同:measure/button 模式走 `#export` slot |
|
||||
| 条件 `v-if` 按钮导致宽度抖动 | 用 `hidden` 进 items,由组件过滤,避免 DOM 突然增减难测 |
|
||||
| 页太多易漏测 | 按批次改 + 每批抽查 1 个宽屏/窄屏;优先 visual 验收 plan-cert / 报销申请 / 产品 |
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不引入新的第三套工具栏组件。
|
||||
- 不把操作列按钮迁入工具栏(已外置的保持外置)。
|
||||
- 不在本变更修改后端 API。
|
||||
@@ -0,0 +1,161 @@
|
||||
# web-admin 侧栏非叶子目录 + 右侧叶子组 Tab 设计
|
||||
|
||||
**日期**:2026-10-04
|
||||
**状态**:待审阅(实现前须产品确认本文)
|
||||
**交互 Demo**:`docs/demos/sidebar-group-leaf-tabs-demo.html`
|
||||
**范围**:`web-admin` 全站业务菜单导航。默认壳层为**单列树形侧栏**(`MenuTypeEnum.LEFT`),只展示非叶子;无独立一级竖向 Tab。不含小程序、不含后端菜单 API 变更。
|
||||
|
||||
## 背景与目标
|
||||
|
||||
当前侧栏同时展示目录和叶子,内容区一次只挂一个页面(默认 `showWorkTab: false`)。用户希望:
|
||||
|
||||
- 左侧树**只展示非叶子**;
|
||||
- 点击**最后一层非叶子**后,右侧用 **Tab 展示该层全部可见叶子**;
|
||||
- 换另一个最后一层非叶子时,**整组 Tab 替换**;
|
||||
- **默认只加载第一个(或 URL 已指向的)叶子**,点哪个 Tab 再加载哪个界面。
|
||||
|
||||
报销管理是典型三层(报销管理 → 基础配置 → 费用项目等)。CRM 为三层:CRM管理 → 产品/报价单/合同/客户分组 → 组内叶子;点击分组后右侧 Tab 只含该组可见叶子。
|
||||
|
||||
## 已确认决策
|
||||
|
||||
| 项 | 决策 |
|
||||
|----|------|
|
||||
| 覆盖范围 | 整站业务菜单,不是只做报销 |
|
||||
| Tab 形态 | **整组固定 Tab**:不能单个关闭;换组整组替换 |
|
||||
| 刷新 | 以 URL 为准,停在当前叶子或隐藏页 |
|
||||
| 加载 | 默认只挂载当前路由页;点过的同组叶子 `keep-alive`;换组清空缓存 |
|
||||
| 一级下全是叶子 | 一级当作最后一层非叶子;Tab 只含有权限且未隐藏的叶子 |
|
||||
| 隐藏页(`isHide`) | 不进 Tab 条;内容区切到该页;**父叶子 Tab 保持选中** |
|
||||
| 未保存拦截 | 不做;与现有点侧栏换页一致 |
|
||||
| 实现路径 | **方案 1**:布局层组 Tab 条 + 现有单 `router-view` + `keep-alive`。不打开、不改造 WorkTab 打开记录 |
|
||||
| 单叶子组 | 不显示组 Tab 条,直接展示该叶子页 |
|
||||
| 中间目录 | 只展开/收起,不改右侧组 |
|
||||
|
||||
## 信息架构
|
||||
|
||||
```
|
||||
侧栏(非叶子) 内容区
|
||||
┌─────────────────┐ ┌──────────────────────────────────┐
|
||||
│ 报销管理 │ 展开 │ Tab: 费用项目 | 工作流(备用金) | … │
|
||||
│ 基础配置 ● │ ──点击──► │ (仅当前/已访问叶子真正挂载) │
|
||||
│ 备用金 │ │ 页面:费用项目管理 │
|
||||
│ 报销 │ └──────────────────────────────────┘
|
||||
│ CRM管理 │ 展开 │ │
|
||||
│ 产品管理 ● │ ──点击──► (无 Tab,直接产品管理页) │
|
||||
│ 报价单管理 ● │ ──点击──► Tab: 报价单管理 | 报价单审批 │
|
||||
│ 合同管理 ● │ ──点击──► Tab: 合同管理 | 合同审批 | 调价函管理 │
|
||||
│ 客户管理 ● │ ──点击──► (无 Tab,直接客户管理页) │
|
||||
└─────────────────┘
|
||||
```
|
||||
|
||||
### 可见菜单
|
||||
|
||||
参与侧栏和组 Tab 计算的节点必须同时满足:
|
||||
|
||||
- 当前用户有权限;
|
||||
- `meta.isHide` 不为 true;
|
||||
- 非登录/403/404/门户首页等无业务组页面。
|
||||
|
||||
### 非叶子 / 最后一层非叶子
|
||||
|
||||
在**过滤后的树**上:
|
||||
|
||||
- **非叶子**:至少有一个可见子节点。
|
||||
- **最后一层非叶子**:可见子节点里**没有目录**(子节点都是叶子),或为「混合节点」(见下)。
|
||||
- **中间非叶子**:可见子节点里**至少还有一个非叶子**。点击只展开树,不 `push` 叶子、不换组。
|
||||
|
||||
### 混合节点
|
||||
|
||||
可见子节点里**既有目录又有叶子**时:该节点标题点击打开**其直接叶子**组成的 Tab 组;展开箭头只负责展开/收起子目录。子目录仍留在侧栏,可再点进各自的组。否则这些叶子无法从侧栏进入。
|
||||
|
||||
### 当前组
|
||||
|
||||
由当前路由向上找最近的「会打开 Tab 的节点」(最后一层非叶子或混合节点)。该节点的**直接可见叶子**= Tab 全集,顺序与菜单 `order` 一致。
|
||||
|
||||
隐藏页不进入全集。隐藏页通过 `meta.activePath`(没有则用 path 最长前缀匹配组内叶子)归属到某一个叶子,该叶子高亮。
|
||||
|
||||
首页、登录、错误页、无匹配组:不渲染组 Tab。
|
||||
|
||||
## 交互
|
||||
|
||||
1. 点击最后一层非叶子 / 混合节点:若当前路由已属于该组(含其隐藏页),不打断 URL;否则 `router.push` 该组**第一个可见叶子**。
|
||||
2. 点击组内 Tab:`router.push` 该叶子 path。已是当前叶子则不重复导航。
|
||||
3. 换组:Tab 条换成新组;上一组 `keep-alive` 清空。
|
||||
4. 进入隐藏页:Tab 条不变;父叶子高亮;内容为隐藏页。返回/提交成功仍由页面自己 `push` 回列表。
|
||||
5. 从隐藏页点另一个叶子 Tab:直接切走,无确认框。
|
||||
6. 浏览器刷新 / 书签:按 URL 恢复页面;侧栏展开到对应组并选中;画出整组 Tab;**只挂载 URL 这一页**(不必先经过组内第一个叶子)。
|
||||
7. 直达无权限 URL:现有 403/跳转;不生成假 Tab。
|
||||
|
||||
## 加载与缓存
|
||||
|
||||
当前 `ArtPageContent` 仅在 `meta.keepAlive === true` 时缓存,且 `showWorkTab === false` 时 `keepAliveMax` 为 1。组 Tab 需要覆盖这一策略:
|
||||
|
||||
| 场景 | 行为 |
|
||||
|------|------|
|
||||
| 首次进入组 | 只创建当前路由组件 |
|
||||
| 同组点过的可见叶子 | 纳入 `keep-alive` `include`(**不要求**页面 `meta.keepAlive`) |
|
||||
| 换组 | 清空本组 include,卸载上一组叶子 |
|
||||
| 隐藏页 | 默认不纳入组 include;若该页自身 `keepAlive: true`(如用户详情)则仍按其 meta |
|
||||
| 上限 | `keepAliveMax` ≥ 当前组可见叶子数(本组同时缓存的叶子不超过组大小) |
|
||||
|
||||
组 Tab 的缓存与 WorkTab 的 `opened` 列表无关。`showWorkTab` 保持默认 false。
|
||||
|
||||
## 视觉
|
||||
|
||||
- 组 Tab 在内容区顶部:顶栏/面包屑之下、业务页之上。
|
||||
- Fresh Mint:对齐案例仓储「库存信息表」`.subnav`——白底描边圆角轨道(10px)+ 内嵌 8px 圆角项;选中为 `--primary-bg` 填充与 `--primary-dark` 字色;无关闭图标。不得使用案例 `#167c4a`。
|
||||
- 侧栏宽度、一级竖 Tab、树区规则仍遵循 `docs/web-admin-ui-spec-fresh-mint.md` §3;本能力只改树节点过滤与内容区 Tab。
|
||||
- 规范文档与 OpenSpec `ui-conventions` 实现时同步补「侧栏非叶子 + 组 Tab」,避免与「默认不展示 WorkTab」条文冲突:组 Tab **不是** WorkTab。
|
||||
|
||||
## 架构(方案 1)
|
||||
|
||||
```
|
||||
菜单树 + 当前 route
|
||||
│
|
||||
▼
|
||||
resolveLeafGroup(route, menu) → { groupId, groupNode, leaves[], activeLeafId }
|
||||
│
|
||||
├─► Sidebar:只渲染非叶子;高亮 groupNode
|
||||
└─► GroupLeafTabs:渲染 leaves[];点击 push
|
||||
│
|
||||
▼
|
||||
ArtPageContent
|
||||
KeepAlive include = 当前组已访问叶子组件名
|
||||
RouterView 仍只挂当前匹配页
|
||||
```
|
||||
|
||||
### 建议落点(实现时可微调路径,职责不变)
|
||||
|
||||
| 单元 | 职责 |
|
||||
|------|------|
|
||||
| `utils/router/leaf-group.ts`(名称可调整) | 纯函数:判非叶子、解析当前组、隐藏页归属、第一片叶子 path |
|
||||
| 侧栏(`art-sidebar-menu` / 双列子树 / PORTAL 子导航) | 过滤叶子;最后一层/混合节点点击走「进组」而不是进单个叶子 |
|
||||
| `GroupLeafTabs` 组件 | 固定 Tab 条,无关闭 |
|
||||
| `ArtPageContent` | 挂 Tab 条;按组维护 keep-alive include / max |
|
||||
| 隐藏路由 `meta.activePath` | 补齐常用表单/详情,避免高亮丢失 |
|
||||
| UI 规范 + OpenSpec | 记录交互,明确组 Tab ≠ WorkTab |
|
||||
|
||||
不改业务列表内部 CRUD;不改后端 `sys_menu` 结构(除非实现时发现个别 `activePath` 必须写在路由 meta,前端即可)。
|
||||
|
||||
## 错误与边界
|
||||
|
||||
- 组内可见叶子数为 0:不画 Tab,走现有空菜单/无权限。
|
||||
- 门户首页、全屏页(`isFullPage`):无组 Tab。
|
||||
- 混合节点:Tab 仅含**该节点直接叶子**,不含孙节点。
|
||||
- 角标:若叶子在侧栏被拿掉,原叶子角标改挂到其所属最后一层非叶子(或 Tab 项上)。实现时与现有 `menu-badge` 对齐,避免角标消失。
|
||||
|
||||
## 验收
|
||||
|
||||
1. 报销 → 基础配置:三个 Tab,只加载第一个;点第二个才出页面;再点备用金,上一组卸载,换成申请/审批/发放。
|
||||
2. 刷新停在当前叶子或隐藏表单 URL;Tab 条仍是该组;父叶子高亮。
|
||||
3. CRM:点一级只出现有权限且未隐藏的叶子;进报价表单时「报价单管理」仍高亮;返回列表不丢组。
|
||||
4. 无权限叶子不出现;直达无权限 URL 仍 403。
|
||||
5. 同组来回切换已访问叶子不重复打首屏列表请求(网络面板可核对);换组后旧页请求不再因缓存而显示。
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不恢复可关闭、可积压的 WorkTab 历史页签。
|
||||
- 不做全局表单脏检查。
|
||||
- 不把隐藏页(表单/详情)做成弹窗。
|
||||
- 不强制给 CRM/系统管理补二级目录(一级可当最后一层)。
|
||||
- 不改小程序导航。
|
||||
@@ -78,7 +78,7 @@ page-head → panel → filter-block → list-toolbar → list-table → paginat
|
||||
```
|
||||
|
||||
**标准写法要点**:
|
||||
- 工具栏:「已选 N 项」→ 唯一 `type="primary"` 新增 → 批量删除
|
||||
- 工具栏:「已选 N 项」→ 唯一 `type="primary"` 新增 → `ListToolbarOverflow`(次要操作)→ EndActions;溢出顺序见列表工具栏溢出设计文档
|
||||
- 表格:`list-table` + `stripe` + `row-key="id"` + 双击查看
|
||||
- 弹窗:`label-position="top"`、`form-grid-2`、Close/Check 底栏
|
||||
- 状态列:`<el-tag size="small">` + `status-tag-registry`
|
||||
|
||||
@@ -88,11 +88,13 @@
|
||||
|
||||
### 3.0 默认壳层(web-admin 运行时)
|
||||
|
||||
- **默认布局**:左侧树菜单(`MenuTypeEnum.LEFT`),不再默认门户顶栏。
|
||||
- **左侧**:Logo + 系统名称 + 树形菜单;菜单数字角标为红底白字圆角(`#dc2626`)。
|
||||
- **右侧自上而下**:顶栏(面包屑/工具,高约 56px)→ 多页签 WorkTab → 内容区。
|
||||
- **侧栏宽度**:约 `220px`(与本节 `.sidebar` 宽度一致)。
|
||||
- **门户布局(PORTAL)**:保留为可选;设置面板可切换;业务页内容规范不变。
|
||||
- **默认布局**:单列树形侧栏(`MenuTypeEnum.LEFT`)。**没有**独立的一级纵向 Tab 栏。
|
||||
- **侧栏顶部品牌**:Logo + 系统名称(侧栏顶部)。
|
||||
- **树形区**:一整棵业务菜单树,**只展示非叶子**(一级如「报销管理」「CRM管理」作为可展开目录;最后一层非叶子如「基础配置」可点击打开右侧组 Tab)。叶子不在侧栏展示。数字角标挂在组节点上(汇总可见叶子)。
|
||||
- **内容区自上而下**:顶栏(面包屑/工具,高约 56px)→ **组叶子 Tab 条**(该组可见叶子多于 1 个时)→ 页面内容。单叶子组(如 CRM 产品管理、客户管理)不渲染 Tab 条。
|
||||
- **仍默认不展示 WorkTab**(可关闭的历史页签)。组 Tab **不是** WorkTab:不能单个关闭;换最后一层非叶子则整组替换;默认只加载当前叶子,点哪个 Tab 再加载哪个页。
|
||||
- **树区宽度**:约 `260px`。
|
||||
- **门户(PORTAL)/ 双列(DUAL_MENU)**:不再作为产品默认壳层。
|
||||
- **色调**:Fresh Mint(`--primary #10b981` 链);不得使用案例 HTML 的 `#167c4a` 作为主色。
|
||||
|
||||
### 3.1 根布局 `.layout`
|
||||
@@ -344,6 +346,7 @@
|
||||
- **已选与操作按钮同一行**:**「已选 N 项」**(或 **`.list-toolbar-selected`**)与 **新增 / 批量 / 导入导出** 等按钮 **从左起顺序排列**,紧跟在选中摘要之后;**禁止** 使用 **`justify-content: space-between`** 将按钮区整体推到行末(与区域管理等页一致)。
|
||||
- **区域管理对齐点(强约束)**:如 `#/system/region` 的列表工具栏,**「已选 N 项」计数必须出现在最前**,其后紧跟 **「新增区域」**(主按钮)等操作按钮,形成「计数 → 动作」的扫描节奏;不要把新增按钮单独放到右侧或另起一行(对齐 `fresh-mint-green.html` 的列表工具栏信息层级)。
|
||||
- **工具栏按钮色彩规则(强约束)**:列表工具栏从左到右的按钮中,**仅第一个主行动作**使用主色实心(`btn-main` / `type="primary"`)。其余如 **批量删除 / 导入导出 / 下载模板 / 批量导入** 等,统一使用 **中性描边按钮**(`btn-ghost` / default),避免出现同一行多颗绿色主按钮(与设计图一致)。
|
||||
- **次要操作溢出收纳**:次要操作(编辑/删除/导出/清空列过滤等)使用 **`ListToolbarOverflow`**;布局为「主操作 → Overflow → EndActions」。溢出池内编辑/删除靠前,导出与清空列过滤靠后(清空列过滤最末)。顺序与工厂约定见 `docs/superpowers/specs/2026-10-02-list-toolbar-overflow-design.md`。
|
||||
- **列表操作列全局规则(强约束)**:所有列表的“操作”列需 **固定在右侧**(`fixed="right"`)并预留足够宽度(建议 `min-width >= 260px`,按按钮数量增大),保证同一行操作按钮可完整展示,禁止因列宽不足出现按钮被裁切或省略。
|
||||
- **`.list-toolbar-selected`**:`font-size: 12px`,`font-weight: 600`,`color: var(--text-muted)`,`padding: 0 10px 0 0`,`margin-right: 4px`,**右边框** `1px solid var(--border)`,`line-height`/`min-height` **36px**,`inline-flex` 居中
|
||||
- **`.sel-num`**:`color: var(--primary-dark)`,`font-weight: 700`,`margin: 0 2px`
|
||||
|
||||
Reference in new issue
Block a user