first commit

This commit is contained in:
2026-08-31 16:22:00 +08:00
commit e969a1e559
2665 changed files with 128795 additions and 0 deletions
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 学习日历(用于板块7右30%:日历组件 + 上下月切换) -->
<root>
<label>
<id>学习日历</id>
<name>学习日历(带学习记录标记)</name>
<description>渲染当月日历组件,已学习日期高亮,今天红色显示</description>
<category>其他类</category>
<version>v1.0</version>
<creator>军政门户项目组</creator>
</label>
<datasource>
<type>SQL</type>
<sql><![CDATA[
-- 获取当月有学习记录的日期
SELECT DISTINCT DAY(StudyDate) AS Day
FROM PE_StudyRecord
WHERE UserId = @UserId AND YEAR(StudyDate) = @Year AND MONTH(StudyDate) = @Month
]]></sql>
<parameters>
<param name="UserId" type="int" default="0" description="当前用户ID,未登录则为0取全员统计" />
<param name="Year" type="int" default="0" description="年份,0=当前年" />
<param name="Month" type="int" default="0" description="月份,0=当前月" />
</parameters>
</datasource>
<output>
<![CDATA[
<div class="calendar">
<div class="cal-hd">
<a class="cal-prev" href="?m={prev_month}"></a>
<span class="cal-title">{Year}年{Month}月</span>
<a class="cal-next" href="?m={next_month}"></a>
</div>
<table class="cal-tb">
<thead>
<tr><th>一</th><th>二</th><th>三</th><th>四</th><th>五</th><th class="wk">六</th><th class="wk">日</th></tr>
</thead>
<tbody>
<!-- 由 JS 根据 Year/Month 动态渲染单元格 -->
<tr><td colspan="7" class="cal-loading">加载中...</td></tr>
</tbody>
</table>
</div>
<script>
$(function() {
// 日历渲染逻辑(调用 pe:RenderCalendar() 自定义函数)
pe.RenderCalendar({Year: {Year}, Month: {Month}, StudiedDays: '{studied_days_csv}'});
});
</script>
]]>
</output>
</root>