袁少华 4 years ago
parent
commit
664c38cdf3

+ 5 - 3
pages/dashboard/esop.html

@@ -29,7 +29,7 @@
         <div class="col-lg-4 col-md-4 page-title">
             E-SOP
         </div>
-        <!-- <div class="col-lg-3 col-md-3 block-padding">
+        <div class="col-lg-4 col-md-4 block-padding">
             <button type="button" class="btn btn-warning"
                 onclick="window.location.replace('/pages/dashboard/warehouse.html');">仓库看板</button>
             <button type="button" class="btn btn-warning"
@@ -38,7 +38,9 @@
                 onclick="window.location.replace('/pages/dashboard/line.html');">产线看板</button>
             <button type="button" class="btn btn-warning"
                 onclick="window.location.replace('/pages/dashboard/quality.html');">品质看板</button>
-        </div> -->
+            <button type="button" class="btn btn-warning"
+                onclick="window.location.replace('/pages/dashboard/video1.html');">云看板</button>
+        </div>
         <div class="col-lg-4 col-md-4">
         </div>
     </div>
@@ -58,7 +60,7 @@
                     <div class="row" v-for="task in taskList2" style="margin-bottom: 2px;">
                         <div class="col-lg-2 col-md-2 center no-padding" style="width: 19%;">{{task.orderSheetCode}}</div>
                         <div class="col-lg-2 col-md-2 center no-padding" style="width: 19%;">{{task.materialCode}}</div>
-                        <div style="width: 35%;overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-2 col-md-2 center no-padding" >{{task.materialName}}</div>
+                        <div style="width: 35%;overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-2 col-md-2 left no-padding" >{{task.materialName}}</div>
                         <!-- <div class="col-lg-2 col-md-2 center no-padding" style="width: 20%;">{{task.specs}}</div> -->
                         <div class="col-lg-2 col-md-2 center no-padding" style="width: 12%;">{{task.qty}}</div>
                         <div class="col-lg-1 col-md-2 center no-padding" style="width: 10%;">

+ 5 - 1
pages/dashboard/line.html

@@ -28,13 +28,17 @@
         <div class="col-lg-4 col-md-4 page-title">
             产线管理看板
         </div>
-        <div class="col-lg-3 col-md-3 block-padding">
+        <div class="col-lg-4 col-md-4 block-padding">
             <button type="button" class="btn btn-warning"
                 onclick="window.location.replace('/pages/dashboard/warehouse.html');">仓库看板</button>
             <button type="button" class="btn btn-warning"
                 onclick="window.location.replace('/pages/dashboard/produce.html');">制造看板</button>
             <button type="button" class="btn btn-warning"
                 onclick="window.location.replace('/pages/dashboard/quality.html');">品质看板</button>
+            <button type="button" class="btn btn-warning"
+                onclick="window.location.replace('/pages/dashboard/esop.html');">E-SOP</button>
+            <button type="button" class="btn btn-warning"
+                onclick="window.location.replace('/pages/dashboard/video1.html');">云看板</button>
         </div>
         <div class="col-lg-4 col-md-4">
         </div>

+ 5 - 1
pages/dashboard/produce.html

@@ -28,13 +28,17 @@
         <div class="col-lg-4 col-md-4 page-title">
             制造管理看板
         </div>
-        <div class="col-lg-3 col-md-3 block-padding">
+        <div class="col-lg-4 col-md-4 block-padding">
             <button type="button" class="btn btn-warning"
                 onclick="window.location.replace('/pages/dashboard/warehouse.html');">仓库看板</button>
             <button type="button" class="btn btn-warning"
                 onclick="window.location.replace('/pages/dashboard/line.html');">产线看板</button>
             <button type="button" class="btn btn-warning"
                 onclick="window.location.replace('/pages/dashboard/quality.html');">品质看板</button>
+            <button type="button" class="btn btn-warning"
+                onclick="window.location.replace('/pages/dashboard/esop.html');">E-SOP</button>
+            <button type="button" class="btn btn-warning"
+                onclick="window.location.replace('/pages/dashboard/video1.html');">云看板</button>
         </div>
         <div class="col-lg-4 col-md-4">
         </div>

+ 5 - 1
pages/dashboard/quality.html

@@ -36,13 +36,17 @@
         <div class="col-lg-4 col-md-4 page-title">
             品质管理看板
         </div>
-        <div class="col-lg-3 col-md-3 block-padding">
+        <div class="col-lg-4 col-md-4 block-padding">
             <button type="button" class="btn btn-warning"
                 onclick="window.location.replace('/pages/dashboard/warehouse.html');">仓库看板</button>
             <button type="button" class="btn btn-warning"
                 onclick="window.location.replace('/pages/dashboard/produce.html');">制造看板</button>
             <button type="button" class="btn btn-warning"
                 onclick="window.location.replace('/pages/dashboard/line.html');">产线看板</button>
+            <button type="button" class="btn btn-warning"
+                onclick="window.location.replace('/pages/dashboard/esop.html');">E-SOP</button>
+            <button type="button" class="btn btn-warning"
+                onclick="window.location.replace('/pages/dashboard/video1.html');">云看板</button>
         </div>
         <div class="col-lg-4 col-md-4">
         </div>

+ 74 - 100
pages/dashboard/video1.html

@@ -46,17 +46,17 @@
         
         <div id="two">
             <div style="width: 49%;height: 100%;float:left;margin-left: -20px;margin-right: 10px;">
-                <video id="twoVideo" class="videoType" :src="'/upVedio/ABB/'+firstFile"  controls width="100%" height="100%" > </video> 
+                <video autoplay="true" loop="true" id="twoVideo" class="videoType" :src="'/upVedio/ABB/'+firstFile"  controls width="100%" height="100%" > </video> 
                 <img id="twoImg" class="imgType" :src="'/upVedio/ABB/'+firstFile" width="100%" />
             </div>
             <div style="width: 50%;height: 100%;float:left;" v-for="task in taskList">
-                <video id="twoVideo2"  v-if="!task.isImg" class="videoType" :src="'/upVedio/ABB/'+task.fileName"  controls width="100%" height="100%" > </video> 
-                <img v-if="task.isImg" class="imgType" :src="'/upVedio/ABB/'+task.fileName" width="110%" /> 
+                <video autoplay="true" loop="true"  id="twoVideo2"  v-if="!task.isImg" class="videoType" :src="'/upVedio/ABB/'+task.fileName"  controls width="100%" height="100%" > </video> 
+                <img v-if="task.isImg" class="imgType" :src="'/upVedio/ABB/'+task.fileName" width="106%" /> 
             </div>
         </div>
-        <div class="row" v-for="task in taskList" id="one"> 
-            <video v-if="!task.isImg" id="oneVideo"  class="videoType" :src="'/upVedio/AAA/'+task.fileName"  controls width="100%" height="100%" > </video> 
-            <img v-if="task.isImg" class="imgType" :src="'/upVedio/AAA/'+task.fileName" width="100%" />
+        <div class="row" v-for="task in taskList" id="one" style="margin-left: -25px"> 
+            <video autoplay="true" loop="true" v-if="!task.isImg" id="oneVideo"  class="videoType" :src="'/upVedio/AAA/'+task.fileName"  controls width="100%" height="100%" > </video> 
+            <img v-if="task.isImg" class="imgType" :src="'/upVedio/AAA/'+task.fileName" width="101%" />
        </div> 
     </div>
 
@@ -74,125 +74,99 @@
         var vm = new Vue({
                     el: '#div-main',
                     data: {
+                        listInit: ServiceProduceTask.getVedioFileList(),
                         taskList: [],
-                        cacheDataObject: {}, // 从服务器加载的全数据,界面只取某几条
-                        imer_long: '', // 定时取服务器数据
-                        timer_short: '', // 数据超长定时轮播
+                        timer: '',
+                        pageSize: 1,
+                        pageIndex: 0,
+                        timer: '',
                         upVideo:'',
                         firstFile:''
                     },
                     methods: {
-                        // 从服务器加载数据并显示
-                        refreshData: function () {
-                            // 关闭定时器
-                            // clearInterval(this.timer_short);
-                            this.loadData();
-                            // 开启定时器
-                            this.timer_short = setTimeout(this.scrollData, 3000);
-                        }, // 轮播数据
-                        scrollData: function () {
-                            for (var key in this.cacheDataObject) {
-                                const dataList = this.cacheDataObject[key].data;
-                                const pagesize = this.cacheDataObject[key].pagesize;
-                                var pageindex = this.cacheDataObject[key].pageindex + 1;
-
-                                if (dataList.length > pagesize) {
-                                    const pagesum = (dataList.length / pagesize).toFixed(0) * 1 + (dataList.length %
-                                        pagesize > 0 ? 1 : 0);
-                                    if (pageindex >= pagesum)
-                                        pageindex = 0;
-                                    this.cacheDataObject[key].pageindex = pageindex;
-                                    const startIndex = pageindex * pagesize;
-                                    const remainSum = dataList.length - startIndex;
-                                    const recordSum = remainSum >= pagesize ? pagesize : remainSum;
-                                    const keyPar = dataList.slice(startIndex, startIndex + pagesize);
-                                    if(keyPar.length < 1){
-                                        continue;
-                                    }
-                                    this[key] = dataList.slice(startIndex, startIndex + pagesize);
-                                }
-                            }
-
-                        }, // 从服务器加载数据
-                        loadData: function () {
-                            this.cacheDataObject = {};
+                        get() {
+                            this.upVideo = this.listInit[0].upVideo;
                             
-                            const taskList = ServiceProduceTask.getVedioFileList();
-                            this.upVideo = taskList[0].upVideo;
+                            this.firstFile = this.listInit[0].fileName;
+                            if(this.listInit[0].isImg){
+                                $("#twoVideo").hide();
+                            }else{
+                                $("#twoImg").hide();
+                            }
                             if(this.upVideo == 'AAA'){
                                $("#two").hide();
                             }else{
-                                $("#one").hide();
+                               $("#one").hide();
+                               this.listInit.splice(0, 1);
                             }
                             
-                            this.firstFile = taskList[0].fileName;
-                            if(taskList[0].isImg){
-                                $("#twoVideo").hide();
+                        },
+                        get2(){
+                            this.taskList = this.listInit.slice(this.pageIndex,this.pageSize);
+                            if(this.pageSize >= this.listInit.length){
+                                this.pageIndex = 0;
+                                this.pageSize = 1;
                             }else{
-                                $("#twoImg").hide();
+                                this.pageIndex = this.pageIndex + 1;
+                                this.pageSize = this.pageSize + 1;
+                            }
+                            // this.getVideo();
+                        },
+                        getVideo(){
+                            var _video1 = $('#twoVideo')[0];
+                            var _video2 = $('#twoVideo2')[0];
+                            var _video3 = $('#oneVideo')[0];
+                            
+                            if($('#twoVideo').is(':hidden') && _video1.paused){
+                            }else{
+                                _video1.play();
+                            }
+                            if($('#twoVideo2').is(':hidden') && _video2.paused){
+                            }else{
+                                _video1.play();
                             }
-                            taskList.splice(0, 1);
-                            this.cacheDataObject.taskList = {
-                                data: taskList,
-                                pagesize: 1,
-                                pageindex: 0
+                            if($('#oneVideo').is(':hidden') && _video3.paused){
+                            }else{
+                                _video1.play();
                             }
-                            this.taskList = taskList.slice(0, this.cacheDataObject.taskList.pagesize);
-                            getVideo();
+                           
                         }
                     },
                     mounted() {
-                        this.timer_long = setInterval(this.refreshData, 10000);
-                        this.refreshData();
+                        this.get();
+                        this.get2();
+                        this.timer = setInterval(this.get2, 7000);
 
                     },
                     beforeDestroy() {
-                        clearInterval(this.timer_long);
-                        // clearInterval(this.timer_short);
+                        clearInterval(this.timer);
                     }
                 })
 
-        // $(function () {
-
-        //     if(taskList != null){
-
-        //         var file = taskList[0].fileType;
-        //         if (file=='jpg' || file=='jpeg' || file=='png'){
-        //             $("#videoType").hide();
-        //             $("#imgType").attr('src',"/upVedio/"+taskList[0].fileName);
-        //         }else{
-        //             $("#imgType").hide();
-        //             $("#videoType").attr('src',"/upVedio/"+taskList[0].fileName);
-        //             setInterval(function () { getVideo(); }, 3000);
-        //         }
-                
-        //     }
-            
-        // })
-       
-        function getVideo(){
-            var _video1 = $('#twoVideo')[0];
-            var _video2 = $('#twoVideo2')[0];
-            var _video3 = $('#oneVideo')[0];
+        
+        // function getVideo(){
+        //     var _video1 = $('#twoVideo')[0];
+        //     var _video2 = $('#twoVideo2')[0];
+        //     var _video3 = $('#oneVideo')[0];
             
-            if($('#twoVideo').is(':hidden') && _video1.paused){
-            }else{
-                _video1.play();
-            }
-            if($('#twoVideo2').is(':hidden') && _video2.paused){
-            }else{
-                _video1.play();
-            }
-            if($('#oneVideo').is(':hidden') && _video3.paused){
-            }else{
-                _video1.play();
-            }
+        //     if($('#twoVideo').is(':hidden') && _video1.paused){
+        //     }else{
+        //         _video1.play();
+        //     }
+        //     if($('#twoVideo2').is(':hidden') && _video2.paused){
+        //     }else{
+        //         _video1.play();
+        //     }
+        //     if($('#oneVideo').is(':hidden') && _video3.paused){
+        //     }else{
+        //         _video1.play();
+        //     }
             
-            // if(_video3.paused){
-            //     _video3.play();
-            //     //_video.pause();//暂停
-            // }
-        }
+        //     if(_video3.paused){
+        //        _video3.play();
+        //        //_video.pause();//暂停
+        //     }
+        // }
        
         
     </script>

+ 5 - 1
pages/dashboard/warehouse.html

@@ -30,13 +30,17 @@
         <div class="col-lg-4 col-md-4 page-title">
             仓库管理看板
         </div>
-        <div class="col-lg-3 col-md-3 block-padding">
+        <div class="col-lg-4 col-md-4 block-padding">
             <button type="button" class="btn btn-warning"
                 onclick="window.location.replace('/pages/dashboard/produce.html');">制造看板</button>
             <button type="button" class="btn btn-warning"
                 onclick="window.location.replace('/pages/dashboard/line.html');">产线看板</button>
             <button type="button" class="btn btn-warning"
                 onclick="window.location.replace('/pages/dashboard/quality.html');">品质看板</button>
+            <button type="button" class="btn btn-warning"
+                onclick="window.location.replace('/pages/dashboard/esop.html');">E-SOP</button>
+            <button type="button" class="btn btn-warning"
+                onclick="window.location.replace('/pages/dashboard/video1.html');">云看板</button>
         </div>
         <div class="col-lg-4 col-md-4">
         </div>