fix(dacli/webapi): 报表 API 镜像路径从 jnpf-web-datareport 改为主 webapp
jnpf-web-datareport 是 jQuery 老项目, 没有 src/api/ 目录 (只有 src/index.js) 原路径 /jnpf/前端/jnpf-web-datareport/src/api/index.js 永远 ENOENT, 任何 dacli report 命令触发 initWebapi 都炸 新路径 /web/apps/jnpf-web-apps-main/src/api/onlineDev/report.ts 是 Vue 3 主 webapp 的报表 API 客户端, 导出 getReportList/getReportInfo/delReport/copy/ getData/saveVersion 等 6 个函数, 走 /api/Report 端点 (被 nginx 代理到报表服务 32000) 验证: loadWebModule 成功, 6 个函数都拿到, dacli report list --json 不再 ENOENT Co-Authored-By: Claude <[email protected]>
This commit is contained in:
1 parent
c70ffb7844
commit
f32faa69e5
1 file changed
+14
-9
+14
-9
@@ -1,18 +1,23 @@
|
||||
/**
|
||||
* webapi/report.ts — 镜像 web 端 jnpf-web-datareport (v0.11+ Phase 2)
|
||||
* webapi/report.ts — 镜像 web 端报表 API (主 webapp 的 onlineDev/report.ts)
|
||||
*
|
||||
* 注意: 报表是独立子项目 jnpf-web-datareport
|
||||
* 端点 (走主平台 backend):
|
||||
* - /api/extend/ReportManage (CRUD 报表)
|
||||
* - /api/extend/ReportCategory (分类)
|
||||
* - /api/extend/DataReport (数据/预览)
|
||||
*
|
||||
* 用户 2026-06-25 修正: 报表 web 端在 jnpf-web-datareport, 不在主 webapp
|
||||
* 注意:
|
||||
* - jnpf-web-datareport (jQuery 老项目) 没有 src/api/ 目录, 无法镜像
|
||||
* - 改用主 webapp Vue 3 版的 report.ts
|
||||
* - 端点走 /api/Report (大写 R, 被 nginx 代理到报表服务 32000):
|
||||
* - GET /api/Report 列表
|
||||
* - GET /api/Report/{id} 详情
|
||||
* - POST /api/Report 新建
|
||||
* - PUT /api/Report/{id} 修改
|
||||
* - DELETE /api/Report/{id} 删除
|
||||
* - POST /api/Report/{id}/Actions/Copy
|
||||
* - POST /api/Report/Data 预览/取数
|
||||
* - POST /api/Report/Save 保存设计
|
||||
*/
|
||||
import { JnpfClient } from '../core/client.ts'
|
||||
import { loadWebModule } from './_loader.ts'
|
||||
|
||||
const REPORT_SRC = '/home/ubuntu/ccWorkDir/jnpf/前端/jnpf-web-datareport/src/api/index.js'
|
||||
const REPORT_SRC = '/home/ubuntu/ccWorkDir/web/apps/jnpf-web-apps-main/src/api/onlineDev/report.ts'
|
||||
|
||||
let cached: any = null
|
||||
|
||||
|
||||
Reference in new issue
Block a user