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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!doctype html>
<html>
<head>
[#include "/business/wechat/include/title.html" /]
[#include "/business/wechat/include/wheader.html" /]
</head>
 
<body>
<header class="kltit"><a href="javascript:history.go(-1);"><span></span></a>配置</header>
<nav class="kltwo clearfix">
    <div class="kltwowrap2">
        <a href="#" hidefocus="true" class="active">配置分类</a>
        <a href="#" hidefocus="true">配置列表 </a>
        <a href="#" hidefocus="true">统计分析</a>             
    </div>
</nav>
<div class="swiper-container" id="swiper-pages">
    <div [#if RequestParameters.t?? && RequestParameters.t==1]class="swiper-wrapper swiper-wrapper_another"[#else]class="swiper-wrapper"[/#if]>
        <div class="swiper-slide kltypebg">
            <section>
                [#if cateList?? && cateList?size>0]
                    [#list cateList as lv1]
                        <section class="tasktype">
                            <a class="firstCate"><p>
                                <label>${lv1.num}个</label><span class="tpye1"></span>${lv1.name}
                            </p></a>
                            <div class="secondCate">
                                [#if lv1.children?? && lv1.children?size>0]
                                    [#list lv1.children as lv2]
                                        <a href="${base}/ewyw/ewconfig/econfigThirdCate.html?lv2_id=${lv2.id}"><p class="tasksubtype"><em></em><label>${lv2.num}个</label>${lv2.name}</p></a>
                                    [/#list]
                                [/#if]
                            </div>    
                        </section>
                    [/#list]
                [/#if]
            </section>
        </div>
        <div class="swiper-slide">
            <div id="main"></div>
            <div id="pagination" class="loadmore"></div>
        </div>
        <div class="swiper-slide">
            <section class="taskstatiimgwrap">
                <div id="pie"></div>
            </section>
        </div>
    </div>
</div>  
 
 
<script type="text/javascript">
        function query(index) {
            if(index==1) {
                if($.util.isEmpty($("#main").html())) {
                    queryDevice();
                }
            } else if(index==2) {
                if($.util.isEmpty($("#pie").html())) {
                    queryPie();
                }
            }
        }
 
        function loadPie(data) {
             $('#pie').highcharts({
                title: {
                    text: '配置一级分类占比'
                },
                tooltip: {
                    pointFormat: '<b>{point.y}个</b>'
                },
                plotOptions: {
                    pie: {
                        allowPointSelect: true,
                        cursor: 'pointer',
                        dataLabels: {
                            enabled: true,
                            color: '#000000',
                            connectorColor: '#000000',
                            format: '<b>{point.name}</b>: {point.percentage:.1f} %'
                        }
                    }
                },
                series: [{
                    type: 'pie',
                    data: data
                }]
            });
        }
 
        function queryPie() {
             loading($("#pie"));
             $.post("${base}/ewyw/ewconfig/catePie.html",{},function(data,textStatus) {
                 loadPie(data);
             },"json");
             
        }
 
        function queryDevice() {
            var param = {};
              $("#pagination").pagination({
                durl:"${base}/ewyw/ewconfig/econfigData.html",
                curl:"${base}/ewyw/ewconfig/econfigCount.html",
                pdiv:"pagination",
                mdiv:"main",
                perPage : 5,
                param:param
            });
        }
        
        $(function() {
            n=$('.kltwowrap2 a').size();                
            var wh=100*n+"%";
            $('.kltwowrap2').width(wh);
            var lt=(100/n/3);
            var lt_li=lt+"%";
            $('.kltwowrap2 a').width(lt_li);            
            $(".kltwowrap2 a").on('touchstart mousedown',function(e){
                e.preventDefault()
                $(".kltwowrap2 .active").removeClass('active');
                $(this).addClass('active');
                tabsSwiper.slideTo($(this).index());
            });
            
            $(".kltwowrap2 a").click(function(e){
                e.preventDefault();
            });
            
            window.onload=function(){  
                var pages = document.getElementById("swiper-pages");  
                var scale = window.screen.height / window.screen.width;  
                pages.style.height = document.body.clientWidth * scale -$('.kltit').height()-$('.kltwo').height() - 20  + "px";  
            } 
            
            var tabsSwiper = new Swiper(".swiper-container",{
                setWrapperSize :true,
                onSlideChangeStart: function(sw){
                    $(".kltwowrap2 .active").removeClass('active');
                    var panelIndex = tabsSwiper.activeIndex;
                    var $kltwowrapA = $(".kltwowrap2 a").eq(panelIndex);
                    $kltwowrapA.addClass('active');
                    $kltwowrapA.parent().css("left",-parseInt(sw.activeIndex/4)*sw.width);
                    query(panelIndex);
                }
            });
            
        })
        
        
        /*标签切换屏幕左右滑动导航字数过多*/
     </script>
 
[#assign label="device"]
[#include "/business/wechat/include/wfooter.html" /]                       
</body>
</html>