完善教育

This commit is contained in:
李鹏宇
2026-08-12 17:06:11 +08:00
parent ba80a569e9
commit d08668ca8a
8 changed files with 417 additions and 17 deletions
+149
View File
@@ -84,6 +84,155 @@
<li>密码:首次登录请修改初始密码;忘记密码请联系管理员。</li>
<li>本手册内容由管理员维护,如需补充或更正请联系管理员。</li>
</ul>
</div>
]]></field>
</record>
<!-- ===================== 产品介绍 ===================== -->
<!-- content 为全内联 style 的自包含 H5 网页(只读展示),Html 字段净化器
默认保留 style 属性、剥离 <style> 标签,因此必须用内联 style 而非 class。 -->
<record id="about_page_product" model="yuthon.about.page">
<field name="name">产品介绍</field>
<field name="category">product</field>
<field name="sequence">30</field>
<field name="active">True</field>
<field name="content"><![CDATA[
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'PingFang SC','Microsoft YaHei',sans-serif;color:#1e293b;line-height:1.65;">
<!-- Hero -->
<div style="position:relative;background:linear-gradient(135deg,#0b1120 0%,#0e3a5c 55%,#0ea5e9 100%);color:#fff;padding:52px 32px 60px;text-align:center;overflow:hidden;">
<div style="position:absolute;top:-60px;right:-40px;width:220px;height:220px;border-radius:50%;background:rgba(56,189,248,0.16);"></div>
<div style="position:absolute;bottom:-80px;left:-30px;width:260px;height:260px;border-radius:50%;background:rgba(250,204,21,0.12);"></div>
<div style="position:relative;z-index:1;display:inline-flex;align-items:center;gap:10px;padding:8px 18px;background:rgba(255,255,255,0.12);border:1px solid rgba(255,255,255,0.30);border-radius:999px;font-size:15px;font-weight:600;margin-bottom:20px;">
<span style="display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:7px;background:#ffd43b;color:#0b1120;font-weight:800;font-family:monospace;">P</span>
python企业实训平台
</div>
<h1 style="position:relative;z-index:1;margin:0 0 12px;font-size:36px;font-weight:800;letter-spacing:1px;color:#fff !important;">从 Python 语法到企业级项目实战</h1>
<p style="position:relative;z-index:1;margin:0 0 22px;font-size:16px;opacity:0.92;font-weight:400;color:#fff !important;">面向高校与职业院校的工程化 Python 实训平台,把企业真实开发场景搬进课堂</p>
<div style="position:relative;z-index:1;display:flex;flex-wrap:wrap;justify-content:center;gap:10px;">
<span style="padding:6px 14px;background:rgba(255,255,255,0.10);border:1px solid rgba(255,255,255,0.22);border-radius:999px;font-size:13px;">语法基础</span>
<span style="padding:6px 14px;background:rgba(255,255,255,0.10);border:1px solid rgba(255,255,255,0.22);border-radius:999px;font-size:13px;">Web 开发</span>
<span style="padding:6px 14px;background:rgba(255,255,255,0.10);border:1px solid rgba(255,255,255,0.22);border-radius:999px;font-size:13px;">数据分析</span>
<span style="padding:6px 14px;background:rgba(255,255,255,0.10);border:1px solid rgba(255,255,255,0.22);border-radius:999px;font-size:13px;">自动化运维</span>
<span style="padding:6px 14px;background:rgba(255,255,255,0.10);border:1px solid rgba(255,255,255,0.22);border-radius:999px;font-size:13px;">企业项目</span>
</div>
</div>
<!-- 数据条 -->
<div style="display:flex;flex-wrap:wrap;justify-content:center;gap:16px;padding:28px 20px 8px;">
<div style="flex:1 1 140px;min-width:130px;text-align:center;background:#f1f5f9;border-radius:14px;padding:18px 12px;">
<div style="font-size:26px;font-weight:800;color:#0ea5e9;">6</div>
<div style="font-size:13px;color:#64748b;margin-top:4px;">阶段化实训体系</div>
</div>
<div style="flex:1 1 140px;min-width:130px;text-align:center;background:#f1f5f9;border-radius:14px;padding:18px 12px;">
<div style="font-size:26px;font-weight:800;color:#2563eb;">20+</div>
<div style="font-size:13px;color:#64748b;margin-top:4px;">企业级项目案例</div>
</div>
<div style="flex:1 1 140px;min-width:130px;text-align:center;background:#f1f5f9;border-radius:14px;padding:18px 12px;">
<div style="font-size:26px;font-weight:800;color:#7c3aed;">1:1</div>
<div style="font-size:13px;color:#64748b;margin-top:4px;">真实企业开发环境</div>
</div>
<div style="flex:1 1 140px;min-width:130px;text-align:center;background:#f1f5f9;border-radius:14px;padding:18px 12px;">
<div style="font-size:26px;font-weight:800;color:#16a34a;">Odoo 18</div>
<div style="font-size:13px;color:#64748b;margin-top:4px;">企业级技术底座</div>
</div>
</div>
<!-- 概述 -->
<div style="padding:18px 24px 0;">
<p style="margin:0;font-size:15px;color:#334155;">平台以 <b>Odoo 18</b> 为底座,围绕 Python 工程化实训重构教学链路:把企业的版本控制、代码评审、持续集成与云端编码环境原样搬进课堂。学员不再孤立地「学语法」,而是以<b>真实项目</b>为主线,在导师带领下走完「需求 → 编码 → 评审 → 部署」的完整闭环,让实训成果直接对接企业岗位能力要求。</p>
</div>
<!-- 核心功能卡片墙 -->
<div style="padding:20px 24px 4px;">
<h2 style="margin:0 0 14px;font-size:20px;font-weight:700;color:#0f172a;">核心功能</h2>
<div style="display:flex;flex-wrap:wrap;gap:14px;">
<div style="flex:1 1 260px;min-width:240px;background:#ffffff;border:1px solid #e2e8f0;border-radius:14px;padding:18px 20px;box-shadow:0 2px 10px rgba(15,23,42,0.04);">
<div style="display:flex;align-items:center;gap:10px;margin-bottom:8px;">
<span style="display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:9px;background:linear-gradient(135deg,#38bdf8,#0ea5e9);color:#fff;font-size:16px;">📚</span>
<b style="font-size:15px;color:#0f172a;">阶段化实训课程</b>
</div>
<p style="margin:0;font-size:14px;color:#475569;">语法基础 → Web 开发 → 数据分析 → 自动化运维,分阶课程搭配视频 / PPT / 案例,循序渐进。</p>
</div>
<div style="flex:1 1 260px;min-width:240px;background:#ffffff;border:1px solid #e2e8f0;border-radius:14px;padding:18px 20px;box-shadow:0 2px 10px rgba(15,23,42,0.04);">
<div style="display:flex;align-items:center;gap:10px;margin-bottom:8px;">
<span style="display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:9px;background:linear-gradient(135deg,#ffd43b,#f59e0b);color:#0b1120;font-size:16px;">⌨️</span>
<b style="font-size:15px;color:#0f172a;">在线编码沙箱</b>
</div>
<p style="margin:0;font-size:14px;color:#475569;">内置云端 Python 运行环境,免配置即可写代码、跑结果,练习与验证实时完成。</p>
</div>
<div style="flex:1 1 260px;min-width:240px;background:#ffffff;border:1px solid #e2e8f0;border-radius:14px;padding:18px 20px;box-shadow:0 2px 10px rgba(15,23,42,0.04);">
<div style="display:flex;align-items:center;gap:10px;margin-bottom:8px;">
<span style="display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:9px;background:linear-gradient(135deg,#fb923c,#f97316);color:#fff;font-size:16px;">🏗️</span>
<b style="font-size:15px;color:#0f172a;">企业项目库</b>
</div>
<p style="margin:0;font-size:14px;color:#475569;">汇集电商、数据看板、接口服务等 20+ 真实项目案例,学员按岗位方向挑选项目实战。</p>
</div>
<div style="flex:1 1 260px;min-width:240px;background:#ffffff;border:1px solid #e2e8f0;border-radius:14px;padding:18px 20px;box-shadow:0 2px 10px rgba(15,23,42,0.04);">
<div style="display:flex;align-items:center;gap:10px;margin-bottom:8px;">
<span style="display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:9px;background:linear-gradient(135deg,#a78bfa,#8b5cf6);color:#fff;font-size:16px;">✅</span>
<b style="font-size:15px;color:#0f172a;">作业评审闭环</b>
</div>
<p style="margin:0;font-size:14px;color:#475569;">学员提交代码 / 结果,导师在线批阅并给反馈,模拟企业 Code Review 流程。</p>
</div>
<div style="flex:1 1 260px;min-width:240px;background:#ffffff;border:1px solid #e2e8f0;border-radius:14px;padding:18px 20px;box-shadow:0 2px 10px rgba(15,23,42,0.04);">
<div style="display:flex;align-items:center;gap:10px;margin-bottom:8px;">
<span style="display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:9px;background:linear-gradient(135deg,#60a5fa,#3b82f6);color:#fff;font-size:16px;">📈</span>
<b style="font-size:15px;color:#0f172a;">学习进展看板</b>
</div>
<p style="margin:0;font-size:14px;color:#475569;">按项目 / 章节统计完成度与代码质量,师生各有视角,实训进度一目了然。</p>
</div>
<div style="flex:1 1 260px;min-width:240px;background:#ffffff;border:1px solid #e2e8f0;border-radius:14px;padding:18px 20px;box-shadow:0 2px 10px rgba(15,23,42,0.04);">
<div style="display:flex;align-items:center;gap:10px;margin-bottom:8px;">
<span style="display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:9px;background:linear-gradient(135deg,#4ade80,#22c55e);color:#fff;font-size:16px;">🎯</span>
<b style="font-size:15px;color:#0f172a;">岗位能力画像</b>
</div>
<p style="margin:0;font-size:14px;color:#475569;">沉淀学员项目经历与技能标签,生成能力画像,直接对标企业招聘需求。</p>
</div>
</div>
</div>
<!-- 流程 -->
<div style="padding:20px 24px 4px;">
<h2 style="margin:0 0 14px;font-size:20px;font-weight:700;color:#0f172a;">实训链路</h2>
<div style="display:flex;flex-wrap:wrap;gap:12px;">
<div style="flex:1 1 300px;min-width:260px;background:linear-gradient(135deg,#eff6ff,#f0f9ff);border:1px solid #bfdbfe;border-radius:14px;padding:16px 18px;">
<div style="font-size:14px;font-weight:700;color:#1d4ed8;margin-bottom:6px;">导师端</div>
<div style="font-size:14px;color:#334155;">配置阶段课程 → 派发企业项目 → 批阅代码与结果 → 沉淀项目笔记 → 跟踪班级实训进度</div>
</div>
<div style="flex:1 1 300px;min-width:260px;background:linear-gradient(135deg,#f0fdf4,#ecfdf5);border:1px solid #bbf7d0;border-radius:14px;padding:16px 18px;">
<div style="font-size:14px;font-weight:700;color:#15803d;margin-bottom:6px;">学员端</div>
<div style="font-size:14px;color:#334155;">进入项目实战 → 在线编码与运行 → 提交作业等待评审 → 查看能力画像与进阶建议</div>
</div>
</div>
</div>
<!-- 优势 -->
<div style="padding:20px 24px 8px;">
<h2 style="margin:0 0 14px;font-size:20px;font-weight:700;color:#0f172a;">为什么选我们</h2>
<div style="display:flex;flex-wrap:wrap;gap:14px;">
<div style="flex:1 1 200px;min-width:180px;background:#fff;border-left:4px solid #0ea5e9;border-radius:10px;padding:14px 16px;box-shadow:0 1px 6px rgba(15,23,42,0.05);">
<b style="font-size:14px;color:#0f172a;">真项目真环境</b>
<p style="margin:6px 0 0;font-size:13px;color:#475569;">复刻企业 Git / CI / 云编码流程,实训即上岗预演。</p>
</div>
<div style="flex:1 1 200px;min-width:180px;background:#fff;border-left:4px solid #2563eb;border-radius:10px;padding:14px 16px;box-shadow:0 1px 6px rgba(15,23,42,0.05);">
<b style="font-size:14px;color:#0f172a;">成果可量化</b>
<p style="margin:6px 0 0;font-size:13px;color:#475569;">代码提交、评审、完成度全程留痕,能力看得见。</p>
</div>
<div style="flex:1 1 200px;min-width:180px;background:#fff;border-left:4px solid #7c3aed;border-radius:10px;padding:14px 16px;box-shadow:0 1px 6px rgba(15,23,42,0.05);">
<b style="font-size:14px;color:#0f172a;">岗位对齐</b>
<p style="margin:6px 0 0;font-size:13px;color:#475569;">项目方向对标 Python 开发 / 数据分析 / 运维岗位。</p>
</div>
<div style="flex:1 1 200px;min-width:180px;background:#fff;border-left:4px solid #16a34a;border-radius:10px;padding:14px 16px;box-shadow:0 1px 6px rgba(15,23,42,0.05);">
<b style="font-size:14px;color:#0f172a;">开箱即用</b>
<p style="margin:6px 0 0;font-size:13px;color:#475569;">基于 Odoo 18,手机 / 平板 / 电脑多端随时实训。</p>
</div>
</div>
</div>
<!-- 页脚 -->
<div style="margin-top:24px;padding:18px 24px;background:#0f172a;color:#94a3b8;font-size:13px;text-align:center;">
python企业实训平台 · 基于 Odoo 18 构建 · 让每一次练习都更接近真实开发
</div>
</div>
]]></field>
</record>
+1
View File
@@ -16,6 +16,7 @@ class YuthonAboutPage(models.Model):
category = fields.Selection([
('system', '系统说明'),
('operation', '操作手册'),
('product', '产品介绍'),
], string='分类', default='system', required=True)
content = fields.Html(string='内容', sanitize=True, translate=True)
sequence = fields.Integer(string='排序', default=10)
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

+115
View File
@@ -151,3 +151,118 @@
}
}
}
// ============================================================
// 课程学习:章节列表看板化(网格卡片墙)
// 把内嵌 kanban 渲染成自适应的卡片网格,去掉默认列/分组样式。
// ============================================================
.o_college_chapter_kanban {
background: transparent !important;
border: none !important;
// 去掉 kanban 默认分组列包裹,让卡片直接成为网格项
.o_kanban_renderer {
display: grid !important;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
gap: 16px !important;
align-items: stretch !important;
background: transparent !important;
padding: 0 !important;
}
// 单列分组包裹层不参与布局,使其子卡片成为 renderer 的 grid item
.o_kanban_group {
display: contents !important;
}
.o_kanban_record {
width: 100% !important;
margin: 0 !important;
border: none !important;
padding: 0 !important;
background: transparent !important;
}
.o_college_chapter_card {
height: 100%;
display: flex !important;
flex-direction: column !important;
gap: 8px !important;
background-color: $o-view-background-color !important;
border: 1px solid rgba($o-main-text-color, 0.08) !important;
border-radius: 12px !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
padding: 16px 18px !important;
transition: transform 0.15s ease, box-shadow 0.15s ease;
&:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1) !important;
}
.o_college_chapter_head {
display: flex !important;
align-items: center !important;
gap: 8px !important;
.o_college_chapter_title {
font-size: 15px;
font-weight: 600;
color: $o-main-text-color !important;
}
}
.o_college_chapter_video {
font-size: 13px;
color: $o-gray-600 !important;
}
.o_college_chapter_foot {
margin-top: auto !important;
text-align: right !important;
}
}
}
// ============================================================
// 关于页(产品介绍等):只读 H5 撑满内容区,去掉四周大留白
// content 字段内容已为全内联 style 的自包含 H5,这里只做容器铺满。
// ============================================================
.o_about_full_form {
// 去掉 form 默认内边距,让内容贴边
padding: 0 !important;
.o_form_renderer,
.o_form_renderer > .o_form_field {
padding: 0 !important;
margin: 0 !important;
}
}
.o_about_full.o_field_html {
// 只读展示时铺满,无编辑器工具栏
display: block !important;
padding: 0 !important;
margin: 0 !important;
max-width: 100% !important;
background: transparent !important;
border: none !important;
.o_readonly {
padding: 0 !important;
}
}
// 系统说明 / 操作手册 仍为普通富文本(保留基础样式)
.o_about_page {
max-width: 900px;
margin: 0 auto;
font-size: 14px;
line-height: 1.8;
color: $o-main-text-color;
h2 { font-size: 22px; margin: 8px 0 16px; }
h3 { font-size: 17px; margin: 22px 0 10px; }
h4 { font-size: 15px; margin: 16px 0 8px; }
p, li { color: $o-main-text-color; }
}
@@ -189,3 +189,113 @@
}
}
}
// ============================================================
// 课程学习:章节列表看板化(深色模式网格卡片墙)
// ============================================================
.o_college_chapter_kanban {
background: transparent !important;
border: none !important;
.o_kanban_renderer {
display: grid !important;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
gap: 16px !important;
align-items: stretch !important;
background: transparent !important;
padding: 0 !important;
}
.o_kanban_group {
display: contents !important;
}
.o_kanban_record {
width: 100% !important;
margin: 0 !important;
border: none !important;
padding: 0 !important;
background: transparent !important;
}
.o_college_chapter_card {
height: 100%;
display: flex !important;
flex-direction: column !important;
gap: 8px !important;
background-color: #1e293b !important;
border: 1px solid #334155 !important;
border-radius: 12px !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
padding: 16px 18px !important;
transition: transform 0.15s ease, box-shadow 0.15s ease;
&:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45) !important;
}
.o_college_chapter_head {
display: flex !important;
align-items: center !important;
gap: 8px !important;
.o_college_chapter_title {
font-size: 15px;
font-weight: 600;
color: #f8fafc !important;
}
}
.o_college_chapter_video {
font-size: 13px;
color: #94a3b8 !important;
}
.o_college_chapter_foot {
margin-top: auto !important;
text-align: right !important;
}
}
}
// ============================================================
// 关于页(产品介绍等):只读 H5 撑满内容区,去掉四周大留白
// content 字段内容已为全内联 style 的自包含 H5,这里只做容器铺满。
// ============================================================
.o_about_full_form {
padding: 0 !important;
.o_form_renderer,
.o_form_renderer > .o_form_field {
padding: 0 !important;
margin: 0 !important;
}
}
.o_about_full.o_field_html {
display: block !important;
padding: 0 !important;
margin: 0 !important;
max-width: 100% !important;
background: transparent !important;
border: none !important;
.o_readonly {
padding: 0 !important;
}
}
// 系统说明 / 操作手册 仍为普通富文本(深色下基础样式)
.o_about_page {
max-width: 900px;
margin: 0 auto;
font-size: 14px;
line-height: 1.8;
color: #e2e8f0;
h2 { font-size: 22px; margin: 8px 0 16px; color: #f8fafc; }
h3 { font-size: 17px; margin: 22px 0 10px; color: #f8fafc; }
h4 { font-size: 15px; margin: 16px 0 8px; color: #f8fafc; }
p, li { color: #cbd5e1; }
}
+4 -11
View File
@@ -1,21 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!-- ===================== 关于页:表单 ===================== -->
<!-- content 为只读 html 字段,里面放一个自包含(全内联 style)的 H5 网页,
表单去掉 sheet、撑满内容区,避免四周大留白。 -->
<record id="yuthon_about_page_form" model="ir.ui.view">
<field name="name">yuthon.about.page.form</field>
<field name="model">yuthon.about.page</field>
<field name="arch" type="xml">
<form>
<sheet>
<div class="oe_title">
<h1><field name="name" readonly="1"/></h1>
</div>
<group>
<field name="category" readonly="1" widget="badge"/>
<field name="active" readonly="1"/>
</group>
<field name="content" widget="html" class="o_about_content"/>
</sheet>
<form class="o_about_full_form">
<field name="content" widget="html" readonly="1" class="o_about_full"/>
</form>
</field>
</record>
+19 -6
View File
@@ -170,12 +170,25 @@
</group>
<separator string="课程章节(点击「去学习」观看视频与资料)"/>
<field name="chapter_ids" readonly="1">
<list>
<field name="name"/>
<button name="action_open_study" type="object"
string="去学习" class="btn-primary"
icon="fa-play"/>
</list>
<kanban class="o_college_chapter_kanban">
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click o_college_chapter_card">
<div class="o_college_chapter_head">
<span class="o_college_chapter_title"><field name="name"/></span>
</div>
<div class="o_college_chapter_video" t-if="record.video_filename_display.raw_value">
<i class="fa fa-play-circle mr-1"/>
<field name="video_filename_display"/>
</div>
<div class="o_college_chapter_foot">
<button name="action_open_study" type="object"
class="btn btn-primary btn-sm" icon="fa-play">去学习</button>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</sheet>
</form>
+19
View File
@@ -1,4 +1,23 @@
<odoo>
<!-- ===================== 产品介绍(顶级菜单,置顶,位于「我的实训」上方) ===================== -->
<!-- 在当前页面的内容区以表单形式打开预置记录 about_page_product,
其 content 富文本字段即为 H5 页面内容(介绍本教育产品本身)。 -->
<!-- 先删除上一轮遗留的 act_url 记录,避免同 external id 模型冲突(ParseError) -->
<delete model="ir.actions.act_url" id="action_yuthon_product_intro"/>
<record id="action_yuthon_product_intro" model="ir.actions.act_window">
<field name="name">产品介绍</field>
<field name="res_model">yuthon.about.page</field>
<field name="view_mode">form</field>
<field name="res_id" ref="about_page_product"/>
<field name="target">current</field>
</record>
<menuitem id="menu_yuthon_product_intro"
name="产品介绍"
web_icon="college,static/src/img/product_intro.png"
sequence="0"
action="action_yuthon_product_intro"
groups="college.group_teacher,college.group_student,base.group_system"/>
<!-- ===================== 我的实训(顶级菜单,置顶) ===================== -->
<menuitem id="menu_yuthon_training"
name="我的实训"