feat: 完善版本管理功能

后端改进:
- 新增版本发布状态管理 (draft/published/deprecated/superseded)
- 新增发布/废弃/回滚 API 接口
- 新增增量包生成功能 (仅包含差异文件)
- 新增删除版本时的依赖检查
- 数据库字段: publish_status, superseded_by, delta_package_*

前端改进:
- 版本列表新增发布状态列和增量包大小列
- 新增发布/废弃/回滚操作按钮
- 新增增量包下载功能
- 更新国际化翻译

修复:
- 修复 announcements 页面 typeOptions 未定义问题
- 修复 echarts 模块导入类型问题

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-01 20:31:52 +08:00
parent c3e44c74da
commit c755587a4d
13 changed files with 774 additions and 92 deletions
+24 -2
View File
@@ -1415,6 +1415,15 @@
"batchExportBtn": "Batch Export",
"batchDeleteConfirm": "Are you sure you want to delete {count} selected versions? This action cannot be undone.",
"batchDeleteSuccess": "Batch delete successful",
"publishTitle": "Publish Version",
"publishConfirm": "Are you sure you want to publish version \"v{version}\"? This will make it available to users.",
"publishSuccess": "Version published successfully",
"deprecateTitle": "Deprecate Version",
"deprecateConfirm": "Are you sure you want to deprecate version \"v{version}\"? This will stop distributing it to users.",
"deprecateSuccess": "Version deprecated successfully",
"rollbackTitle": "Rollback Version",
"rollbackConfirm": "Are you sure you want to rollback version \"v{version}\"? This will restore it to published status.",
"rollbackSuccess": "Version rolled back successfully",
"select": "Select",
"columns": {
"version": "Version",
@@ -1425,9 +1434,19 @@
"type": "Type",
"method": "Method",
"status": "Status",
"deltaPackage": "Delta",
"createdAt": "Created At",
"actions": "Actions"
},
"actions": {
"download": "Download",
"downloadDelta": "Download Delta",
"edit": "Edit",
"delete": "Delete",
"publish": "Publish",
"deprecate": "Deprecate",
"rollback": "Rollback"
},
"strategies": {
"optional": "Optional",
"forced": "Forced"
@@ -1441,8 +1460,11 @@
"manual": "Manual Update"
},
"status": {
"active": "Active",
"superseded": "Superseded"
"draft": "Draft",
"published": "Published",
"deprecated": "Deprecated",
"superseded": "Superseded",
"active": "Active"
},
"createForm": {
"title": "Create Version",
+24 -2
View File
@@ -1393,6 +1393,15 @@
"batchExportBtn": "批量导出",
"batchDeleteConfirm": "确定要删除选中的 {count} 个版本吗?此操作不可撤销。",
"batchDeleteSuccess": "批量删除成功",
"publishTitle": "发布版本",
"publishConfirm": "确定要发布版本「v{version}」吗?发布后将分发给用户。",
"publishSuccess": "版本发布成功",
"deprecateTitle": "废弃版本",
"deprecateConfirm": "确定要废弃版本「v{version}」吗?废弃后将停止分发给用户。",
"deprecateSuccess": "版本废弃成功",
"rollbackTitle": "回滚版本",
"rollbackConfirm": "确定要回滚版本「v{version}」吗?回滚后将恢复为已发布状态。",
"rollbackSuccess": "版本回滚成功",
"select": "选择",
"columns": {
"version": "版本号",
@@ -1403,9 +1412,19 @@
"type": "更新类型",
"method": "更新方式",
"status": "状态",
"deltaPackage": "增量包",
"createdAt": "创建时间",
"actions": "操作"
},
"actions": {
"download": "下载",
"downloadDelta": "下载增量包",
"edit": "编辑",
"delete": "删除",
"publish": "发布",
"deprecate": "废弃",
"rollback": "回滚"
},
"strategies": {
"optional": "可选更新",
"forced": "强制更新"
@@ -1419,8 +1438,11 @@
"manual": "手动更新"
},
"status": {
"active": "有效",
"superseded": "已失效"
"draft": "草稿",
"published": "已发布",
"deprecated": "已废弃",
"superseded": "已失效",
"active": "有效"
},
"createForm": {
"title": "创建版本",