bpmax-cli 0.2.1-beta.8 → 0.2.1-beta.80

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.
Files changed (191) hide show
  1. package/README.md +30 -7
  2. package/dist/bin.js +41627 -11178
  3. package/dist/bin.js.map +1 -1
  4. package/package.json +12 -5
  5. package/scripts/install-skills.mjs +27 -60
  6. package/scripts/run-source-cli.mjs +145 -0
  7. package/skills/bpmax-ai-taskbook/SKILL.md +13 -1
  8. package/skills/bpmax-ai-taskbook/references/blueprint-taskbook-gates.md +121 -0
  9. package/skills/bpmax-ai-taskbook/references/taskbook-template.md +42 -2
  10. package/skills/bpmax-api-platform-editor/SKILL.md +24 -31
  11. package/skills/bpmax-api-platform-editor/agents/openai.yaml +2 -2
  12. package/skills/bpmax-api-platform-editor/references/platform-api-map.md +2 -2
  13. package/skills/bpmax-api-platform-editor/references/runtime-workflow.md +3 -3
  14. package/skills/bpmax-approval-matrix/SKILL.md +54 -2
  15. package/skills/bpmax-blueprint-doc-workflow/SKILL.md +15 -2
  16. package/skills/bpmax-blueprint-doc-workflow/references/blueprint-structure.md +8 -0
  17. package/skills/bpmax-blueprint-doc-workflow/references/per-flow-required-structure.md +13 -0
  18. package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-modeling-review.xml +23 -0
  19. package/skills/bpmax-blueprint-doc-workflow/references/sample-paragraph-flow-details.xml +27 -0
  20. package/skills/bpmax-blueprint-doc-workflow/references/sample-pass.xml +45 -28
  21. package/skills/bpmax-blueprint-doc-workflow/references/source-traceability-and-flow-modeling.md +115 -0
  22. package/skills/bpmax-blueprint-doc-workflow/scripts/lint_blueprint_doc.py +386 -5
  23. package/skills/bpmax-bug-reporting/SKILL.md +72 -0
  24. package/skills/bpmax-builder-shared/SKILL.md +1 -0
  25. package/skills/bpmax-builder-shared/configuration-impact-review.md +76 -0
  26. package/skills/bpmax-builder-shared/template_script_hard_rules.py +3 -1
  27. package/skills/bpmax-builder-shared/tests/test_template_script_hard_rules.py +16 -0
  28. package/skills/bpmax-business-skill/SKILL.md +3 -1
  29. package/skills/bpmax-cli/SKILL.md +46 -0
  30. package/skills/bpmax-config-latest/SKILL.md +4 -0
  31. package/skills/bpmax-console-template-editor/SKILL.md +113 -523
  32. package/skills/bpmax-console-template-editor/agents/openai.yaml +2 -2
  33. package/skills/bpmax-console-template-editor/references/full-detail-guide.md +45 -0
  34. package/skills/bpmax-console-template-editor/references/local-temp-workflow.md +13 -12
  35. package/skills/bpmax-console-template-editor/scripts/console_template_editor_common.py +299 -78
  36. package/skills/bpmax-console-template-editor/tests/test_console_template_editor.py +344 -30
  37. package/skills/bpmax-dataset-field-template-editor/SKILL.md +131 -594
  38. package/skills/bpmax-dataset-field-template-editor/references/full-detail-guide.md +570 -0
  39. package/skills/bpmax-dataset-field-template-editor/references/nested-field-patterns.md +8 -8
  40. package/skills/bpmax-dataset-field-template-editor/references/runtime-verified-field-page-shape.md +1 -1
  41. package/skills/bpmax-dataset-field-template-editor/scripts/dataset_field_editor_common.py +11 -77
  42. package/skills/bpmax-dataset-field-template-editor/scripts/export_dataset_field.py +4 -57
  43. package/skills/bpmax-dataset-field-template-editor/scripts/init_create_dataset_field.py +2 -0
  44. package/skills/bpmax-dataset-field-template-editor/scripts/inspect_dataset_field_runtime.py +4 -78
  45. package/skills/bpmax-dataset-field-template-editor/scripts/submit_dataset_field.py +3 -89
  46. package/skills/bpmax-dataset-field-template-editor/tests/test_dataset_field_editor.py +14 -0
  47. package/skills/bpmax-dataset-field-template-editor/tests/test_init_create_dataset_field.py +2 -0
  48. package/skills/bpmax-dataset-template-editor/SKILL.md +123 -778
  49. package/skills/bpmax-dataset-template-editor/references/dataset-script-runtime-matrix.md +11 -0
  50. package/skills/bpmax-dataset-template-editor/references/full-detail-guide.md +753 -0
  51. package/skills/bpmax-dataset-template-editor/references/runtime-gotchas.md +12 -0
  52. package/skills/bpmax-dataset-template-editor/references/ui-to-backend-field-map.md +1 -0
  53. package/skills/bpmax-dataset-template-editor/references/work-file-to-submit-mapping.md +2 -2
  54. package/skills/bpmax-dataset-template-editor/scripts/basic_table_audit.py +8 -1
  55. package/skills/bpmax-dataset-template-editor/scripts/dataset_editor_common.py +9 -90
  56. package/skills/bpmax-dataset-template-editor/scripts/export_dataset.py +8 -1
  57. package/skills/bpmax-dataset-template-editor/scripts/resolve_dataset.py +8 -1
  58. package/skills/bpmax-dataset-template-editor/scripts/submit_dataset.py +1 -2
  59. package/skills/bpmax-dataset-template-editor/scripts/verify_dataset_list.py +8 -1
  60. package/skills/bpmax-dataset-template-editor/scripts/verify_publish_health.py +8 -1
  61. package/skills/bpmax-dataset-template-editor/tests/test_dataset_editor.py +6 -40
  62. package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +18 -4
  63. package/skills/bpmax-e2e-flow-config-orchestrator/agents/openai.yaml +2 -2
  64. package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +13 -9
  65. package/skills/bpmax-e2e-flow-test-operator/SKILL.md +174 -546
  66. package/skills/bpmax-e2e-flow-test-operator/agents/openai.yaml +2 -3
  67. package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +181 -15
  68. package/skills/bpmax-e2e-flow-test-operator/references/browser-action-dsl.md +167 -0
  69. package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +15 -7
  70. package/skills/bpmax-e2e-flow-test-operator/references/full-detail-guide.md +589 -0
  71. package/skills/bpmax-e2e-flow-test-operator/references/minimal-test-loop.md +12 -8
  72. package/skills/bpmax-e2e-flow-test-operator/references/negative-sale-api-matrix.md +4 -4
  73. package/skills/bpmax-e2e-flow-test-operator/references/profile-schema.md +1 -1
  74. package/skills/bpmax-e2e-flow-test-operator/references/state-schema.md +3 -1
  75. package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_doc.py +7 -5
  76. package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py +2 -2
  77. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_runner.py +5 -1
  78. package/skills/bpmax-e2e-flow-test-operator/tests/test_negative_sale_api_tools.py +71 -0
  79. package/skills/bpmax-e2e-flow-test-operator-v2/SKILL.md +64 -0
  80. package/skills/bpmax-e2e-flow-test-operator-v2/agents/openai.yaml +7 -0
  81. package/skills/bpmax-e2e-flow-test-operator-v2/references/automation-generation-pipeline.md +33 -0
  82. package/skills/bpmax-e2e-flow-test-operator-v2/references/autonomous-execution.md +40 -0
  83. package/skills/bpmax-e2e-flow-test-operator-v2/references/batch-generation-and-execution.md +17 -0
  84. package/skills/bpmax-e2e-flow-test-operator-v2/references/browser-action-runner.md +19 -0
  85. package/skills/bpmax-e2e-flow-test-operator-v2/references/browser-recording-and-replay.md +95 -0
  86. package/skills/bpmax-e2e-flow-test-operator-v2/references/form-script-generation.md +41 -0
  87. package/skills/bpmax-e2e-flow-test-operator-v2/references/identity-and-failure-routing.md +90 -0
  88. package/skills/bpmax-e2e-flow-test-operator-v2/references/multi-request-mutation.md +9 -0
  89. package/skills/bpmax-e2e-flow-test-operator-v2/references/scenario-coverage-generation.md +17 -0
  90. package/skills/bpmax-e2e-flow-test-operator-v2/references/scoped-execution.md +13 -0
  91. package/skills/bpmax-e2e-flow-test-operator-v2/references/step-restartability-and-state.md +23 -0
  92. package/skills/bpmax-e2e-flow-test-operator-v2/references/test-assets-and-evidence.md +9 -0
  93. package/skills/bpmax-e2e-flow-test-operator-v2/references/test-data-and-selector-contract.md +51 -0
  94. package/skills/bpmax-e2e-flow-test-operator-v2/references/test-preflight-and-confirmation.md +32 -0
  95. package/skills/bpmax-filter-template-editor/SKILL.md +114 -551
  96. package/skills/bpmax-filter-template-editor/references/experience-coverage-matrix.md +18 -18
  97. package/skills/bpmax-filter-template-editor/references/filter-content-schema.md +21 -0
  98. package/skills/bpmax-filter-template-editor/references/filter-request-shape.md +29 -26
  99. package/skills/bpmax-filter-template-editor/references/filter-runtime-patterns.md +19 -2
  100. package/skills/bpmax-filter-template-editor/references/full-detail-guide.md +56 -0
  101. package/skills/bpmax-filter-template-editor/references/runtime-verified-filter-page-shape.md +10 -9
  102. package/skills/bpmax-filter-template-editor/scripts/filter_template_editor_common.py +7 -57
  103. package/skills/bpmax-filter-template-editor/tests/test_filter_template_editor.py +4 -48
  104. package/skills/bpmax-flow/SKILL.md +2 -0
  105. package/skills/bpmax-flow-detail-template-editor/SKILL.md +53 -0
  106. package/skills/bpmax-flow-template-editor/SKILL.md +129 -1123
  107. package/skills/bpmax-flow-template-editor/agents/openai.yaml +2 -2
  108. package/skills/bpmax-flow-template-editor/references/diff-strategy.md +3 -3
  109. package/skills/bpmax-flow-template-editor/references/editor-runtime-vs-draft.md +9 -9
  110. package/skills/bpmax-flow-template-editor/references/flow-template-api-workflow.md +2 -1
  111. package/skills/bpmax-flow-template-editor/references/full-detail-guide.md +1158 -0
  112. package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +1 -1
  113. package/skills/bpmax-flow-template-editor/references/payload-checklist.md +2 -0
  114. package/skills/bpmax-flow-template-editor/references/project-create-runtime-gotchas.md +17 -0
  115. package/skills/bpmax-flow-template-editor/references/requirement-to-node-mapping.md +8 -3
  116. package/skills/bpmax-flow-template-editor/references/runtime-verified-flow-detail-shape.md +7 -7
  117. package/skills/bpmax-flow-template-editor/references/runtime-verified-meta-fields.md +2 -2
  118. package/skills/bpmax-flow-template-editor/references/runtime-verified-node-fields.md +12 -2
  119. package/skills/bpmax-flow-template-editor/references/save-draft-request-shape.md +7 -23
  120. package/skills/bpmax-flow-template-editor/references/work-file-to-submit-mapping.md +1 -1
  121. package/skills/bpmax-flow-template-editor/tests/test_flow_template_editor.py +19 -75
  122. package/skills/bpmax-form-template-editor/SKILL.md +138 -1151
  123. package/skills/bpmax-form-template-editor/agents/openai.yaml +2 -2
  124. package/skills/bpmax-form-template-editor/references/dynamic-field-state.md +167 -0
  125. package/skills/bpmax-form-template-editor/references/form-template-api-workflow.md +51 -51
  126. package/skills/bpmax-form-template-editor/references/full-detail-guide.md +1115 -0
  127. package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +4 -4
  128. package/skills/bpmax-form-template-editor/references/payload-checklist.md +3 -1
  129. package/skills/bpmax-form-template-editor/references/sub-form-patterns.md +6 -0
  130. package/skills/bpmax-form-template-editor/scripts/form_template_editor_common.py +8 -0
  131. package/skills/bpmax-form-template-editor/tests/test_form_template_editor.py +42 -19
  132. package/skills/bpmax-functional-test-design/LICENSE.upstream +24 -0
  133. package/skills/bpmax-functional-test-design/SKILL.md +80 -0
  134. package/skills/bpmax-functional-test-design/agents/openai.yaml +4 -0
  135. package/skills/bpmax-functional-test-design/references/bpmax-test-suite-output.md +95 -0
  136. package/skills/bpmax-functional-test-design/references/decision-table-testing.md +50 -0
  137. package/skills/bpmax-functional-test-design/references/domain-testing.md +43 -0
  138. package/skills/bpmax-functional-test-design/references/state-transition-testing.md +47 -0
  139. package/skills/bpmax-functional-test-design/references/technique-selection.md +38 -0
  140. package/skills/bpmax-functional-test-design/references/use-case-testing.md +55 -0
  141. package/skills/bpmax-group-model-editor/SKILL.md +24 -0
  142. package/skills/bpmax-home-portal-editor/SKILL.md +81 -0
  143. package/skills/bpmax-icon-catalog/SKILL.md +18 -0
  144. package/skills/bpmax-icon-catalog/agents/openai.yaml +4 -0
  145. package/skills/bpmax-icon-catalog/assets/ri-icons.json +3140 -0
  146. package/skills/bpmax-icon-catalog/references/source-contract.md +3 -0
  147. package/skills/bpmax-list-template-editor/SKILL.md +131 -466
  148. package/skills/bpmax-list-template-editor/agents/openai.yaml +2 -2
  149. package/skills/bpmax-list-template-editor/references/content-config-shape.md +16 -4
  150. package/skills/bpmax-list-template-editor/references/full-detail-guide.md +461 -0
  151. package/skills/bpmax-list-template-editor/references/list-template-api-workflow.md +6 -9
  152. package/skills/bpmax-list-template-editor/references/local-temp-workflow.md +1 -1
  153. package/skills/bpmax-list-template-editor/references/runtime-verified-workflow.md +50 -2
  154. package/skills/bpmax-list-template-editor/references/special-formats.md +5 -2
  155. package/skills/bpmax-list-template-editor/scripts/list_template_editor_common.py +9 -78
  156. package/skills/bpmax-memory-protocol/SKILL.md +7 -6
  157. package/skills/bpmax-nav-config-editor/SKILL.md +14 -17
  158. package/skills/bpmax-nav-config-editor/agents/openai.yaml +2 -2
  159. package/skills/bpmax-nav-config-editor/references/api-workflow.md +2 -2
  160. package/skills/bpmax-nav-config-editor/references/runtime-probing.md +11 -12
  161. package/skills/bpmax-page-composition-template-editor/SKILL.md +315 -0
  162. package/skills/bpmax-page-composition-template-editor/examples/presets/catalog.json +41 -0
  163. package/skills/bpmax-page-composition-template-editor/examples/presets/full-capability-workbench.json +294 -0
  164. package/skills/bpmax-page-composition-template-editor/examples/presets/project-detail-step-panel.json +184 -0
  165. package/skills/bpmax-page-composition-template-editor/examples/presets/project-list-quick-process.json +177 -0
  166. package/skills/bpmax-page-composition-template-editor/examples/presets/project-operations-dashboard.json +400 -0
  167. package/skills/bpmax-page-composition-template-editor/examples/presets/project-operations-visual-light.json +214 -0
  168. package/skills/bpmax-page-composition-template-editor/examples/presets/step-related-projects.json +184 -0
  169. package/skills/bpmax-page-composition-template-editor/references/resource-api.md +9 -0
  170. package/skills/bpmax-plugin-config/SKILL.md +55 -5
  171. package/skills/bpmax-project/SKILL.md +37 -1
  172. package/skills/bpmax-project-detail-template-editor/SKILL.md +13 -39
  173. package/skills/bpmax-project-detail-template-editor/agents/openai.yaml +2 -2
  174. package/skills/bpmax-role-editor/SKILL.md +11 -30
  175. package/skills/bpmax-shared/SKILL.md +19 -9
  176. package/skills/bpmax-team-editor/SKILL.md +27 -0
  177. package/skills/bpmax-ui-ux-audit/LICENSE.upstream +23 -0
  178. package/skills/bpmax-ui-ux-audit/SKILL.md +42 -0
  179. package/skills/bpmax-ui-ux-audit/agents/openai.yaml +4 -0
  180. package/skills/bpmax-ui-ux-audit/references/audit-framework.md +39 -0
  181. package/skills/bpmax-ui-ux-audit/references/bpmax-ux-findings.md +56 -0
  182. package/skills/bpmax-user/SKILL.md +33 -1
  183. package/skills/bpmax-user-mock-operator/SKILL.md +58 -56
  184. package/skills/bpmax-user-mock-operator/agents/openai.yaml +2 -2
  185. package/skills/bpmax-user-mock-operator/scripts/chrome_identity_bridge.mjs +1766 -0
  186. package/skills/bpmax-user-model-editor/SKILL.md +24 -0
  187. package/skills/bpmax-workspace-editor/SKILL.md +1 -0
  188. package/skills/form-control-library/references/form-template-submit-schema.md +3 -1
  189. package/skills/bpmax-user-mock-operator/scripts/switch_user_identity.py +0 -37
  190. package/skills/bpmax-user-mock-operator/scripts/user_mock_operator_common.py +0 -136
  191. package/skills/bpmax-user-mock-operator/tests/test_user_mock_operator.py +0 -138
@@ -0,0 +1,177 @@
1
+ {
2
+ "name": "项目列表快速处理",
3
+ "key": "project.list.quick-process",
4
+ "intro": "",
5
+ "template": {
6
+ "version": 1,
7
+ "entry": {
8
+ "kind": "project-list"
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": "project-table",
158
+ "capability": "project.table",
159
+ "query": "projects",
160
+ "title": "项目列表"
161
+ },
162
+ {
163
+ "type": "step-quick-process",
164
+ "capability": "step.quick-process",
165
+ "action": "submitStep",
166
+ "title": "快速处理"
167
+ }
168
+ ]
169
+ },
170
+ "dependencies": {
171
+ "capabilities": [
172
+ "project.table",
173
+ "step.quick-process"
174
+ ]
175
+ }
176
+ }
177
+ }
@@ -0,0 +1,400 @@
1
+ {
2
+ "name": "项目运营数据看板",
3
+ "key": "project.operations.dashboard",
4
+ "intro": "只读项目运营看板:用状态、负责人、部门、仓库和需求月份判断处理负荷、资源压力与交付节奏。",
5
+ "template": {
6
+ "version": 1,
7
+ "entry": {
8
+ "kind": "project-list"
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
+ "flow_type": "flow636354625",
31
+ "flow_key": ""
32
+ },
33
+ "filterMode": "server",
34
+ "filterGroup": "dashboard",
35
+ "row_mapping": {
36
+ "id": "__id",
37
+ "name": "xmmc1.0",
38
+ "owner_id": "__owner_id",
39
+ "owner_name": "__project_owner.name",
40
+ "create_time": "__create_time",
41
+ "current_step_name": "current_step_name",
42
+ "department": "tjbm",
43
+ "request_date": "tjrq",
44
+ "need_date": "xqrq",
45
+ "request_reason": "sqyy",
46
+ "warehouse": "ckck",
47
+ "branch": "szfb"
48
+ },
49
+ "filter_fields": {
50
+ "status": "status",
51
+ "keyword": "xmmc1",
52
+ "owner": "__owner_id",
53
+ "created_date": "__create_time"
54
+ }
55
+ },
56
+ "dashboardStats": {
57
+ "engine": "es",
58
+ "mode": "aggregate",
59
+ "resource": "/project/aggregate",
60
+ "method": "POST",
61
+ "params": {
62
+ "data_set_key": "main",
63
+ "flow_type": "flow636354625",
64
+ "flow_key": ""
65
+ },
66
+ "aggs": {
67
+ "by_status": {
68
+ "type": "terms",
69
+ "field": "status",
70
+ "size": 8
71
+ },
72
+ "by_owner": {
73
+ "type": "terms",
74
+ "field": "__owner_id",
75
+ "size": 20
76
+ },
77
+ "by_department": {
78
+ "type": "terms",
79
+ "field": "tjbm",
80
+ "size": 20
81
+ },
82
+ "by_warehouse": {
83
+ "type": "terms",
84
+ "field": "ckck",
85
+ "size": 20
86
+ },
87
+ "by_branch": {
88
+ "type": "terms",
89
+ "field": "szfb",
90
+ "size": 12
91
+ },
92
+ "by_month": {
93
+ "type": "date_histogram",
94
+ "field": "__create_time",
95
+ "calendar_interval": "month"
96
+ },
97
+ "by_demand_month": {
98
+ "type": "date_histogram",
99
+ "field": "xqrq",
100
+ "calendar_interval": "month"
101
+ },
102
+ "by_apply_month": {
103
+ "type": "date_histogram",
104
+ "field": "tjrq",
105
+ "calendar_interval": "month"
106
+ },
107
+ "department_count": {
108
+ "type": "cardinality",
109
+ "field": "tjbm"
110
+ },
111
+ "warehouse_count": {
112
+ "type": "cardinality",
113
+ "field": "ckck"
114
+ },
115
+ "owner_count": {
116
+ "type": "cardinality",
117
+ "field": "__owner_id"
118
+ },
119
+ "total_projects": {
120
+ "type": "value_count",
121
+ "field": "__id"
122
+ }
123
+ },
124
+ "filterGroup": "dashboard"
125
+ }
126
+ },
127
+ "methods": {},
128
+ "actions": {
129
+ "resolveCurrentStep": {
130
+ "capability": "step.quick-process",
131
+ "schema": {
132
+ "required": [
133
+ "projectId"
134
+ ],
135
+ "properties": {
136
+ "projectId": {
137
+ "type": "number"
138
+ }
139
+ }
140
+ }
141
+ },
142
+ "submitStep": {
143
+ "capability": "step.operation",
144
+ "previewOnly": true,
145
+ "action": "approve",
146
+ "schema": {
147
+ "required": [
148
+ "projectId",
149
+ "stepId"
150
+ ],
151
+ "properties": {
152
+ "projectId": {
153
+ "type": "number"
154
+ },
155
+ "stepId": {
156
+ "type": "number"
157
+ },
158
+ "comments": {
159
+ "type": "string"
160
+ }
161
+ }
162
+ },
163
+ "refresh": [
164
+ "projects"
165
+ ]
166
+ },
167
+ "createProject": {
168
+ "capability": "project.create",
169
+ "previewOnly": true,
170
+ "action": "create",
171
+ "schema": {
172
+ "required": [
173
+ "name"
174
+ ],
175
+ "properties": {
176
+ "name": {
177
+ "type": "string"
178
+ }
179
+ }
180
+ },
181
+ "refresh": [
182
+ "projects"
183
+ ]
184
+ },
185
+ "updateProject": {
186
+ "capability": "project.form",
187
+ "previewOnly": true,
188
+ "action": "update",
189
+ "schema": {
190
+ "required": [
191
+ "projectId",
192
+ "name"
193
+ ],
194
+ "properties": {
195
+ "projectId": {
196
+ "type": "number"
197
+ },
198
+ "name": {
199
+ "type": "string"
200
+ }
201
+ }
202
+ },
203
+ "refresh": [
204
+ "projects"
205
+ ]
206
+ },
207
+ "exportProjects": {
208
+ "capability": "project.export",
209
+ "previewOnly": true,
210
+ "action": "export",
211
+ "schema": {
212
+ "required": [
213
+ "projectIds"
214
+ ],
215
+ "properties": {
216
+ "projectIds": {
217
+ "type": "array"
218
+ }
219
+ }
220
+ }
221
+ },
222
+ "bulkEditProjects": {
223
+ "capability": "project.bulk-edit",
224
+ "previewOnly": true,
225
+ "action": "bulk-edit",
226
+ "schema": {
227
+ "required": [
228
+ "projectIds",
229
+ "status"
230
+ ],
231
+ "properties": {
232
+ "projectIds": {
233
+ "type": "array"
234
+ },
235
+ "status": {
236
+ "type": "string"
237
+ }
238
+ }
239
+ },
240
+ "refresh": [
241
+ "projects"
242
+ ]
243
+ }
244
+ }
245
+ },
246
+ "render": {
247
+ "template": "<main class=\"ops-dashboard\">\n <header class=\"dashboard-header\">\n <div>\n <p class=\"dashboard-eyebrow\">OPERATIONS / PAGE COMPOSITION</p>\n <h1>{{ template.name || '项目运营数据看板' }}</h1>\n <p class=\"dashboard-subtitle\">{{ template.intro || '用统一页面模板组合项目指标、状态分布和处理列表。' }}</p>\n </div>\n <div class=\"dashboard-actions\">\n <el-button class=\"dashboard-button\" type=\"primary\" :loading=\"dashboardRefreshing\" :disabled=\"dashboardRefreshing\" @click=\"refreshAll\">\n {{ dashboardRefreshing ? '刷新中…' : '刷新数据' }}\n </el-button>\n <el-button class=\"dashboard-button dashboard-button-muted\" plain @click=\"clearSelection\">清除选择</el-button>\n </div>\n </header>\n\n <div v-if=\"runtimeError\" class=\"dashboard-alert\" role=\"alert\">{{ runtimeError }}</div>\n\n <section class=\"dashboard-kpis\" aria-label=\"项目指标\">\n <article v-for=\"metric in dashboardMetrics\" :key=\"metric.key\" class=\"dashboard-kpi\" :class=\"'tone-' + metric.tone\">\n <span>{{ metric.label }}</span>\n <strong>{{ metric.value }}</strong>\n </article>\n </section>\n\n <section class=\"dashboard-charts\" aria-label=\"项目图表\">\n <page-chart chart-type=\"status-donut\" title=\"项目状态构成\" :rows=\"projectRows\" :aggregation=\"dashboardAggregations.by_status\" :aggregation-labels=\"statusLabels\" />\n <page-chart chart-type=\"owner-bar\" title=\"负责人项目量\" :rows=\"projectRows\" :aggregation=\"dashboardAggregations.by_owner\" aggregation-label-prefix=\"负责人 \" />\n <page-chart chart-type=\"terms-bar\" title=\"申请部门项目量\" eyebrow=\"DEPARTMENT LOAD\" :rows=\"projectRows\" :aggregation=\"dashboardAggregations.by_department\" />\n <page-chart chart-type=\"terms-bar\" title=\"仓库需求分布\" eyebrow=\"WAREHOUSE DEMAND\" :rows=\"projectRows\" :aggregation=\"dashboardAggregations.by_warehouse\" />\n <page-chart chart-type=\"terms-bar\" title=\"所属分部项目量\" eyebrow=\"BRANCH MIX\" :rows=\"projectRows\" :aggregation=\"dashboardAggregations.by_branch\" />\n <page-chart chart-type=\"created-trend\" title=\"需求月份趋势\" eyebrow=\"DEMAND PLAN\" :rows=\"projectRows\" :aggregation=\"dashboardAggregations.by_demand_month\" />\n \n <page-chart chart-type=\"created-trend\" title=\"申请月份趋势\" eyebrow=\"REQUEST INTAKE\" :rows=\"projectRows\" :aggregation=\"dashboardAggregations.by_apply_month\" />\n </section>\n\n <section class=\"dashboard-customization\" aria-label=\"看板业务说明\">\n <page-block v-for=\"(block, index) in blocks\" v-if=\"block.type === 'report-preview'\" :key=\"'report-' + index\" :block=\"block\" :block-index=\"index\" :insight-context=\"insightContext\" />\n </section>\n\n <section class=\"dashboard-grid\">\n <article class=\"dashboard-panel dashboard-status-panel\">\n <div class=\"dashboard-panel-heading\"><div><p class=\"dashboard-overline\">DISTRIBUTION</p><h2>项目状态</h2></div><span>{{ formatNumber(dashboardMetrics[0] && dashboardMetrics[0].value) }} 项</span></div>\n <div class=\"dashboard-status-list\">\n <button v-for=\"status in statusRows\" :key=\"status.key\" type=\"button\" class=\"dashboard-status-row\" :class=\"{ 'is-active': filterStatus === status.key }\" @click=\"selectDashboardStatus(status.key)\">\n <span class=\"dashboard-status-label\"><i :class=\"'status-dot status-' + status.key\"></i>{{ status.label }}</span>\n <span class=\"dashboard-status-value\">{{ status.value }}</span>\n <span class=\"dashboard-progress\"><i :style=\"{ width: (Math.round(status.value / ((dashboardMetrics[0] && dashboardMetrics[0].value) || 1) * 100) + '%') }\"></i></span>\n </button>\n <p v-if=\"!statusRows.length\" class=\"dashboard-empty\">暂无状态数据</p>\n </div>\n </article>\n\n <article class=\"dashboard-panel dashboard-filter-panel\">\n <div class=\"dashboard-panel-heading\"><div><p class=\"dashboard-overline\">FILTERS</p><h2>筛选与选中项</h2></div></div>\n <label class=\"dashboard-label\" for=\"dashboard-status\">状态</label>\n <el-select id=\"dashboard-status\" v-model=\"filterStatus\" class=\"dashboard-control dashboard-element-control\" size=\"small\" placeholder=\"选择项目状态\" :popper-append-to-body=\"false\">\n <el-option v-for=\"status in statusOptions\" :key=\"status.key\" :label=\"status.label\" :value=\"status.key\" />\n </el-select>\n <label class=\"dashboard-label\" for=\"dashboard-keyword\">关键词</label>\n <el-input id=\"dashboard-keyword\" v-model=\"filterKeyword\" class=\"dashboard-control dashboard-element-control\" size=\"small\" clearable prefix-icon=\"el-icon-search\" placeholder=\"搜索项目名称或 ID\" />\n <label class=\"dashboard-label\" for=\"dashboard-owner\">负责人 ID</label>\n <el-input id=\"dashboard-owner\" v-model=\"filterOwner\" class=\"dashboard-control dashboard-element-control\" size=\"small\" clearable placeholder=\"按负责人 ID 筛选\" />\n <label class=\"dashboard-label\" for=\"dashboard-created-date\">创建日期</label>\n <el-date-picker id=\"dashboard-created-date\" v-model=\"filterCreatedDate\" class=\"dashboard-control dashboard-element-control\" size=\"small\" type=\"date\" format=\"yyyy-MM-dd\" value-format=\"yyyy-MM-dd\" clearable :popper-append-to-body=\"false\" placeholder=\"选择创建日期\" />\n <el-button class=\"dashboard-filter-submit\" type=\"primary\" size=\"small\" :loading=\"dashboardRefreshing\" :disabled=\"dashboardRefreshing\" @click=\"applyFilters\"><i class=\"ri ri_search-line\"></i> 筛选</el-button>\n <div v-if=\"selectedProject\" class=\"dashboard-selected\">\n <span>当前项目</span><strong>{{ selectedProject.name || selectedProject.title || selectedProject.id }}</strong>\n <small>{{ currentStep ? stepLabel(currentStep) : '没有唯一可处理环节' }}</small>\n </div>\n <p v-else class=\"dashboard-empty\">从列表选择项目后查看上下文。</p>\n </article>\n\n <article class=\"dashboard-panel dashboard-list-panel\">\n <div class=\"dashboard-panel-heading\"><div><p class=\"dashboard-overline\">PROJECT LIST</p><h2>项目列表</h2></div><span>{{ projectCount }} 个结果</span></div>\n <page-block\n v-for=\"(block, index) in blocks\"\n v-if=\"block.type === 'project-table'\"\n :key=\"'table-' + index\"\n :block=\"block\"\n :block-index=\"index\"\n :rows=\"filteredProjectRows\"\n :selected-project=\"selectedProject\"\n :current-step=\"currentStep\"\n :draft-comment=\"draftComment\"\n :action-busy=\"actionBusy\"\n :selected-project-ids=\"selectedProjectIds\"\n @select-project=\"selectProject\"\n @open-quick-process=\"openQuickProcess\"\n />\n </article>\n\n <article class=\"dashboard-panel dashboard-detail-panel\">\n <div class=\"dashboard-panel-heading\"><div><p class=\"dashboard-overline\">CONTEXT</p><h2>项目详情</h2></div></div>\n <page-block\n v-for=\"(block, index) in blocks\"\n v-if=\"block.type === 'project-detail'\"\n :key=\"'detail-' + 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 :selected-project-ids=\"selectedProjectIds\"\n @load-project-detail=\"loadProjectDetail\"\n />\n <p v-if=\"!selectedProject\" class=\"dashboard-empty\">选择列表中的项目查看详情。</p>\n </article>\n </section>\n\n <div v-if=\"quickProcessVisible\" class=\"dashboard-overlay\" role=\"dialog\" aria-modal=\"true\" aria-label=\"快速处理\">\n <section class=\"dashboard-drawer\">\n <div class=\"dashboard-drawer-heading\"><div><p class=\"dashboard-overline\">ACTION</p><h2>快速处理</h2></div><el-button class=\"dashboard-close\" plain @click=\"clearSelection\">关闭</el-button></div>\n <p v-if=\"selectedProject\" class=\"dashboard-drawer-project\">{{ 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=\"'action-' + 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 :selected-project-ids=\"selectedProjectIds\"\n @submit-step=\"submitStep\"\n @update-comment=\"draftComment = $event\"\n />\n <p v-if=\"!currentStep\" class=\"dashboard-empty\">当前项目没有唯一可处理环节。</p>\n </section>\n </div>\n</main>",
248
+ "style": ".ops-dashboard { min-height: 100%; padding: 24px 32px 48px; background: #f5f7fa; color: #1f2937; }\n.dashboard-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }\n.dashboard-eyebrow, .dashboard-overline { margin: 0; color: #2563eb; font-size: 11px; font-weight: 700; letter-spacing: .12em; }\n.dashboard-header h1 { margin: 6px 0; font-size: 26px; letter-spacing: -.02em; }\n.dashboard-subtitle { max-width: 680px; margin: 0; color: #64748b; line-height: 1.6; }\n.dashboard-actions { display: flex; gap: 8px; flex-wrap: wrap; }\n.dashboard-button, .dashboard-close { min-height: 44px; padding: 9px 14px; border: 1px solid #2563eb; border-radius: 8px; background: #2563eb; color: #fff; cursor: pointer; }\n.dashboard-button-muted, .dashboard-close { border-color: #cbd5e1; background: #fff; color: #334155; }\n.dashboard-button:focus-visible, .dashboard-close:focus-visible, .dashboard-status-row:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }\n.dashboard-button:disabled { cursor: not-allowed; opacity: .55; }\n.dashboard-alert { margin-top: 16px; padding: 12px 16px; border: 1px solid #fecaca; border-radius: 10px; background: #fff1f2; color: #991b1b; }\n.dashboard-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }\n.dashboard-kpi { position: relative; min-height: 104px; padding: 16px 18px; box-sizing: border-box; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; overflow: hidden; }\n.dashboard-kpi:before { position: absolute; inset: 0 auto 0 0; width: 4px; content: ''; background: #2563eb; }\n.dashboard-kpi.tone-amber:before { background: #d97706; } .dashboard-kpi.tone-violet:before { background: #7c3aed; } .dashboard-kpi.tone-green:before { background: #16a34a; }\n.dashboard-kpi span { display: block; color: #64748b; font-size: 12px; } .dashboard-kpi strong { display: block; margin-top: 12px; font-size: 28px; font-variant-numeric: tabular-nums; } .dashboard-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }\n.dashboard-grid { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(260px, .8fr) minmax(460px, 1.8fr); gap: 16px; margin-top: 16px; align-items: start; }\n.dashboard-charts .page-composition-chart { min-width: 0; }\n.dashboard-panel { min-width: 0; padding: 20px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; }\n.dashboard-list-panel { grid-column: 1 / -1; } .dashboard-detail-panel { grid-column: 1 / -1; }\n.dashboard-panel-heading, .dashboard-drawer-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }\n.dashboard-panel-heading h2, .dashboard-drawer-heading h2 { margin: 4px 0 0; font-size: 17px; } .dashboard-panel-heading > span { color: #64748b; font-size: 12px; }\n.dashboard-status-list { display: grid; gap: 4px; } .dashboard-status-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; min-height: 52px; padding: 8px 0; border: 0; border-bottom: 1px solid #f1f5f9; background: transparent; color: #334155; text-align: left; cursor: pointer; }\n.dashboard-status-row.is-active .dashboard-status-label, .dashboard-status-row:hover .dashboard-status-label { color: #2563eb; } .dashboard-status-label { display: flex; gap: 8px; align-items: center; }\n.dashboard-status-value { font-variant-numeric: tabular-nums; font-weight: 600; } .dashboard-progress { grid-column: 1 / -1; display: block; height: 5px; border-radius: 999px; background: #e2e8f0; overflow: hidden; } .dashboard-progress i { display: block; height: 100%; border-radius: inherit; background: #60a5fa; }\n.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; } .status-2, .status-6, .status-pending { background: #d97706; } .status-3, .status-processing { background: #7c3aed; } .status-4, .status-completed, .status-done { background: #16a34a; }\n.dashboard-label { display: block; margin: 12px 0 6px; color: #475569; font-size: 12px; font-weight: 600; } .dashboard-control { width: 100%; min-height: 42px; box-sizing: border-box; padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #1f2937; } .dashboard-element-control { min-height: 32px; padding: 0; } .dashboard-element-control.el-select, .dashboard-element-control.el-date-editor { display: block; } .dashboard-element-control .el-input__inner, .dashboard-element-control.el-input .el-input__inner { min-height: 32px; height: 32px; border-color: #cbd5e1; border-radius: 6px; background: #fff; color: #1f2937; } .dashboard-element-control .el-input__inner:focus { border-color: #2563eb; }\n.dashboard-control:focus { border-color: #2563eb; outline: 2px solid #bfdbfe; outline-offset: 1px; } .dashboard-selected { margin-top: 20px; padding: 12px; border-radius: 10px; background: #eff6ff; } .dashboard-selected span, .dashboard-selected small { display: block; color: #475569; font-size: 12px; } .dashboard-selected strong { display: block; margin: 5px 0; }\n.dashboard-empty { margin: 0; color: #64748b; font-size: 13px; } .dashboard-overlay { position: fixed; inset: 0; z-index: 20; display: flex; justify-content: flex-end; background: rgba(15, 23, 42, .32); } .dashboard-drawer { width: min(520px, 100vw); height: 100%; box-sizing: border-box; padding: 24px; overflow: auto; background: #fff; } .dashboard-drawer-project { margin: 0 0 20px; font-weight: 600; }\n@media (max-width: 1024px) { .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dashboard-list-panel, .dashboard-detail-panel { grid-column: 1 / -1; } }\n@media (max-width: 1024px) { .dashboard-charts .page-composition-chart:last-child { grid-column: 1 / -1; } }\n@media (max-width: 720px) { .ops-dashboard { padding: 16px 16px 32px; } .dashboard-header { flex-direction: column; } .dashboard-kpis, .dashboard-charts, .dashboard-grid { grid-template-columns: 1fr; } .dashboard-list-panel, .dashboard-detail-panel { grid-column: auto; } } .dashboard-customization { margin-top: 16px; padding: 20px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; } .dashboard-customization .page-block-report-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } @media (max-width: 720px) { .dashboard-customization .page-block-report-grid { grid-template-columns: 1fr; } }",
249
+ "blocks": [
250
+ {
251
+ "type": "project-table",
252
+ "capability": "project.table",
253
+ "query": "projects",
254
+ "title": "项目列表",
255
+ "columns": [
256
+ {
257
+ "key": "id",
258
+ "label": "项目 ID"
259
+ },
260
+ {
261
+ "key": "name",
262
+ "label": "项目名称"
263
+ },
264
+ {
265
+ "key": "__statusLabel",
266
+ "label": "状态"
267
+ },
268
+ {
269
+ "key": "__currentStepName",
270
+ "label": "当前环节"
271
+ },
272
+ {
273
+ "key": "owner_name",
274
+ "label": "负责人"
275
+ },
276
+ {
277
+ "key": "department",
278
+ "label": "申请部门"
279
+ },
280
+ {
281
+ "key": "branch",
282
+ "label": "所属分部"
283
+ },
284
+ {
285
+ "key": "request_date",
286
+ "label": "申请日期"
287
+ },
288
+ {
289
+ "key": "need_date",
290
+ "label": "需求日期"
291
+ },
292
+ {
293
+ "key": "warehouse",
294
+ "label": "出入库仓库"
295
+ },
296
+ {
297
+ "key": "__createTimeLabel",
298
+ "label": "创建时间"
299
+ }
300
+ ]
301
+ },
302
+ {
303
+ "type": "project-pagination",
304
+ "capability": "project.pagination",
305
+ "query": "projects",
306
+ "pageSize": 5
307
+ },
308
+ {
309
+ "type": "report-preview",
310
+ "capability": "report.preview",
311
+ "title": "业务口径与可定制分析",
312
+ "eyebrow": "CUSTOMIZATION",
313
+ "items": [
314
+ {
315
+ "key": "data-scope",
316
+ "label": "数据范围",
317
+ "valueKey": "dataScope",
318
+ "description": "指标和图表来自服务端全量聚合,不随当前分页变化。"
319
+ },
320
+ {
321
+ "key": "department-count",
322
+ "label": "部门维度",
323
+ "valueKey": "departmentCount",
324
+ "description": "识别需求来源与部门负荷,cardinality 为全量去重数。"
325
+ },
326
+ {
327
+ "key": "warehouse-count",
328
+ "label": "仓库维度",
329
+ "valueKey": "warehouseCount",
330
+ "description": "识别仓库需求压力和资源分布。"
331
+ },
332
+ {
333
+ "key": "owner-count",
334
+ "label": "负责人维度",
335
+ "valueKey": "ownerCount",
336
+ "description": "观察工作量是否集中在少数负责人。"
337
+ },
338
+ {
339
+ "key": "filter-summary",
340
+ "label": "当前筛选",
341
+ "valueKey": "filterSummary",
342
+ "description": "筛选提交后同步刷新列表与所有聚合。"
343
+ },
344
+ {
345
+ "key": "apply-peak-month",
346
+ "label": "申请峰值月份",
347
+ "valueKey": "applyPeakMonth",
348
+ "description": "识别申请量最高的月份,辅助安排资源与库存。"
349
+ },
350
+ {
351
+ "key": "custom-elements",
352
+ "label": "可组合元素",
353
+ "value": "KPI · 图表 · 说明卡 · 筛选 · 分页",
354
+ "description": "同一页面模板可按业务目标组合指标、分析维度和交互控件。"
355
+ },
356
+ {
357
+ "key": "business-definition",
358
+ "label": "业务口径",
359
+ "value": "项目总数、状态、负责人、组织与需求节奏均以当前筛选条件下的服务端全量聚合为准。"
360
+ },
361
+ {
362
+ "key": "page-summary",
363
+ "label": "当前页",
364
+ "valueKey": "currentPage",
365
+ "description": "明确当前页码与分页范围,便于回测。"
366
+ }
367
+ ]
368
+ },
369
+ {
370
+ "type": "project-detail",
371
+ "capability": "project.detail",
372
+ "context": "selectedProject",
373
+ "title": "项目详情"
374
+ },
375
+ {
376
+ "type": "step-form",
377
+ "capability": "step.form",
378
+ "context": "currentStep",
379
+ "title": "环节表单"
380
+ },
381
+ {
382
+ "type": "step-operation",
383
+ "capability": "step.operation",
384
+ "action": "submitStep",
385
+ "title": "环节操作"
386
+ }
387
+ ]
388
+ },
389
+ "dependencies": {
390
+ "capabilities": [
391
+ "project.detail",
392
+ "project.pagination",
393
+ "project.table",
394
+ "report.preview",
395
+ "step.form",
396
+ "step.operation"
397
+ ]
398
+ }
399
+ }
400
+ }