SuperAPI AI 工具集

form-compile

通用与其它

查看项目

更新于 10-15 21:33

技能介绍

用途:form-compile 用于编译 1С 受管表单,生成 Form.xml。支持两种模式:JSON DSL(依据 JSON 表单定义生成)和 FromObject(依据 1С 对象元数据按 ERP 预设自动生成)。从零设计表单(5 个以上元素或需求不明确)时可先调用 /form-patterns 加载参考;简单表单(1–3 个字段)无需。

主要能力:JSON DSL 支持 title、properties、events、excludedCommands、elements、attributes、commands、parameters。元素类型包括 group、input、check、radio、label、labelField、table、columnGroup、pages/page、button、buttonGroup、popup、cmdBar、autoCmdBar、picture、picField 等,并支持通用属性(name、title、tooltip、visible、enabled、readOnly、titleLocation、宽高、拉伸、events 等)。事件名区分大小写,覆盖表单、输入框、表格、按钮等各类事件。类型系统支持 string、decimal、boolean、date、引用类型、对象类型、ValueTable、ValueTree、DynamicList、复合类型等。

使用方式:JSON DSL 模式执行 powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/form-compile.ps1" -JsonPath "<json>" -OutputPath "<Form.xml>";FromObject 模式执行 powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/form-compile.ps1" -FromObject -OutputPath "<.../TypePlural/ObjectName/Forms/FormName/Ext/Form.xml>",对象与用途由 OutputPath 推导,支持 Document 和 Catalog。

适用场景:创建表单骨架后填充 Form.xml,配合 /form-add、/form-validate、/form-info 使用;也用于外部处理(EPF),此时主属性为 ExternalDataProcessorObject.ИмяОбработки,数据路径使用表单属性而非 Объект.ИмяРеквизита。

限制:FormDataStructure、FormDataCollection、FormDataTree 不能作为属性类型;未知键会在输出中产生警告;EPF 组装需要含目标配置的数据库(见 /epf-build)。更细的字段、表格、动态列表、外观、图表等主题需查阅 references/ 下对应文档。