cms/entcms/wwwroot/admin.ui
yumoqing 52f4632dfc feat: 角色权限体系 + 栏目管理
1. 角色体系(owner企业类型):
   - superuser: 超级用户(继承全部权限)
   - webmaster: 内容管理员(CRUD全部内容/分类/栏目/配置/线索)
   - reviewer: 内容审核(查看内容+审批状态更新)
   - supervisor: 主管(只读全部+线索管理+审批)
   - customer-support: 客服(线索查看和更新)
   - anonymous: 匿名用户(公开页面+提交线索)

2. 超级用户初始化脚本(scripts/init_superuser.py)
   - 默认: admin/admin123
   - 自动创建用户+分配owner.superuser角色

3. cms_sections栏目管理表:
   - section_key: 栏目标识(hero/products/cases/news/cta/footer/float)
   - display_config: 展示配置JSON(布局/列数/悬停效果)
   - style_config: 样式配置JSON(颜色/渐变/边框)
   - static_content: 静态内容(Hero标语/产品卡片/CTA文案)
   - is_visible: 显示/隐藏控制
   - sort_order: 栏目排序

4. cms_categories增加display_config字段(分类展示风格)

5. 初始化6个栏目数据(Hero/产品/案例/新闻/页脚/浮动入口)

6. 更新菜单和管理后台增加栏目管理入口
2026-05-27 16:57:00 +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('/entcms/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('/entcms/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('/entcms/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('/entcms/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('/entcms/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"
}
}
]
}