feat(web): update components

- PersonalWorkbench.vue: update personal workbench component
- SidebarRail.vue: update sidebar rail component
- TopBar.vue: update top bar component
- ConfirmDialog.vue: update confirm dialog component
This commit is contained in:
caoxiaozhu
2026-05-13 13:12:28 +00:00
parent 97b0851e26
commit eec4efe207
4 changed files with 129 additions and 135 deletions

View File

@@ -75,7 +75,7 @@ const sidebarMeta = {
workbench: { label: '个人工作台' },
requests: { label: '个人报销' },
approval: { label: '审批中心', badge: '12' },
chat: { label: 'AI 助手' },
chat: { label: '财务知识问答' },
policies: { label: '知识管理' },
audit: { label: '任务规则中心' },
employees: { label: '员工管理' },

View File

@@ -7,17 +7,17 @@
</div>
<div class="top-actions">
<template v-if="isChat">
<div class="kpi-chips">
<div v-for="kpi in chatKpis" :key="kpi.label" class="kpi-chip" :style="{ '--chip-color': kpi.color }">
<span class="chip-value">{{ kpi.value }}<small>{{ kpi.unit }}</small></span>
<span class="chip-label">{{ kpi.label }}</span>
<span class="chip-delta" :class="kpi.trend">{{ kpi.meta }}</span>
</div>
</div>
</template>
<template v-else-if="isOverview">
<template v-if="isChat">
<div class="kpi-chips">
<div v-for="kpi in chatKpis" :key="kpi.label" class="kpi-chip" :style="{ '--chip-color': kpi.color }">
<span class="chip-value">{{ kpi.value }}<small>{{ kpi.unit }}</small></span>
<span class="chip-label">{{ kpi.label }}</span>
<span class="chip-delta" :class="kpi.trend">{{ kpi.meta }}</span>
</div>
</div>
</template>
<template v-else-if="isOverview">
<div class="range-combo" aria-label="首页时间范围">
<div class="range-shell">
<span class="range-meta">
@@ -158,17 +158,17 @@ const props = defineProps({
}
})
const emit = defineEmits([
'update:search',
'update:activeRange',
'update:customRange',
'batchApprove',
'openChat',
'newApplication'
])
const isChat = computed(() => props.activeView === 'chat')
const isOverview = computed(() => props.activeView === 'overview')
const emit = defineEmits([
'update:search',
'update:activeRange',
'update:customRange',
'batchApprove',
'openChat',
'newApplication'
])
const isChat = computed(() => props.activeView === 'chat')
const isOverview = computed(() => props.activeView === 'overview')
const isRequests = computed(() => props.activeView === 'requests')
const isApproval = computed(() => props.activeView === 'approval')
const isPolicies = computed(() => props.activeView === 'policies')
@@ -614,10 +614,10 @@ function formatRangeLabel(start, end) {
min-width: 0;
}
.create-top-btn {
height: 40px;
display: inline-flex;
align-items: center;
.create-top-btn {
height: 40px;
display: inline-flex;
align-items: center;
gap: 8px;
padding: 0 18px;
border: 0;
@@ -630,11 +630,11 @@ function formatRangeLabel(start, end) {
white-space: nowrap;
}
.create-top-btn:hover {
background: #047857;
}
@media (max-width: 1120px) {
.create-top-btn:hover {
background: #047857;
}
@media (max-width: 1120px) {
.range-combo {
width: 100%;
justify-content: flex-end;