@qingflow-tech/qingflow-cli 1.1.50-beta.3 → 1.1.50-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/skills/qingflow-cli/reference/builder/50-views.md +7 -4
- package/src/qingflow_mcp/builder_facade/models.py +19 -0
- package/src/qingflow_mcp/builder_facade/schemas/views/manifest.json +2 -3
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/complete.json +67 -15
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/button-config.json +3 -3
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/data-permission.json +1 -1
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/display.json +13 -11
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/operation-permission.json +3 -3
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/query-condition.json +1 -1
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/summary.json +51 -6
- package/src/qingflow_mcp/builder_facade/service.py +34 -1
- package/src/qingflow_mcp/builder_facade/views_extract.py +21 -1
- package/src/qingflow_mcp/solution/compiler/view_compiler.py +2 -1
- package/src/qingflow_mcp/solution/executor.py +3 -1
- package/src/qingflow_mcp/solution/spec_models.py +1 -0
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Qingflow CLI 是轻流面向开发者和 AI Agent 的命令行工具。它把轻
|
|
|
7
7
|
## 安装
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install @qingflow-tech/qingflow-cli@1.1.50-beta.
|
|
10
|
+
npm install @qingflow-tech/qingflow-cli@1.1.50-beta.4
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
推荐从官网复制这一条一键安装 Qingflow CLI:
|
|
@@ -21,7 +21,7 @@ npx qingflow-cli@latest install
|
|
|
21
21
|
## 运行
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npx -y -p @qingflow-tech/qingflow-cli@1.1.50-beta.
|
|
24
|
+
npx -y -p @qingflow-tech/qingflow-cli@1.1.50-beta.4 qingflow
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
全局安装后可以直接运行:
|
|
@@ -62,7 +62,7 @@ qingflow-skills install --agent codex --scope user
|
|
|
62
62
|
如果你通过一次性 `npx -p` 执行 skills 安装,建议加 `--copy`,避免 symlink 指向 npm 临时执行缓存:
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
|
-
npx -y -p @qingflow-tech/qingflow-cli@1.1.50-beta.
|
|
65
|
+
npx -y -p @qingflow-tech/qingflow-cli@1.1.50-beta.4 qingflow-skills install --agent codex --scope user --copy
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
`qingflow-skills install` 默认使用 symlink,且遇到同名 skill 不会覆盖;只有显式传入 `--force` 才会替换。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qingflow-tech/qingflow-cli",
|
|
3
|
-
"version": "1.1.50-beta.
|
|
3
|
+
"version": "1.1.50-beta.4",
|
|
4
4
|
"description": "Human-friendly Qingflow command line interface for auth, record operations, import, tasks, and stable builder flows.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/pyproject.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Builder Views
|
|
2
2
|
|
|
3
|
-
Read this when the task is about table/card/board/gantt/hierarchy views, fixed filters, query panels, view sorting, view data permissions, associated report/view display on a view, or repairing existing views.
|
|
3
|
+
Read this when the task is about table/card/board/gantt/hierarchy/calendar views, fixed filters, query panels, view sorting, view data permissions, associated report/view display on a view, or repairing existing views.
|
|
4
4
|
|
|
5
5
|
## Scope
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ app get -> app get fields/views -> views schema -> prepare one view -> views val
|
|
|
18
18
|
|
|
19
19
|
视图声明是**版本化契约**(`apiVersion: builder.qingflow.com/v1alpha1`)。`builder views apply` 是视图创建的**唯一入口**(旧命令式 `view_create` 已删除;不要再寻找或使用任何“直接创建视图”的命令/工具)。
|
|
20
20
|
|
|
21
|
-
- **两级 schema**:**summary**(最简版:类型/名称/数据展示内容 + `data_permission` 数据权限形状)与 **complete**(完整版:visibility 可见性授权、`filters`、`sort`、`query_conditions`、`action_buttons`/`buttons`、`associated_resources`、`card`/`gantt`/`hierarchy` 类型专属配置、`display`/`record`/`share`)。字段级定义逐字段带 `x-backend` 后端映射。
|
|
21
|
+
- **两级 schema**:**summary**(最简版:类型/名称/数据展示内容 + `data_permission` 数据权限形状)与 **complete**(完整版:visibility 可见性授权、`filters`、`sort`、`query_conditions`、`action_buttons`/`buttons`、`associated_resources`、`card`/`gantt`/`hierarchy`/`calendar` 类型专属配置、`display`/`record`/`share`)。字段级定义逐字段带 `x-backend` 后端映射。
|
|
22
22
|
- **读 schema**:`qingflow --json builder views schema` 默认返回 `v1alpha1/summary.json`;需要完整可写配置时显式传 `--schema-kind complete`。MCP 对应 `app_views_schema`。
|
|
23
23
|
- **Schema-first 写入**:先用 `builder views schema --schema-version VERSION --schema-kind complete` 读取完整 schema;将相同版本显式传给 `validate --schema-version VERSION` 和 `apply --schema-version VERSION`。`validate` 也可从声明信封读取 `schema_version`,但推荐显式传版本;apply 的版本校验必须用 `--schema-version`。`validate` 接受一个直接视图声明对象,不接受 `upsert_view` 包装或批量 envelope。
|
|
24
24
|
- **说明字段**:视图 Schema 使用语义化的 `*Description` 自定义 key(如 `dataPermissionDescription`)承载说明,加载和引用展开时原样保留;读取说明的工具应识别这些 key。标准校验器忽略这些自定义字段,仍按 `type`、`enum`、`required` 等关键字校验;`default` 是标准注解,不会自动填值。`*Description` 不是提交视图声明时的业务字段。
|
|
@@ -26,7 +26,8 @@ app get -> app get fields/views -> views schema -> prepare one view -> views val
|
|
|
26
26
|
- **读 canonical 声明**:`qingflow --json builder views get --app-key APP --schema-version VERSION --schema-kind summary`,返回指定版本的 summary 声明数组(字段名反解);完整可写配置用 `--schema-kind complete` 并检查 `config_read_errors[].gaps`。
|
|
27
27
|
- **完整声明的提取边界**:`views get --schema-kind complete` 优先读取 `buttonConfigVO` 中的完整按钮绑定。公式过滤、无法解析的过滤规则或按钮 ID 会使该视图返回 `VIEW_NOT_EXTRACTABLE`(见 `details.config_read_errors[].gaps`),不会生成删减后的可写声明。修改这类视图的其他属性应使用局部 patch。更新现有视图时,已配置的系统字段原样保留,不补默认值、不重算序号;读接口生成的未配置占位对象不会写回,不会因此新增系统字段配置。
|
|
28
28
|
- **版本协商**:apply 显式传 `--schema-version v1alpha1` 时启用版本化校验:非法声明返回 `INVALID_SPEC` 且**不写**;响应信封回显 `schemaVersion`。apply 不传时行为与旧版一致(别名宽容,零破坏)。
|
|
29
|
-
-
|
|
29
|
+
- **公开视图类型**:summary 与 complete 均支持 `table`、`card`、`board`、`gantt`、`hierarchy`、`calendar`。层级视图须提供 `hierarchy: {title_que_id, children_que_id}`;日历视图须提供 `calendar: {title_que_id, date_que_id}`,可选 `color_que_id`。日历 `date_que_id` 可引用表单日期字段,也可用系统字段 `2`(申请时间)或 `3`(更新时间)。
|
|
30
|
+
- **complete 档配置速览**:`data_permission`(`{type: config|custom, scope: all|oneself|dept|subordinate|custom}`;`scope=custom` 的规则明细写 `filters`);`sort`(`[{que_id, ascending}]`,空数组=恢复默认排序);`hierarchy`(可选 `root_filter`);`card`/`gantt`/`calendar`/`display`/`record`/`share` 配置组。
|
|
30
31
|
|
|
31
32
|
## Update existing views
|
|
32
33
|
|
|
@@ -132,7 +133,7 @@ CLI 将参数与文件内容拼装为服务层载荷,**顶层键**如下:
|
|
|
132
133
|
|
|
133
134
|
## 5. `type` 与各类型必填
|
|
134
135
|
|
|
135
|
-
契约 **`view.type`**:**`table`** | **`card`** | **`board`** | **`gantt`**。
|
|
136
|
+
契约 **`view.type`**:**`table`** | **`card`** | **`board`** | **`gantt`** | **`hierarchy`** | **`calendar`**。
|
|
136
137
|
|
|
137
138
|
| `type` | 列/字段要点 | 类型专属键 |
|
|
138
139
|
|--------|----------------|------------|
|
|
@@ -140,6 +141,8 @@ CLI 将参数与文件内容拼装为服务层载荷,**顶层键**如下:
|
|
|
140
141
|
| **`card`** | 同 table | — |
|
|
141
142
|
| **`board`**(看板) | 列;且须 **`group_by`**(分组字段名) | **`group_by`** |
|
|
142
143
|
| **`gantt`** | 列;须 **`start_field`**、**`end_field`**(通常为日期类字段名) | 可选 **`title_field`** |
|
|
144
|
+
| **`hierarchy`** | 层级标题字段和父子关系字段 | `hierarchy.title_que_id`、`hierarchy.children_que_id`;可选 `hierarchy.root_filter` |
|
|
145
|
+
| **`calendar`** | 标题字段和日期字段 | `calendar.title_que_id`、`calendar.date_que_id`;可选 `calendar.color_que_id` |
|
|
143
146
|
|
|
144
147
|
实现侧校验:对 **table/card**,`columns` 至少包含一列;已知系统字段在读取已有视图时原样透传,不要求出现在表单业务字段索引中。未知系统字段仍会报告覆盖缺口。
|
|
145
148
|
|
|
@@ -135,6 +135,7 @@ class PublicViewType(str, Enum):
|
|
|
135
135
|
board = "board"
|
|
136
136
|
gantt = "gantt"
|
|
137
137
|
hierarchy = "hierarchy"
|
|
138
|
+
calendar = "calendar"
|
|
138
139
|
|
|
139
140
|
|
|
140
141
|
class PublicButtonTriggerAction(str, Enum):
|
|
@@ -1273,6 +1274,14 @@ class ViewHierarchyConfigPatch(StrictModel):
|
|
|
1273
1274
|
)
|
|
1274
1275
|
|
|
1275
1276
|
|
|
1277
|
+
class ViewCalendarConfigPatch(StrictModel):
|
|
1278
|
+
"""日历视图特有配置 → viewgraphCalendarConfigVO。"""
|
|
1279
|
+
|
|
1280
|
+
title_que_id: int = Field(validation_alias=AliasChoices("title_que_id", "titleQueId"))
|
|
1281
|
+
date_que_id: int = Field(validation_alias=AliasChoices("date_que_id", "dateQueId"))
|
|
1282
|
+
color_que_id: int | None = Field(default=None, validation_alias=AliasChoices("color_que_id", "colorQueId"))
|
|
1283
|
+
|
|
1284
|
+
|
|
1276
1285
|
class ViewDisplayConfigPatch(StrictModel):
|
|
1277
1286
|
"""展示杂项 → defaultRowHigh/beingPinNavigate/remark。"""
|
|
1278
1287
|
|
|
@@ -1429,6 +1438,7 @@ class ViewUpsertPatch(StrictModel):
|
|
|
1429
1438
|
card: ViewCardConfigPatch | None = Field(default=None)
|
|
1430
1439
|
gantt: ViewGanttConfigPatch | None = Field(default=None)
|
|
1431
1440
|
hierarchy: ViewHierarchyConfigPatch | None = Field(default=None)
|
|
1441
|
+
calendar: ViewCalendarConfigPatch | None = Field(default=None)
|
|
1432
1442
|
display: ViewDisplayConfigPatch | None = Field(default=None)
|
|
1433
1443
|
record: ViewRecordConfigPatch | None = Field(default=None)
|
|
1434
1444
|
share: ViewShareConfigPatch | None = Field(default=None)
|
|
@@ -1497,6 +1507,10 @@ class ViewUpsertPatch(StrictModel):
|
|
|
1497
1507
|
payload["type"] = "board"
|
|
1498
1508
|
elif normalized == "ganttview":
|
|
1499
1509
|
payload["type"] = "gantt"
|
|
1510
|
+
elif normalized == "hierarchyview":
|
|
1511
|
+
payload["type"] = "hierarchy"
|
|
1512
|
+
elif normalized == "calendarview":
|
|
1513
|
+
payload["type"] = "calendar"
|
|
1500
1514
|
return payload
|
|
1501
1515
|
|
|
1502
1516
|
@model_validator(mode="after")
|
|
@@ -1512,6 +1526,11 @@ class ViewUpsertPatch(StrictModel):
|
|
|
1512
1526
|
raise ValueError("hierarchy view requires hierarchy.title_que_id and children_que_id")
|
|
1513
1527
|
elif self.hierarchy is not None:
|
|
1514
1528
|
raise ValueError("hierarchy config is only allowed on hierarchy views")
|
|
1529
|
+
if self.type == PublicViewType.calendar:
|
|
1530
|
+
if self.calendar is None:
|
|
1531
|
+
raise ValueError("calendar view requires calendar.title_que_id and date_que_id")
|
|
1532
|
+
elif self.calendar is not None:
|
|
1533
|
+
raise ValueError("calendar config is only allowed on calendar views")
|
|
1515
1534
|
if self.type != PublicViewType.card and self.card is not None:
|
|
1516
1535
|
raise ValueError("card config is only allowed on card views")
|
|
1517
1536
|
if self.type != PublicViewType.gantt and self.gantt is not None:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://qingflow.com/schemas/builder/views/v1alpha1/complete.json",
|
|
4
4
|
"title": "Qingflow Builder Views Declaration · complete (v1alpha1)",
|
|
5
|
-
"viewCompleteDescription": "视图完整声明(完整版 spec):summary 的严格超集,覆盖 app_views_apply 当前支持的公开语义——数据权限/可见性授权/筛选/排序/查询条件/按钮配置/关联资源/类型特有配置(card/gantt/hierarchy)/展示与记录开关/分享安全。展示、排序、筛选和类型专属字段使用整数 queId;查询条件 rows 兼容字段名或 ID
|
|
5
|
+
"viewCompleteDescription": "视图完整声明(完整版 spec):summary 的严格超集,覆盖 app_views_apply 当前支持的公开语义——数据权限/可见性授权/筛选/排序/查询条件/按钮配置/关联资源/类型特有配置(card/gantt/hierarchy/calendar)/展示与记录开关/分享安全。展示、排序、筛选和类型专属字段使用整数 queId;查询条件 rows 兼容字段名或 ID。打印模板明细、附件权限、列级权限和高级筛选公式尚未进入公开写入契约。schema 校验在别名归一之后执行,只约束规范名。各配置域的专项 Schema(含清空/替换语义)通过 app_views_schema 换 schema_kind 获取(见 x-qingflow-related-schemas)。",
|
|
6
6
|
"$defs": {
|
|
7
7
|
"ViewDeclaration": {
|
|
8
8
|
"type": "object",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"type": "string",
|
|
27
27
|
"minLength": 1,
|
|
28
28
|
"maxLength": 200,
|
|
29
|
+
"viewNameDescription": "视图名称;未提供 view_key 时按 name 唯一匹配决定更新或创建,重名报 AMBIGUOUS_VIEW。",
|
|
29
30
|
"x-backend": "viewgraphName"
|
|
30
31
|
},
|
|
31
32
|
"type": {
|
|
@@ -35,10 +36,11 @@
|
|
|
35
36
|
"card",
|
|
36
37
|
"board",
|
|
37
38
|
"gantt",
|
|
38
|
-
"hierarchy"
|
|
39
|
+
"hierarchy",
|
|
40
|
+
"calendar"
|
|
39
41
|
],
|
|
40
|
-
"viewTypeDescription": "
|
|
41
|
-
"x-backend": "viewgraphType(tableView/cardView/boardView/ganttView/hierarchyView)"
|
|
42
|
+
"viewTypeDescription": "支持表格、卡片、看板、甘特、层级和日历视图。",
|
|
43
|
+
"x-backend": "viewgraphType(tableView/cardView/boardView/ganttView/hierarchyView/calendarView)"
|
|
42
44
|
},
|
|
43
45
|
"columns": {
|
|
44
46
|
"type": "array",
|
|
@@ -134,6 +136,11 @@
|
|
|
134
136
|
"hierarchyDescription": "层级视图特有配置(hierarchy 类型适用,必填)。",
|
|
135
137
|
"x-backend": "viewgraphHierarchyConfigVO(titleQueId/childrenQueId/rootNodeFilter)"
|
|
136
138
|
},
|
|
139
|
+
"calendar": {
|
|
140
|
+
"$ref": "#/$defs/CalendarConfig",
|
|
141
|
+
"calendarDescription": "日历视图特有配置(calendar 类型适用,必填)。",
|
|
142
|
+
"x-backend": "viewgraphCalendarConfigVO(titleQueId/dateQueId/colorQueId)"
|
|
143
|
+
},
|
|
137
144
|
"display": {
|
|
138
145
|
"$ref": "#/$defs/DisplayConfig",
|
|
139
146
|
"displayDescription": "展示杂项:行高/固定导航/备注。",
|
|
@@ -291,6 +298,13 @@
|
|
|
291
298
|
"hierarchy"
|
|
292
299
|
]
|
|
293
300
|
}
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"if": {
|
|
304
|
+
"properties": { "type": { "const": "calendar" } },
|
|
305
|
+
"required": ["type"]
|
|
306
|
+
},
|
|
307
|
+
"then": { "required": ["calendar"] }
|
|
294
308
|
}
|
|
295
309
|
]
|
|
296
310
|
},
|
|
@@ -497,10 +511,12 @@
|
|
|
497
511
|
"ascending": {
|
|
498
512
|
"type": "boolean",
|
|
499
513
|
"default": true,
|
|
514
|
+
"ascendingDescription": "是否升序;默认 true。",
|
|
500
515
|
"x-backend": "beingSortAscend"
|
|
501
516
|
},
|
|
502
517
|
"que_id": {
|
|
503
518
|
"type": "integer",
|
|
519
|
+
"queIdDescription": "排序字段 queId。别名 fieldName/field/name。",
|
|
504
520
|
"x-backend": "ViewgraphSortQuestion.queId"
|
|
505
521
|
}
|
|
506
522
|
}
|
|
@@ -512,11 +528,13 @@
|
|
|
512
528
|
"enabled": {
|
|
513
529
|
"type": "boolean",
|
|
514
530
|
"default": true,
|
|
531
|
+
"enabledDescription": "是否开启查询面板。",
|
|
515
532
|
"x-backend": "queryConditionStatus"
|
|
516
533
|
},
|
|
517
534
|
"exact": {
|
|
518
535
|
"type": "boolean",
|
|
519
536
|
"default": false,
|
|
537
|
+
"exactDescription": "是否精确匹配;true=多条件同时满足,false=任一满足。",
|
|
520
538
|
"x-backend": "queryConditionExact"
|
|
521
539
|
},
|
|
522
540
|
"hide_before_query": {
|
|
@@ -813,31 +831,37 @@
|
|
|
813
831
|
"default",
|
|
814
832
|
"fill"
|
|
815
833
|
],
|
|
834
|
+
"clippingModeDescription": "封面裁剪模式:default=默认,fill=填充。",
|
|
816
835
|
"x-backend": "clippingMode(default 实测)"
|
|
817
836
|
},
|
|
818
837
|
"image_adaption": {
|
|
819
838
|
"type": "boolean",
|
|
820
839
|
"default": false,
|
|
840
|
+
"imageAdaptionDescription": "封面图是否自适应尺寸。",
|
|
821
841
|
"x-backend": "beingImageAdaption"
|
|
822
842
|
},
|
|
823
843
|
"show_field_title": {
|
|
824
844
|
"type": "boolean",
|
|
825
845
|
"default": true,
|
|
846
|
+
"showFieldTitleDescription": "是否显示字段标题。",
|
|
826
847
|
"x-backend": "beingShowQueTitle"
|
|
827
848
|
},
|
|
828
849
|
"show_title": {
|
|
829
850
|
"type": "boolean",
|
|
830
851
|
"default": true,
|
|
852
|
+
"showTitleDescription": "是否显示卡片标题。",
|
|
831
853
|
"x-backend": "beingShowTitleQue"
|
|
832
854
|
},
|
|
833
855
|
"show_cover": {
|
|
834
856
|
"type": "boolean",
|
|
835
857
|
"default": false,
|
|
858
|
+
"showCoverDescription": "是否显示封面图。",
|
|
836
859
|
"x-backend": "beingShowCover"
|
|
837
860
|
},
|
|
838
861
|
"group_color": {
|
|
839
862
|
"type": "boolean",
|
|
840
863
|
"default": false,
|
|
864
|
+
"groupColorDescription": "分组是否显示颜色标识。",
|
|
841
865
|
"x-backend": "beingGroupColor"
|
|
842
866
|
},
|
|
843
867
|
"group_que_id": {
|
|
@@ -870,6 +894,7 @@
|
|
|
870
894
|
"year"
|
|
871
895
|
],
|
|
872
896
|
"default": "month",
|
|
897
|
+
"defaultTimeDimensionDescription": "默认时间维度:day/week/month/year。",
|
|
873
898
|
"x-backend": "defaultTimeDimension(month×8/week×4 实测)"
|
|
874
899
|
},
|
|
875
900
|
"auto_calibration": {
|
|
@@ -880,16 +905,18 @@
|
|
|
880
905
|
},
|
|
881
906
|
"groups": {
|
|
882
907
|
"type": "array",
|
|
908
|
+
"groupsDescription": "甘特分组字段列表,按 ordinal 排序。",
|
|
883
909
|
"items": {
|
|
884
910
|
"type": "object",
|
|
885
911
|
"additionalProperties": false,
|
|
886
912
|
"properties": {
|
|
887
913
|
"ordinal": {
|
|
888
|
-
"type": "integer"
|
|
914
|
+
"type": "integer",
|
|
915
|
+
"ordinalDescription": "分组展示顺序。"
|
|
889
916
|
},
|
|
890
917
|
"que_id": {
|
|
891
918
|
"type": "integer",
|
|
892
|
-
"
|
|
919
|
+
"queIdDescription": "分组字段 queId。"
|
|
893
920
|
}
|
|
894
921
|
}
|
|
895
922
|
},
|
|
@@ -898,6 +925,7 @@
|
|
|
898
925
|
"dependencies": {
|
|
899
926
|
"type": "array",
|
|
900
927
|
"maxItems": 1,
|
|
928
|
+
"dependenciesDescription": "任务依赖关系;后端为单对象,v1alpha1 限 1 条。",
|
|
901
929
|
"items": {
|
|
902
930
|
"$ref": "#/$defs/GanttDependency"
|
|
903
931
|
},
|
|
@@ -905,14 +933,17 @@
|
|
|
905
933
|
},
|
|
906
934
|
"start_que_id": {
|
|
907
935
|
"type": "integer",
|
|
936
|
+
"startQueIdDescription": "甘特开始时间字段 queId;与顶层 start_que_id 等价,取其一。",
|
|
908
937
|
"x-backend": "startTimeQueId"
|
|
909
938
|
},
|
|
910
939
|
"end_que_id": {
|
|
911
940
|
"type": "integer",
|
|
941
|
+
"endQueIdDescription": "甘特结束时间字段 queId;与顶层 end_que_id 等价,取其一。",
|
|
912
942
|
"x-backend": "endTimeQueId"
|
|
913
943
|
},
|
|
914
944
|
"title_que_id": {
|
|
915
945
|
"type": "integer",
|
|
946
|
+
"titleQueIdDescription": "甘特标题字段 queId;与顶层 title_que_id 等价。",
|
|
916
947
|
"x-backend": "titleQueId"
|
|
917
948
|
}
|
|
918
949
|
}
|
|
@@ -927,28 +958,32 @@
|
|
|
927
958
|
"properties": {
|
|
928
959
|
"start_start_option_id": {
|
|
929
960
|
"type": "integer",
|
|
961
|
+
"startStartOptionIdDescription": "开始→开始依赖的偏移选项 id(可选)。",
|
|
930
962
|
"x-backend": "startStartOptionId"
|
|
931
963
|
},
|
|
932
964
|
"start_end_option_id": {
|
|
933
965
|
"type": "integer",
|
|
966
|
+
"startEndOptionIdDescription": "开始→结束依赖的偏移选项 id(可选)。",
|
|
934
967
|
"x-backend": "startEndOptionId"
|
|
935
968
|
},
|
|
936
969
|
"end_start_option_id": {
|
|
937
970
|
"type": "integer",
|
|
971
|
+
"endStartOptionIdDescription": "结束→开始依赖的偏移选项 id(可选)。",
|
|
938
972
|
"x-backend": "endStartOptionId"
|
|
939
973
|
},
|
|
940
974
|
"end_end_option_id": {
|
|
941
975
|
"type": "integer",
|
|
976
|
+
"endEndOptionIdDescription": "结束→结束依赖的偏移选项 id(可选)。",
|
|
942
977
|
"x-backend": "endEndOptionId"
|
|
943
978
|
},
|
|
944
979
|
"dependency_que_id": {
|
|
945
980
|
"type": "integer",
|
|
946
|
-
"
|
|
981
|
+
"dependencyQueIdDescription": "被依赖(后续)任务的关联字段 queId。",
|
|
947
982
|
"x-backend": "dependencyQueId"
|
|
948
983
|
},
|
|
949
984
|
"predecessor_que_id": {
|
|
950
985
|
"type": "integer",
|
|
951
|
-
"
|
|
986
|
+
"predecessorQueIdDescription": "前置任务的关联字段 queId。",
|
|
952
987
|
"x-backend": "predecessorTaskQueId"
|
|
953
988
|
}
|
|
954
989
|
}
|
|
@@ -974,14 +1009,26 @@
|
|
|
974
1009
|
},
|
|
975
1010
|
"title_que_id": {
|
|
976
1011
|
"type": "integer",
|
|
1012
|
+
"titleQueIdDescription": "层级标题字段 queId。",
|
|
977
1013
|
"x-backend": "viewgraph_hierarchy_config.titleQueId"
|
|
978
1014
|
},
|
|
979
1015
|
"children_que_id": {
|
|
980
1016
|
"type": "integer",
|
|
1017
|
+
"childrenQueIdDescription": "子节点关联字段 queId(引用/关联字段)。",
|
|
981
1018
|
"x-backend": "childrenQueId"
|
|
982
1019
|
}
|
|
983
1020
|
}
|
|
984
1021
|
},
|
|
1022
|
+
"CalendarConfig": {
|
|
1023
|
+
"type": "object",
|
|
1024
|
+
"additionalProperties": false,
|
|
1025
|
+
"required": ["title_que_id", "date_que_id"],
|
|
1026
|
+
"properties": {
|
|
1027
|
+
"title_que_id": { "type": "integer", "calendarTitleQueIdDescription": "日历事项标题字段 queId。", "x-backend": "titleQueId" },
|
|
1028
|
+
"date_que_id": { "type": "integer", "calendarDateQueIdDescription": "日历日期字段 queId;可使用表单日期字段或系统字段申请时间(2)/更新时间(3)。", "x-backend": "dateQueId" },
|
|
1029
|
+
"color_que_id": { "type": "integer", "calendarColorQueIdDescription": "可选的日历颜色字段 queId。", "x-backend": "colorQueId" }
|
|
1030
|
+
}
|
|
1031
|
+
},
|
|
985
1032
|
"DisplayConfig": {
|
|
986
1033
|
"type": "object",
|
|
987
1034
|
"additionalProperties": false,
|
|
@@ -994,15 +1041,18 @@
|
|
|
994
1041
|
"highest",
|
|
995
1042
|
"high"
|
|
996
1043
|
],
|
|
1044
|
+
"rowHeightDescription": "表格行高:compact=紧凑,moderate=适中,high=高,highest=最高。",
|
|
997
1045
|
"x-backend": "defaultRowHigh(compact×705 实测)"
|
|
998
1046
|
},
|
|
999
1047
|
"pin_navigate": {
|
|
1000
1048
|
"type": "boolean",
|
|
1001
1049
|
"default": false,
|
|
1050
|
+
"pinNavigateDescription": "是否固定视图内导航;与顶层 pinned(视图列表固定)无关。",
|
|
1002
1051
|
"x-backend": "beingPinNavigate"
|
|
1003
1052
|
},
|
|
1004
1053
|
"remark": {
|
|
1005
1054
|
"type": "string",
|
|
1055
|
+
"remarkDescription": "视图备注。",
|
|
1006
1056
|
"x-backend": "remark"
|
|
1007
1057
|
}
|
|
1008
1058
|
}
|
|
@@ -1014,26 +1064,31 @@
|
|
|
1014
1064
|
"audit_visible": {
|
|
1015
1065
|
"type": "boolean",
|
|
1016
1066
|
"default": true,
|
|
1067
|
+
"auditVisibleDescription": "是否显示操作记录。",
|
|
1017
1068
|
"x-backend": "beingAuditRecordVisible"
|
|
1018
1069
|
},
|
|
1019
1070
|
"data_log_visible": {
|
|
1020
1071
|
"type": "boolean",
|
|
1021
1072
|
"default": true,
|
|
1073
|
+
"dataLogVisibleDescription": "是否显示数据日志(字段变更历史)。",
|
|
1022
1074
|
"x-backend": "beingDataLogVisible"
|
|
1023
1075
|
},
|
|
1024
1076
|
"qrobot_record_visible": {
|
|
1025
1077
|
"type": "boolean",
|
|
1026
1078
|
"default": false,
|
|
1079
|
+
"qrobotRecordVisibleDescription": "是否显示机器人记录。",
|
|
1027
1080
|
"x-backend": "beingQrobotRecordVisible"
|
|
1028
1081
|
},
|
|
1029
1082
|
"workflow_future_visible": {
|
|
1030
1083
|
"type": "boolean",
|
|
1031
1084
|
"default": true,
|
|
1085
|
+
"workflowFutureVisibleDescription": "是否显示流程未来节点。",
|
|
1032
1086
|
"x-backend": "beingWorkflowNodeFutureListVisible"
|
|
1033
1087
|
},
|
|
1034
1088
|
"comment": {
|
|
1035
1089
|
"type": "boolean",
|
|
1036
1090
|
"default": false,
|
|
1091
|
+
"commentDescription": "是否开启留言。",
|
|
1037
1092
|
"x-backend": "beingCommentStatus"
|
|
1038
1093
|
}
|
|
1039
1094
|
}
|
|
@@ -1045,6 +1100,7 @@
|
|
|
1045
1100
|
"need_pass": {
|
|
1046
1101
|
"type": "boolean",
|
|
1047
1102
|
"default": false,
|
|
1103
|
+
"needPassDescription": "分享是否需要访问密码;true 时用 password 提供密码。",
|
|
1048
1104
|
"x-backend": "beingNeedPass"
|
|
1049
1105
|
},
|
|
1050
1106
|
"password": {
|
|
@@ -1055,6 +1111,7 @@
|
|
|
1055
1111
|
"force_login": {
|
|
1056
1112
|
"type": "boolean",
|
|
1057
1113
|
"default": false,
|
|
1114
|
+
"forceLoginDescription": "分享是否强制登录后查看。",
|
|
1058
1115
|
"x-backend": "beingForceLogin"
|
|
1059
1116
|
},
|
|
1060
1117
|
"print_enabled": {
|
|
@@ -1071,7 +1128,7 @@
|
|
|
1071
1128
|
{
|
|
1072
1129
|
"kind": "display",
|
|
1073
1130
|
"displayDescription": "展示字段、排序、关联资源和各公开视图类型的专属配置。",
|
|
1074
|
-
"fields": ["columns", "sort", "card", "gantt", "hierarchy", "associated_resources", "display", "group_que_id", "title_que_id", "start_que_id", "end_que_id"]
|
|
1131
|
+
"fields": ["columns", "sort", "card", "gantt", "hierarchy", "calendar", "associated_resources", "display", "group_que_id", "title_que_id", "start_que_id", "end_que_id"]
|
|
1075
1132
|
},
|
|
1076
1133
|
{
|
|
1077
1134
|
"kind": "data-permission",
|
|
@@ -1102,7 +1159,7 @@
|
|
|
1102
1159
|
"kinds": {
|
|
1103
1160
|
"summary": "最小创建声明:类型/名称/展示字段 + 数据权限形状。",
|
|
1104
1161
|
"complete": "完整声明:全部公开可写字段,含各配置域与类型专属配置。",
|
|
1105
|
-
"display": "
|
|
1162
|
+
"display": "展示字段、排序、卡片/甘特/层级/日历配置、分组字段和关联资源。",
|
|
1106
1163
|
"data-permission": "数据权限模式、数据范围和固定筛选条件。",
|
|
1107
1164
|
"operation-permission": "成员可见范围、记录日志、留言、打印和分享策略。",
|
|
1108
1165
|
"query-condition": "用户查询面板的开关、匹配模式和字段布局。",
|
|
@@ -1121,11 +1178,6 @@
|
|
|
1121
1178
|
"backend_warning": "底层 ViewgraphInfo 更新接口对部分省略字段会执行 false、true、空数组或空字符串初始化,因此不得把直接后端请求中的省略统一理解为保留。"
|
|
1122
1179
|
},
|
|
1123
1180
|
"x-qingflow-backend-known-unsupported": {
|
|
1124
|
-
"calendar": {
|
|
1125
|
-
"backend": "viewgraphType=calendarView + viewgraphCalendarConfigVO",
|
|
1126
|
-
"status": "not-writable",
|
|
1127
|
-
"reason": "当前 app_views_apply 编译器没有 calendar 分支。"
|
|
1128
|
-
},
|
|
1129
1181
|
"column_permissions": {
|
|
1130
1182
|
"backend": "viewgraphQuestions/ViewgraphQuestion",
|
|
1131
1183
|
"status": "not-writable",
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"properties": {
|
|
9
|
-
"action_buttons": { "type": "array", "items": { "$ref": "../complete.json#/$defs/ActionButton" }, "maxItems": 60 },
|
|
10
|
-
"action_buttons_mode": { "type": "string", "enum": ["merge", "replace"], "default": "merge" },
|
|
11
|
-
"buttons": { "type": "array", "items": { "$ref": "../complete.json#/$defs/ButtonBinding" }, "maxItems": 60 },
|
|
9
|
+
"action_buttons": { "type": "array", "items": { "$ref": "../complete.json#/$defs/ActionButton" }, "maxItems": 60, "actionButtonsDescription": "系统动作按钮(add_data/link/qRobot/wings);省略保留现有,空数组清空。" },
|
|
10
|
+
"action_buttons_mode": { "type": "string", "enum": ["merge", "replace"], "default": "merge", "actionButtonsModeDescription": "merge=与现有按钮合并(默认),replace=按声明全量替换。" },
|
|
11
|
+
"buttons": { "type": "array", "items": { "$ref": "../complete.json#/$defs/ButtonBinding" }, "maxItems": 60, "buttonsDescription": "已有自定义按钮的视图绑定(按 button_id 引用,维护位置/主次/显隐)。" },
|
|
12
12
|
"query_conditions": { "$ref": "../complete.json#/$defs/QueryConditions", "queryConditionsDescription": "搜索按钮配置依赖的查询面板。" }
|
|
13
13
|
},
|
|
14
14
|
"x-qingflow-related-schemas": {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"properties": {
|
|
9
|
-
"data_permission": { "$ref": "../complete.json#/$defs/DataPermission" },
|
|
9
|
+
"data_permission": { "$ref": "../complete.json#/$defs/DataPermission", "dataPermissionDescription": "数据权限生效类型(config/custom)与数据范围(scope)。" },
|
|
10
10
|
"filters": {
|
|
11
11
|
"type": "array",
|
|
12
12
|
"items": { "anyOf": [
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://qingflow.com/schemas/builder/views/v1alpha1/details/display.json",
|
|
4
4
|
"title": "Qingflow Views display configuration",
|
|
5
|
-
"displayDescription": "视图展示配置片段(schema_kind=display),字段直接并入完整视图声明。所有字段引用均为实际整数 queId
|
|
5
|
+
"displayDescription": "视图展示配置片段(schema_kind=display),字段直接并入完整视图声明。所有字段引用均为实际整数 queId。",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"properties": {
|
|
9
9
|
"pinned": { "type": "boolean", "pinnedDescription": "是否固定在应用的视图列表顶部。true=固定,false=取消固定;省略时保持当前状态。它与 display.pin_navigate 无关。", "x-backend": "POST /app/{appKey}/view/ordinal (FIXED_VIEW_LIST|VIEW_LIST)" },
|
|
10
10
|
"columns": { "type": "array", "items": { "type": "integer" }, "minItems": 1, "columnsDescription": "表格或卡片展示字段,按数组顺序显示。" },
|
|
11
11
|
"sort": { "type": "array", "items": { "$ref": "../complete.json#/$defs/SortRule" }, "sortDescription": "多级排序。空数组恢复默认排序。" },
|
|
12
|
-
"card": { "$ref": "../complete.json#/$defs/CardConfig" },
|
|
13
|
-
"gantt": { "$ref": "../complete.json#/$defs/GanttConfig" },
|
|
14
|
-
"hierarchy": { "$ref": "../complete.json#/$defs/HierarchyConfig" },
|
|
15
|
-
"
|
|
16
|
-
"
|
|
12
|
+
"card": { "$ref": "../complete.json#/$defs/CardConfig", "cardDescription": "卡片视图配置(封面/标题/字段标题/分组)。" },
|
|
13
|
+
"gantt": { "$ref": "../complete.json#/$defs/GanttConfig", "ganttDescription": "甘特视图配置(时间维度/分组/依赖)。" },
|
|
14
|
+
"hierarchy": { "$ref": "../complete.json#/$defs/HierarchyConfig", "hierarchyDescription": "层级视图配置(必填 title_que_id/children_que_id,可选 root_filter)。" },
|
|
15
|
+
"calendar": { "$ref": "../complete.json#/$defs/CalendarConfig", "calendarDescription": "日历视图配置(必填 title_que_id/date_que_id)。" },
|
|
16
|
+
"associated_resources": { "$ref": "../complete.json#/$defs/AssociatedResources", "associatedResourcesDescription": "关联报表/图表资源展示配置;应用级资源池用 app_associated_resources_apply 维护。" },
|
|
17
|
+
"display": { "$ref": "../complete.json#/$defs/DisplayConfig", "displayMiscDescription": "展示杂项(行高/视图内导航固定/备注)。" },
|
|
17
18
|
"group_que_id": { "type": "integer", "groupQueIdDescription": "看板分组字段 queId。" },
|
|
18
|
-
"title_que_id": { "type": "integer", "titleQueIdDescription": "
|
|
19
|
+
"title_que_id": { "type": "integer", "titleQueIdDescription": "卡片、甘特、层级或日历标题字段 queId。" },
|
|
19
20
|
"start_que_id": { "type": "integer", "startQueIdDescription": "甘特开始时间字段 queId。" },
|
|
20
21
|
"end_que_id": { "type": "integer", "endQueIdDescription": "甘特结束时间字段 queId。" }
|
|
21
22
|
},
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
"kinds": {
|
|
28
29
|
"summary": "最小创建声明:类型/名称/展示字段 + 数据权限形状。",
|
|
29
30
|
"complete": "完整声明:全部公开可写字段,含各配置域与类型专属配置。",
|
|
30
|
-
"display": "
|
|
31
|
+
"display": "展示字段、排序、卡片/甘特/层级/日历配置、分组字段和关联资源。",
|
|
31
32
|
"data-permission": "数据权限模式、数据范围和固定筛选条件。",
|
|
32
33
|
"operation-permission": "成员可见范围、记录日志、留言、打印和分享策略。",
|
|
33
34
|
"query-condition": "用户查询面板的开关、匹配模式和字段布局。",
|
|
@@ -56,16 +57,17 @@
|
|
|
56
57
|
"card": "columns 至少包含一个业务字段;标题和封面等使用 card。",
|
|
57
58
|
"board": "必须提供 group_que_id。",
|
|
58
59
|
"gantt": "必须提供 start_que_id 和 end_que_id,或在 gantt 中提供等价字段。",
|
|
59
|
-
"hierarchy": "必须提供 hierarchy.title_que_id 和 hierarchy.children_que_id。"
|
|
60
|
+
"hierarchy": "必须提供 hierarchy.title_que_id 和 hierarchy.children_que_id。",
|
|
61
|
+
"calendar": "必须提供 calendar.title_que_id 和 calendar.date_que_id。date_que_id 可为表单日期字段或系统字段 2(申请时间)/3(更新时间)。"
|
|
60
62
|
},
|
|
61
63
|
"x-qingflow-unsupported": {
|
|
62
|
-
"calendar": "app_views_apply 当前不支持 calendar;后端对应 calendarView + viewgraphCalendarConfigVO。",
|
|
63
64
|
"column_permissions": "列级可编辑、隐藏、下载等 ViewgraphQuestion 配置尚未进入公开 DSL。"
|
|
64
65
|
},
|
|
65
66
|
"examples": [
|
|
66
67
|
{ "columns": [101, 102], "sort": [{ "que_id": 101, "ascending": true }] },
|
|
67
68
|
{ "group_que_id": 103, "title_que_id": 101, "card": { "show_title": true, "group_color": true } },
|
|
68
69
|
{ "gantt": { "title_que_id": 101, "start_que_id": 104, "end_que_id": 105, "default_time_dimension": "month", "auto_calibration": false } },
|
|
69
|
-
{ "hierarchy": { "title_que_id": 101, "children_que_id": 106, "root_filter": [] } }
|
|
70
|
+
{ "hierarchy": { "title_que_id": 101, "children_que_id": 106, "root_filter": [] } },
|
|
71
|
+
{ "calendar": { "title_que_id": 101, "date_que_id": 104, "color_que_id": 103 } }
|
|
70
72
|
]
|
|
71
73
|
}
|
package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/operation-permission.json
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"properties": {
|
|
9
|
-
"visibility": { "$ref": "../complete.json#/$defs/Visibility" },
|
|
10
|
-
"record": { "$ref": "../complete.json#/$defs/RecordConfig" },
|
|
11
|
-
"share": { "$ref": "../complete.json#/$defs/ShareConfig" }
|
|
9
|
+
"visibility": { "$ref": "../complete.json#/$defs/Visibility", "visibilityDescription": "对内可见范围 + 外部成员授权。" },
|
|
10
|
+
"record": { "$ref": "../complete.json#/$defs/RecordConfig", "recordDescription": "记录可见性开关:操作记录/数据日志/机器人记录/流程未来节点/留言。" },
|
|
11
|
+
"share": { "$ref": "../complete.json#/$defs/ShareConfig", "shareDescription": "分享与安全:密码/强制登录/打印。" }
|
|
12
12
|
},
|
|
13
13
|
"x-qingflow-related-schemas": {
|
|
14
14
|
"currentKind": "operation-permission",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"properties": {
|
|
9
|
-
"query_conditions": { "$ref": "../complete.json#/$defs/QueryConditions" }
|
|
9
|
+
"query_conditions": { "$ref": "../complete.json#/$defs/QueryConditions", "queryConditionsDescription": "查询面板开关/匹配模式/查询前隐藏/行列布局。" }
|
|
10
10
|
},
|
|
11
11
|
"x-qingflow-related-schemas": {
|
|
12
12
|
"currentKind": "query-condition",
|
|
@@ -35,10 +35,12 @@
|
|
|
35
35
|
"table",
|
|
36
36
|
"card",
|
|
37
37
|
"board",
|
|
38
|
-
"gantt"
|
|
38
|
+
"gantt",
|
|
39
|
+
"hierarchy",
|
|
40
|
+
"calendar"
|
|
39
41
|
],
|
|
40
|
-
"viewTypeDescription": "视图类型。别名归一:tableView→table、cardView→card、kanban→board、ganttView→gantt
|
|
41
|
-
"x-backend": "viewgraph.viewgraphType(tableView/cardView/boardView/ganttView)"
|
|
42
|
+
"viewTypeDescription": "视图类型。别名归一:tableView→table、cardView→card、kanban→board、ganttView→gantt、hierarchyView→hierarchy、calendarView→calendar。",
|
|
43
|
+
"x-backend": "viewgraph.viewgraphType(tableView/cardView/boardView/ganttView/hierarchyView/calendarView)"
|
|
42
44
|
},
|
|
43
45
|
"columns": {
|
|
44
46
|
"type": "array",
|
|
@@ -57,7 +59,8 @@
|
|
|
57
59
|
"groupQueIdDescription": "分组字段 queId"
|
|
58
60
|
},
|
|
59
61
|
"title_que_id": {
|
|
60
|
-
"type": "integer"
|
|
62
|
+
"type": "integer",
|
|
63
|
+
"titleQueIdDescription": "卡片/看板/甘特/层级标题字段 queId(可选)。"
|
|
61
64
|
},
|
|
62
65
|
"start_que_id": {
|
|
63
66
|
"type": "integer",
|
|
@@ -68,6 +71,14 @@
|
|
|
68
71
|
"type": "integer",
|
|
69
72
|
"endQueIdDescription": "甘特结束时间字段 queId(gantt 必填)。别名 endField。",
|
|
70
73
|
"x-backend": "viewgraphGanttConfigVO.endTimeQueId"
|
|
74
|
+
},
|
|
75
|
+
"hierarchy": {
|
|
76
|
+
"$ref": "#/$defs/HierarchyConfig",
|
|
77
|
+
"hierarchyDescription": "层级视图特有配置(hierarchy 类型适用,必填)。"
|
|
78
|
+
},
|
|
79
|
+
"calendar": {
|
|
80
|
+
"$ref": "#/$defs/CalendarConfig",
|
|
81
|
+
"calendarDescription": "日历视图特有配置(calendar 类型适用,必填)。"
|
|
71
82
|
}
|
|
72
83
|
},
|
|
73
84
|
"allOf": [
|
|
@@ -149,9 +160,42 @@
|
|
|
149
160
|
"end_que_id"
|
|
150
161
|
]
|
|
151
162
|
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"if": {
|
|
166
|
+
"properties": { "type": { "const": "hierarchy" } },
|
|
167
|
+
"required": ["type"]
|
|
168
|
+
},
|
|
169
|
+
"then": { "required": ["hierarchy"] }
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"if": {
|
|
173
|
+
"properties": { "type": { "const": "calendar" } },
|
|
174
|
+
"required": ["type"]
|
|
175
|
+
},
|
|
176
|
+
"then": { "required": ["calendar"] }
|
|
152
177
|
}
|
|
153
178
|
]
|
|
154
179
|
},
|
|
180
|
+
"HierarchyConfig": {
|
|
181
|
+
"type": "object",
|
|
182
|
+
"additionalProperties": false,
|
|
183
|
+
"required": ["title_que_id", "children_que_id"],
|
|
184
|
+
"properties": {
|
|
185
|
+
"title_que_id": { "type": "integer", "hierarchyTitleQueIdDescription": "层级节点标题字段 queId。" },
|
|
186
|
+
"children_que_id": { "type": "integer", "hierarchyChildrenQueIdDescription": "层级父子关系字段 queId。" }
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"CalendarConfig": {
|
|
190
|
+
"type": "object",
|
|
191
|
+
"additionalProperties": false,
|
|
192
|
+
"required": ["title_que_id", "date_que_id"],
|
|
193
|
+
"properties": {
|
|
194
|
+
"title_que_id": { "type": "integer", "calendarTitleQueIdDescription": "日历事项标题字段 queId。" },
|
|
195
|
+
"date_que_id": { "type": "integer", "calendarDateQueIdDescription": "日历日期字段 queId;可使用表单日期字段或系统字段申请时间(2)/更新时间(3)。" },
|
|
196
|
+
"color_que_id": { "type": "integer", "calendarColorQueIdDescription": "可选的日历颜色字段 queId。" }
|
|
197
|
+
}
|
|
198
|
+
},
|
|
155
199
|
"DataPermission": {
|
|
156
200
|
"type": "object",
|
|
157
201
|
"additionalProperties": false,
|
|
@@ -197,7 +241,7 @@
|
|
|
197
241
|
"complete"
|
|
198
242
|
],
|
|
199
243
|
"kindDescriptions": {
|
|
200
|
-
"display": "
|
|
244
|
+
"display": "展示字段、排序、卡片/甘特/层级/日历配置、分组字段和关联资源。",
|
|
201
245
|
"data-permission": "数据权限模式、数据范围和固定筛选条件。",
|
|
202
246
|
"operation-permission": "成员可见范围、记录日志、留言、打印和分享策略。",
|
|
203
247
|
"query-condition": "用户查询面板的开关、匹配模式和字段布局。",
|
|
@@ -247,7 +291,6 @@
|
|
|
247
291
|
"x-qingflow-capability-boundary": {
|
|
248
292
|
"contract": "仅列出 app_views_apply 当前可写字段。",
|
|
249
293
|
"backendKnownUnsupported": {
|
|
250
|
-
"calendar": "后端存在 calendarView DTO,但当前 app_views_apply 不支持创建或更新日历视图。",
|
|
251
294
|
"column_permissions": "后端 ViewgraphQuestion 支持列级查看、编辑和下载权限,当前公开 DSL 尚未开放。",
|
|
252
295
|
"advanced_filter_formula": "后端支持 viewgraphLimitFormula,当前 filters 只公开简易条件。",
|
|
253
296
|
"print_templates": "后端支持默认打印模板和 printTpls 绑定,当前只公开打印开关。",
|
|
@@ -255,6 +298,8 @@
|
|
|
255
298
|
}
|
|
256
299
|
},
|
|
257
300
|
"examples": [
|
|
301
|
+
{ "name": "任务层级", "type": "hierarchy", "hierarchy": { "title_que_id": 101, "children_que_id": 106 } },
|
|
302
|
+
{ "name": "事项日历", "type": "calendar", "calendar": { "title_que_id": 101, "date_que_id": 104, "color_que_id": 103 } },
|
|
258
303
|
{
|
|
259
304
|
"name": "业务记录",
|
|
260
305
|
"type": "table",
|
|
@@ -12460,7 +12460,12 @@ class AiBuilderFacade:
|
|
|
12460
12460
|
suggested_next_call={"tool_name": "app_get_fields", "arguments": {"profile": profile, "app_key": app_key}},
|
|
12461
12461
|
)
|
|
12462
12462
|
for group_name, config_que_ids in _iter_view_config_group_field_names(patch):
|
|
12463
|
-
|
|
12463
|
+
calendar_system_date = (
|
|
12464
|
+
{patch.calendar.date_que_id}
|
|
12465
|
+
if group_name == "calendar" and patch.calendar is not None and patch.calendar.date_que_id in {2, 3}
|
|
12466
|
+
else set()
|
|
12467
|
+
)
|
|
12468
|
+
missing_config_fields = [que for que in config_que_ids if que not in fields_by_que_id and que not in calendar_system_date]
|
|
12464
12469
|
if missing_config_fields:
|
|
12465
12470
|
return _failed(
|
|
12466
12471
|
"UNKNOWN_VIEW_FIELD",
|
|
@@ -20942,6 +20947,8 @@ def _normalize_portal_view_type(view: dict[str, Any]) -> str:
|
|
|
20942
20947
|
"ganttView": "ganttView",
|
|
20943
20948
|
"hierarchy": "hierarchyView",
|
|
20944
20949
|
"hierarchyView": "hierarchyView",
|
|
20950
|
+
"calendar": "calendarView",
|
|
20951
|
+
"calendarView": "calendarView",
|
|
20945
20952
|
}
|
|
20946
20953
|
return mapping.get(raw, "tableView")
|
|
20947
20954
|
|
|
@@ -29741,6 +29748,8 @@ def _normalize_view_type_name(value: Any) -> str:
|
|
|
29741
29748
|
return "board"
|
|
29742
29749
|
if "hierarchy" in normalized:
|
|
29743
29750
|
return "hierarchy"
|
|
29751
|
+
if "calendar" in normalized:
|
|
29752
|
+
return "calendar"
|
|
29744
29753
|
if "card" in normalized:
|
|
29745
29754
|
return "card"
|
|
29746
29755
|
return "table"
|
|
@@ -29847,6 +29856,10 @@ def _build_view_update_payload(
|
|
|
29847
29856
|
payload["viewgraphType"] = "hierarchyView"
|
|
29848
29857
|
payload["beingShowTitleQue"] = True
|
|
29849
29858
|
payload.pop("groupQueId", None)
|
|
29859
|
+
elif normalized_type == "calendar":
|
|
29860
|
+
payload["viewgraphType"] = "calendarView"
|
|
29861
|
+
payload["beingShowTitleQue"] = True
|
|
29862
|
+
payload.pop("groupQueId", None)
|
|
29850
29863
|
return _hydrate_view_backend_payload(
|
|
29851
29864
|
payload=payload,
|
|
29852
29865
|
view_type=normalized_type,
|
|
@@ -29949,6 +29962,7 @@ def _build_minimal_view_payload(
|
|
|
29949
29962
|
"board": "boardView",
|
|
29950
29963
|
"gantt": "ganttView",
|
|
29951
29964
|
"hierarchy": "hierarchyView",
|
|
29965
|
+
"calendar": "calendarView",
|
|
29952
29966
|
}[patch.type.value],
|
|
29953
29967
|
"ordinal": ordinal,
|
|
29954
29968
|
"viewgraphQueIds": visible_que_id_values,
|
|
@@ -30067,6 +30081,11 @@ def _hydrate_view_backend_payload(
|
|
|
30067
30081
|
data["beingShowTitleQue"] = True
|
|
30068
30082
|
data["groupQueId"] = None
|
|
30069
30083
|
data["viewgraphGanttConfigVO"] = None
|
|
30084
|
+
elif view_type == "calendar":
|
|
30085
|
+
data["viewgraphType"] = "calendarView"
|
|
30086
|
+
data["beingShowTitleQue"] = True
|
|
30087
|
+
data["groupQueId"] = None
|
|
30088
|
+
data["viewgraphGanttConfigVO"] = None
|
|
30070
30089
|
if view_filters is not None:
|
|
30071
30090
|
data["viewgraphLimit"] = deepcopy(view_filters)
|
|
30072
30091
|
data["viewgraphLimitType"] = 1
|
|
@@ -30164,6 +30183,13 @@ def _apply_view_config_groups(
|
|
|
30164
30183
|
"rootNodeFilter": deepcopy(hierarchy_filter_groups) if hierarchy_filter_groups is not None else [],
|
|
30165
30184
|
}
|
|
30166
30185
|
data["titleQue"] = patch.hierarchy.title_que_id
|
|
30186
|
+
if patch.calendar is not None and view_type == "calendar":
|
|
30187
|
+
data["viewgraphCalendarConfigVO"] = {
|
|
30188
|
+
"titleQueId": patch.calendar.title_que_id,
|
|
30189
|
+
"dateQueId": patch.calendar.date_que_id,
|
|
30190
|
+
"colorQueId": patch.calendar.color_que_id,
|
|
30191
|
+
}
|
|
30192
|
+
data["titleQue"] = patch.calendar.title_que_id
|
|
30167
30193
|
display = patch.display
|
|
30168
30194
|
if display is not None:
|
|
30169
30195
|
if display.row_height is not None:
|
|
@@ -30231,6 +30257,11 @@ def _iter_view_config_group_field_names(patch: ViewUpsertPatch) -> list[tuple[st
|
|
|
30231
30257
|
groups.append(("gantt", gantt_ids))
|
|
30232
30258
|
if patch.hierarchy is not None:
|
|
30233
30259
|
groups.append(("hierarchy", [patch.hierarchy.title_que_id, patch.hierarchy.children_que_id]))
|
|
30260
|
+
if patch.calendar is not None:
|
|
30261
|
+
calendar_ids = [patch.calendar.title_que_id, patch.calendar.date_que_id]
|
|
30262
|
+
if patch.calendar.color_que_id is not None:
|
|
30263
|
+
calendar_ids.append(patch.calendar.color_que_id)
|
|
30264
|
+
groups.append(("calendar", calendar_ids))
|
|
30234
30265
|
return groups
|
|
30235
30266
|
|
|
30236
30267
|
|
|
@@ -30241,6 +30272,8 @@ def _resolve_view_visible_que_ids(patch: ViewUpsertPatch) -> list[int]:
|
|
|
30241
30272
|
extra_ids: list[int | None] = []
|
|
30242
30273
|
if patch.hierarchy is not None:
|
|
30243
30274
|
extra_ids.extend([patch.hierarchy.title_que_id, patch.hierarchy.children_que_id])
|
|
30275
|
+
if patch.calendar is not None:
|
|
30276
|
+
extra_ids.extend([patch.calendar.title_que_id, patch.calendar.date_que_id, patch.calendar.color_que_id])
|
|
30244
30277
|
for value in [*patch.columns, patch.title_que_id, patch.start_que_id, patch.end_que_id, patch.group_que_id, *extra_ids]:
|
|
30245
30278
|
que_id = _coerce_any_int(value)
|
|
30246
30279
|
if que_id is not None and (que_id > 0 or _is_known_system_view_que_id(que_id)) and que_id not in ordered:
|
|
@@ -25,6 +25,7 @@ _VIEW_TYPE_BY_BACKEND = {
|
|
|
25
25
|
"boardView": "board",
|
|
26
26
|
"ganttView": "gantt",
|
|
27
27
|
"hierarchyView": "hierarchy",
|
|
28
|
+
"calendarView": "calendar",
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
# 后端 dataScope → 公开 data_permission.scope(与 _DATA_PERMISSION_SCOPE_MAP 对称)
|
|
@@ -68,7 +69,6 @@ _SYSTEM_COLUMN_NAMES = {
|
|
|
68
69
|
# complete 契约不覆盖、读面存在的配置键(进入 SKIP 账本,evaluation.md §4.3)
|
|
69
70
|
_UNCOVERED_READBACK_KEYS = (
|
|
70
71
|
"attachVisibleOnlyConfig",
|
|
71
|
-
"viewgraphCalendarConfigVO",
|
|
72
72
|
"beingRemarkStatus",
|
|
73
73
|
"querySearchStatus",
|
|
74
74
|
"beingDefaultPrintTplStatus",
|
|
@@ -417,6 +417,26 @@ def extract_complete_view_declaration(
|
|
|
417
417
|
declaration["hierarchy"] = hierarchy
|
|
418
418
|
_optionally(declaration, "title_que_id", title_que)
|
|
419
419
|
|
|
420
|
+
if view_type == "calendar":
|
|
421
|
+
calendar_raw = view_info.get("viewgraphCalendarConfigVO") if isinstance(view_info.get("viewgraphCalendarConfigVO"), dict) else {}
|
|
422
|
+
title_que = _coerce_positive_int(calendar_raw.get("titleQueId"))
|
|
423
|
+
date_que = _coerce_any_int(calendar_raw.get("dateQueId"))
|
|
424
|
+
color_que = _coerce_positive_int(calendar_raw.get("colorQueId"))
|
|
425
|
+
if title_que is None or title_que not in fields_by_que_id:
|
|
426
|
+
gaps.append(_gap("calendar.title_que_id", "unresolved_calendar_config", "calendar title queId does not resolve; view is not extractable", que_id=title_que))
|
|
427
|
+
return {}, gaps
|
|
428
|
+
if date_que is None or (date_que not in {2, 3} and date_que not in fields_by_que_id):
|
|
429
|
+
gaps.append(_gap("calendar.date_que_id", "unresolved_calendar_config", "calendar date queId does not resolve; view is not extractable", que_id=date_que))
|
|
430
|
+
return {}, gaps
|
|
431
|
+
calendar: dict[str, Any] = {"title_que_id": title_que, "date_que_id": date_que}
|
|
432
|
+
if color_que is not None:
|
|
433
|
+
if color_que not in fields_by_que_id:
|
|
434
|
+
gaps.append(_gap("calendar.color_que_id", "unresolved_que_id", "calendar color queId does not resolve", que_id=color_que))
|
|
435
|
+
return {}, gaps
|
|
436
|
+
calendar["color_que_id"] = color_que
|
|
437
|
+
declaration["calendar"] = calendar
|
|
438
|
+
declaration["title_que_id"] = title_que
|
|
439
|
+
|
|
420
440
|
if view_type in {"card", "board"}:
|
|
421
441
|
_optionally(declaration, "title_que_id", _coerce_positive_int(view_info.get("titleQue")))
|
|
422
442
|
|
|
@@ -12,6 +12,7 @@ VIEW_TYPE_MAP = {
|
|
|
12
12
|
ViewType.board: "boardView",
|
|
13
13
|
ViewType.gantt: "ganttView",
|
|
14
14
|
ViewType.hierarchy: "hierarchyView",
|
|
15
|
+
ViewType.calendar: "calendarView",
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
|
|
@@ -32,7 +33,7 @@ def compile_views(entity: EntitySpec) -> list[dict[str, Any]]:
|
|
|
32
33
|
"viewgraphQueIds": list(view.field_ids),
|
|
33
34
|
"viewgraphQuestions": [],
|
|
34
35
|
"ordinal": ordinal,
|
|
35
|
-
"beingShowTitleQue": view.type in (ViewType.card, ViewType.board, ViewType.gantt, ViewType.hierarchy),
|
|
36
|
+
"beingShowTitleQue": view.type in (ViewType.card, ViewType.board, ViewType.gantt, ViewType.hierarchy, ViewType.calendar),
|
|
36
37
|
"beingShowCover": False,
|
|
37
38
|
"viewgraphLimitType": 1,
|
|
38
39
|
"viewgraphLimit": view.filters,
|
|
@@ -911,13 +911,14 @@ class SolutionExecutor:
|
|
|
911
911
|
data.setdefault("asosChartConfig", {"limitType": 1, "asosChartIdList": []})
|
|
912
912
|
data.setdefault("viewgraphGanttConfigVO", None)
|
|
913
913
|
data.setdefault("viewgraphHierarchyConfigVO", None)
|
|
914
|
+
data.setdefault("viewgraphCalendarConfigVO", None)
|
|
914
915
|
data.setdefault("viewgraphLimitFormula", "")
|
|
915
916
|
data.setdefault("buttonConfigDTOList", [])
|
|
916
917
|
if not data.get("viewgraphQuestions"):
|
|
917
918
|
data["viewgraphQuestions"] = _build_viewgraph_questions(schema, visible_que_ids)
|
|
918
919
|
if not data.get("viewgraphSorts"):
|
|
919
920
|
data["viewgraphSorts"] = [{"queId": 0, "beingSortAscend": True, "queType": 8}]
|
|
920
|
-
if data.get("viewgraphType") in {"cardView", "boardView", "ganttView", "hierarchyView"}:
|
|
921
|
+
if data.get("viewgraphType") in {"cardView", "boardView", "ganttView", "hierarchyView", "calendarView"}:
|
|
921
922
|
data["titleQue"] = visible_que_ids[0] if visible_que_ids else None
|
|
922
923
|
else:
|
|
923
924
|
data.setdefault("titleQue", None)
|
|
@@ -2234,6 +2235,7 @@ def _portal_view_type(store: RunArtifactStore, entity_id: str, view_id: str) ->
|
|
|
2234
2235
|
"board": "boardView",
|
|
2235
2236
|
"gantt": "ganttView",
|
|
2236
2237
|
"hierarchy": "hierarchyView",
|
|
2238
|
+
"calendar": "calendarView",
|
|
2237
2239
|
}
|
|
2238
2240
|
for entity in store.data.get("normalized_solution_spec", {}).get("entities", []):
|
|
2239
2241
|
if entity["entity_id"] != entity_id:
|