chenc преди 4 години
родител
ревизия
e4c1bad89d
променени са 5 файла, в които са добавени 49 реда и са изтрити 12 реда
  1. 1 0
      js/content/mycharts.js
  2. 6 6
      js/service/product.js
  3. 24 2
      pages/dashboard/produce.html
  4. 2 2
      pages/dashboard/quality.html
  5. 16 2
      pages/dashboard/video1.html

+ 1 - 0
js/content/mycharts.js

@@ -1173,6 +1173,7 @@ var ChartsService = {
                     label: {
                         show: true,
                         formatter: '{c}%',//显示百分号
+                        fontSize:16
                     },
                     data: yDataList2
                 }

+ 6 - 6
js/service/product.js

@@ -204,18 +204,18 @@ var ServiceProduct = {
         //     "分类G": 400
         // };
         // return MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHours/getQualityType");
-        var map=MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHoursDescribe/getMonthExceptionByCategory")
-        if(map){
-            var remainingQuantity=3-(Object.keys(map).length%3);
+        // var map=MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHoursDescribe/getMonthExceptionByCategory")
+        var list=MethodGetService.methodGet("/fbsAbnormalWorkingHours/fbsAbnormalWorkingHoursDescribe/getMonthExceptionByCategoryTwo")
+        if(list){
+            var remainingQuantity=3-(list.length%3);
             if(remainingQuantity!=3){
                 for(var i=0;i<remainingQuantity;i++){
                     var bu="补"+i
-                    console.log(bu)
-                    map[bu]="";
+                    list.push({label: bu,sum1:0,sum2:0})
                 }
             }
         }
-        return map;
+        return list;
     },
     // 周成品入库数量,根据分类
     getWeekInByCategory: function () {

+ 24 - 2
pages/dashboard/produce.html

@@ -221,8 +221,30 @@
         setTimeout(beginFun("charts_24",weekInBycategoryList,10000,"charts_24"),500);
 
         const monthExceptionByCategory =  ServiceProduct.getMonthExceptionByCategory();
-        setTimeout(beginFunA("charts_23",monthExceptionByCategory,10000,"charts_23"),500);
-
+        // setTimeout(beginFunA("charts_23",monthExceptionByCategory,10000,"charts_23"),500);
+        setTimeout(beB,500);
+        function beB(){
+            var lsitMonth = monthExceptionByCategory.slice(pageIndexMonthGood,pageSizeMonthGood);
+            pageIndexMonthGood = pageSizeMonthGood;
+            pageSizeMonthGood = pageSizeMonthGood + initSize;
+            ChartsService.initBarWithTwoNumberRate("charts_23", lsitMonth,
+                        ChartsService.getGridSpanSmall());
+            if(monthExceptionByCategory.length <= pageIndexMonthGood){
+                return;
+            }
+            setInterval(beginScrollB,10000);
+        }
+        function beginScrollB(){
+            var lsitMonth = monthExceptionByCategory.slice(pageIndexMonthGood,pageSizeMonthGood);
+            pageIndexMonthGood = pageSizeMonthGood;
+            pageSizeMonthGood = pageSizeMonthGood + initSize;
+            if(monthExceptionByCategory.length <= pageIndexMonthGood){
+                pageIndexMonthGood = 0;
+                pageSizeMonthGood = initSize;
+            }
+            ChartsService.initBarWithTwoNumberRate("charts_23", lsitMonth,
+                        ChartsService.getGridSpanSmall());
+        }
         
         const monthGoodList =  ServiceProduct.getMonthGood();
         setTimeout(beA,500);

+ 2 - 2
pages/dashboard/quality.html

@@ -203,7 +203,7 @@
                 <div class="row">
                     <div class="col-md-6 col-lg-6 center " style="padding-bottom: 5px;margin-top:-10px;"
                         v-for="showimage in showImageList">
-                        {{showimage }}
+                        <!-- {{showimage }} -->
                         <img :src="'/upAnomalous/'+showimage" border="0" style="width:350px;height:290px;"/>
                     </div>
                 </div>
@@ -384,7 +384,7 @@
                     const unpassList = ServiceMaterial.getQualityUnpassList();
                     this.cacheDataObject.unpassList = {
                         data: unpassList,
-                        pagesize: 10,
+                        pagesize: 9,
                         pageindex: 0
                     }
                     this.unpassList = unpassList.slice(0, this.cacheDataObject

+ 16 - 2
pages/dashboard/video1.html

@@ -85,6 +85,7 @@
     <script src="/lib/echarts/theme/macarons.js"></script>
     <script src="/js/service/produce-task.js"></script>
     <script type="text/javascript">
+        // setTimeout(ServiceProduceTask.getVedioFileList(),500)
         // $(".videoType").height($(window).height()-85);
         // $(".imgType").height($(window).height()-85);
         $(".videoType").height($(window).height());
@@ -99,9 +100,20 @@
                         pageIndex: 0,
                         timer: '',
                         upVideo:'',
-                        firstFile:''
+                        firstFile:'',
+                        timer_long: '', // 定时取服务器数据
                     },
                     methods: {
+                        // 从服务器加载数据并显示
+                        refreshData: function () {
+                            // 刷新报表
+                            this.listInit=ServiceProduceTask.getVedioFileList();
+                            // alert(1)
+                            this.get();
+                            this.get2();
+                            // this.getVideo();
+                            console.log(ServiceProduceTask.getVedioFileList())
+                        },
                         get() {
                             this.upVideo = this.listInit[0].upVideo;
                             
@@ -154,10 +166,12 @@
                         this.get();
                         this.get2();
                         this.timer = setInterval(this.get2, 7000);
-
+                        this.timer_long = setInterval(this.refreshData, 6000);
+                        this.refreshData();
                     },
                     beforeDestroy() {
                         clearInterval(this.timer);
+                        clearInterval(this.timer_long);
                     }
                 })