feat: ai生成病例编辑

This commit is contained in:
王天骄
2026-06-15 17:28:35 +08:00
parent 3c2eb0a517
commit 9deadf2083
11 changed files with 1353 additions and 135 deletions
+21 -9
View File
@@ -2,11 +2,16 @@
<div class="admin-shell" :class="{ collapsed: appStore.collapsed, dark: appStore.darkMode }">
<aside class="sidebar">
<div class="sidebar-header">
<div class="brand-mark">M</div>
<div class="brand-copy">
<strong>MediAI</strong>
<span>医疗AI平台</span>
<div class="brand-mark">
<img :src="logoUrl" alt="新方正集团" />
</div>
<div class="brand-copy">
<strong>新方正集团</strong>
<span>管理系统</span>
</div>
<el-tooltip :content="sidebarToggleTip" placement="right">
<el-button class="sidebar-toggle" :icon="sidebarToggleIcon" circle @click="toggleSidebar" />
</el-tooltip>
</div>
<el-scrollbar class="sidebar-scroll">
@@ -18,7 +23,7 @@
<el-icon><component :is="item.icon" /></el-icon>
<span>{{ item.title }}</span>
</span>
<router-link v-else :to="getPagePath(item.page)" class="nav-item">
<router-link v-else :to="getPagePath(item.page)" class="nav-item" :title="item.title">
<el-icon><component :is="item.icon" /></el-icon>
<span>{{ item.title }}</span>
</router-link>
@@ -41,10 +46,10 @@
<section class="main-panel">
<header class="top-header">
<div class="header-left">
<el-tooltip content="折叠菜单" placement="bottom">
<el-button :icon="Fold" circle @click="appStore.collapsed = !appStore.collapsed" />
<el-tooltip :content="sidebarToggleTip" placement="bottom">
<el-button :icon="sidebarToggleIcon" circle @click="toggleSidebar" />
</el-tooltip>
<el-breadcrumb separator="/">
<el-breadcrumb v-if="!appStore.collapsed" separator="/">
<el-breadcrumb-item>首页</el-breadcrumb-item>
<el-breadcrumb-item>{{ pageTitle }}</el-breadcrumb-item>
</el-breadcrumb>
@@ -85,7 +90,8 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { ArrowDown, Bell, Fold, Moon, QuestionFilled, Search, Sunny } from '@element-plus/icons-vue'
import { ArrowDown, Bell, Expand, Fold, Moon, QuestionFilled, Search, Sunny } from '@element-plus/icons-vue'
import logoUrl from '@/assets/images/logo.png'
import { getPagePath, pageTitles, roleMenus } from '@/mock/navigation'
import { useAppStore } from '@/stores/app'
@@ -95,6 +101,8 @@ const appStore = useAppStore()
const keyword = ref('')
const visibleSections = computed(() => roleMenus[appStore.user.role])
const sidebarToggleIcon = computed(() => (appStore.collapsed ? Expand : Fold))
const sidebarToggleTip = computed(() => (appStore.collapsed ? '展开菜单' : '收起菜单'))
const pageTitle = computed(() => {
const page = route.params.page
if (typeof page === 'string') {
@@ -103,6 +111,10 @@ const pageTitle = computed(() => {
return String(route.meta.title || '数据驾驶舱')
})
function toggleSidebar() {
appStore.collapsed = !appStore.collapsed
}
function handleCommand(command: string) {
if (command === 'logout') {
appStore.logout()