Forráskód Böngészése

Merge branch 'master' of http://139.196.39.194:9021/yuansh/FBS_VIEW

chenc 4 éve
szülő
commit
ba3bc83ee6

BIN
files/imgInfo.jpg


+ 135 - 102
js/service/produce-task.js

@@ -445,107 +445,140 @@ var ServiceProduceTask = {
     },
     // 日生产计划
     getEsopTaskList: function () {
-        const taskList = [];
-        taskList.push({
-            orderSheetCode: "G10001",
-            materialCode: "10001",
-            materialName: "物料A",
-            specs: "3*4",
-            ProjectName: "项目A",
-            files:[
-                {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/1.pdf"}
-            ]
-        });
-        taskList.push({
-            orderSheetCode: "G10002",
-            materialCode: "10002",
-            materialName: "物料B",
-            specs: "3*4",
-            ProjectName: "项目B",
-            files:[
-                {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/2.pdf"}
-            ]
-        });
-        taskList.push({
-            orderSheetCode: "G10001",
-            materialCode: "10001",
-            materialName: "物料A",
-            specs: "3*4",
-            ProjectName: "项目A",
-            files:[
-                {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/1.pdf"}
-            ]
-        });
-        taskList.push({
-            orderSheetCode: "G10002",
-            materialCode: "10002",
-            materialName: "物料B",
-            specs: "3*4",
-            ProjectName: "项目B",
-            files:[
-                {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/2.pdf"}
-            ]
-        });
-        taskList.push({
-            orderSheetCode: "G10001",
-            materialCode: "10001",
-            materialName: "物料A",
-            specs: "3*4",
-            ProjectName: "项目A",
-            files:[
-                {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/1.pdf"}
-            ]
-        });
-        taskList.push({
-            orderSheetCode: "G10002",
-            materialCode: "10002",
-            materialName: "物料B",
-            specs: "3*4",
-            ProjectName: "项目B",
-            files:[
-                {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/2.pdf"}
-            ]
-        });
-        taskList.push({
-            orderSheetCode: "G10001",
-            materialCode: "10001",
-            materialName: "物料A",
-            specs: "3*4",
-            ProjectName: "项目A",
-            files:[
-                {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/1.pdf"}
-            ]
-        });
-        taskList.push({
-            orderSheetCode: "G10002",
-            materialCode: "10002",
-            materialName: "物料B",
-            specs: "3*4",
-            ProjectName: "项目B",
-            files:[
-                {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/2.pdf"}
-            ]
-        });
-        taskList.push({
-            orderSheetCode: "G10001",
-            materialCode: "10001",
-            materialName: "物料A",
-            specs: "3*4",
-            ProjectName: "项目A",
-            files:[
-                {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/1.pdf"}
-            ]
-        });
-        taskList.push({
-            orderSheetCode: "G10002",
-            materialCode: "10002",
-            materialName: "物料B",
-            specs: "3*4",
-            ProjectName: "项目B",
-            files:[
-                {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/2.pdf"}
-            ]
-        });
-        return taskList;
+
+        return getService.methodGet("/fbsMomOrder/fbsMomOrder/getEsopTaskList");
+        // const taskList = [];
+        // taskList.push({
+        //     orderSheetCode: "G10001",
+        //     materialCode: "10001",
+        //     materialName: "物料A",
+        //     specs: "3*4",
+        //     ProjectName: "项目A",
+        //     files:[
+        //         {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/1.pdf"}
+        //     ]
+        // });
+        // taskList.push({
+        //     orderSheetCode: "G10002",
+        //     materialCode: "10002",
+        //     materialName: "物料B",
+        //     specs: "3*4",
+        //     ProjectName: "项目B",
+        //     files:[
+        //         {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/2.pdf"}
+        //     ]
+        // });
+        // taskList.push({
+        //     orderSheetCode: "G10001",
+        //     materialCode: "10001",
+        //     materialName: "物料A",
+        //     specs: "3*4",
+        //     ProjectName: "项目A",
+        //     files:[
+        //         {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/1.pdf"}
+        //     ]
+        // });
+        // taskList.push({
+        //     orderSheetCode: "G10002",
+        //     materialCode: "10002",
+        //     materialName: "物料B",
+        //     specs: "3*4",
+        //     ProjectName: "项目B",
+        //     files:[
+        //         {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/2.pdf"}
+        //     ]
+        // });
+        
+        // taskList.push({
+        //     orderSheetCode: "G10001",
+        //     materialCode: "10001",
+        //     materialName: "物料A",
+        //     specs: "3*4",
+        //     ProjectName: "项目A",
+        //     files:[
+        //         {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/1.pdf"}
+        //     ]
+        // });
+        // taskList.push({
+        //     orderSheetCode: "G10002",
+        //     materialCode: "10002",
+        //     materialName: "物料B",
+        //     specs: "3*4",
+        //     ProjectName: "项目B",
+        //     files:[
+        //         {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/2.pdf"}
+        //     ]
+        // });
+        // taskList.push({
+        //     orderSheetCode: "G10001",
+        //     materialCode: "10001",
+        //     materialName: "物料A",
+        //     specs: "3*4",
+        //     ProjectName: "项目A",
+        //     files:[
+        //         {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/1.pdf"}
+        //     ]
+        // });
+        // taskList.push({
+        //     orderSheetCode: "G10002",
+        //     materialCode: "10002",
+        //     materialName: "物料B",
+        //     specs: "3*4",
+        //     ProjectName: "项目B",
+        //     files:[
+        //         {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/2.pdf"}
+        //     ]
+        // });
+        // taskList.push({
+        //     orderSheetCode: "G10001",
+        //     materialCode: "10001",
+        //     materialName: "物料A",
+        //     specs: "3*4",
+        //     ProjectName: "项目A",
+        //     files:[
+        //         {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/1.pdf"}
+        //     ]
+        // });
+        // taskList.push({
+        //     orderSheetCode: "G10002",
+        //     materialCode: "10002",
+        //     materialName: "物料B",
+        //     specs: "3*4",
+        //     ProjectName: "项目B",
+        //     files:[
+        //         {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/2.pdf"}
+        //     ]
+        // });
+        // taskList.push({
+        //     orderSheetCode: "G10001",
+        //     materialCode: "10001",
+        //     materialName: "物料A",
+        //     specs: "3*4",
+        //     ProjectName: "项目A",
+        //     files:[
+        //         {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/1.pdf"}
+        //     ]
+        // });
+        // taskList.push({
+        //     orderSheetCode: "G10002",
+        //     materialCode: "10002",
+        //     materialName: "物料B",
+        //     specs: "3*4",
+        //     ProjectName: "项目B",
+        //     files:[
+        //         {name:"物料A操作手册",type:"pdf",path:"/files/opratefile/2.pdf"}
+        //     ]
+        // });
+        // return taskList;
+    },
+    //文件列表
+    getEsopFileList:function(){
+
+        return getService.methodGet("/workingStatistics/fbsWorkingStatistics/getEsopFileList");
+    },
+    //视频自动播放
+    getVedioFileList:function(){
+        return getService.methodGet("/workingStatistics/fbsWorkingStatistics/getVedioFileList");
     }
+
 }

+ 8 - 8
js/service/product.js

@@ -66,15 +66,15 @@ var ServiceProduct = {
     },
     // 月成品出货统计,根据成品维度
     getMonthSend: function () {
-        // return getService.methodGet("/fbsRdrecord32/fbsRdrecords32/getMonthSend");
+        return getService.methodGet("/fbsRdrecord32/fbsRdrecords32/getMonthSend");
 
-        return {
-            "成品A": 20,
-            "成品B": 100,
-            "成品C": 80,
-            "成品D": 150,
-            "成品E": 200,
-        };
+        // return {
+        //     "成品A": 20,
+        //     "成品B": 100,
+        //     "成品C": 80,
+        //     "成品D": 150,
+        //     "成品E": 200,
+        // };
     },
     // 月项目发货统计,根据项目维度
     getMonthSendByProject: function () {

+ 73 - 18
pages/dashboard/esop.html

@@ -9,6 +9,13 @@
     <link href="/lib/bootstrap/bootstrap.min.css" rel="stylesheet" />
     <link href="/css/dashboard.css" rel="stylesheet" />
 
+    <script type="text/javascript" src="/js/service.js"></script>
+    <script type="text/javascript" src="/js/session.js"></script>
+    <script type="text/javascript" src="/js/getService.js"></script>
+
+    <script type="text/javascript" src="/js/service/method-get-service.js"></script>
+    <script type="text/javascript" src="/lib/jquery-3.4.1.js"></script>
+    <script type="text/javascript" src="/lib/jquery-3.4.1.min.js"></script>
 
 </head>
 
@@ -36,27 +43,44 @@
     <div class="my-container" id="div-main">
         <div class="row block-padding">
             <div class="col-lg-4 col-md-4">
+                <h2>任务</h2>
+                <div style="height: 200px;">
+                    <div class="row">
+                        <div class="col-lg-2 col-md-2 center no-padding" style="width: 17%;">订单号</div>
+                        <div class="col-lg-2 col-md-2 center no-padding" style="width: 17%;">物料号</div>
+                        <div class="col-lg-2 col-md-2 center no-padding" style="width: 35%;">物料名称</div>
+                        <div class="col-lg-2 col-md-2 center no-padding" style="width: 20%;">规格</div>
+                        <div class="col-lg-2 col-md-2 center no-padding" style="width: 11%;">数量</div>
+                    </div>
+                    <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: 17%;">{{task.orderSheetCode}}</div>
+                        <div class="col-lg-2 col-md-2 center no-padding" style="width: 17%;">{{task.materialCode}}</div>
+                        <div class="col-lg-2 col-md-2 center no-padding" style="width: 35%;">{{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: 11%;">{{task.qty}}</div>
+                    </div>
+                </div>
+                <br/>
+                <h2>文件</h2>
                 <div class="row">
-                    <div class="col-lg-2 col-md-2 center no-padding">工单号</div>
-                    <div class="col-lg-2 col-md-2 center no-padding">产品编码</div>
-                    <div class="col-lg-2 col-md-3 center no-padding">产品名称</div>
-                    <div class="col-lg-2 col-md-2 center no-padding">型号规格</div>
-                    <div class="col-lg-3 col-md-1 center no-padding">项目</div>
-                    <div class="col-lg-1 col-md-2 center no-padding">操作</div>
+                    <div class="col-lg-2 col-md-2 center no-padding" style="width: 48%;">文件名</div>
+                    <div class="col-lg-2 col-md-2 center no-padding" style="width: 25%;">文件类型</div>
+                    <div class="col-lg-1 col-md-2 center no-padding" style="width: 25%;">操作</div>
                 </div>
                 <div class="row" v-for="task in taskList" style="margin-bottom: 2px;">
-                    <div class="col-lg-2 col-md-2 center no-padding">{{task.orderSheetCode}}</div>
-                    <div class="col-lg-2 col-md-2 center no-padding">{{task.materialCode}}</div>
-                    <div class="col-lg-2 col-md-3 center no-padding">{{task.materialName}}</div>
-                    <div class="col-lg-2 col-md-2 center no-padding">{{task.specs}}</div>
-                    <div class="col-lg-3 col-md-1 center no-padding">{{task.ProjectName}}</div>
-                    <div class="col-lg-1 col-md-2 center no-padding">
-                            <button type="button" class="btn btn-xs btn-warning" @click="showfile(task.files[0])">操作</button>
+                    <div class="col-lg-2 col-md-2 center no-padding" style="width: 48%;">{{task.fileName}}</div>
+                    <div class="col-lg-2 col-md-2 center no-padding" style="width: 25%;">{{task.fileType}}</div>
+                    <div class="col-lg-1 col-md-2 center no-padding" style="width: 25%;">
+                            <button type="button" class="btn btn-xs btn-warning" @click="showfile(task.fileName,task.fileType)">查看</button>
                     </div>
                 </div>
             </div>
-            <div class="col-lg-8 col-md-8">
+            <div class="col-lg-8 col-md-8" >
+                <img id="imgInfo" src="/files/imgInfo.jpg" width="100%" height="100%"/> 
                 <iframe id="frameMain" width="98%" border="0" frameborder="0" v-bind:src="filepath" style="background-color:#ffffff"></iframe>
+                <img id="imgType" src="" width="auto" /> 
+                <video id="videoType" src="" controls width="auto" > </video>
+                <div id="textType" width="auto" ></div>
             </div>
         </div>
     </div>
@@ -68,19 +92,50 @@
     <script src="/lib/echarts/theme/macarons.js"></script>
     <script src="/js/service/produce-task.js"></script>
     <script type="text/javascript">
-        const taskList = ServiceProduceTask.getEsopTaskList();
-        $("#frameMain").height($(window).height()-110);
 
+        $(function () {
+            hideAll();
+            $("#imgInfo").show();
+        })
+        function hideAll(){
+            $("#frameMain").hide();
+            $("#imgType").hide();
+            $("#videoType").hide();
+            $("#imgInfo").hide();
+        }
+
+
+        const taskList = ServiceProduceTask.getEsopFileList();
+        const taskList2 = ServiceProduceTask.getEsopTaskList();
+        $("#frameMain").height($(window).height()-110);
+        $("#imgType").height($(window).height()-110);
+        $("#videoType").height($(window).height()-110);
 
         var vm = new Vue({
             el: '#div-main',
             data: {
                 taskList: taskList,
+                taskList2: taskList2,
                 filepath:""
             },
             methods: {
-                showfile: function (file) {
-                    this.filepath = "/lib/pdfjs/web/viewer.html?file="+file.path;
+                showfile: function (name,file) {
+                    if(file=='pdf'){
+                        hideAll();
+                        $("#frameMain").show();
+                        this.filepath = "/lib/pdfjs/web/viewer.html?file=/upFiles/"+name;
+                    }else if(file=='jpg' || file=='jpeg' || file=='png'){
+                        hideAll();
+                        $("#imgType").show();
+                        $("#imgType").attr('src',"/upFiles/"+name);
+                    }else if(file=='avi' || file=='mov' || file=='rmvb' || file=='rm' || file=='flv' || file=='mp4' || file=='3gp'){
+                        hideAll();
+                        $("#videoType").show();
+                        $("#videoType").attr('src',"/upFiles/"+name);
+                    }else{
+                        alert("暂时不支持该类型文件的展示");
+                    }
+                    
                 }
             },
         });

+ 91 - 0
pages/dashboard/video.html

@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html lang="zh">
+
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=0.5">
+    <title>云看板</title>
+
+    <link href="/lib/bootstrap/bootstrap.min.css" rel="stylesheet" />
+    <link href="/css/dashboard.css" rel="stylesheet" />
+
+    <script type="text/javascript" src="/js/service.js"></script>
+    <script type="text/javascript" src="/js/session.js"></script>
+    <script type="text/javascript" src="/js/getService.js"></script>
+
+    <script type="text/javascript" src="/lib/jquery-3.4.1.js"></script>
+    <script type="text/javascript" src="/lib/jquery-3.4.1.min.js"></script>
+
+</head>
+
+<body id="container" class="container-fluid">
+    <div class="row no-padding head-bar" style="height:81px">
+        <!-- <div class="col-lg-1 col-md-1">
+
+        </div> -->
+        <!-- <div class="col-lg-4 col-md-4 page-title">
+            E-SOP看板
+        </div> -->
+        <!-- <div class="col-lg-3 col-md-3 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/quality.html');">品质看板</button>
+        </div> -->
+        <!-- <div class="col-lg-4 col-md-4">
+        </div> -->
+    </div>
+    <div class="my-container" id="div-main">
+        <div class="row block-padding">
+             <video id="videoType" src="/upFiles/123.mp4" controls width="100%" height="100%" > </video> 
+             <img id="imgType" src="" width="100%" /> 
+        </div>
+    </div>
+
+    <!-- jQuery  -->
+    <script src="/lib/jquery.min.js"></script>
+    <script src="/lib/vue.min.js"></script>
+    <script src="/lib/echarts/echarts.min.js"></script>
+    <script src="/lib/echarts/theme/macarons.js"></script>
+    <script src="/js/service/produce-task.js"></script>
+    <script type="text/javascript">
+        $("#videoType").height($(window).height()-110);
+        $("#imgType").height($(window).height()-110);
+        const taskList = ServiceProduceTask.getVedioFileList();
+
+        $(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 _video = $('#videoType')[0];
+            if(_video.paused){
+                _video.play();
+                //_video.pause();//暂停
+            }
+        }
+       
+        
+    </script>
+
+</body>
+
+</html>

BIN
upFiles/诗.jpg


BIN
upVedio/imgInfo.jpg