style: 重塑政务风格 + 操作列统一 el-link + 表格紧凑化
业务背景 - ry-vue3 为政务/卫健委风合规管理系统 (医疗机构合规系统), 不要可爱配色、不要插画 - 品牌色: 主色 #15803D (低调深绿) + 次色 #0E7490 (青蓝), 不要蓝色系主色 变更概要 1. 全局地基 - theme.scss: Element Plus 主色改为 #15803D, slate 9 档, 联动组件库 - main.scss: 字体/页面骨架/筛选栏/表格/控件/滚动条 全套样式 - AdminLayout.vue: 政务顶栏 + 浅色侧栏 - Workbench.vue: 替换原绿底大字卡为 KPI 白底色条 + 快捷入口 + 进度条 2. 表格操作列改造 - el-button link 全面替换为 el-link (:underline="false" + type="primary/danger") - 36 文件 132 处替换, 操作列外加 .table-actions 容器 (内含分隔线) - 修复 el-link 不支持的属性 (size="small"/text/loading) 3. 筛选栏 - 弹性布局 + gap 14px 16px + align-items: flex-start + min-height 32px - 删除所有 scoped .filter-form 覆盖 (28 处) 让全局样式生效 - 控件宽度 180px 统一, 标签 32px 居中, 折行不紧贴 4. 表格紧凑化 - cell-padding 10px → 6px, 表头高度 36px - 行高 ~46px → ~36px, 字号 13px 5. 每页默认 20 条 - 21 文件 pageSize: 10 → 20 6. meetings 操作列折叠 - 11 操作 → 外置 3 个主操作 + 1 个"更多" el-dropdown (8 个次操作) - width 500px → 260px - 配 .op-dropdown / .op-caret 样式 (hover 旋转) - 新增 onMoreAction dispatch 函数 (复用原 handler) 7. 操作列文字防拆行 - .table-actions flex-wrap: nowrap + white-space: nowrap - el-link padding 0 8px → 0 6px, flex-shrink: 0 8. 环境配置 - .env.development: 直连远端 https://risingdoctor.com/hg-api (绕过 vite proxy 卡顿) - vite.config.js: proxy fallback 保留
This commit is contained in:
@@ -1,7 +1,269 @@
|
||||
html, body, #app { height: 100%; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
|
||||
:root { --theme-color: #409eff; --theme-color-light: #66b1ff; --theme-color-dark: #3a8ee6; }
|
||||
.page-wrap { padding: 16px; }
|
||||
.page-card { background: #fff; border-radius: 6px; padding: 16px; box-shadow: 0 1px 4px rgba(0,21,41,.08); margin-bottom: 16px; }
|
||||
.page-title { font-size: 18px; font-weight: 600; margin-bottom: 12px; color: #1f1f1f; }
|
||||
.filter-bar { margin-bottom: 12px; }
|
||||
.toolbar { margin-bottom: 12px; display: flex; gap: 8px; }
|
||||
/* =============================================================
|
||||
全局样式 — 医疗机构合规系统
|
||||
风格:政务稳重 / 信息密度合理 / 中文优先 / 浅灰底 + 卡片
|
||||
============================================================= */
|
||||
|
||||
html, body, #app {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
|
||||
"Hiragino Sans GB", "Microsoft YaHei", "微软雅黑",
|
||||
"Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
color: var(--el-text-color-primary);
|
||||
background: var(--brand-slate-50);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
*, *::before, *::after { box-sizing: border-box; }
|
||||
|
||||
a { color: var(--brand-primary-text); text-decoration: none; }
|
||||
a:hover { color: var(--brand-primary); }
|
||||
|
||||
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; color: var(--el-text-color-primary); }
|
||||
|
||||
/* —— 滚动条 (政务: 低调, 不发光) —— */
|
||||
::-webkit-scrollbar { width: 8px; height: 8px; }
|
||||
::-webkit-scrollbar-track { background: transparent; }
|
||||
::-webkit-scrollbar-thumb { background: var(--brand-slate-300); border-radius: 4px; }
|
||||
::-webkit-scrollbar-thumb:hover { background: var(--brand-slate-400); }
|
||||
|
||||
/* —— 页面骨架 —— */
|
||||
.page-wrap { padding: 16px 20px; }
|
||||
|
||||
/* 卡片容器 (所有后台列表/详情页统一用这个) */
|
||||
.page-card {
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
padding: 20px 24px;
|
||||
border: 1px solid var(--brand-slate-200);
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
/* 页面标题 — 政务: 顶部蓝色细横线 + 粗体, 不靠图标 */
|
||||
.page-title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: var(--el-text-color-primary);
|
||||
margin: 0 0 16px;
|
||||
padding-left: 12px;
|
||||
border-left: 4px solid var(--brand-primary);
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
/* 面包屑 — 政务标准 */
|
||||
.breadcrumb {
|
||||
font-size: 13px;
|
||||
color: var(--el-text-color-secondary);
|
||||
margin-bottom: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.breadcrumb .sep { color: var(--brand-slate-300); margin: 0 2px; }
|
||||
.breadcrumb a { color: var(--el-text-color-secondary); cursor: pointer; }
|
||||
.breadcrumb a:hover { color: var(--brand-primary); }
|
||||
.breadcrumb .current { color: var(--el-text-color-primary); font-weight: 500; }
|
||||
|
||||
/* 筛选区 */
|
||||
.filter-bar { margin-bottom: 16px; }
|
||||
|
||||
/* 筛选区 — 弹性换行 + 控件最小宽度, 上下不紧贴 */
|
||||
.filter-form {
|
||||
background: var(--brand-slate-50);
|
||||
padding: 16px 20px;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 16px;
|
||||
border: 1px solid var(--brand-slate-200);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
gap: 14px 16px;
|
||||
}
|
||||
.filter-form .el-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.filter-form .el-form-item .el-form-item__label {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
padding: 0 8px 0 0;
|
||||
font-size: 13px;
|
||||
color: var(--el-text-color-regular);
|
||||
}
|
||||
.filter-form .el-form-item .el-form-item__content { line-height: 32px; }
|
||||
.filter-form .el-input,
|
||||
.filter-form .el-select,
|
||||
.filter-form .el-date-editor { width: 180px; }
|
||||
.filter-form .el-input__wrapper { min-height: 32px; }
|
||||
.filter-form .el-select__wrapper { min-height: 32px; }
|
||||
.toolbar { margin-bottom: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
|
||||
|
||||
/* 按钮: 默认带细边框阴影 hover 明显 */
|
||||
.el-button { font-weight: 500; border-radius: 4px; }
|
||||
.el-button--primary { box-shadow: 0 1px 2px rgba(21, 128, 61, 0.20); }
|
||||
.el-button--primary:hover { box-shadow: 0 2px 6px rgba(21, 128, 61, 0.30); }
|
||||
|
||||
/* link 按钮 — 修复 link+primary 撞色 (全局) */
|
||||
:deep(.el-button--primary.is-link),
|
||||
:deep(.el-button--primary.is-link:hover) {
|
||||
background: transparent !important;
|
||||
border-color: transparent !important;
|
||||
color: var(--brand-primary-text) !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
:deep(.el-button--primary.is-link:hover) { color: var(--brand-primary) !important; }
|
||||
|
||||
/* el-link 表格操作 — 行内链接, 取代 el-button link */
|
||||
.el-link {
|
||||
font-weight: 500;
|
||||
}
|
||||
/* 表格操作列容器 — 不换行, 防止外置按钮文字拆行 */
|
||||
.table-actions {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.table-actions .el-link,
|
||||
.table-actions .el-button.is-link {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
padding: 0 6px;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.table-actions .el-link + .el-link,
|
||||
.table-actions .el-button.is-link + .el-button.is-link {
|
||||
border-left: 1px solid var(--brand-slate-200);
|
||||
}
|
||||
.table-actions .el-link.is-disabled {
|
||||
color: var(--brand-slate-300);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.table-actions .el-link.el-link--danger { color: var(--el-color-danger); }
|
||||
.table-actions .el-link.el-link--warning { color: var(--el-color-warning); }
|
||||
.table-actions .el-link.el-link--success { color: var(--el-color-success); }
|
||||
|
||||
/* 表格操作列 — 折叠"更多"下拉触发器 */
|
||||
.table-actions .op-dropdown {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
border-left: 1px solid var(--brand-slate-200);
|
||||
}
|
||||
.table-actions .op-caret {
|
||||
font-size: 10px;
|
||||
margin-left: 2px;
|
||||
transition: transform .2s;
|
||||
}
|
||||
.table-actions .op-dropdown:hover .op-caret {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
/* 表格 — 政务: 表头灰底, 行高紧凑, 边框清晰 */
|
||||
.el-table {
|
||||
--el-table-border-color: var(--brand-slate-200);
|
||||
--el-table-header-bg-color: var(--brand-slate-100);
|
||||
--el-table-header-text-color: var(--el-text-color-primary);
|
||||
--el-table-row-hover-bg-color: var(--brand-slate-50);
|
||||
--el-table-cell-padding: 6px 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
.el-table th.el-table__cell {
|
||||
font-weight: 600;
|
||||
background: var(--brand-slate-100) !important;
|
||||
color: var(--el-text-color-primary) !important;
|
||||
border-bottom: 1px solid var(--brand-slate-300) !important;
|
||||
padding: 8px 0 !important;
|
||||
height: 36px !important;
|
||||
}
|
||||
.el-table td.el-table__cell { padding: 6px 0; }
|
||||
.el-table--striped .el-table__body tr.el-table__row--striped td { background: #FCFDFE; }
|
||||
|
||||
/* 分页 */
|
||||
.el-pagination { justify-content: flex-end; margin-top: 16px; padding: 0; }
|
||||
|
||||
/* 输入框: 政务感, 边框清晰 */
|
||||
.el-input__wrapper, .el-textarea__inner, .el-select__wrapper {
|
||||
box-shadow: 0 0 0 1px var(--brand-slate-300) inset !important;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.el-input__wrapper:hover, .el-select__wrapper:hover {
|
||||
box-shadow: 0 0 0 1px var(--brand-primary-light) inset !important;
|
||||
}
|
||||
.el-input__wrapper.is-focus, .el-select__wrapper.is-focused {
|
||||
box-shadow: 0 0 0 1px var(--brand-primary) inset !important;
|
||||
}
|
||||
|
||||
/* Tag 标签 — 政务: 圆角小, 颜色低饱和 */
|
||||
.el-tag {
|
||||
border-radius: 3px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Dialog 标题: 政务感 */
|
||||
.el-dialog__header { padding: 16px 24px; border-bottom: 1px solid var(--brand-slate-200); margin-right: 0; }
|
||||
.el-dialog__title { font-size: 16px; font-weight: 600; color: var(--el-text-color-primary); }
|
||||
.el-dialog__headerbtn { top: 16px; }
|
||||
.el-dialog__body { padding: 20px 24px; }
|
||||
.el-dialog__footer { padding: 12px 24px; border-top: 1px solid var(--brand-slate-200); }
|
||||
|
||||
/* Menu 侧边栏 (AdminLayout 重写, 这里只是兜底) */
|
||||
.el-menu { border-right: none !important; }
|
||||
|
||||
/* Descriptions 查看页 */
|
||||
.el-descriptions__label { color: var(--el-text-color-secondary); font-weight: 500; background: var(--brand-slate-50); }
|
||||
.el-descriptions__content { color: var(--el-text-color-primary); }
|
||||
|
||||
/* KPI 卡片 (Workbench 用) */
|
||||
.stats-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 16px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.stat-card {
|
||||
background: #fff;
|
||||
border: 1px solid var(--brand-slate-200);
|
||||
border-radius: 6px;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
.stat-card:hover {
|
||||
border-color: var(--brand-primary-light);
|
||||
box-shadow: 0 4px 12px rgba(30, 64, 175, 0.08);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
.stat-card .stat-label { font-size: 13px; color: var(--el-text-color-secondary); }
|
||||
.stat-card .stat-value { font-size: 28px; font-weight: 600; color: var(--brand-primary); line-height: 1.1; }
|
||||
.stat-card .stat-extra { font-size: 12px; color: var(--el-text-color-secondary); }
|
||||
|
||||
/* 二级标题 (页面内 section) */
|
||||
.section-title {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: var(--el-text-color-primary);
|
||||
margin: 0 0 14px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid var(--brand-slate-200);
|
||||
}
|
||||
|
||||
/* 空状态 */
|
||||
.empty-block {
|
||||
padding: 48px 20px;
|
||||
text-align: center;
|
||||
color: var(--el-text-color-secondary);
|
||||
font-size: 13px;
|
||||
}
|
||||
Reference in New Issue
Block a user