cms/entcms/wwwroot/admin.ui
yumoqing 569c8e6715 refactor: CMS从Sage子模块重构为独立ahserver Web应用
架构变更:
- CMS作为独立进程运行(端口9090),不再嵌入Sage
- 使用ahserver框架,复用rbac模块做认证授权
- 所有模块共享sage数据库(配置在conf/config.json)

新增文件:
- app/cms.py: 独立Web应用主入口(webapp(init))
- app/global_func.py: 全局函数(get_module_dbname/UiWindow等)
- conf/config.json: 应用配置模板(数据库/路径/处理器/Redis)
- start.sh/stop.sh: 进程管理脚本
- pyproject.toml: 顶层Python包配置

路径重构(去掉/entcms前缀):
- 官网首页: /entcms/index.ui → /index.ui
- 管理后台: /entcms/admin.ui → /admin.ui
- API: /entcms/api/xxx.dspy → /api/xxx.dspy
- CRUD: /entcms/cms_content_list → /cms_content_list
- dingdingflow保持/dingdingflow前缀(映射子目录)

config.json路径映射:
- entcms/wwwroot → / (根路径)
- dingdingflow/wwwroot → /dingdingflow
- bricks/dist → /bricks

构建脚本(build.sh):
- 创建独立venv(py3/)
- 安装核心依赖(apppublic/sqlor/ahserver/bricks/rbac等)
- json2ddl生成CMS业务表DDL
- xls2ui生成CRUD UI
- 生成systemd服务文件

load_path.py更新:
- entcms: 所有路径去掉/entcms前缀
- dingdingflow: 保持/dingdingflow前缀
- 查找set_role_perm.py支持CMS和Sage两种环境

init_superuser.py更新:
- 支持CMS独立环境(自动检测py3/conf)
- 创建superuser角色并分配全部权限
2026-05-27 17:20:36 +08:00

322 lines
13 KiB
XML

{
"widgettype": "VBox",
"options": {
"width": "100%",
"height": "100%",
"padding": "20px"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "企业CMS管理后台",
"fontSize": "24px",
"fontWeight": "bold",
"css": "title"
}
},
{
"widgettype": "Text",
"options": {
"text": "管理官网内容、分类、商机线索和站点配置",
"fontSize": "14px",
"color": "#999",
"css": "subtitle"
}
},
{
"widgettype": "ResponsableBox",
"options": {
"gap": "16px",
"minWidth": "220px",
"css": "admin-cards"
},
"subwidgets": [
{
"widgettype": "Button",
"options": {
"css": "card",
"padding": "20px",
"borderRadius": "12px",
"border": "none"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.sage_main_content",
"options": {
"url": "{{entire_url('/cms_content_list')}}"
},
"mode": "replace"
}
],
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"alignItems": "flex-start",
"gap": "8px"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "📝",
"fontSize": "32px"
}
},
{
"widgettype": "Text",
"options": {
"text": "内容管理",
"fontSize": "18px",
"fontWeight": "bold"
}
},
{
"widgettype": "Text",
"options": {
"text": "新闻、案例、产品、Banner",
"fontSize": "13px",
"color": "#999"
}
}
]
}
]
},
{
"widgettype": "Button",
"options": {
"css": "card",
"padding": "20px",
"borderRadius": "12px",
"border": "none"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.sage_main_content",
"options": {
"url": "{{entire_url('/cms_sections_list')}}"
},
"mode": "replace"
}
],
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"alignItems": "flex-start",
"gap": "8px"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "🎨",
"fontSize": "32px"
}
},
{
"widgettype": "Text",
"options": {
"text": "栏目管理",
"fontSize": "18px",
"fontWeight": "bold"
}
},
{
"widgettype": "Text",
"options": {
"text": "栏目排序、显示隐藏、展示风格",
"fontSize": "13px",
"color": "#999"
}
}
]
}
]
},
{
"widgettype": "Button",
"options": {
"css": "card",
"padding": "20px",
"borderRadius": "12px",
"border": "none"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.sage_main_content",
"options": {
"url": "{{entire_url('/cms_categories_list')}}"
},
"mode": "replace"
}
],
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"alignItems": "flex-start",
"gap": "8px"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "📂",
"fontSize": "32px"
}
},
{
"widgettype": "Text",
"options": {
"text": "内容分类",
"fontSize": "18px",
"fontWeight": "bold"
}
},
{
"widgettype": "Text",
"options": {
"text": "管理产品分类、案例行业、新闻栏目",
"fontSize": "13px",
"color": "#999"
}
}
]
}
]
},
{
"widgettype": "Button",
"options": {
"css": "card",
"padding": "20px",
"borderRadius": "12px",
"border": "none"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.sage_main_content",
"options": {
"url": "{{entire_url('/cms_leads_list')}}"
},
"mode": "replace"
}
],
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"alignItems": "flex-start",
"gap": "8px"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "🎯",
"fontSize": "32px"
}
},
{
"widgettype": "Text",
"options": {
"text": "商机线索",
"fontSize": "18px",
"fontWeight": "bold"
}
},
{
"widgettype": "Text",
"options": {
"text": "访客留言、AI抽取商机",
"fontSize": "13px",
"color": "#999"
}
}
]
}
]
},
{
"widgettype": "Button",
"options": {
"css": "card",
"padding": "20px",
"borderRadius": "12px",
"border": "none"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.sage_main_content",
"options": {
"url": "{{entire_url('/cms_site_config_list')}}"
},
"mode": "replace"
}
],
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"alignItems": "flex-start",
"gap": "8px"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "⚙️",
"fontSize": "32px"
}
},
{
"widgettype": "Text",
"options": {
"text": "站点配置",
"fontSize": "18px",
"fontWeight": "bold"
}
},
{
"widgettype": "Text",
"options": {
"text": "首屏标语、页脚信息、联系方式",
"fontSize": "13px",
"color": "#999"
}
}
]
}
]
}
]
},
{
"widgettype": "VBox",
"id": "sage_main_content",
"options": {
"width": "100%",
"flex": "1",
"marginTop": "20px"
}
}
]
}