Przeglądaj źródła

feat(web): 报告编辑页路由 + 归档/编辑 API 封装

新增 archiveReport/archiveReportsBatch/editHealthReport 接口封装,注册 health-reports/:id/edit 编辑页路由

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
liaoxg 1 miesiąc temu
rodzic
commit
4e08589bdb
2 zmienionych plików z 31 dodań i 0 usunięć
  1. 24 0
      cfc-web/src/api/admin.js
  2. 7 0
      cfc-web/src/router/index.js

+ 24 - 0
cfc-web/src/api/admin.js

@@ -1963,6 +1963,30 @@ export function getHealthReportDetail(reportId) {
   })
 }
 
+export function archiveReport(reportId) {
+  return request({
+    url: '/api/health/report/archive',
+    method: 'post',
+    data: { reportId }
+  })
+}
+
+export function archiveReportsBatch(reportIds) {
+  return request({
+    url: '/api/health/report/archive-batch',
+    method: 'post',
+    data: { reportIds }
+  })
+}
+
+export function editHealthReport(data) {
+  return request({
+    url: '/api/health/report/edit',
+    method: 'post',
+    data
+  })
+}
+
 // ===== CF值(平台积分)管理 =====
 export function getCfValueBalance(data) {
   return request({

+ 7 - 0
cfc-web/src/router/index.js

@@ -526,6 +526,13 @@ const routes = [
         component: () => import('@/views/admin/UnifiedHealthReports.vue'),
         meta: { title: '健康报告', perm: 'health:reports' }
       },
+      {
+        path: 'health-reports/:id/edit',
+        name: 'HealthReportEdit',
+        component: () => import('@/views/admin/HealthReportEdit.vue'),
+        meta: { title: '编辑报告', perm: 'health:reports' },
+        props: true
+      },
       {
         path: 'health-indicators',
         name: 'HealthIndicators',