feat: 初始化医护端与患者端页面骨架
完成两个 Vite 应用的基础工程化配置、路由、状态管理及第一版业务页面,当前使用演示数据,尚未接入真实后端接口。
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { RouterView, useRoute, useRouter } from 'vue-router'
|
||||
|
||||
import { useAppStore } from '@/stores/app'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const appStore = useAppStore()
|
||||
|
||||
const menuItems = [
|
||||
{ path: '/dashboard', label: '工作台' },
|
||||
{ path: '/consent-tasks', label: '签署任务' },
|
||||
{ path: '/documents', label: '文书库' },
|
||||
{ path: '/reports', label: '统计报表' },
|
||||
{ path: '/settings', label: '系统设置' },
|
||||
]
|
||||
|
||||
const activeMenu = computed(() => route.path)
|
||||
const pageTitle = computed(() => String(route.meta.title ?? '医签通'))
|
||||
|
||||
function handleMenuSelect(path: string) {
|
||||
if (path !== route.path) {
|
||||
void router.push(path)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-container class="clinical-layout">
|
||||
<el-aside width="236px" class="clinical-sidebar">
|
||||
<div class="brand">
|
||||
<div class="brand-mark">签</div>
|
||||
<div>
|
||||
<strong>医签通</strong>
|
||||
<span>medical-sign</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-menu :default-active="activeMenu" class="clinical-menu" @select="handleMenuSelect">
|
||||
<el-menu-item v-for="item in menuItems" :key="item.path" :index="item.path">
|
||||
<span class="menu-dot" />
|
||||
<span>{{ item.label }}</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
|
||||
<div class="sidebar-footer">
|
||||
<span class="status-dot" />
|
||||
<span>演示环境运行中</span>
|
||||
</div>
|
||||
</el-aside>
|
||||
|
||||
<el-container>
|
||||
<el-header class="clinical-header">
|
||||
<div>
|
||||
<p class="header-kicker">电子知情同意管理平台</p>
|
||||
<h1>{{ pageTitle }}</h1>
|
||||
</div>
|
||||
<div class="user-context">
|
||||
<div class="user-avatar">{{ appStore.userName.slice(0, 1) }}</div>
|
||||
<div>
|
||||
<strong>{{ appStore.userName }}</strong>
|
||||
<span>{{ appStore.department }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
|
||||
<el-main class="clinical-main">
|
||||
<RouterView />
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</template>
|
||||
Reference in New Issue
Block a user