Files
ningbo/动易的标签库/标签库/列表类/通用信息焦点图.config
T
2026-08-31 16:22:00 +08:00

355 lines
13 KiB
XML

<?xml version="1.0"?>
<root>
<LabelType>列表类</LabelType>
<LabelIntro>通用信息焦点图复杂算法主标签,此标签仅用来调用,无需修改!</LabelIntro>
<OutType>sin</OutType>
<LabelDataType>sql_sysquery</LabelDataType>
<EnabelAjax>False</EnabelAjax>
<IsXsltSql>false</IsXsltSql>
<IsXsltCountSql>false</IsXsltCountSql>
<LabelSqlString>SELECT NodeID,arrChildID,ItemListOrderType,ItemPageSize FROM PE_Nodes WHERE NodeID IN (@nodes)</LabelSqlString>
<attributes>
<name>bindStyle</name>
<datatype>string</datatype>
<default>普通式</default>
<intro>项目呈现样式</intro>
</attributes>
<attributes>
<name>outputQty</name>
<datatype>int</datatype>
<default>10</default>
<intro>输出的项目数量</intro>
</attributes>
<attributes>
<name>titleLength</name>
<datatype>int</datatype>
<default>50</default>
<intro>项目标题长度,一个汉字占两个字节</intro>
</attributes>
<attributes>
<name>nodes</name>
<datatype>supersql</datatype>
<default>0</default>
<intro>栏目ID</intro>
</attributes>
<attributes>
<name>includeChildNodes</name>
<datatype>bool</datatype>
<default>true</default>
<intro>是否包含子栏目</intro>
</attributes>
<attributes>
<name>models</name>
<datatype>string</datatype>
<default>0</default>
<intro>模型ID</intro>
</attributes>
<attributes>
<name>bindModel</name>
<datatype>int</datatype>
<default>0</default>
<intro>通过模型ID与指定的模型表联合</intro>
</attributes>
<attributes>
<name>specials</name>
<datatype>string</datatype>
<default>0</default>
<intro>专题ID</intro>
</attributes>
<attributes>
<name>items</name>
<datatype>string</datatype>
<default>0</default>
<intro>项目ID</intro>
</attributes>
<attributes>
<name>listOrderType</name>
<datatype>int</datatype>
<default>1</default>
<intro>项目列表排序方式</intro>
</attributes>
<attributes>
<name>linkOpenType</name>
<datatype>int</datatype>
<default>0</default>
<intro>项目列表打开方式</intro>
</attributes>
<attributes>
<name>inDays</name>
<datatype>int</datatype>
<default />
<intro>近多少天的项目</intro>
</attributes>
<attributes>
<name>betDate</name>
<datatype>string</datatype>
<default />
<intro>介于时间段之间的项目</intro>
</attributes>
<attributes>
<name>editor</name>
<datatype>string</datatype>
<default />
<intro>为指定编辑者的项目</intro>
</attributes>
<attributes>
<name>inputer</name>
<datatype>string</datatype>
<default />
<intro>为指定录入者的项目</intro>
</attributes>
<attributes>
<name>hits</name>
<datatype>int</datatype>
<default />
<intro>点击数大于等于指定值的项目</intro>
</attributes>
<attributes>
<name>dayHits</name>
<datatype>int</datatype>
<default />
<intro>日点击数大于等于指定值的项目</intro>
</attributes>
<attributes>
<name>weekHits</name>
<datatype>int</datatype>
<default />
<intro>周点击数大于等于指定值的项目</intro>
</attributes>
<attributes>
<name>monthHits</name>
<datatype>int</datatype>
<default />
<intro>月点击数大于等于指定值的项目</intro>
</attributes>
<attributes>
<name>eliteLevel</name>
<datatype>int</datatype>
<default />
<intro>推荐级大于等于指定值的项目</intro>
</attributes>
<attributes>
<name>priorityLevel</name>
<datatype>int</datatype>
<default />
<intro>优先级大于等于指定值的项目</intro>
</attributes>
<attributes>
<name>picExist</name>
<datatype>bool</datatype>
<default>true</default>
<intro>是否查询带图片的项目</intro>
</attributes>
<attributes>
<name>disableVirtualLink</name>
<datatype>bool</datatype>
<default>false</default>
<intro>是否禁止输出虚连接项目</intro>
</attributes>
<attributes>
<name>focusWidth</name>
<datatype>int</datatype>
<default>428</default>
<intro>焦点图宽度</intro>
</attributes>
<attributes>
<name>focusHeight</name>
<datatype>int</datatype>
<default>280</default>
<intro>焦点图高度</intro>
</attributes>
<attributes>
<name>listOrderByNodeSet</name>
<datatype>bool</datatype>
<default>false</default>
<intro>项目列表排序方式由节点配置取代</intro>
</attributes>
<attributes>
<name>optionalCond</name>
<datatype>string</datatype>
<default />
<intro>可选扩展查询约束条件</intro>
</attributes>
<attributes>
<name>optionalExtend</name>
<datatype>string</datatype>
<default />
<intro>可选扩展参数</intro>
</attributes>
<LabelTemplate>
<![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
<xsl:param name="bindStyle" />
<xsl:param name="outputQty" />
<xsl:param name="titleLength" />
<xsl:param name="nodes" />
<xsl:param name="includeChildNodes" />
<xsl:param name="models" />
<xsl:param name="bindModel"/>
<xsl:param name="specials" />
<xsl:param name="items" />
<xsl:param name="listOrderType" />
<xsl:param name="linkOpenType"/>
<xsl:param name="inDays" />
<xsl:param name="betDate" />
<xsl:param name="editor" />
<xsl:param name="inputer" />
<xsl:param name="hits" />
<xsl:param name="dayHits" />
<xsl:param name="weekHits" />
<xsl:param name="monthHits" />
<xsl:param name="eliteLevel" />
<xsl:param name="priorityLevel" />
<xsl:param name="picExist"/>
<xsl:param name="disableVirtualLink" />
<xsl:param name="focusWidth" />
<xsl:param name="focusHeight" />
<xsl:param name="listOrderByNodeSet" />
<xsl:param name="optionalCond" />
<xsl:param name="optionalExtend" />
<!--约束条件节,如需维护此节,请注意各项数据有效性-->
<xsl:variable name="_constraint">
<xsl:if test="$disableVirtualLink = 'true'">
AND CM.LinkType = 0
</xsl:if>
<xsl:if test="$specials != 0">
AND SI.SpecialID IN (<xsl:value-of select="$specials"/>)
</xsl:if>
<xsl:if test="$models != 0">
AND CM.ModelID IN (<xsl:value-of select="$models"/>)
</xsl:if>
<xsl:if test="$items != 0">
AND CM.GeneralID IN (<xsl:value-of select="$items"/>)
</xsl:if>
<xsl:if test="$eliteLevel != ''">
AND CM.EliteLevel &gt;= <xsl:value-of select="$eliteLevel"/>
</xsl:if>
<xsl:if test="$priorityLevel != ''">
AND CM.Priority &gt;= <xsl:value-of select="$priorityLevel"/>
</xsl:if>
<xsl:if test="$hits != ''">
AND CM.Hits &gt;= <xsl:value-of select="$hits"/>
</xsl:if>
<xsl:if test="$dayHits != ''">
AND CM.DayHits &gt;= <xsl:value-of select="$dayHits"/>
</xsl:if>
<xsl:if test="$weekHits != ''">
AND CM.WeekHits &gt;= <xsl:value-of select="$weekHits"/>
</xsl:if>
<xsl:if test="$monthHits != ''">
AND CM.MonthHits &gt;= <xsl:value-of select="$monthHits"/>
</xsl:if>
<xsl:if test="$inDays != ''">
AND DATEDIFF(d,CM.UpdateTime,GETDATE()) &lt;= <xsl:value-of select="$inDays"/>
</xsl:if>
<xsl:if test="$picExist = 'true'">
AND CM.DefaultPicUrl != ''
</xsl:if>
<xsl:if test="$inputer != ''">
AND CM.Inputer = '<xsl:value-of select="$inputer"/>'
</xsl:if>
<xsl:if test="$editor != ''">
AND CM.Editor = '<xsl:value-of select="$editor"/>'
</xsl:if>
<xsl:if test="$betDate != '' and $betDate != '|'">
AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) &gt;= '<xsl:value-of select="substring-before($betDate,'|')" />') AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) &lt;= '<xsl:value-of select="substring-after($betDate,'|')" />')
</xsl:if>
</xsl:variable>
<xsl:template match="/NewDataSet">
<!--参数传递节,如需增加参数传递,请修改此变量节-->
<xsl:variable name="_params">
titleLength="<xsl:value-of select="$titleLength"/>" focusWidth="<xsl:value-of select="$focusWidth"/>" focusHeight="<xsl:value-of select="$focusHeight"/>" optionalExtend="<xsl:value-of select="$optionalExtend"/>"
</xsl:variable>
<!--绑定样式前缀节,如需维护,请修改此变量节-->
<xsl:variable name="_bindStyle">
通用信息焦点图_<xsl:value-of select="$bindStyle"/>
</xsl:variable>
<!--内容列表排序方式判断、此变量节请勿修改-->
<xsl:variable name="_listOrderType">
<xsl:choose>
<xsl:when test="contains($nodes,',') = 'true'">
<xsl:value-of select="$listOrderType"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$listOrderByNodeSet = 'true'">
<xsl:value-of select="/NewDataSet/Table/ItemListOrderType"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$listOrderType"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!--内容列表排序、此变量节请勿修改-->
<xsl:variable name="_listOrderValue">
<xsl:choose>
<xsl:when test="$_listOrderType = 1">CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 2">CM.GeneralID ASC</xsl:when>
<xsl:when test="$_listOrderType = 3">CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 4">CM.UpdateTime ASC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 5">CM.Hits DESC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 6">CM.Hits ASC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 7">CM.CommentAudited DESC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 8">CM.CommentAudited ASC,,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 9">CM.DayHits DESC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 10">CM.DayHits ASC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 11">CM.WeekHits DESC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 12">CM.WeekHits ASC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 13">CM.MonthHits DESC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 14">CM.MonthHits ASC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 15">CM.EliteLevel DESC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 16">CM.EliteLevel ASC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 17">CM.Priority DESC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 18">CM.Priority ASC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 19">CM.Hits DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 20">CM.EliteLevel DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 21">CM.Priority DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
<xsl:when test="$_listOrderType = 22">CM.CommentAudited DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
<xsl:otherwise>CM.UpdateTime DESC,CM.GeneralID DESC</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!--取得节点列,此变量节请勿修改-->
<xsl:variable name="_nodes">
<xsl:choose>
<xsl:when test="$includeChildNodes = 'false'">
<xsl:value-of select="$nodes"/>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="Table">
<xsl:value-of select="arrChildID"/>,
</xsl:for-each>0
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!--取得模型绑定串节,此变量节请勿修改-->
<xsl:variable name="_bindModel">
<xsl:if test="$specials != 0">
INNER JOIN PE_SpecialInfos SI ON (CM.ItemID = SI.GeneralID)
</xsl:if>
<xsl:if test="$bindModel != 0">
<xsl:value-of select="pe:GetSqlSnippet($bindModel)"/>
</xsl:if>
</xsl:variable>
<!--查询语句组合节,此节请勿修改-->
<xsl:choose>
<xsl:when test="Table">
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="SELECT TOP <xsl:value-of select="$outputQty"/> * FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:value-of select="$_constraint"/> ORDER BY <xsl:value-of select="$_listOrderValue"/>" page="false" /}
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$nodes = 0">
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="SELECT TOP <xsl:value-of select="$outputQty"/> * FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 <xsl:value-of select="$_constraint"/> ORDER BY <xsl:value-of select="$_listOrderValue"/>" page="false" /}
</xsl:when>
<xsl:otherwise>
<font style="color:red">指定了不存在的栏目ID或栏目数组!</font>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>]]>
</LabelTemplate>
</root>