diff --git a/backend/src/main/resources/database/init.sql b/backend/src/main/resources/database/init.sql index c57bd22..bba9559 100644 --- a/backend/src/main/resources/database/init.sql +++ b/backend/src/main/resources/database/init.sql @@ -454,7 +454,7 @@ INSERT INTO `menu` (`id`, `parent_id`, `name`, `type`, `path`, `component`, `ico -- ===== 药品管理(目录) ===== INSERT INTO `menu` (`id`, `parent_id`, `name`, `type`, `path`, `component`, `icon`, `permission_code`, `sort_order`) VALUES -(21, 0, '药品管理', 1, NULL, NULL, 'MedicineBox', NULL, 2), +(21, 0, '药品管理', 1, NULL, NULL, 'Goods', NULL, 2), (22, 21, '药品列表', 2, '/medicine/list', 'views/medicine/MedicineList', NULL, 'medicine:list', 21), (23, 22, '药品查询', 3, NULL, NULL, NULL, 'medicine:query', 211), (24, 22, '新增药品', 3, NULL, NULL, NULL, 'medicine:add', 212), diff --git a/frontend/src/styles/global.scss b/frontend/src/styles/global.scss index 0355d62..89e5b24 100644 --- a/frontend/src/styles/global.scss +++ b/frontend/src/styles/global.scss @@ -8,89 +8,157 @@ html, body, #app { height: 100%; font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif; + color: #303133; } -// 页面通用样式 +// 页面容器(卡片式) .page-container { background: #fff; - border-radius: 4px; - padding: 20px; + border-radius: 8px; + padding: 24px; min-height: calc(100vh - 140px); + box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); } +// 页面标题 +.page-header { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 20px; + padding-bottom: 16px; + border-bottom: 1px solid #ebeef5; +} + +.page-title { + font-size: 18px; + font-weight: 600; + color: #303133; + display: flex; + align-items: center; + gap: 8px; + + &::before { + content: ''; + display: inline-block; + width: 4px; + height: 18px; + background: #409eff; + border-radius: 2px; + } +} + +// 搜索区 .search-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; padding: 16px; - background: #fafafa; - border-radius: 4px; + background: #f5f7fa; + border-radius: 8px; .el-input, .el-select, .el-cascader, .el-date-picker { width: 200px; } } +// 工具栏 .tool-bar { margin-bottom: 16px; display: flex; justify-content: space-between; + align-items: center; } -// 表格操作按钮 +// 操作按钮组 .table-actions { display: flex; - gap: 8px; -} - -// 弹窗表单 -.dialog-form { - .el-form-item { - margin-bottom: 18px; - } - .el-input, .el-select, .el-cascader { - width: 100%; - } + gap: 6px; } // 统计卡片 .stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); - gap: 16px; - margin-bottom: 20px; + gap: 20px; + margin-bottom: 24px; } .stat-card { background: #fff; - border-radius: 8px; - padding: 20px; + border-radius: 12px; + padding: 24px; display: flex; align-items: center; - gap: 16px; - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); + gap: 20px; + box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); + transition: transform 0.2s, box-shadow 0.2s; + + &:hover { + transform: translateY(-2px); + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); + } .stat-icon { width: 56px; height: 56px; - border-radius: 12px; + border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; + flex-shrink: 0; } .stat-info { .stat-label { color: #909399; font-size: 14px; + margin-bottom: 4px; } .stat-value { - font-size: 28px; + font-size: 30px; font-weight: 700; color: #303133; + line-height: 1.2; } } } + +// 区域卡片 +.section-card { + background: #fff; + border-radius: 8px; + padding: 20px; + box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05); +} + +// 对话框表单 +.dialog-form { + .el-form-item { + margin-bottom: 18px; + } + .el-input, .el-select, .el-cascader, .el-input-number { + width: 100%; + } +} + +// 状态标签增强 +.status-dot { + display: inline-block; + width: 8px; + height: 8px; + border-radius: 50%; + margin-right: 6px; +} + +// 响应式 +@media (max-width: 1400px) { + .stat-cards { grid-template-columns: repeat(2, 1fr); } +} +@media (max-width: 768px) { + .stat-cards { grid-template-columns: 1fr; } + .page-container { padding: 16px; } +} diff --git a/frontend/src/views/category/CategoryList.vue b/frontend/src/views/category/CategoryList.vue index 1b2f2e0..d4b3cda 100644 --- a/frontend/src/views/category/CategoryList.vue +++ b/frontend/src/views/category/CategoryList.vue @@ -60,6 +60,7 @@ onMounted(loadData)