bpmax-cli 0.2.1-beta.74 → 0.2.1-beta.77

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.
@@ -0,0 +1,184 @@
1
+ {
2
+ "name": "环节关联项目",
3
+ "key": "step.related-projects",
4
+ "intro": "",
5
+ "template": {
6
+ "version": 1,
7
+ "entry": {
8
+ "kind": "step-process"
9
+ },
10
+ "contexts": {
11
+ "selectedProject": {
12
+ "source": "selected-row"
13
+ },
14
+ "currentStep": {
15
+ "source": "selectedProject",
16
+ "resolver": "current-step"
17
+ }
18
+ },
19
+ "data": {
20
+ "queries": {
21
+ "projects": {
22
+ "engine": "es",
23
+ "resource": "/project/list",
24
+ "method": "POST",
25
+ "params": {
26
+ "data_set_key": "main",
27
+ "page": 1,
28
+ "page_size": 20,
29
+ "with_step": 1
30
+ }
31
+ }
32
+ },
33
+ "methods": {},
34
+ "actions": {
35
+ "resolveCurrentStep": {
36
+ "capability": "step.quick-process",
37
+ "schema": {
38
+ "required": [
39
+ "projectId"
40
+ ],
41
+ "properties": {
42
+ "projectId": {
43
+ "type": "number"
44
+ }
45
+ }
46
+ }
47
+ },
48
+ "submitStep": {
49
+ "capability": "step.operation",
50
+ "previewOnly": true,
51
+ "action": "approve",
52
+ "schema": {
53
+ "required": [
54
+ "projectId",
55
+ "stepId"
56
+ ],
57
+ "properties": {
58
+ "projectId": {
59
+ "type": "number"
60
+ },
61
+ "stepId": {
62
+ "type": "number"
63
+ },
64
+ "comments": {
65
+ "type": "string"
66
+ }
67
+ }
68
+ },
69
+ "refresh": [
70
+ "projects"
71
+ ]
72
+ },
73
+ "createProject": {
74
+ "capability": "project.create",
75
+ "previewOnly": true,
76
+ "action": "create",
77
+ "schema": {
78
+ "required": [
79
+ "name"
80
+ ],
81
+ "properties": {
82
+ "name": {
83
+ "type": "string"
84
+ }
85
+ }
86
+ },
87
+ "refresh": [
88
+ "projects"
89
+ ]
90
+ },
91
+ "updateProject": {
92
+ "capability": "project.form",
93
+ "previewOnly": true,
94
+ "action": "update",
95
+ "schema": {
96
+ "required": [
97
+ "projectId",
98
+ "name"
99
+ ],
100
+ "properties": {
101
+ "projectId": {
102
+ "type": "number"
103
+ },
104
+ "name": {
105
+ "type": "string"
106
+ }
107
+ }
108
+ },
109
+ "refresh": [
110
+ "projects"
111
+ ]
112
+ },
113
+ "exportProjects": {
114
+ "capability": "project.export",
115
+ "previewOnly": true,
116
+ "action": "export",
117
+ "schema": {
118
+ "required": [
119
+ "projectIds"
120
+ ],
121
+ "properties": {
122
+ "projectIds": {
123
+ "type": "array"
124
+ }
125
+ }
126
+ }
127
+ },
128
+ "bulkEditProjects": {
129
+ "capability": "project.bulk-edit",
130
+ "previewOnly": true,
131
+ "action": "bulk-edit",
132
+ "schema": {
133
+ "required": [
134
+ "projectIds",
135
+ "status"
136
+ ],
137
+ "properties": {
138
+ "projectIds": {
139
+ "type": "array"
140
+ },
141
+ "status": {
142
+ "type": "string"
143
+ }
144
+ }
145
+ },
146
+ "refresh": [
147
+ "projects"
148
+ ]
149
+ }
150
+ }
151
+ },
152
+ "render": {
153
+ "template": "<section class=\"composition-shell\">\n <header class=\"composition-header\">\n <div>\n <p class=\"composition-eyebrow\">PAGE COMPOSITION</p>\n <h1>{{ template.name || '跨页面组合' }}</h1>\n <p>{{ template.intro || '由页面上下文和公开业务能力组合而成。' }}</p>\n </div>\n <button type=\"button\" class=\"composition-refresh\" :disabled=\"dashboardRefreshing\" @click=\"refreshAll\">\n {{ dashboardRefreshing ? '刷新中…' : '刷新数据' }}\n </button>\n </header>\n <div v-if=\"runtimeError\" class=\"composition-alert\" role=\"alert\">{{ runtimeError }}</div>\n <section v-for=\"(block, index) in blocks\" :key=\"block.type + '-' + index\" class=\"composition-section\">\n <div class=\"composition-section-heading\">\n <h2>{{ block.title || block.type }}</h2>\n <span>{{ block.capability || '' }}</span>\n </div>\n <page-block\n :block=\"block\"\n :block-index=\"index\"\n :rows=\"block.paginated ? paginatedProjectRows : queryRows(block.query || 'projects')\"\n :selected-project=\"selectedProject\"\n :current-step=\"currentStep\"\n :draft-comment=\"draftComment\"\n :action-busy=\"actionBusy\"\n :filter-status=\"filterStatus\"\n :filter-keyword=\"filterKeyword\"\n :status-options=\"statusOptions\"\n :pagination-page=\"paginationPage\"\n :pagination-page-size=\"paginationPageSize\"\n :project-count=\"projectCount\"\n :selected-project-ids=\"selectedProjectIds\"\n :step-logs=\"stepLogs\"\n :attachment-drafts=\"attachmentDrafts\"\n :report-metrics=\"dashboardMetrics\"\n @select-project=\"selectProject\"\n @select-step=\"selectStep\"\n @open-quick-process=\"openQuickProcess\"\n @load-project-detail=\"loadProjectDetail\"\n @submit-step=\"submitStep\"\n @update-comment=\"draftComment = $event\"\n @set-filter-status=\"filterStatus = $event\"\n @set-filter-keyword=\"filterKeyword = $event\"\n @set-page=\"setPage\"\n @create-project=\"createProject\"\n @submit-project-form=\"submitProjectForm\"\n @export-projects=\"exportProjects\"\n @bulk-edit-projects=\"bulkEditProjects\"\n @add-attachment=\"addAttachment\"\n @selection-change=\"setSelectedProjectIds\"\n />\n </section>\n <div v-if=\"quickProcessVisible\" class=\"composition-dialog\" role=\"dialog\" aria-modal=\"true\">\n <div class=\"composition-dialog-panel\">\n <div class=\"composition-dialog-heading\"><h2>快速处理</h2><button type=\"button\" @click=\"clearSelection\">关闭</button></div>\n <p v-if=\"selectedProject\">{{ selectedProject.name || selectedProject.title || ('项目 ' + selectedProject.id) }}</p>\n <page-block\n v-for=\"(block, index) in blocks\"\n v-if=\"block.type === 'step-form' || block.type === 'step-operation'\"\n :key=\"'dialog-' + block.type + '-' + index\"\n :block=\"block\"\n :block-index=\"index\"\n :selected-project=\"selectedProject\"\n :current-step=\"currentStep\"\n :draft-comment=\"draftComment\"\n :action-busy=\"actionBusy\"\n :filter-status=\"filterStatus\"\n :filter-keyword=\"filterKeyword\"\n :status-options=\"statusOptions\"\n :pagination-page=\"paginationPage\"\n :pagination-page-size=\"paginationPageSize\"\n :project-count=\"projectCount\"\n :selected-project-ids=\"selectedProjectIds\"\n :step-logs=\"stepLogs\"\n :attachment-drafts=\"attachmentDrafts\"\n :report-metrics=\"dashboardMetrics\"\n @submit-step=\"submitStep\"\n @update-comment=\"draftComment = $event\"\n />\n </div>\n </div>\n</section>",
154
+ "style": ".composition-shell { min-height: 100%; padding: 24px 32px; background: #f5f7fa; color: #1f2937; }\n.composition-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 20px 24px; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; }\n.composition-eyebrow { margin: 0; color: #2563eb; font-size: 11px; letter-spacing: .12em; font-weight: 700; }\n.composition-header h1 { margin: 6px 0; font-size: 24px; }\n.composition-header p:last-child { margin: 0; color: #64748b; }\n.composition-refresh, .composition-dialog-heading button { min-height: 40px; padding: 8px 14px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; cursor: pointer; }\n.composition-alert { margin-top: 16px; padding: 12px 16px; border: 1px solid #fecaca; border-radius: 8px; background: #fff1f2; color: #991b1b; }\n.composition-section { margin-top: 16px; padding: 20px; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; }\n.composition-section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }\n.composition-section-heading h2 { margin: 0; font-size: 16px; }\n.composition-section-heading span { color: #64748b; font-size: 12px; }\n.composition-dialog { position: fixed; inset: 0; z-index: 20; display: flex; justify-content: flex-end; background: rgba(15, 23, 42, .32); }\n.composition-dialog-panel { width: min(520px, 100vw); height: 100%; overflow: auto; box-sizing: border-box; padding: 24px; background: #fff; }\n.composition-dialog-heading { display: flex; justify-content: space-between; align-items: center; }\n.composition-dialog-heading h2 { margin: 0; }\n@media (max-width: 720px) { .composition-shell { padding: 16px; } .composition-header { flex-direction: column; } }",
155
+ "blocks": [
156
+ {
157
+ "type": "step-form",
158
+ "capability": "step.form",
159
+ "context": "currentStep",
160
+ "title": "环节表单"
161
+ },
162
+ {
163
+ "type": "step-operation",
164
+ "capability": "step.operation",
165
+ "action": "submitStep",
166
+ "title": "环节操作"
167
+ },
168
+ {
169
+ "type": "project-table",
170
+ "capability": "project.table",
171
+ "query": "projects",
172
+ "title": "项目列表"
173
+ }
174
+ ]
175
+ },
176
+ "dependencies": {
177
+ "capabilities": [
178
+ "step.form",
179
+ "step.operation",
180
+ "project.table"
181
+ ]
182
+ }
183
+ }
184
+ }
@@ -0,0 +1,9 @@
1
+ # Page-composition resource API
2
+
3
+ 资源接口属于独立页面组合模板:
4
+
5
+ - `GET /api/page_composition_asset/:templateId`:按当前组织列出未删除资源。
6
+ - `POST /api/page_composition_asset/:templateId`:multipart `file` 上传并登记 MIME、大小、SHA-256、对象 URL 和模板归属。
7
+ - `DELETE /api/page_composition_asset/:assetId`:仅允许删除当前组织中未被模板 JSON 引用的资源。
8
+
9
+ 后端允许的扩展名:png、jpg、jpeg、gif、webp、avif、css、less、js、mjs、json、woff、woff2、ttf;单文件大小为 1 byte 到 10 MB。资源表由 migration 创建:`think_page_composition_asset`。