# 需新增的自定义标签清单 > 现有标签库不覆盖以下场景,需在 PowerEasy 后台 → 标签管理 → 新建标签 后使用。 > 全部基于真实 SQL + XSLT 实现,不存在 mock 数据。 --- ## 1. 视频信息列表 **LabelId**:`视频信息列表` **LabelType**:列表类 **数据源**:`PE_U_Video` / `PE_CommonModel` 关联 **属性(attributes)** | 名称 | 类型 | 默认 | 说明 | |---|---|---|---| | nodeId | int | 0 | 视频栏目节点ID | | outputQty | int | 8 | 数量 | | titleLength | int | 24 | 标题截断 | | width | int | 200 | 缩略图宽 | | height | int | 140 | 缩略图高 | **LabelSqlString** ```sql SELECT TOP @outputQty V.*, CM.Title, CM.NodeID, CM.GeneralID, CM.InputTime, CM.PinyinTitle, CM.HtmlPageName FROM PE_U_Video V INNER JOIN PE_CommonModel CM ON V.ItemID = CM.GeneralID WHERE CM.Status = 99 AND CM.NodeID IN (SELECT arrChildID FROM PE_Nodes WHERE NodeID = @nodeId) ORDER BY CM.UpdateTime DESC ``` **LabelTemplate (XSLT 片段)** ```xml ``` --- ## 2. 日历控件 **LabelId**:`日历控件` **LabelType**:其他类 **数据源**:服务端时间戳(`{PE.TimeNow /}`) **属性** | 名称 | 类型 | 默认 | 说明 | |---|---|---|---| | showType | string | month | month / week | | theme | string | blue | 主题色 | **LabelTemplate (XSLT 片段)** ```xml
``` > 注:`pe:RenderCalendar` 需在 `labelproc` 自定义函数中实现,返回日历 HTML 片段。 --- ## 3. 用稿统计图表 **LabelId**:`用稿统计图表` **LabelType**:其他类 **数据源**:`PE_CommonModel` 按 `Inputer` 分组聚合 **属性** | 名称 | 类型 | 默认 | 说明 | |---|---|---|---| | period | string | month | day/week/month | | chartType | string | pie | pie/bar/line | | topN | int | 10 | 取前 N 个 | **LabelSqlString** ```sql SELECT TOP @topN Inputer, COUNT(*) AS Cnt FROM PE_CommonModel WHERE Status = 99 AND UpdateTime >= pe:DateAdd(pe:TimeNow(),'day',-30) GROUP BY Inputer ORDER BY Cnt DESC ``` **LabelTemplate (XSLT 片段 — 注入 ECharts)** ```xml
``` --- ## 4. 排行榜 **LabelId**:`排行榜` **LabelType**:列表类 **数据源**:`PE_CommonModel` 按 `Hits` / `CommentCount` 排序 **属性** | 名称 | 类型 | 默认 | 说明 | |---|---|---|---| | rankType | string | 点击 | 点击 / 评论 / 推荐 | | outputQty | int | 10 | 数量 | | titleLength | int | 30 | 标题截断 | | nodes | string | 0 | 节点ID,0=全站 | **LabelSqlString** ```sql SELECT TOP @outputQty NodeID, GeneralID, InputTime, PinyinTitle, HtmlPageName, Title, Hits, CommentCount FROM PE_CommonModel WHERE Status = 99 ORDER BY Hits DESC ORDER BY CommentCount DESC ORDER BY EliteLevel DESC, UpdateTime DESC ``` **LabelTemplate (XSLT 片段)** ```xml
``` --- ## 5. 自设内容(已存在,但本模板高频使用,建议创建多个实例) 为方便后台管理,建议预先创建以下固定 `nodeId + num`: | num | 用途 | 所在分区 | |---|---|---| | 1 | 顶部登录/注册/搜索 HTML | 分区 1 | | 2 | 头条大标题 | 分区 3 | | 3 | 头条副标题 | 分区 3 | | 10 | 横幅广告位 | 分区 5 | | 11 | "学习园地"装饰大图 | 分区 6 | | 12 | "学习专栏"装饰大图 | 分区 9 | | 13 | "先进典型"红色横幅 | 分区 11 | | 14 | 直播电视图标 | 分区 16 | | 15 | "基层风采"装饰大图 | 分区 18 | | 16 | 实用工具图标宫格 | 分区 19 | | 99 | 底部版权/备案 | 分区 23 | > 这些 `自设内容` 实例的 SQL 仍指向 `PE_Nodes.Custom_Content`,由后台编辑录入,**不属于 mock 数据**。