feat: add settings page with navigation and access control updates
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<path d="M9 7.6c-3 3.5-4 7.3-2.9 11.2 1.2 4.2 4.6 7 10.1 8.5-2 1.8-4.6 2.6-7.6 2.3C5.1 26.7 3.5 23.1 3.7 19 4 14.4 5.7 10.6 9 7.6Z" />
|
||||
</svg>
|
||||
</div>
|
||||
<strong class="brand-name">星海科技</strong>
|
||||
<strong class="brand-name">{{ displayCompanyName }}</strong>
|
||||
<button class="brand-toggle" type="button" aria-label="打开 AI 助手" @click="emit('openChat')">
|
||||
<i class="mdi mdi-chevron-double-left"></i>
|
||||
</button>
|
||||
@@ -54,11 +54,15 @@ import { computed } from 'vue'
|
||||
const props = defineProps({
|
||||
navItems: { type: Array, required: true },
|
||||
activeView: { type: String, required: true },
|
||||
companyName: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
currentUser: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
name: '系统管理员',
|
||||
role: '财务管理员',
|
||||
role: '管理员',
|
||||
avatar: '管'
|
||||
})
|
||||
}
|
||||
@@ -73,8 +77,9 @@ const sidebarMeta = {
|
||||
approval: { label: '审批中心', badge: '12' },
|
||||
chat: { label: 'AI 助手' },
|
||||
policies: { label: '知识管理' },
|
||||
audit: { label: '技能中心' },
|
||||
employees: { label: '员工管理' }
|
||||
audit: { label: '审计追踪' },
|
||||
employees: { label: '员工管理' },
|
||||
settings: { label: '系统设置' }
|
||||
}
|
||||
|
||||
const decoratedNavItems = computed(() =>
|
||||
@@ -87,9 +92,11 @@ const decoratedNavItems = computed(() =>
|
||||
|
||||
const displayUser = computed(() => ({
|
||||
name: props.currentUser?.name || '系统管理员',
|
||||
role: props.currentUser?.role || '财务管理员',
|
||||
role: props.currentUser?.role || '管理员',
|
||||
avatar: props.currentUser?.avatar || '管'
|
||||
}))
|
||||
|
||||
const displayCompanyName = computed(() => props.companyName || 'X-Financial')
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -334,7 +341,7 @@ const displayUser = computed(() => ({
|
||||
border-radius: 12px;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
box-shadow:
|
||||
0 16px 32px rgba(15, 23, 42, 0.10),
|
||||
0 16px 32px rgba(15, 23, 42, 0.1),
|
||||
0 2px 8px rgba(15, 23, 42, 0.04);
|
||||
opacity: 0;
|
||||
transform: translateY(8px);
|
||||
|
||||
Reference in New Issue
Block a user