From e26cf53c7141a061d6c982b46eefebe51ef70346 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 3 Jun 2026 06:45:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E8=9C=80=E9=94=A6?= =?UTF-8?q?=E4=BC=A0=E5=AA=92=E6=99=BA=E8=83=BD=E4=BD=93=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E6=A8=A1=E5=9D=97=E9=A1=B9=E7=9B=AE=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - wwwroot/index.ui: 首页入口 - wwwroot/menu.ui: 侧边菜单 - scripts/: 后端逻辑脚本目录 - json/: CRUD数据模型定义目录 - docs/: 项目文档目录 - README.md: 项目说明 - .gitignore: Git忽略规则 --- .gitignore | 35 ++++++++++++++++++++++++++++ README.md | 49 +++++++++++++++++++++++++++++++++++++++- docs/.gitkeep | 0 json/.gitkeep | 0 scripts/.gitkeep | 0 wwwroot/index.ui | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ wwwroot/menu.ui | 13 +++++++++++ 7 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 docs/.gitkeep create mode 100644 json/.gitkeep create mode 100644 scripts/.gitkeep create mode 100644 wwwroot/index.ui create mode 100644 wwwroot/menu.ui diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..13eca9b --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +# Python +__pycache__/ +*.py[cod] +*$py.class +*.pyc +*.pyo +*.egg-info/ +*.egg +dist/ +build/ +.eggs/ + +# Virtual environments +.venv/ +venv/ +env/ + +# Environment variables +.env +.env.* + +# IDE +.idea/ +.vscode/ +*.swp +*.swo +*~ + +# OS +.DS_Store +Thumbs.db + +# Sage +.pytest_cache/ +*.log diff --git a/README.md b/README.md index 5557c86..9a91ff7 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,49 @@ -# shujin_media +# 蜀锦传媒智能体系统 (Shujin Media Agent System) +Sage 平台独立模块 —— 蜀锦传媒智能体系统。 + +## 概述 + +本模块是 Sage 平台的独立业务模块,提供蜀锦传媒相关的智能体功能,包括传媒内容管理、自动化工作流、智能分析等服务。 + +本模块不依赖 sage 主仓库,但复用 Sage 平台的基础 RBAC(基于角色的访问控制)模块进行权限管理。 + +## 目录结构 + +``` +shujin_media/ +├── wwwroot/ # 前端 UI 页面 +│ ├── index.ui # 首页入口 +│ └── menu.ui # 侧边菜单定义 +├── scripts/ # 后端逻辑脚本 +├── json/ # CRUD 数据模型定义 +├── docs/ # 项目文档 +├── README.md # 本文件 +└── .gitignore +``` + +## 技术栈 + +- **前端 UI**: Sage UI Widget System (.ui JSON 定义) +- **后端脚本**: Python +- **数据模型**: JSON CRUD 定义 +- **权限控制**: Sage RBAC 模块 + +## 开发规范 + +- UI 文件使用 Sage Widget JSON 格式,支持 Jinja2 模板语法 +- 后端脚本放在 `scripts/` 目录 +- 数据模型(CRUD 定义)放在 `json/` 目录 +- 遵循 Sage 模块开发规范 + +## 部署 + +```bash +cd ~/repos/shujin_media +git pull +# 按 Sage 模块部署流程操作 +``` + +## 远程仓库 + +- Git: git.opencomputing.cn:yumoqing/shujin_media diff --git a/docs/.gitkeep b/docs/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/json/.gitkeep b/json/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/scripts/.gitkeep b/scripts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/wwwroot/index.ui b/wwwroot/index.ui new file mode 100644 index 0000000..9f6f337 --- /dev/null +++ b/wwwroot/index.ui @@ -0,0 +1,59 @@ +{ + "widgettype": "VBox", + "id": "shujin_media_root", + "options": { + "width": "100%", + "height": "100%", + "bgcolor": "var(--sage-bg-primary, transparent)" + }, + "subwidgets": [ + { + "widgettype": "VScrollPanel", + "options": { + "css": "filler" + }, + "subwidgets": [ + { + "widgettype": "HBox", + "options": { + "width": "100%", + "alignItems": "center", + "marginBottom": "16px" + }, + "subwidgets": [ + { + "widgettype": "Title2", + "options": { + "fontWeight": "700", + "otext": "蜀锦传媒智能体系统", + "i18n": true + } + }, + { + "widgettype": "Filler" + } + ] + }, + { + "widgettype": "VBox", + "options": { + "css": "card", + "width": "100%", + "borderRadius": "12px", + "padding": "24px" + }, + "subwidgets": [ + { + "widgettype": "Text", + "options": { + "fontSize": "15px", + "otext": "欢迎使用蜀锦传媒智能体系统。本模块提供智能传媒管理与自动化服务。", + "i18n": true + } + } + ] + } + ] + } + ] +} diff --git a/wwwroot/menu.ui b/wwwroot/menu.ui new file mode 100644 index 0000000..eaf012e --- /dev/null +++ b/wwwroot/menu.ui @@ -0,0 +1,13 @@ +{ + "widgettype": "Menu", + "id": "shujin_media_menu", + "options": { + "items": [ + { + "name": "shujin_media", + "label": "蜀锦传媒", + "url": "{{entire_url('shell.ui')}}" + } + ] + } +}