feat: 更新财务系统界面和功能优化

- 替换系统管理和入账管理的图标为更合适的样式
- 优化登录请求的格式和错误处理
- 从localStorage读取用户信息初始化用户状态
- 简化仪表盘路由配置,移除多语言支持
- 调整工作台头部组件,移除不必要的统计信息
- 清理工作台页面,仅保留欢迎信息
This commit is contained in:
2026-01-12 15:03:12 +08:00
parent 963e2a8d39
commit 77c1b37f2e
8 changed files with 249 additions and 242 deletions

View File

@@ -27,17 +27,20 @@ withDefaults(defineProps<Props>(), {
<slot name="description"></slot>
</span>
</div>
<div class="mt-4 flex flex-1 justify-end md:mt-0">
<div class="flex flex-col justify-center text-right">
<div
v-if="$slots.todo || $slots.project || $slots.team"
class="mt-4 flex flex-1 justify-end md:mt-0"
>
<div v-if="$slots.todo" class="flex flex-col justify-center text-right">
<span class="text-foreground/80"> 待办 </span>
<span class="text-2xl">2/10</span>
</div>
<div class="mx-12 flex flex-col justify-center text-right md:mx-16">
<div v-if="$slots.project" class="mx-12 flex flex-col justify-center text-right md:mx-16">
<span class="text-foreground/80"> 项目 </span>
<span class="text-2xl">8</span>
</div>
<div class="mr-4 flex flex-col justify-center text-right md:mr-10">
<div v-if="$slots.team" class="mr-4 flex flex-col justify-center text-right md:mr-10">
<span class="text-foreground/80"> 团队 </span>
<span class="text-2xl">300</span>
</div>

View File

@@ -31,10 +31,18 @@ export const useUserStore = defineStore('core-user', {
this.userRoles = roles;
},
},
state: (): AccessState => ({
userInfo: null,
userRoles: '',
}),
state: (): AccessState => {
// 从localStorage中读取用户信息
const storedUserInfo = localStorage.getItem('userInfo');
const userInfo = storedUserInfo ? JSON.parse(storedUserInfo) : null;
// 从用户信息中提取角色
const roles = userInfo?.role ?? '';
return {
userInfo,
userRoles: roles,
};
},
});
// 解决热更新问题