Files
2026-05-31 19:47:50 +08:00

99 lines
2.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# E10 内部 API: getFormFieldPage
## 端点
```
POST /api/workflow/core/form/field/manage/getFormFieldPage
```
浏览器内调用,自动带 session cookie 认证。
## 请求体
```json
{
"pageNo": 1,
"pageSize": 20,
"module": "workflow",
"formFieldSearchEntity": {
"isDelete": 0,
"status": "enable",
"formId": "1185512764483297325",
"formTableId": "1185512764483297435"
}
}
```
| 参数 | 说明 |
|------|------|
| pageNo | 页码(非 `page` |
| pageSize | 每页条数(非 `size` |
| module | 固定 `workflow` |
| formFieldSearchEntity.isDelete | 0 |
| formFieldSearchEntity.status | `enable` |
| formFieldSearchEntity.formId | 表单 ID |
| formFieldSearchEntity.formTableId | 表 ID(主表 vs 明细表);主表必传,明细表传对应的 tableId |
## 响应结构
```json
{
"code": 200,
"msg": "接口返回成功",
"status": true,
"data": {
"pageDatas": {
"pageNo": 1,
"pageSize": 20,
"result": [
{
"title": "申请人",
"dataKey": "sqr",
"type": "Employee",
"fieldId": "1185512764483297398",
"formId": "1185512764483297325",
"formTableId": "1185512764483297435",
"showOrder": 0,
"groupName": "基础信息",
"columnName": "sqr",
"columnType": "MEDIUMTEXT",
"systemField": false,
"componentKey": "Employee"
}
]
}
}
}
```
## 获取 formId 的方法
### 方法 1: localStorage
```
localStorage key: Form_0_<formId>_checkNewForm
```
示例: `Form_0_1185512764483297325_checkNewForm` → formId = `1185512764483297325`
### 方法 2: XHR 拦截
注入 `XMLHttpRequest` 钩子,然后在页面上切换 主表/明细表 tab 触发 API 调用,从捕获的请求体中提取。
### 方法 3: 页面 URL 提取
流程详情页 URL: `/info/engine_wf/pathdef/list/company/pathset/<WORKFLOW_ID>/base`
## 已知示例
来自"06.用车审批流程"(浙江聿见纺织科技 E10 v10.0.2508.01:
| 属性 | 值 |
|------|-----|
| formId | 1185512764483297325 |
| formTableId (主表) | 1185512764483297435 |
| workflowId | 1185512781721886720 |
| 数据库表 | fl_ycsplc |
| 主表字段数 | 13 |
| 明细表字段数 | 0(无明细表) |