袁少华 %!s(int64=4) %!d(string=hai) anos
pai
achega
f088b27ae2
Modificáronse 2 ficheiros con 53 adicións e 13 borrados
  1. 14 3
      js/session.js
  2. 39 10
      pages/dashboard/produce.html

+ 14 - 3
js/session.js

@@ -87,7 +87,8 @@ function getQueryVariable(variable){
     return(false);
 }
 
-
+//map型看板滚动 
+//-------------------开始-----------------------
 function beginFun(chartsID,dataMap,autoTime,timeName,grid){
     return function(){autoInitDate(chartsID,dataMap,autoTime,timeName,grid)} 
 }
@@ -109,6 +110,10 @@ function autoInitDate(chartsID,dataMap,autoTime,timeName,grid){
     }
     ChartsService.initCommonBar(chartsID,map,grid);
 
+    if(DataList.length <= initSize){
+        return;
+    }
+
     timeName = setInterval(beginFun2(chartsID,DataList,timeName,grid),autoTime);
     
 }
@@ -159,7 +164,9 @@ function autoInitDateA(chartsID,dataMap,autoTime,timeName,grid){
         map[lsitA[key][0]] = lsitA[key][1];
     }
     ChartsService.initCommonBar(chartsID,map,grid);
-
+    if(DataListA.length <= initSize){
+        return;
+    }
     timeName = setInterval(beginFun2A(chartsID,DataListA,timeName,grid),autoTime);
     
 }
@@ -187,4 +194,8 @@ function autoLoadDateA(chartsID,DataListA,timeName,grid){
         map[lsitA[key][0]] = lsitA[key][1];
     }
     ChartsService.initCommonBar(chartsID,map,grid);
-}
+}
+
+//map型看板滚动 
+//-------------------结束-----------------------
+

+ 39 - 10
pages/dashboard/produce.html

@@ -80,7 +80,7 @@
                     <!-- <span style="background-color:#5bc0de">&nbsp;&nbsp;&nbsp;</span> -->
                 </div>
                 <div class="row">
-                    <div class="col-lg-12 col-md-12" style="height: 380px;">
+                    <div class="col-lg-12 col-md-12" style="height: 350px;">
                         <div class="row" v-for="product in mouthProduceTaskList">
                             <div class="col-lg-1 col-md-1 center no-padding">{{product.orderSheetCode}}</div>
                             <div class="col-lg-2 col-md-2 center no-padding">{{product.define12}}</div>
@@ -206,16 +206,45 @@
         // 参数说明:beginFun("图表ID","list形式数据","翻页时间(毫秒)","本页面唯一id(不可重复)")
         // ChartsService.initBarWithShade("charts_24", ServiceProduct.getWeekInByCategory(),
         //                 ChartsService.getGridSpanSmall());
-        var initSize = 3;
-        var pageSize = 3;
+        var initSize = 5;
+        var pageSize = 5;
         var pageIndex = 0;
+        var pageSizeA = 5;
+        var pageIndexA = 0;
         const weekInBycategoryList = ServiceProduct.getWeekInByCategory();
-        setTimeout(beginFun("charts_24",weekInBycategoryList,2000,"charts_24"),500);
+        setTimeout(beginFun("charts_24",weekInBycategoryList,10000,"charts_24"),500);
 
         const monthExceptionByCategory =  ServiceProduct.getMonthExceptionByCategory();
-        setTimeout(beginFun("charts_23",monthExceptionByCategory,2000,"charts_23"),500);
-
+        setTimeout(beginFunA("charts_23",monthExceptionByCategory,10000,"charts_23"),500);
 
+        
+        const monthGoodList =  ServiceProduct.getMonthGood();
+        setTimeout(beA,500);
+        var pageSizeMonthGood = 5;
+        var pageIndexMonthGood = 0;
+        function beA(){
+            var lsitMonth = monthGoodList.slice(pageIndexMonthGood,pageSizeMonthGood);
+            pageIndexMonthGood = pageSizeMonthGood;
+            pageSizeMonthGood = pageSizeMonthGood + initSize;
+            ChartsService.initBarWithTwoNumberRate("charts_22", lsitMonth,
+                        ChartsService.getGridSpanSmall());
+            if(monthGoodList.length <= pageIndexMonthGood){
+                return;
+            }
+            setInterval(beginScrollA,10000);
+        }
+        function beginScrollA(){
+            var lsitMonth = monthGoodList.slice(pageIndexMonthGood,pageSizeMonthGood);
+            pageIndexMonthGood = pageSizeMonthGood;
+            pageSizeMonthGood = pageSizeMonthGood + initSize;
+            if(monthGoodList.length <= pageIndexMonthGood){
+                pageIndexMonthGood = 0;
+                pageSizeMonthGood = initSize;
+            }
+            ChartsService.initBarWithTwoNumberRate("charts_22", lsitMonth,
+                        ChartsService.getGridSpanSmall());
+        }
+        
 
         var vm = new Vue({
             el: '#div-main',
@@ -241,10 +270,10 @@
 
                     ChartsService.initBarWithTwoNumberRate("charts_21", ServicePerson.getMonthAttendance(),
                         ChartsService.getGridSpanSmall());
-                    ChartsService.initBarWithTwoNumberRate("charts_22", ServiceProduct.getMonthGood(),
-                        ChartsService.getGridSpanSmall());
-                    ChartsService.initBarWithShade("charts_23", ServiceProduct
-                        .getMonthExceptionByCategory(), ChartsService.getGridSpanSmall());
+                    // ChartsService.initBarWithTwoNumberRate("charts_22", ServiceProduct.getMonthGood(),
+                    //     ChartsService.getGridSpanSmall());
+                    // ChartsService.initBarWithShade("charts_23", ServiceProduct
+                    //     .getMonthExceptionByCategory(), ChartsService.getGridSpanSmall());
                     // ChartsService.initBarWithShade("charts_24", ServiceProduct.getWeekInByCategory(),
                     //     ChartsService.getGridSpanSmall());