feat(health): 内容管理模块 — 审核/分类/标签/富文本编辑器
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

后端:
- 文章审核状态机:draft → pending_review → published(含 reject/unpublish)
- 文章分类 CRUD(article_category entity + service + handler)
- 文章标签 CRUD(article_tag + article_article_tag 关联)
- 文章修订版快照(article_revision)
- 阅读计数、排序、slug、审核备注
- 新增 health.articles.review 权限

前端:
- ArticleManageList:状态标签页 + 分类筛选 + 关键字搜索 + 审核操作
- ArticleEditor:Wangeditor 富文本编辑器 + 元数据侧栏
- ArticleCategoryManage:分类 CRUD + 父子层级
- ArticleTagManage:标签 CRUD

修复:
- diagnosis_service/health_data_service/dialysis_service: 补充 key_version 字段
- ArticleCategoryManage: 补充 Select 组件导入
This commit is contained in:
iven
2026-04-26 12:51:30 +08:00
parent 49b8300fdc
commit 17b423b9b8
26 changed files with 3731 additions and 97 deletions

View File

@@ -6,7 +6,7 @@ use erp_core::events::EventBus;
use erp_core::module::{ErpModule, PermissionDescriptor};
use crate::handler::{
appointment_handler, article_handler, consultation_handler, consent_handler, critical_value_threshold_handler, daily_monitoring_handler, diagnosis_handler, dialysis_handler, doctor_handler, follow_up_handler,
appointment_handler, article_category_handler, article_handler, article_tag_handler, consultation_handler, consent_handler, critical_value_threshold_handler, daily_monitoring_handler, diagnosis_handler, dialysis_handler, doctor_handler, follow_up_handler,
health_data_handler, patient_handler, points_handler, stats_handler,
};
@@ -317,6 +317,48 @@ impl HealthModule {
.put(article_handler::update_article)
.delete(article_handler::delete_article),
)
// 资讯审核工作流
.route(
"/health/articles/{id}/submit",
axum::routing::post(article_handler::submit_article),
)
.route(
"/health/articles/{id}/approve",
axum::routing::post(article_handler::approve_article),
)
.route(
"/health/articles/{id}/reject",
axum::routing::post(article_handler::reject_article),
)
.route(
"/health/articles/{id}/unpublish",
axum::routing::post(article_handler::unpublish_article),
)
.route(
"/health/articles/{id}/view",
axum::routing::post(article_handler::view_article),
)
// 资讯分类
.route(
"/health/article-categories",
axum::routing::get(article_category_handler::list_categories)
.post(article_category_handler::create_category),
)
.route(
"/health/article-categories/{id}",
axum::routing::put(article_category_handler::update_category)
.delete(article_category_handler::delete_category),
)
// 资讯标签
.route(
"/health/article-tags",
axum::routing::get(article_tag_handler::list_tags)
.post(article_tag_handler::create_tag),
)
.route(
"/health/article-tags/{id}",
axum::routing::delete(article_tag_handler::delete_tag),
)
// 积分商城 — 患者端
.route(
"/health/points/account",
@@ -630,6 +672,12 @@ impl ErpModule for HealthModule {
description: "创建、编辑、删除健康资讯文章".into(),
module: "health".into(),
},
PermissionDescriptor {
code: "health.articles.review".into(),
name: "审核资讯".into(),
description: "审核通过或拒绝资讯文章发布".into(),
module: "health".into(),
},
PermissionDescriptor {
code: "health.points.list".into(),
name: "查看积分".into(),