feat: suffix panel field-verified fixes — real upload e2e, collapse handles, precise spacing
- real headless upload verified end to end (CDP file injection → chip → server file → scoped download), closing the text-presence-only gap - group header gains 插入后缀 entry (empty groups no longer dead-end) - suffix directory panel gets its own collapse handle + persisted state; panel fills viewport height with independent scrollbars for directory and workspace (bulk-seeded 40 dirs/30 suffixes verified scrolling) - fold handles centered to viewport (fixed positioning); sidebar-to-panel gap fixed to 5px (content margin-left 0 + max-width none on suffix view) - logout button 5px from sidebar edge (footer margin compensation) - integration test cleanups scoped to self-created rows only, so shared dev-logins survive full test runs; suite now targets dedicated license_platform_test database
This commit is contained in:
@@ -24,11 +24,11 @@
|
|||||||
/* 全局侧栏折叠(决策:授权管理平台可收起隐藏) */
|
/* 全局侧栏折叠(决策:授权管理平台可收起隐藏) */
|
||||||
.admin-workspace{position:relative}
|
.admin-workspace{position:relative}
|
||||||
.admin-workspace.nav-collapsed .sidebar{width:0;flex-basis:0;padding:0;overflow:hidden;border-right:0}
|
.admin-workspace.nav-collapsed .sidebar{width:0;flex-basis:0;padding:0;overflow:hidden;border-right:0}
|
||||||
.nav-fold{position:absolute;left:242px;top:50%;transform:translateY(-50%);z-index:40;width:20px;height:56px;border:1px solid #d8dfe8;border-left:0;border-radius:0 6px 6px 0;background:#fff;color:#526173;cursor:pointer;display:grid;place-items:center;font-size:13px}
|
.nav-fold{position:fixed;left:242px;top:50%;transform:translateY(-50%);z-index:40;width:20px;height:56px;border:1px solid #d8dfe8;border-left:0;border-radius:0 6px 6px 0;background:#fff;color:#526173;cursor:pointer;display:grid;place-items:center;font-size:13px}
|
||||||
.nav-fold:hover{color:#1769e0;border-color:#1769e0}
|
.nav-fold:hover{color:#1769e0;border-color:#1769e0}
|
||||||
.admin-workspace.nav-collapsed .nav-fold{left:0;border-radius:0 6px 6px 0}
|
.admin-workspace.nav-collapsed .nav-fold{left:0;border-radius:0 6px 6px 0}
|
||||||
.admin-workspace .sidebar-footer{display:flex;align-items:center;gap:8px}
|
.admin-workspace .sidebar-footer{display:flex;align-items:center;gap:8px;padding-right:0;margin-right:-9px}
|
||||||
.footer-email{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
.footer-email{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||||
.side-logout{margin-left:auto;margin-right:5px;border:0;background:none;cursor:pointer;color:#96a5b6;font-size:12px;padding:2px 4px;flex:0 0 auto}
|
.side-logout{margin-left:auto;border:0;background:none;cursor:pointer;color:#96a5b6;font-size:12px;padding:2px 4px;flex:0 0 auto}
|
||||||
.side-logout:hover{color:#fff}
|
.side-logout:hover{color:#fff}
|
||||||
.content.content-suffix{padding-left:5px;padding-top:16px}
|
.content.content-suffix{margin-left:0;max-width:none;padding-left:5px;padding-top:16px;padding-right:16px}
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ const overviewLoading = ref(false)
|
|||||||
|
|
||||||
// 增加列弹框(列名 + 值设置复选框)
|
// 增加列弹框(列名 + 值设置复选框)
|
||||||
const colDialog = reactive({ visible: false, name: '', isValue: false, saving: false })
|
const colDialog = reactive({ visible: false, name: '', isValue: false, saving: false })
|
||||||
|
const dirCollapsed = ref(localStorage.getItem('suffixDirCollapsed') === '1')
|
||||||
|
function toggleDirFold() { dirCollapsed.value = !dirCollapsed.value; try { localStorage.setItem('suffixDirCollapsed', dirCollapsed.value ? '1' : '0') } catch {} }
|
||||||
// 单元格编辑
|
// 单元格编辑
|
||||||
const editing = reactive({ sid: 0, cid: 0, text: '', a: '', v: '' })
|
const editing = reactive({ sid: 0, cid: 0, text: '', a: '', v: '' })
|
||||||
// 行编辑态(视觉高亮,格子弹出编辑不受它限制)
|
// 行编辑态(视觉高亮,格子弹出编辑不受它限制)
|
||||||
@@ -207,6 +209,17 @@ async function removeGroup(g: { id:number; name:string }) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function insertSuffixTop(groupId: number) {
|
||||||
|
try {
|
||||||
|
const created = (await createSuffix(groupId, 0)).data.data
|
||||||
|
renamingSuffix.value = created.id
|
||||||
|
renamingSuffixName.value = ''
|
||||||
|
await loadOverview()
|
||||||
|
} catch (e) {
|
||||||
|
ElMessage.error(e instanceof Error ? e.message : '插入失败')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function insertSuffixAfter(groupId: number, afterId: number) {
|
async function insertSuffixAfter(groupId: number, afterId: number) {
|
||||||
try {
|
try {
|
||||||
const created = (await createSuffix(groupId, afterId)).data.data
|
const created = (await createSuffix(groupId, afterId)).data.data
|
||||||
@@ -491,7 +504,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="suffix-shell">
|
<div class="suffix-shell">
|
||||||
<aside class="suffix-side">
|
<aside v-show="!dirCollapsed" class="suffix-side">
|
||||||
<div class="side-root" :class="{ active: selected.kind === 'basic' }" @click="selectNode({ kind: 'basic' })">基本设置</div>
|
<div class="side-root" :class="{ active: selected.kind === 'basic' }" @click="selectNode({ kind: 'basic' })">基本设置</div>
|
||||||
<div class="side-sep"></div>
|
<div class="side-sep"></div>
|
||||||
<div
|
<div
|
||||||
@@ -520,6 +533,7 @@ onMounted(() => {
|
|||||||
</template>
|
</template>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
|
<div class="dir-fold" :class="{ collapsed: dirCollapsed }" :title="dirCollapsed ? '展开目录' : '收起目录'" @click="toggleDirFold">{{ dirCollapsed ? '›' : '‹' }}</div>
|
||||||
<main class="suffix-main">
|
<main class="suffix-main">
|
||||||
<!-- 基本设置:分组 + 后缀 + 模板 -->
|
<!-- 基本设置:分组 + 后缀 + 模板 -->
|
||||||
<template v-if="selected.kind === 'basic'">
|
<template v-if="selected.kind === 'basic'">
|
||||||
@@ -536,6 +550,7 @@ onMounted(() => {
|
|||||||
<strong class="g-name" title="双击重命名" @dblclick="renameGroup(g.id, g.name)">{{ g.name }}</strong>
|
<strong class="g-name" title="双击重命名" @dblclick="renameGroup(g.id, g.name)">{{ g.name }}</strong>
|
||||||
<span class="muted">{{ g.suffixes.length }} 个</span>
|
<span class="muted">{{ g.suffixes.length }} 个</span>
|
||||||
<span class="grow"></span>
|
<span class="grow"></span>
|
||||||
|
<button type="button" class="op" title="在这个分组最前面插入一个后缀" @click="insertSuffixTop(g.id)">插入后缀</button>
|
||||||
<button type="button" class="op" title="上移" @click="moveGroup(g.id, -1)">↑</button>
|
<button type="button" class="op" title="上移" @click="moveGroup(g.id, -1)">↑</button>
|
||||||
<button type="button" class="op" title="下移" @click="moveGroup(g.id, 1)">↓</button>
|
<button type="button" class="op" title="下移" @click="moveGroup(g.id, 1)">↓</button>
|
||||||
<button type="button" class="op danger" title="删除分组" @click="removeGroup(g)">×</button>
|
<button type="button" class="op danger" title="删除分组" @click="removeGroup(g)">×</button>
|
||||||
@@ -571,7 +586,7 @@ onMounted(() => {
|
|||||||
<button type="button" class="op danger" title="删除后缀" @click="removeSuffix(s)">×</button>
|
<button type="button" class="op danger" title="删除后缀" @click="removeSuffix(s)">×</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!g.suffixes.length" class="suffix-row empty-row"><span class="c-idx">—</span><span class="muted">这个分组还没有后缀</span></div>
|
<div v-if="!g.suffixes.length" class="suffix-row empty-row"><span class="c-idx">—</span><span class="muted">这个分组还没有后缀,</span><button type="button" class="op" @click="insertSuffixTop(g.id)">插入后缀</button></div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!groups.length" class="empty-tip">还没有分组,点右上角「+ 新建分组」开始。</div>
|
<div v-if="!groups.length" class="empty-tip">还没有分组,点右上角「+ 新建分组」开始。</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -698,8 +713,14 @@ onMounted(() => {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.suffix-shell{display:flex;gap:14px;min-height:420px;align-items:stretch}
|
.suffix-shell{display:flex;gap:14px;height:calc(100vh - 104px);align-items:stretch;position:relative;overflow:hidden}
|
||||||
.suffix-side{flex:0 0 280px;max-width:320px;border:1px solid #e5eaf0;border-radius:6px;background:#fbfcfe;padding:10px 8px;overflow:auto;max-height:70vh}
|
.dir-fold{position:fixed;left:527px;top:50%;transform:translateY(-50%);z-index:30;width:18px;height:52px;border:1px solid #d8dfe8;border-left:0;border-radius:0 6px 6px 0;background:#fff;color:#526173;cursor:pointer;display:grid;place-items:center;font-size:12px}
|
||||||
|
.admin-workspace.nav-collapsed .dir-fold{left:285px}
|
||||||
|
.dir-fold.collapsed{left:252px}
|
||||||
|
.admin-workspace.nav-collapsed .dir-fold.collapsed{left:10px}
|
||||||
|
.dir-fold:hover{color:#1769e0;border-color:#1769e0}
|
||||||
|
.dir-fold.collapsed{left:0}
|
||||||
|
.suffix-side{flex:0 0 280px;max-width:320px;border:1px solid #e5eaf0;border-radius:6px;background:#fbfcfe;padding:10px 8px;overflow:auto;height:100%}
|
||||||
.side-root{display:flex;align-items:center;gap:6px;padding:7px 10px;border-radius:5px;cursor:pointer;font-weight:600;font-size:13.5px}
|
.side-root{display:flex;align-items:center;gap:6px;padding:7px 10px;border-radius:5px;cursor:pointer;font-weight:600;font-size:13.5px}
|
||||||
.side-root.active,.side-root:hover{background:#eaf2fd}
|
.side-root.active,.side-root:hover{background:#eaf2fd}
|
||||||
.side-sep{height:1px;background:#e5eaf0;margin:8px 4px}
|
.side-sep{height:1px;background:#e5eaf0;margin:8px 4px}
|
||||||
@@ -716,7 +737,7 @@ onMounted(() => {
|
|||||||
.tw.off{cursor:default;color:#c3ccd8}
|
.tw.off{cursor:default;color:#c3ccd8}
|
||||||
.side-count{margin-left:0;color:#9aa7b6;font-size:11px;flex:0 0 auto}
|
.side-count{margin-left:0;color:#9aa7b6;font-size:11px;flex:0 0 auto}
|
||||||
.side-plus{margin-left:auto;color:#1769e0;cursor:pointer;font-weight:700}
|
.side-plus{margin-left:auto;color:#1769e0;cursor:pointer;font-weight:700}
|
||||||
.suffix-main{flex:1;min-width:0}
|
.suffix-main{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;overflow:hidden}
|
||||||
.bar{display:flex;align-items:center;gap:12px;padding:0 0 10px}
|
.bar{display:flex;align-items:center;gap:12px;padding:0 0 10px}
|
||||||
.bar strong{font-size:15px}
|
.bar strong{font-size:15px}
|
||||||
.bar-note{color:#8a97a8;font-size:12px}
|
.bar-note{color:#8a97a8;font-size:12px}
|
||||||
@@ -734,7 +755,7 @@ onMounted(() => {
|
|||||||
.col-order-add .el-input{flex:1}
|
.col-order-add .el-input{flex:1}
|
||||||
td.cell.locked{cursor:default}
|
td.cell.locked{cursor:default}
|
||||||
.grow{flex:1}
|
.grow{flex:1}
|
||||||
.sheet-wrap{border:1px solid #e5eaf0;border-radius:6px;overflow:auto;max-height:68vh;background:#fff}
|
.sheet-wrap{flex:1;min-height:0;border:1px solid #e5eaf0;border-radius:6px;overflow:auto;background:#fff}
|
||||||
.group-block{border-bottom:1px solid #eef1f5}
|
.group-block{border-bottom:1px solid #eef1f5}
|
||||||
.group-block:last-child{border-bottom:0}
|
.group-block:last-child{border-bottom:0}
|
||||||
.group-head{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#f4f6fa;border-bottom:1px solid #eef1f5}
|
.group-head{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#f4f6fa;border-bottom:1px solid #eef1f5}
|
||||||
|
|||||||
Reference in New Issue
Block a user