refactor(clinical-web): 重构医护端布局与路由结构

This commit is contained in:
yelan
2026-08-27 12:21:08 +08:00
parent 36fa15487c
commit 59c4da21d5
16 changed files with 536 additions and 932 deletions
+251 -456
View File
@@ -1,572 +1,367 @@
@import './theme.css';
:root {
font-family:
Inter,
ui-sans-serif,
system-ui,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
sans-serif;
color: #1d2939;
background: #f5f7fa;
font-family: var(--font-sans);
color: var(--ink);
background: var(--bg);
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
* {
box-sizing: border-box;
}
html,
body,
#app {
width: 100%;
min-height: 100%;
}
body {
min-width: 1100px;
min-width: 1024px;
min-height: 100vh;
margin: 0;
background: #f5f7fa;
color: var(--ink);
background: var(--bg);
font-size: 14px;
line-height: 1.5;
}
button,
input {
input,
select,
textarea {
font: inherit;
}
button {
cursor: pointer;
border: 0;
}
.clinical-layout {
min-height: 100vh;
a {
color: inherit;
}
.clinical-sidebar {
position: relative;
display: flex;
flex-direction: column;
color: #d6e4ff;
background: #11243e;
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.brand {
display: flex;
gap: 12px;
align-items: center;
height: 88px;
padding: 0 24px;
border-bottom: 1px solid rgb(255 255 255 / 8%);
::-webkit-scrollbar-thumb {
background: #c3d4db;
border-radius: 4px;
}
.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;
::-webkit-scrollbar-track {
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 {
/* 主框架:侧边菜单 + 顶部 header + 内容 container */
.clinical-layout {
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;
width: 100%;
min-height: 100vh;
background: var(--bg);
}
.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;
flex: 1;
flex-direction: column;
min-width: 0;
min-height: 100vh;
}
.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 {
.clinical-menu {
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);
flex: 0 0 var(--sidebar-width);
flex-direction: column;
width: var(--sidebar-width);
color: #c8dde6;
background: var(--side);
}
.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 {
.menu-brand {
display: flex;
flex-shrink: 0;
gap: 10px;
align-items: center;
justify-content: space-between;
color: #7f91a8;
font-size: 12px;
padding: 18px 16px 16px;
border-bottom: 1px solid rgb(255 255 255 / 8%);
}
.stat-indicator {
width: 8px;
height: 8px;
.menu-brand-icon {
display: grid;
flex-shrink: 0;
width: 34px;
height: 34px;
place-items: center;
border-radius: 9px;
background: linear-gradient(135deg, #18a0c0, var(--brand));
}
.menu-brand-copy strong,
.menu-brand-copy span {
display: block;
}
.menu-brand-copy strong {
color: #fff;
font-size: 16px;
letter-spacing: 1px;
}
.menu-brand-copy span {
color: #8fb3c2;
font-size: 10px;
letter-spacing: 1px;
}
.menu-nav {
flex: 1;
padding: 12px 10px;
overflow-y: auto;
}
.menu-group-title {
padding: 10px 10px 6px;
color: #7ba2b3;
font-size: 11px;
letter-spacing: 1px;
}
.menu-item {
display: flex;
gap: 10px;
align-items: center;
margin-bottom: 2px;
padding: 10px 12px;
color: #c8dde6;
font-size: 13.5px;
text-decoration: none;
border-radius: 8px;
transition:
color 0.15s ease,
background 0.15s ease;
}
.menu-item:hover {
color: #fff;
background: rgb(255 255 255 / 7%);
}
.menu-item.is-active {
color: #fff;
font-weight: 700;
background: var(--brand);
}
.menu-dot {
flex-shrink: 0;
width: 6px;
height: 6px;
background: transparent;
border-radius: 50%;
}
.is-orange {
background: #f5b45e;
.menu-item.is-active .menu-dot {
background: #5ee0a8;
}
.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 {
.menu-profile {
display: flex;
flex-shrink: 0;
gap: 10px;
align-items: center;
justify-content: space-between;
padding: 14px 16px;
border-top: 1px solid rgb(255 255 255 / 8%);
}
.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 {
.menu-profile-avatar {
display: grid;
flex-shrink: 0;
width: 34px;
height: 34px;
color: #456786;
font-size: 13px;
color: #fff;
font-size: 14px;
font-weight: 700;
place-items: center;
border-radius: 10px;
background: #eaf1f6;
border-radius: 50%;
background: #18a0c0;
}
.task-main {
flex: 1;
.menu-profile-copy {
min-width: 0;
}
.task-main strong,
.task-main span {
.menu-profile-copy strong,
.menu-profile-copy span {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.task-main strong {
color: #304968;
.menu-profile-copy strong {
color: #fff;
font-size: 13px;
}
.task-main span {
margin-top: 5px;
color: #91a0b3;
.menu-profile-copy span {
margin-top: 2px;
color: #8fb3c2;
font-size: 11px;
}
.reminder-list {
margin: 0;
padding: 2px 0 8px;
list-style: none;
.menu-logout {
flex-shrink: 0;
margin-left: auto;
padding: 0;
color: #8fb3c2;
font-size: 11px;
background: transparent;
}
.reminder-list li {
.menu-logout:hover {
color: #fff;
}
/* 原型中的顶部 header */
.clinical-header {
display: flex;
gap: 12px;
padding: 16px 0;
border-bottom: 1px solid #f0f3f6;
flex-shrink: 0;
gap: 14px;
align-items: center;
height: var(--header-height);
padding: 0 20px;
background: #fff;
border-bottom: 1px solid var(--line);
}
.reminder-list li:last-child {
border-bottom: 0;
.header-page {
display: flex;
gap: 14px;
align-items: baseline;
min-width: 0;
}
.reminder-number {
color: #62aa9f;
font-size: 12px;
.header-title {
flex-shrink: 0;
color: var(--ink);
font-size: 16px;
font-weight: 700;
}
.reminder-list strong,
.reminder-list span {
display: block;
}
.reminder-list strong {
color: #304968;
.header-breadcrumb {
overflow: hidden;
color: var(--mut);
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
.reminder-list div span {
margin-top: 5px;
color: #91a0b3;
font-size: 11px;
line-height: 1.5;
.header-spacer {
flex: 1;
}
.table-card .el-card__body {
padding: 22px;
}
.filter-bar {
.campus-selector {
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;
flex-shrink: 0;
gap: 6px;
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;
.campus-label {
color: var(--mut);
font-size: 12px;
}
.report-card > .el-card__body > strong {
margin-top: 15px;
.campus-selector select {
width: auto;
padding: 4px 8px;
color: var(--brand-d);
font-size: 12.5px;
font-weight: 700;
background: var(--brand-l);
border: 1px solid var(--brand);
border-radius: 6px;
}
.report-placeholder {
min-height: 330px;
.environment-badge {
flex-shrink: 0;
padding: 3px 8px;
color: var(--warn);
font-size: 11px;
background: var(--warn-l);
border-radius: 20px;
}
.empty-chart {
display: grid;
min-height: 280px;
color: #8797aa;
/* container 只负责滚动和内边距,页面内容由各 View 提供 */
.clinical-container {
flex: 1;
min-height: 0;
padding: 18px 20px;
overflow-y: auto;
}
.page-section {
width: 100%;
max-width: 1440px;
margin: 0 auto;
}
.page-placeholder {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 380px;
padding: 48px 32px;
text-align: center;
place-items: center;
align-content: center;
background: var(--card);
border-radius: var(--r);
box-shadow: var(--sh);
}
.chart-icon {
.placeholder-mark {
display: grid;
width: 52px;
height: 52px;
margin-bottom: 12px;
color: #2f8d83;
width: 54px;
height: 54px;
margin-bottom: 18px;
color: var(--brand);
font-size: 24px;
place-items: center;
border-radius: 16px;
background: #e8f7f3;
background: var(--brand-l);
border-radius: 14px;
}
.empty-chart h3 {
.eyebrow {
margin-bottom: 6px;
color: var(--brand);
font-size: 11px;
font-weight: 700;
letter-spacing: 1px;
}
.placeholder-title {
margin: 0;
color: #304968;
font-size: 15px;
color: var(--ink);
font-size: 22px;
}
.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;
.placeholder-copy {
margin-top: 10px;
color: var(--mut);
font-size: 13px;
}
.setting-row span {
margin-top: 6px;
color: #91a0b3;
font-size: 11px;
@media (max-width: 1200px) {
.clinical-container {
padding: 16px;
}
}
+28
View File
@@ -0,0 +1,28 @@
:root {
--brand: #0e6e8c;
--brand-d: #0a4f66;
--brand-l: #e3f0f4;
--side: #0a3d51;
--bg: #f1f5f7;
--card: #ffffff;
--ink: #1d3b4a;
--mut: #687f8b;
--line: #dce7ec;
--ok: #0f9d6c;
--ok-l: #e2f5ec;
--warn: #d9821f;
--warn-l: #fbf0dd;
--err: #d0534f;
--err-l: #fbe9e8;
--info: #3a7bd5;
--info-l: #e7effb;
--r: 10px;
--sh: 0 2px 10px rgb(13 62 81 / 7%);
--sh-hover: 0 6px 20px rgb(14 110 140 / 18%);
--sh-modal: 0 20px 60px rgb(0 0 0 / 30%);
--font-sans:
'Microsoft YaHei', 'PingFang SC', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
sans-serif;
--sidebar-width: 200px;
--header-height: 54px;
}