cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<#ftl>
<#macro splitpage splitPage>
<#if splitPage.infoCount gte splitPage.pageSize>
    <script type="text/javascript">
    <!--
        function goPage(page){
            var url = window.location.href.replace(/#/g,'');
            if(page == ${splitPage.currentPageIndex}) return false;
            if(/\?/g.test(url)) {
                if(/pageindex=((\d)+)+/.test(url))
                    window.location.href = url.replace(/pageindex=((\d)+)+/, "pageindex="+page);
                else
                    window.location.href = url +"&pageindex=" + page;
                } else {
                    window.location.href = url + "?pageindex=" + page;
                }
            }
        function SearchKeyDown(event) {    
          if (event.keyCode == 13) {
            tzGo();    
          }
        }
        function isNotNull(){
            var PageBar = document.getElementById("PageBar").value.length;
            if(PageBar!=0)
            return true;    
            return false;    
        }
        function tzGo(){
            if(document.getElementById("pageCountId").value!="1"){
                if(isNotNull()){
                        return goPage(document.getElementById("PageBar").value);
                }else{
                    alert("错误的页码");        
                }    
            }else{
                alert("错误的页码");    
            }
        
        }
        
    //-->
    </script>
    <#assign page = param.pageindex?default(1) />
    <#assign previousPage = (splitPage.currentPageIndex>1)?string(splitPage.currentPageIndex-1,1) />
    <#assign nextPage = (splitPage.currentPageIndex == splitPage.pageCount)?string(splitPage.pageCount,splitPage.currentPageIndex+1) />
                         <input type="hidden" name="pageCountId" id="pageCountId" value="${splitPage.pageCount}" />
                                <ul class="page">
                                <li><#if page?number = 1 ><a href="####" onclick="alert('已经是第一页了!')">第一页</a><#else><a href="####" onclick="return goPage(1)">第一页</a></#if></li>
                                    <li><#if page?number lte 1><a href="####" onclick="alert('已经是第一页了!')">上一页</a><#else><a href="####" onclick="return goPage(${previousPage})">上一页</a></#if></li>
                                    <#list (splitPage.pageCount?number-5)..splitPage.pageCount?number as d>
                                    <#if d gte 1>
                                        <li <#if page == d> id="fanye" </#if>><a href="####" onclick="return goPage(${d})">${d}</a></li>
                                    </#if>
                                    </#list>
                                    <li><#if page?number gte splitPage.pageCount?number><a href="####" onclick="alert('已经是最后一页了!')">下一页</a><#else><a href="####" onclick="return goPage(${nextPage})">下一页</a></#if></li>
                                    <li><#if page?number = splitPage.pageCount?number ><a href="####" onclick="alert('已经是最后一页了!')">最末页</a><#else><a href="####"  onclick="return goPage(${splitPage.pageCount})">最末页</a></#if></li>
                                </ul>
                                <!-- 
                            <div  class="fanye3">
                                    <div class="fanye4">转到<input id="PageBar" type="text" allowNull="1"  style="width:40px; height:13px;" onKeyUp="value=value.replace(/\D/g,'')" onkeypress="SearchKeyDown(event)">页</div>
                                    <a href="####" onclick="tzGo();"><img src="/task/images/quedingd2.gif" width="60" height="22" /></a>
                              </div>
                                 -->
                            <!--翻页-->
 
</#if>
</#macro>