feat: 初始化医护端与患者端页面骨架
完成两个 Vite 应用的基础工程化配置、路由、状态管理及第一版业务页面,当前使用演示数据,尚未接入真实后端接口。
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
- 急诊抢救紧急例外;
|
||||
- 签署成功但回传失败。
|
||||
|
||||
## 技术栈规划(不一定全用到)
|
||||
## 当前技术栈
|
||||
|
||||
```text
|
||||
Vue 3
|
||||
@@ -68,15 +68,12 @@ TypeScript
|
||||
Vite
|
||||
Vue Router
|
||||
Pinia
|
||||
TanStack Vue Query
|
||||
Element Plus
|
||||
Axios / OpenAPI Client
|
||||
pdfjs-dist
|
||||
ECharts
|
||||
Vitest
|
||||
Playwright
|
||||
Axios
|
||||
```
|
||||
|
||||
TanStack Vue Query、PDF 预览、报表图表、自动化测试和签字板适配器暂不接入,等真实接口和业务流程稳定后再按需要增加。
|
||||
|
||||
签字板调用应通过独立的 `signature-adapter` 或本地桥接服务封装,业务页面不直接绑定具体厂商 SDK。
|
||||
|
||||
## 非目标
|
||||
@@ -87,4 +84,4 @@ Playwright
|
||||
|
||||
## 当前状态
|
||||
|
||||
当前仅完成目录和说明文档,尚未初始化 Vite。
|
||||
已完成 Vite 基础初始化、路由、Pinia、医护端布局和第一版页面骨架。当前工作台、签署任务、文书库、报表和设置页面均使用演示数据,尚未接入真实后端。
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import HelloWorld from './components/HelloWorld.vue'
|
||||
import { RouterView } from 'vue-router'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<HelloWorld />
|
||||
<RouterView />
|
||||
</template>
|
||||
|
||||
6
clinical-web/src/api/index.ts
Normal file
6
clinical-web/src/api/index.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import axios from 'axios'
|
||||
|
||||
export const apiClient = axios.create({
|
||||
baseURL: import.meta.env.VITE_API_BASE_URL || '/api',
|
||||
timeout: 10_000,
|
||||
})
|
||||
73
clinical-web/src/layouts/ClinicalLayout.vue
Normal file
73
clinical-web/src/layouts/ClinicalLayout.vue
Normal file
@@ -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>
|
||||
@@ -1,5 +1,10 @@
|
||||
import { createPinia } from 'pinia'
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
import { createApp } from 'vue'
|
||||
import './style.css'
|
||||
import App from './App.vue'
|
||||
|
||||
createApp(App).mount('#app')
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import './styles/index.css'
|
||||
|
||||
createApp(App).use(router).use(createPinia()).use(ElementPlus).mount('#app')
|
||||
|
||||
52
clinical-web/src/router/index.ts
Normal file
52
clinical-web/src/router/index.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
|
||||
import ClinicalLayout from '@/layouts/ClinicalLayout.vue'
|
||||
import ConsentTasksView from '@/views/consent-tasks/ConsentTasksView.vue'
|
||||
import DashboardView from '@/views/dashboard/DashboardView.vue'
|
||||
import DocumentsView from '@/views/documents/DocumentsView.vue'
|
||||
import ReportsView from '@/views/reports/ReportsView.vue'
|
||||
import SettingsView from '@/views/settings/SettingsView.vue'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
component: ClinicalLayout,
|
||||
redirect: '/dashboard',
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
component: DashboardView,
|
||||
meta: { title: '工作台' },
|
||||
},
|
||||
{
|
||||
path: 'consent-tasks',
|
||||
component: ConsentTasksView,
|
||||
meta: { title: '签署任务' },
|
||||
},
|
||||
{
|
||||
path: 'documents',
|
||||
component: DocumentsView,
|
||||
meta: { title: '文书库' },
|
||||
},
|
||||
{
|
||||
path: 'reports',
|
||||
component: ReportsView,
|
||||
meta: { title: '统计报表' },
|
||||
},
|
||||
{
|
||||
path: 'settings',
|
||||
component: SettingsView,
|
||||
meta: { title: '系统设置' },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/:pathMatch(.*)*',
|
||||
redirect: '/dashboard',
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
export default router
|
||||
9
clinical-web/src/stores/app.ts
Normal file
9
clinical-web/src/stores/app.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useAppStore = defineStore('app', {
|
||||
state: () => ({
|
||||
userName: '演示医生',
|
||||
department: '儿科急诊',
|
||||
environment: '演示环境',
|
||||
}),
|
||||
})
|
||||
572
clinical-web/src/styles/index.css
Normal file
572
clinical-web/src/styles/index.css
Normal file
@@ -0,0 +1,572 @@
|
||||
:root {
|
||||
font-family:
|
||||
Inter,
|
||||
ui-sans-serif,
|
||||
system-ui,
|
||||
-apple-system,
|
||||
BlinkMacSystemFont,
|
||||
'Segoe UI',
|
||||
sans-serif;
|
||||
color: #1d2939;
|
||||
background: #f5f7fa;
|
||||
font-synthesis: none;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
min-width: 1100px;
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
background: #f5f7fa;
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clinical-layout {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.clinical-sidebar {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: #d6e4ff;
|
||||
background: #11243e;
|
||||
}
|
||||
|
||||
.brand {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
height: 88px;
|
||||
padding: 0 24px;
|
||||
border-bottom: 1px solid rgb(255 255 255 / 8%);
|
||||
}
|
||||
|
||||
.brand-mark {
|
||||
display: grid;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
color: #11243e;
|
||||
font-size: 20px;
|
||||
font-weight: 800;
|
||||
place-items: center;
|
||||
border-radius: 12px;
|
||||
background: #93d8ca;
|
||||
}
|
||||
|
||||
.brand strong,
|
||||
.brand span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.brand strong {
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
.brand span {
|
||||
margin-top: 3px;
|
||||
color: #8fa5c1;
|
||||
font-size: 10px;
|
||||
letter-spacing: 1.2px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.clinical-menu {
|
||||
flex: 1;
|
||||
padding: 18px 12px;
|
||||
border-right: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.clinical-menu .el-menu-item {
|
||||
height: 48px;
|
||||
margin: 4px 0;
|
||||
color: #a8bad2;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.clinical-menu .el-menu-item:hover {
|
||||
color: #fff;
|
||||
background: rgb(255 255 255 / 8%);
|
||||
}
|
||||
|
||||
.clinical-menu .el-menu-item.is-active {
|
||||
color: #fff;
|
||||
background: #274765;
|
||||
}
|
||||
|
||||
.menu-dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
margin-right: 12px;
|
||||
border-radius: 50%;
|
||||
background: currentcolor;
|
||||
}
|
||||
|
||||
.sidebar-footer {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
padding: 22px 24px;
|
||||
color: #8fa5c1;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.status-dot {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: #73d5a5;
|
||||
box-shadow: 0 0 0 4px rgb(115 213 165 / 12%);
|
||||
}
|
||||
|
||||
.clinical-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 88px;
|
||||
padding: 0 34px;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #e8edf3;
|
||||
}
|
||||
|
||||
.header-kicker,
|
||||
.eyebrow {
|
||||
margin: 0 0 6px;
|
||||
color: #7e91a8;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1.3px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.clinical-header h1 {
|
||||
margin: 0;
|
||||
color: #172b4d;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.user-context {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
display: grid;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
color: #176b67;
|
||||
font-weight: 700;
|
||||
place-items: center;
|
||||
border-radius: 50%;
|
||||
background: #d9f1ec;
|
||||
}
|
||||
|
||||
.user-context strong,
|
||||
.user-context span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.user-context strong {
|
||||
color: #263b59;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.user-context span {
|
||||
margin-top: 2px;
|
||||
color: #91a0b3;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.clinical-main {
|
||||
padding: 32px 34px 48px;
|
||||
}
|
||||
|
||||
.page-section {
|
||||
max-width: 1440px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.page-heading {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.page-heading h2,
|
||||
.welcome-panel h2 {
|
||||
margin: 0;
|
||||
color: #172b4d;
|
||||
font-size: 28px;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.page-heading p:not(.eyebrow) {
|
||||
margin: 8px 0 0;
|
||||
color: #8090a5;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.welcome-panel {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
min-height: 190px;
|
||||
margin-bottom: 20px;
|
||||
padding: 30px 34px;
|
||||
overflow: hidden;
|
||||
color: #e8f3f5;
|
||||
border-radius: 18px;
|
||||
background:
|
||||
radial-gradient(circle at 84% 18%, rgb(147 216 202 / 24%), transparent 28%),
|
||||
linear-gradient(125deg, #173958, #195d69);
|
||||
}
|
||||
|
||||
.welcome-panel h2 {
|
||||
max-width: 570px;
|
||||
color: #fff;
|
||||
font-size: 27px;
|
||||
}
|
||||
|
||||
.welcome-copy {
|
||||
max-width: 600px;
|
||||
margin: 14px 0 0;
|
||||
color: #b9d1d9;
|
||||
font-size: 14px;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.primary-button,
|
||||
.secondary-button {
|
||||
min-height: 40px;
|
||||
padding: 0 18px;
|
||||
color: #123148;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
border: 0;
|
||||
border-radius: 9px;
|
||||
background: #9bdfd0;
|
||||
}
|
||||
|
||||
.primary-button:hover {
|
||||
background: #b3ebde;
|
||||
}
|
||||
|
||||
.secondary-button {
|
||||
color: #176b67;
|
||||
border: 1px solid #bfe2dc;
|
||||
background: #eefaf7;
|
||||
}
|
||||
|
||||
.stats-row {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.stat-card,
|
||||
.content-card {
|
||||
border: 1px solid #e9eef4;
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
.stat-card {
|
||||
min-height: 132px;
|
||||
}
|
||||
|
||||
.stat-card .el-card__body {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.stat-topline {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
color: #7f91a8;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.stat-indicator {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.is-orange {
|
||||
background: #f5b45e;
|
||||
}
|
||||
|
||||
.is-green {
|
||||
background: #68c795;
|
||||
}
|
||||
|
||||
.is-red {
|
||||
background: #eb8d8d;
|
||||
}
|
||||
|
||||
.is-blue {
|
||||
background: #78aee5;
|
||||
}
|
||||
|
||||
.stat-card strong {
|
||||
display: block;
|
||||
margin: 12px 0 4px;
|
||||
color: #193453;
|
||||
font-size: 27px;
|
||||
letter-spacing: -0.5px;
|
||||
}
|
||||
|
||||
.stat-card small {
|
||||
color: #91a0b3;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.dashboard-grid {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.content-card .el-card__header {
|
||||
padding: 20px 22px;
|
||||
border-bottom: 1px solid #edf1f5;
|
||||
}
|
||||
|
||||
.content-card .el-card__body {
|
||||
padding: 0 22px;
|
||||
}
|
||||
|
||||
.card-heading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card-heading h3 {
|
||||
margin: 0;
|
||||
color: #203957;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.text-button {
|
||||
color: #267d78;
|
||||
font-size: 12px;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.task-item {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
min-height: 72px;
|
||||
border-bottom: 1px solid #f0f3f6;
|
||||
}
|
||||
|
||||
.task-item:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.task-avatar {
|
||||
display: grid;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
color: #456786;
|
||||
font-size: 13px;
|
||||
place-items: center;
|
||||
border-radius: 10px;
|
||||
background: #eaf1f6;
|
||||
}
|
||||
|
||||
.task-main {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.task-main strong,
|
||||
.task-main span {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.task-main strong {
|
||||
color: #304968;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.task-main span {
|
||||
margin-top: 5px;
|
||||
color: #91a0b3;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.reminder-list {
|
||||
margin: 0;
|
||||
padding: 2px 0 8px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.reminder-list li {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
padding: 16px 0;
|
||||
border-bottom: 1px solid #f0f3f6;
|
||||
}
|
||||
|
||||
.reminder-list li:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.reminder-number {
|
||||
color: #62aa9f;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.reminder-list strong,
|
||||
.reminder-list span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.reminder-list strong {
|
||||
color: #304968;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.reminder-list div span {
|
||||
margin-top: 5px;
|
||||
color: #91a0b3;
|
||||
font-size: 11px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.table-card .el-card__body {
|
||||
padding: 22px;
|
||||
}
|
||||
|
||||
.filter-bar {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.filter-bar .el-input {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.filter-bar .el-select {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.detail-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 90px 1fr;
|
||||
gap: 16px 12px;
|
||||
align-items: center;
|
||||
color: #8797aa;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.detail-grid strong {
|
||||
color: #304968;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.report-card {
|
||||
min-height: 142px;
|
||||
}
|
||||
|
||||
.report-card > .el-card__body > span {
|
||||
color: #7f91a8;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.report-card > .el-card__body > strong {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.report-placeholder {
|
||||
min-height: 330px;
|
||||
}
|
||||
|
||||
.empty-chart {
|
||||
display: grid;
|
||||
min-height: 280px;
|
||||
color: #8797aa;
|
||||
text-align: center;
|
||||
place-items: center;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.chart-icon {
|
||||
display: grid;
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
margin-bottom: 12px;
|
||||
color: #2f8d83;
|
||||
font-size: 24px;
|
||||
place-items: center;
|
||||
border-radius: 16px;
|
||||
background: #e8f7f3;
|
||||
}
|
||||
|
||||
.empty-chart h3 {
|
||||
margin: 0;
|
||||
color: #304968;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.empty-chart p {
|
||||
margin: 8px 0 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.settings-card {
|
||||
max-width: 780px;
|
||||
}
|
||||
|
||||
.settings-card .el-card__body {
|
||||
padding: 8px 24px;
|
||||
}
|
||||
|
||||
.setting-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-height: 86px;
|
||||
border-bottom: 1px solid #f0f3f6;
|
||||
}
|
||||
|
||||
.setting-row:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.setting-row strong,
|
||||
.setting-row span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.setting-row strong {
|
||||
color: #304968;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.setting-row span {
|
||||
margin-top: 6px;
|
||||
color: #91a0b3;
|
||||
font-size: 11px;
|
||||
}
|
||||
11
clinical-web/src/types/consent.ts
Normal file
11
clinical-web/src/types/consent.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export type ConsentTaskStatus = 'pending' | 'signed' | 'rejected' | 'expired'
|
||||
|
||||
export interface ConsentTask {
|
||||
id: string
|
||||
patientName: string
|
||||
visitNo: string
|
||||
documentName: string
|
||||
source: string
|
||||
status: ConsentTaskStatus
|
||||
updatedAt: string
|
||||
}
|
||||
139
clinical-web/src/views/consent-tasks/ConsentTasksView.vue
Normal file
139
clinical-web/src/views/consent-tasks/ConsentTasksView.vue
Normal file
@@ -0,0 +1,139 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
import type { ConsentTask, ConsentTaskStatus } from '@/types/consent'
|
||||
|
||||
const statusLabel: Record<ConsentTaskStatus, string> = {
|
||||
pending: '待签署',
|
||||
signed: '已完成',
|
||||
rejected: '已拒签',
|
||||
expired: '已过期',
|
||||
}
|
||||
|
||||
const statusType: Record<ConsentTaskStatus, 'success' | 'warning' | 'danger' | 'info'> = {
|
||||
pending: 'warning',
|
||||
signed: 'success',
|
||||
rejected: 'danger',
|
||||
expired: 'info',
|
||||
}
|
||||
|
||||
const tasks: ConsentTask[] = [
|
||||
{
|
||||
id: 'CT-20260827-001',
|
||||
patientName: '张*',
|
||||
visitNo: 'MZ20260827018',
|
||||
documentName: '儿科急诊特殊检查知情同意书',
|
||||
source: '儿科急诊 · 门诊',
|
||||
status: 'pending',
|
||||
updatedAt: '刚刚',
|
||||
},
|
||||
{
|
||||
id: 'CT-20260827-002',
|
||||
patientName: '李*',
|
||||
visitNo: 'MZ20260827012',
|
||||
documentName: '消化内镜检查知情同意书',
|
||||
source: '消化内科 · 门诊',
|
||||
status: 'signed',
|
||||
updatedAt: '8 分钟前',
|
||||
},
|
||||
{
|
||||
id: 'CT-20260827-003',
|
||||
patientName: '王*',
|
||||
visitNo: 'ZY20260826009',
|
||||
documentName: '麻醉知情同意书',
|
||||
source: '消化内科 · 住院',
|
||||
status: 'pending',
|
||||
updatedAt: '21 分钟前',
|
||||
},
|
||||
{
|
||||
id: 'CT-20260827-004',
|
||||
patientName: '赵*',
|
||||
visitNo: 'MZ20260827003',
|
||||
documentName: '气管插管知情同意书',
|
||||
source: '儿科急诊 · 门诊',
|
||||
status: 'rejected',
|
||||
updatedAt: '今天 09:42',
|
||||
},
|
||||
]
|
||||
|
||||
const selectedTask = ref<ConsentTask | null>(null)
|
||||
const isDetailVisible = ref(false)
|
||||
|
||||
function getStatusLabel(status: string) {
|
||||
return statusLabel[status as ConsentTaskStatus] ?? '未知状态'
|
||||
}
|
||||
|
||||
function getStatusType(status: string) {
|
||||
return statusType[status as ConsentTaskStatus] ?? 'info'
|
||||
}
|
||||
|
||||
function openTask(task: ConsentTask) {
|
||||
selectedTask.value = task
|
||||
isDetailVisible.value = true
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="page-section">
|
||||
<div class="page-heading">
|
||||
<div>
|
||||
<p class="eyebrow">任务中心</p>
|
||||
<h2>签署任务</h2>
|
||||
<p>按患者、就诊和文书任务查看当前签署进度。</p>
|
||||
</div>
|
||||
<button class="primary-button" type="button">新建签署任务</button>
|
||||
</div>
|
||||
|
||||
<el-card shadow="never" class="content-card table-card">
|
||||
<div class="filter-bar">
|
||||
<el-input placeholder="搜索患者、门诊号或任务编号" clearable />
|
||||
<el-select placeholder="全部状态" clearable>
|
||||
<el-option label="待签署" value="pending" />
|
||||
<el-option label="已完成" value="signed" />
|
||||
<el-option label="已拒签" value="rejected" />
|
||||
<el-option label="已过期" value="expired" />
|
||||
</el-select>
|
||||
<el-button>筛选</el-button>
|
||||
</div>
|
||||
|
||||
<el-table :data="tasks" stripe>
|
||||
<el-table-column prop="id" label="任务编号" min-width="160" />
|
||||
<el-table-column prop="patientName" label="患者" width="90" />
|
||||
<el-table-column prop="visitNo" label="就诊号" min-width="150" />
|
||||
<el-table-column prop="documentName" label="文书" min-width="270" />
|
||||
<el-table-column prop="source" label="来源" min-width="160" />
|
||||
<el-table-column label="状态" width="110">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="getStatusType(row.status)" effect="plain">
|
||||
{{ getStatusLabel(row.status) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="updatedAt" label="更新时间" width="120" />
|
||||
<el-table-column label="操作" width="90" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button link type="primary" @click="openTask(row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog v-model="isDetailVisible" title="签署任务详情" width="520px">
|
||||
<template v-if="selectedTask">
|
||||
<div class="detail-grid">
|
||||
<span>任务编号</span><strong>{{ selectedTask.id }}</strong> <span>患者</span
|
||||
><strong>{{ selectedTask.patientName }}</strong> <span>就诊号</span
|
||||
><strong>{{ selectedTask.visitNo }}</strong> <span>文书</span
|
||||
><strong>{{ selectedTask.documentName }}</strong>
|
||||
<span>当前状态</span>
|
||||
<el-tag :type="statusType[selectedTask.status]">
|
||||
{{ statusLabel[selectedTask.status] }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button @click="isDetailVisible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</section>
|
||||
</template>
|
||||
123
clinical-web/src/views/dashboard/DashboardView.vue
Normal file
123
clinical-web/src/views/dashboard/DashboardView.vue
Normal file
@@ -0,0 +1,123 @@
|
||||
<script setup lang="ts">
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const stats = [
|
||||
{ label: '待签署任务', value: '12', hint: '较昨日 +3', tone: 'orange' },
|
||||
{ label: '今日已完成', value: '86', hint: '完成率 91%', tone: 'green' },
|
||||
{ label: '待回传记录', value: '2', hint: '需要关注', tone: 'red' },
|
||||
{ label: '本月签署量', value: '2,486', hint: '较上月 +12%', tone: 'blue' },
|
||||
]
|
||||
|
||||
const recentTasks = [
|
||||
{ patient: '张*', document: '儿科急诊特殊检查知情同意书', status: '待签署', time: '刚刚' },
|
||||
{ patient: '李*', document: '消化内镜检查知情同意书', status: '已完成', time: '8 分钟前' },
|
||||
{ patient: '王*', document: '麻醉知情同意书', status: '待回传', time: '21 分钟前' },
|
||||
]
|
||||
|
||||
function goToTasks() {
|
||||
void router.push('/consent-tasks')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="page-section">
|
||||
<div class="welcome-panel">
|
||||
<div>
|
||||
<p class="eyebrow">今日概览</p>
|
||||
<h2>把每一次知情同意,准确关联到本次就诊。</h2>
|
||||
<p class="welcome-copy">
|
||||
从电子病历发起签署任务,实时查看患者签署状态,并为后续回传和审计保留证据。
|
||||
</p>
|
||||
</div>
|
||||
<button class="primary-button" type="button" @click="goToTasks">查看签署任务</button>
|
||||
</div>
|
||||
|
||||
<el-row :gutter="16" class="stats-row">
|
||||
<el-col v-for="stat in stats" :key="stat.label" :xs="24" :sm="12" :lg="6">
|
||||
<el-card shadow="never" class="stat-card">
|
||||
<div class="stat-topline">
|
||||
<span>{{ stat.label }}</span>
|
||||
<span class="stat-indicator" :class="'is-' + stat.tone" />
|
||||
</div>
|
||||
<strong>{{ stat.value }}</strong>
|
||||
<small>{{ stat.hint }}</small>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="16" class="dashboard-grid">
|
||||
<el-col :xs="24" :lg="15">
|
||||
<el-card shadow="never" class="content-card">
|
||||
<template #header>
|
||||
<div class="card-heading">
|
||||
<div>
|
||||
<p class="eyebrow">实时动态</p>
|
||||
<h3>最近签署任务</h3>
|
||||
</div>
|
||||
<button class="text-button" type="button" @click="goToTasks">查看全部</button>
|
||||
</div>
|
||||
</template>
|
||||
<div class="task-list">
|
||||
<div v-for="task in recentTasks" :key="task.patient + task.time" class="task-item">
|
||||
<div class="task-avatar">{{ task.patient.slice(0, 1) }}</div>
|
||||
<div class="task-main">
|
||||
<strong>{{ task.document }}</strong>
|
||||
<span>{{ task.patient }} · {{ task.time }}</span>
|
||||
</div>
|
||||
<el-tag
|
||||
:type="
|
||||
task.status === '已完成'
|
||||
? 'success'
|
||||
: task.status === '待回传'
|
||||
? 'warning'
|
||||
: 'info'
|
||||
"
|
||||
effect="plain"
|
||||
>
|
||||
{{ task.status }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :xs="24" :lg="9">
|
||||
<el-card shadow="never" class="content-card">
|
||||
<template #header>
|
||||
<div class="card-heading">
|
||||
<div>
|
||||
<p class="eyebrow">下一步</p>
|
||||
<h3>今日提醒</h3>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<ul class="reminder-list">
|
||||
<li>
|
||||
<span class="reminder-number">01</span>
|
||||
<div>
|
||||
<strong>2 条签署结果待回传</strong>
|
||||
<span>请确认电子病历历史记录是否更新。</span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<span class="reminder-number">02</span>
|
||||
<div>
|
||||
<strong>签署一项文书版本</strong>
|
||||
<span>消化内镜文书有一个待审核版本。</span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<span class="reminder-number">03</span>
|
||||
<div>
|
||||
<strong>设备状态正常</strong>
|
||||
<span>护士站签字板最近一次心跳在 1 分钟前。</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</section>
|
||||
</template>
|
||||
60
clinical-web/src/views/documents/DocumentsView.vue
Normal file
60
clinical-web/src/views/documents/DocumentsView.vue
Normal file
@@ -0,0 +1,60 @@
|
||||
<script setup lang="ts">
|
||||
const documents = [
|
||||
{
|
||||
name: '儿科急诊特殊检查知情同意书',
|
||||
department: '儿科急诊',
|
||||
version: 'V1.2',
|
||||
status: '使用中',
|
||||
updatedAt: '2026-08-26',
|
||||
},
|
||||
{
|
||||
name: '消化内镜检查知情同意书',
|
||||
department: '消化内科',
|
||||
version: 'V2.0',
|
||||
status: '使用中',
|
||||
updatedAt: '2026-08-25',
|
||||
},
|
||||
{
|
||||
name: '息肉切除术知情同意书',
|
||||
department: '消化内科',
|
||||
version: 'V1.0',
|
||||
status: '待审核',
|
||||
updatedAt: '2026-08-24',
|
||||
},
|
||||
]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="page-section">
|
||||
<div class="page-heading">
|
||||
<div>
|
||||
<p class="eyebrow">模板中心</p>
|
||||
<h2>文书库</h2>
|
||||
<p>维护知情同意文书、版本和适用科室。</p>
|
||||
</div>
|
||||
<button class="primary-button" type="button">新建文书</button>
|
||||
</div>
|
||||
|
||||
<el-card shadow="never" class="content-card table-card">
|
||||
<el-table :data="documents" stripe>
|
||||
<el-table-column prop="name" label="文书名称" min-width="300" />
|
||||
<el-table-column prop="department" label="适用科室" width="140" />
|
||||
<el-table-column prop="version" label="版本" width="100" />
|
||||
<el-table-column label="状态" width="120">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="row.status === '使用中' ? 'success' : 'warning'" effect="plain">
|
||||
{{ row.status }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="updatedAt" label="更新时间" width="140" />
|
||||
<el-table-column label="操作" width="160">
|
||||
<template #default>
|
||||
<el-button link type="primary">预览</el-button>
|
||||
<el-button link>版本记录</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</section>
|
||||
</template>
|
||||
38
clinical-web/src/views/reports/ReportsView.vue
Normal file
38
clinical-web/src/views/reports/ReportsView.vue
Normal file
@@ -0,0 +1,38 @@
|
||||
<script setup lang="ts">
|
||||
const reportCards = [
|
||||
{ label: '本月签署总量', value: '2,486', note: '覆盖 18 个科室' },
|
||||
{ label: '手机签署占比', value: '78.6%', note: '试运行统计' },
|
||||
{ label: '平均签署耗时', value: '2m 18s', note: '从发起到完成' },
|
||||
]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="page-section">
|
||||
<div class="page-heading">
|
||||
<div>
|
||||
<p class="eyebrow">数据观察</p>
|
||||
<h2>统计报表</h2>
|
||||
<p>查看签署量、渠道、科室和异常任务统计。</p>
|
||||
</div>
|
||||
<button class="secondary-button" type="button">导出报表</button>
|
||||
</div>
|
||||
|
||||
<el-row :gutter="16" class="stats-row">
|
||||
<el-col v-for="card in reportCards" :key="card.label" :xs="24" :sm="8">
|
||||
<el-card shadow="never" class="stat-card report-card">
|
||||
<span>{{ card.label }}</span>
|
||||
<strong>{{ card.value }}</strong>
|
||||
<small>{{ card.note }}</small>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-card shadow="never" class="content-card report-placeholder">
|
||||
<div class="empty-chart">
|
||||
<div class="chart-icon">↗</div>
|
||||
<h3>趋势图表将在接入真实数据后展示</h3>
|
||||
<p>当前页面用于确认报表入口和信息层级,暂使用演示数据。</p>
|
||||
</div>
|
||||
</el-card>
|
||||
</section>
|
||||
</template>
|
||||
45
clinical-web/src/views/settings/SettingsView.vue
Normal file
45
clinical-web/src/views/settings/SettingsView.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive } from 'vue'
|
||||
|
||||
const settings = reactive({
|
||||
enableSms: true,
|
||||
enableAutoReturn: true,
|
||||
enableAuditReminder: true,
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="page-section">
|
||||
<div class="page-heading">
|
||||
<div>
|
||||
<p class="eyebrow">平台配置</p>
|
||||
<h2>系统设置</h2>
|
||||
<p>管理签署渠道、回传策略和审计提醒。</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-card shadow="never" class="content-card settings-card">
|
||||
<div class="setting-row">
|
||||
<div>
|
||||
<strong>启用手机短信签署</strong>
|
||||
<span>允许患者通过短信链接打开签署页面。</span>
|
||||
</div>
|
||||
<el-switch v-model="settings.enableSms" />
|
||||
</div>
|
||||
<div class="setting-row">
|
||||
<div>
|
||||
<strong>签署完成后自动回传</strong>
|
||||
<span>签署成功后,将状态和文件回传电子病历。</span>
|
||||
</div>
|
||||
<el-switch v-model="settings.enableAutoReturn" />
|
||||
</div>
|
||||
<div class="setting-row">
|
||||
<div>
|
||||
<strong>启用异常审计提醒</strong>
|
||||
<span>对拒签、过期和回传失败任务生成提醒。</span>
|
||||
</div>
|
||||
<el-switch v-model="settings.enableAuditReminder" />
|
||||
</div>
|
||||
</el-card>
|
||||
</section>
|
||||
</template>
|
||||
Reference in New Issue
Block a user