fix: 恢复应用管理的配置项定义功能
All checks were successful
continuous-integration/drone/push Build is passing

定时任务提交(104487f)误删了应用 config_schema 相关代码,现恢复:
- backend/app/models/app.py: 恢复 config_schema 数据库字段
- backend/app/routers/apps.py: 恢复 ConfigSchemaItem、API 路由、格式化函数
- frontend/src/views/apps/index.vue: 恢复配置项编辑 UI
This commit is contained in:
2026-01-29 17:45:43 +08:00
parent 66e6dc844c
commit 830361073b
3 changed files with 230 additions and 4 deletions

View File

@@ -18,6 +18,11 @@ class App(Base):
# [{"code": "brainstorm", "name": "头脑风暴", "path": "/brainstorm"}, ...]
tools = Column(Text)
# 配置项定义JSON 数组)- 定义租户可配置的参数
# [{"key": "industry", "label": "行业类型", "type": "radio", "options": [...], "default": "...", "required": false}, ...]
# type: text(文本) | radio(单选) | select(下拉多选) | switch(开关)
config_schema = Column(Text)
# 是否需要企微JS-SDK
require_jssdk = Column(SmallInteger, default=0) # 0-不需要 1-需要