style(web): 移除顶栏 AI 快捷操作区并优化差旅领导意见事件样式

- TopBar 移除 AI 模式下的公司切换/AI 模式切换快捷操作块及 showAiModeUtilityActions 计算属性,清理 top-bar.css 对应样式
- TravelRequestDetailView 领导意见事件重构为状态/意见/审批人结构化布局,travel-request-detail-view.css 补充对应样式
- 同步更新 topbar-ai-mode-switch、ai-sidebar-rail-mode、travel-request-detail-leader-approval 测试
This commit is contained in:
caoxiaozhu
2026-06-21 22:56:34 +08:00
parent 24b5b71b0f
commit 1986b0d945
7 changed files with 129 additions and 57 deletions

View File

@@ -22,18 +22,23 @@ test('workbench topbar places the colorful AI mode button after the company swit
assert.doesNotMatch(topbar, /const topbarWorkbenchMode = ref/)
assert.match(topbar, /const isTopbarAiMode = computed\(\(\) => props\.workbenchMode === 'ai'\)/)
assert.match(topbar, /const topbarWorkbenchModeTitle = computed/)
assert.match(topbar, /const showAiModeUtilityActions = computed\(\(\) => isTopbarAiMode\.value && !isWorkbench\.value\)/)
assert.match(topbar, /<div v-if="showAiModeUtilityActions" class="topbar-utility-actions"/)
assert.match(topbar, /function toggleTopbarWorkbenchMode\(\)/)
assert.match(topbar, /emit\('toggleWorkbenchMode'\)/)
})
test('AI mode business pages do not append company or AI buttons to the right side', () => {
assert.equal((topbar.match(/class="company-switcher"/g) || []).length, 1)
assert.equal((topbar.match(/class="topbar-ai-mode-toggle"/g) || []).length, 1)
assert.doesNotMatch(topbar, /showAiModeUtilityActions/)
assert.doesNotMatch(topbar, /class="topbar-utility-actions"/)
})
test('topbar AI mode button keeps a circular colorful text treatment', () => {
assert.match(topbarStyles, /\.topbar-ai-mode-toggle\s*\{[\s\S]*width:\s*38px;[\s\S]*height:\s*38px;[\s\S]*border-radius:\s*50%;/)
assert.match(topbarStyles, /\.topbar-ai-mode-toggle\s*\{[\s\S]*conic-gradient\(from 210deg,[\s\S]*border-box;/)
assert.match(topbarStyles, /\.topbar-ai-mode-toggle__glyph\s*\{[\s\S]*linear-gradient\(135deg,[\s\S]*background-clip:\s*text;[\s\S]*letter-spacing:\s*0;/)
assert.match(topbarStyles, /\.topbar-ai-mode-toggle:hover,[\s\S]*\.topbar-ai-mode-toggle:focus-visible\s*\{[\s\S]*transform:\s*translateY\(-1px\);/)
assert.match(topbarStyles, /\.topbar-utility-actions\s*\{[\s\S]*display:\s*inline-flex;[\s\S]*justify-content:\s*flex-end;/)
assert.doesNotMatch(topbarStyles, /\.topbar-utility-actions/)
assert.match(topbarStyles, /@media \(max-width: 960px\)[\s\S]*\.topbar-ai-mode-toggle\s*\{[\s\S]*width:\s*34px;[\s\S]*height:\s*34px;/)
assert.match(topbarStyles, /@media \(max-width: 640px\)[\s\S]*\.topbar-ai-mode-toggle\s*\{[\s\S]*flex:\s*0 0 34px;/)
})