Browse Source

Added SignIn Page

Fruit of Eden 6 years ago
parent
commit
c419d49def
12 changed files with 965 additions and 1243 deletions
  1. 0 112
      css/cyllic.css
  2. 13 114
      denglu.html
  3. 142 307
      js/basic.js
  4. 0 122
      js/basic2.js
  5. 118 0
      js/entrance.js
  6. 1 11
      js/getparam.js
  7. 0 27
      js/getparam1.js
  8. 261 0
      js/lazhang-data.js
  9. 298 0
      js/lazhang-display.js
  10. 32 0
      js/resize.js
  11. 99 549
      lazhang.html
  12. 1 1
      plugins/sweetalert/sweetalert-dev.js

+ 0 - 112
css/cyllic.css

@@ -1,112 +0,0 @@
-/* cyrillic-ext */
-@font-face {
-    font-family: 'Roboto';
-    font-style: normal;
-    font-weight: 400;
-    src: local('Roboto'), local('Roboto-Regular'), url(http://libs.useso.com/s/roboto/v18/KFOmCnqEu92Fr1Mu72xKOzY.woff2) format('woff2');
-    unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
-}
-/* cyrillic */
-@font-face {
-    font-family: 'Roboto';
-    font-style: normal;
-    font-weight: 400;
-    src: local('Roboto'), local('Roboto-Regular'), url(http://libs.useso.com/s/roboto/v18/KFOmCnqEu92Fr1Mu5mxKOzY.woff2) format('woff2');
-    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
-}
-/* greek-ext */
-@font-face {
-    font-family: 'Roboto';
-    font-style: normal;
-    font-weight: 400;
-    src: local('Roboto'), local('Roboto-Regular'), url(http://libs.useso.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7mxKOzY.woff2) format('woff2');
-    unicode-range: U+1F00-1FFF;
-}
-/* greek */
-@font-face {
-    font-family: 'Roboto';
-    font-style: normal;
-    font-weight: 400;
-    src: local('Roboto'), local('Roboto-Regular'), url(http://libs.useso.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4WxKOzY.woff2) format('woff2');
-    unicode-range: U+0370-03FF;
-}
-/* vietnamese */
-@font-face {
-    font-family: 'Roboto';
-    font-style: normal;
-    font-weight: 400;
-    src: local('Roboto'), local('Roboto-Regular'), url(http://libs.useso.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7WxKOzY.woff2) format('woff2');
-    unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
-}
-/* latin-ext */
-@font-face {
-    font-family: 'Roboto';
-    font-style: normal;
-    font-weight: 400;
-    src: local('Roboto'), local('Roboto-Regular'), url(http://libs.useso.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7GxKOzY.woff2) format('woff2');
-    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
-}
-/* latin */
-@font-face {
-    font-family: 'Roboto';
-    font-style: normal;
-    font-weight: 400;
-    src: local('Roboto'), local('Roboto-Regular'), url(http://libs.useso.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');
-    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
-}
-/* cyrillic-ext */
-@font-face {
-    font-family: 'Roboto';
-    font-style: normal;
-    font-weight: 700;
-    src: local('Roboto Bold'), local('Roboto-Bold'), url(http://libs.useso.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfCRc4EsA.woff2) format('woff2');
-    unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
-}
-/* cyrillic */
-@font-face {
-    font-family: 'Roboto';
-    font-style: normal;
-    font-weight: 700;
-    src: local('Roboto Bold'), local('Roboto-Bold'), url(http://libs.useso.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfABc4EsA.woff2) format('woff2');
-    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
-}
-/* greek-ext */
-@font-face {
-    font-family: 'Roboto';
-    font-style: normal;
-    font-weight: 700;
-    src: local('Roboto Bold'), local('Roboto-Bold'), url(http://libs.useso.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfCBc4EsA.woff2) format('woff2');
-    unicode-range: U+1F00-1FFF;
-}
-/* greek */
-@font-face {
-    font-family: 'Roboto';
-    font-style: normal;
-    font-weight: 700;
-    src: local('Roboto Bold'), local('Roboto-Bold'), url(http://libs.useso.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfBxc4EsA.woff2) format('woff2');
-    unicode-range: U+0370-03FF;
-}
-/* vietnamese */
-@font-face {
-    font-family: 'Roboto';
-    font-style: normal;
-    font-weight: 700;
-    src: local('Roboto Bold'), local('Roboto-Bold'), url(http://libs.useso.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfCxc4EsA.woff2) format('woff2');
-    unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
-}
-/* latin-ext */
-@font-face {
-    font-family: 'Roboto';
-    font-style: normal;
-    font-weight: 700;
-    src: local('Roboto Bold'), local('Roboto-Bold'), url(http://libs.useso.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfChc4EsA.woff2) format('woff2');
-    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
-}
-/* latin */
-@font-face {
-    font-family: 'Roboto';
-    font-style: normal;
-    font-weight: 700;
-    src: local('Roboto Bold'), local('Roboto-Bold'), url(http://libs.useso.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfBBc4.woff2) format('woff2');
-    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
-}

+ 13 - 114
denglu.html

@@ -82,51 +82,38 @@
             return i;
         }
     </script>
-    <script>
-
-        function load()
-        {
-            alert("页面已加载!");
-
-
-
-        }
-    </script>
 </head>
 
-<body class="" style="background-color: #17253f !important;" onload="startTime() ; load()">
+<body class="" style="background-color: #17253f !important;" onload="startTime();">
 <div class="text-center">
     <nav class="navbar" style="background-color: red">
         <div class="container-fluid">
             <div class="navbar-header">
                 <a class="navbar-brand text-white" href="index.html">工厂产能监控系统</a>
             </div>
-            <div style="color: #ffffff"><img src="images/logo.jpg" style="width: 10%"> &nbsp;&nbsp;&nbsp;&nbsp;深圳市度彼电子有限公司</div>
+            <div style="color: #ffffff"><img src="images/logo.jpg" style="width: 10%"> &nbsp;&nbsp;&nbsp;&nbsp;深圳市度彼电子有限公司
+            </div>
             <font color="#ffffff"><span id="nowDateTimeSpan"></span></font>
         </div>
     </nav>
     <div class="container-fluid" style="margin-top: 10em">
         <div class="card">
             <h5 class="card-header">
-                <select name="select" id="pro_areaCode" >
-                <option value="120000" selected="selected">生产拉线模式</option>
-                <option value="130000">生产线一</option>
-                <option value="140000">生产线二</option>
-                <option value="150000">生产线三</option>
-            </select>
+                生产线 :
+                <select name="select" id="pro_areaCode">
+                    <option value="120000" selected="selected">生产拉线数据读取中</option>
+                </select>
             </h5>
 
             <div class="card-body">
                 <h5 class="card-title">您可以看到生产线内部的实时状况</h5>
                 <p class="card-text">
+                    班次 :
                     <select id="period_ID">
-                        <option selected="selected">班次</option>
-                        <option value="12">上午班</option>
-                        <option value="23">下午班</option>
-                        <option value="33">晚上班</option>
+                        <option value="1">加载中</option>
                     </select>
                 </p>
-                <a href="#" class="btn btn-primary" onclick="location.href='lazhang.html?scheduleId=8&flowId=2&'">开始班次</a>
+                <a href="#" class="btn btn-primary" onclick="moveToStart(this)">开始班次</a>
             </div>
         </div>
         <div class="card">
@@ -140,97 +127,9 @@
     </div>
 </div>
 
-<!-- Jquery Core Js -->
-<script src="plugins/jquery/jquery.min.js"></script>
-
-<!-- Bootstrap Core Js -->
-<script src="plugins/bootstrap/js/bootstrap.js"></script>
-
-<!-- Select Plugin Js -->
-<script src="plugins/bootstrap-select/js/bootstrap-select.js"></script>
-
-<!-- Slimscroll Plugin Js -->
-<script src="plugins/jquery-slimscroll/jquery.slimscroll.js"></script>
-
-<!-- Waves Effect Plugin Js -->
-<script src="plugins/node-waves/waves.js"></script>
-
-<!-- Jquery CountTo Plugin Js -->
-<script src="plugins/jquery-countto/jquery.countTo.js"></script>
-
-<!-- Morris Plugin Js -->
-<script src="plugins/raphael/raphael.min.js"></script>
-<script src="plugins/morrisjs/morris.js"></script>
-
-<!-- ChartJs -->
-<script src="plugins/chartjs/Chart.bundle.js"></script>
-
-<!-- Flot Charts Plugin Js -->
-<script src="plugins/flot-charts/jquery.flot.js"></script>
-<script src="plugins/flot-charts/jquery.flot.resize.js"></script>
-<script src="plugins/flot-charts/jquery.flot.pie.js"></script>
-<script src="plugins/flot-charts/jquery.flot.categories.js"></script>
-<script src="plugins/flot-charts/jquery.flot.time.js"></script>
-
-<!-- Sparkline Chart Plugin Js -->
-<script src="plugins/jquery-sparkline/jquery.sparkline.js"></script>
-<script src="js/basic2.js"></script>
-<script src="js/getparam1.js"></script>
-
-<script>
-
-    function showEachSpot1() {
-        var htmlbody = "", one_person = "";
-        var i = 0;
-        var triGap = periodID.length;
-
-        htmlbody = "";
-        for (i = 0; i < triGap; i++) {
-
-            htmlbody = getSpotHtml(htmlbody, i);
-        }
-        $("#period_ID").html(htmlbody);
-        //console.log(htmlbody);
-    }
-    function getSpotHtml1(htmlbody,  i) {
-        htmlbody += "";
-        htmlbody += `<option value="periodID[i]">
-                                           ${periodname[i]}
-
-                                        </option>`;
-        htmlbody += "";
-        return htmlbody;
-    }
-
-    var proAreaCode =$("#pro_areaCode").val();
-    var periodnum =$("#period_ID").val();
-    $(document).ready(on_document_load);
-
-    function showEachSpot() {
-        var htmlbody = "", one_person = "";
-        var i = 0;
-        var triGap = flowID.length;
-
-        htmlbody = "";
-        for (i = 0; i < triGap; i++) {
-
-            htmlbody = getSpotHtml(htmlbody, i);
-        }
-        $("#pro_areaCode").html(htmlbody);
-        //console.log(htmlbody);
-    }
-    function getSpotHtml(htmlbody,  i) {
-        htmlbody += "";
-        htmlbody += `<option value="flowID[i]">
-                                           ${flowname[i]}
-
-                                        </option>`;
-        htmlbody += "";
-        return htmlbody;
-    }
-
-
-</script>
+<script src="js/basic.js"></script>
+<script src="js/getparam.js"></script>
+<script src="js/entrance.js"></script>
 </body>
 
 </html>

+ 142 - 307
js/basic.js

@@ -1,344 +1,179 @@
-var SVR_URL = "/server/";  //http://172.30.84.3:8803
-if(location.host.indexOf("niimei") === -1){
-    SVR_URL = "http://172.30.84.3:8803/server/";
-}
-
-
-function get_data(url, callback) {
-    $.ajax({
-        url: SVR_URL + url,
-        apiName: url,
-        sendTime: new Date()
-    }).done(callback).fail(on_fail);
-}
-
-function on_fail(msg) {
-    alert("很抱歉,网络错误,请查看Console");
-    console.log("-----   网络请求失败 ---------")
-    console.log(JSON.stringify(this));
-    console.log("----------------------------")
-}
-
-function on_data_success(obj, status) {
-
-}
-
-function first_parse(ajax, obj) {
-    if (typeof obj === "string") {
-        obj = JSON.parse(obj);
-    }
-
-    if (typeof obj !== "object") {
-        console.log(ajax);
-        throw "Error ! Parsing JSON failed ." + JSON.stringify(obj);
-    }
-
-    if (obj.ret == "10000" || obj.ret == 10000 || obj.ret == 1000) {
-        return obj.model;
-    } else {
-        console.log(ajax);
-        throw "Error ! Server returned error." + JSON.stringify(obj);
+let Queue = {IS_LOADED : false, nowuse : 0, SVR_URL:"/server/", groupsCount : 0, groups:[], backup:["/server/","http://localhost:8803/server/","http://172.30.84.3:8803/server/","https://1.niimei.com/server/"] ,list:[]};
+
+function get_server_url() {
+    let output = $.ajax({url: Queue.SVR_URL + "/fcWorker/list?userId=1", timeout:1000 }).fail(on_check_fail).done(function(){
+        Queue.IS_LOADED = true;
+        console.warn("Using SERVER : ");
+        console.warn(Queue.SVR_URL);
+        setTimeout(parse_queue, 50);
+    });
+}
+
+function on_check_fail(){
+    if(Queue.nowuse === Queue.backup.length){
+        var out = "";
+        Queue.backup.forEach(function(val,index,arr){
+            out += val + "\n";
+        })
+        alert("抱歉, 服务器连接失败! \n 请确认 " + out + "其中之一可用");
+    }else{
+        Queue.SVR_URL = Queue.backup[Queue.nowuse];
+        Queue.nowuse ++;
+        $.ajax({url: Queue.SVR_URL + "/fcWorker/list?userId=1", timeout:1000 }).fail(on_check_fail).done(function(){
+            Queue.IS_LOADED = true;
+            console.warn("Using SERVER : ");
+            console.warn(Queue.SVR_URL);
+            setTimeout(parse_queue, 50);
+        });
     }
 }
 
-
-var flowData;
-var sID = [];
-var passNumber = [];
-var failNumber = [];
-var failrate = [];
-var stacknum = 0;
-var stackeverynum = [];
-var failnum=0;
-var passnum=0
-var passdata=[];
-var faildata=[];
-var num=0;
-var hispass=[];
-var hisfail=[];
-var hisstack=[];
-var hisrate=[];
-var goodpass=[];
-var goodid=[];
-var goodfailrate=[];
-var badpass=[];
-var badid=[];
-var badfailrate=[];
-var t=0;
-var n=0;
-var workID=[];
-var sectorID=[];
-function firsttime_load_spots_data() {
-    get_data("fcWorkScheduleLoad/list?scheduleId=" + scheduleId , first_success)
-}
-function secondtime_load_spots_data() {
-    get_data("fcBiFlowDaily/list?type=" + num +"&flowId="+flowId, second_success);
-    num++;
-}
-function chart_load_spots_data() {
-    get_data("fcBiWorkerDaily/get?type=0&limit=3", chart_success);
-
-}
-function chart1_load_spots_data() {
-    get_data("fcBiWorkerDaily/get?type=4&limit=3", chart1_success);
-
-}
-function addtime_load_spots_data() {
-    num++;
-    get_data("fcBiFlowDaily/list?type=" + num +"&flowId="+flowId, add_success);
-
+function get_data(url, callback) {
+    Queue.list.push({url:url, callback:callback, gid:-1});
 }
 
-function first_success(obj, sta) {
-    var output = first_parse(this, obj);
-    //在这里排序 spo\
-    console.log(" output : ");
-    console.log(output);
-    var i, j,k,z;
-    failnum=0;
-    var x=0;
-    var worksum=[];
-    sectorID[0]=output.list[0].sectorId;
-    passNumber[0]=0;
-    failNumber[0]=0;
-    stackeverynum[0]=0;
-    z=0;
-    for(i=1;i<output.list.length;i++){
-        var thisUid = output.list[i].sectorId;
-       x = 0;
-       for(j=0;j<sectorID.length;j++){
-           if(sectorID[j] === thisUid){
-               x=1;
-               break;
-           }
-       }
-       if(x===0){
-           sectorID.push(thisUid);
-       }
-
-    }
-    j=0;
-    for(k=0;k<sectorID.length;k++){
-        var uid = sectorID[k];
-        z=0;
-        for(i=0;i<output.list.length;i++){
-            if(uid===output.list[i].sectorId){
-                passNumber[k]=output.list[i].passNum+passNumber[j];
-                failNumber[k]=output.list[i].failNum+failNumber[j];
-                stackeverynum[k]=output.list[i].due+stackeverynum[j];
-                z++;
-            }
-        }
-        if (failNumber[k] + passNumber[k] == 0) {
-            failrate[k] = 0;
+function new_data_group(groupName, callback){
+    var gid = -1;
+    Queue.groups.forEach(function(val,index,arr){
+        if(val.groupName === groupName){
+            gid = val.gid;
         }
-        else {
-            failrate[k] = failNumber[k] / (failNumber[k] + passNumber[k]) * 100;
-
+    });
+    if(gid === -1) {
+        gid = Queue.groupsCount;
+        Queue.groupsCount++;
+        Queue.groups.push({
+            gid: gid, groupName:groupName, callme: callback, counter:0
+        });
+    }
+    return gid;
+}
+
+function group_get_data(groupName, url, callback){
+    var gid = -1;
+    Queue.groups.forEach(function(val,index,arr){
+        if(val.groupName === groupName){
+            gid = val.gid;
         }
-        /*stackeverynum[k]=stackeverynum[k]/z;*/
-
-        ///
-
-    }
-    addtime_load_spots_data();
-    for(i=2;i<5;i++) {
-        secondtime_load_spots_data();
+    });
+    if(gid === -1) {
+        alert("Group 方法使用错误!!!")
     }
-    chart_load_spots_data();
-    chart1_load_spots_data();
-
-
-
-
-    showChart();
-
-    setInterval(function(){
-        get_data("fcWorkScheduleLoad/list?scheduleId=" + scheduleId, realtime_success);
-    },1000);
-
+    Queue.list.push({url:url, callback:callback, gid:gid});
 }
-function second_success(obj, sta) {
-    var history = first_parse(this, obj);
-    var i, j;
-    console.log(" history : ");
-    console.log(history);
-    hispass[t] = 0;
-    hisfail[t] = 0;
-    hisstack[t] = 0;
-    hisrate[t]=0;
-    for(i=0;i<history.length;i++){
-
-
-            hispass[t] = history[i].passNum+hispass[t];
-            hisfail[t] = history[i].failNum+hisfail[t];
-            hisstack[t] = history[i].avgDue+hisstack[t];
-            hisrate[t] = history[i].failRate;
-            hisrate[t]=hisrate[t]/100;
-
 
-       }
-       if(history.length!=1){
-        hisrate[t]=Math.floor(hisfail[t]/(hispass[t]+hisfail[t])*10000)/100;
-    }
-    if(hispass[t]+hisfail[t]==0){
-        hisrate[t]=0;
+function parse_queue(){
+    if(Queue.list.length > 0){
+        let one = Queue.list.pop();
+        if(one.gid === -1) {
+            request_data(one.url, one.callback);
+        }else{
+            g_request_data(one.url, one.callback, one.gid);
+        }
     }
-    t++;
-
+    setTimeout(parse_queue,100);
 }
-function chart_success(obj, sta) {
-    var redchart = first_parse(this, obj);
-    var i, j;
-    i=j=0;
-    console.log(" redchart : ");
-    console.log(redchart);
-
-    for(i=0;i<3;i++){
-        goodid[i]=redchart.list[i].workerId;
-        goodpass[i]=redchart.list[i].passNum;
-        goodfailrate[i]=redchart.list[i].failRate/100;
-
-
-    }
-
 
+function request_data(url, callback){
+    $.ajax({
+        url: Queue.SVR_URL + url,
+        apiName: url,
+        sendTime: new Date(),
+        callme: callback
+    }).done(on_dat_success).fail(on_fail);
 }
-function chart1_success(obj, sta) {
-    var blackchart = first_parse(this, obj);
-    var i, j;
-    i=j=0;
-    console.log(" black chart : ");
-    console.log(blackchart);
-
-    for(i=0;i<3;i++){
-        badid[i]=blackchart.list[i].workerId;
-        badpass[i]=blackchart.list[i].passNum;
-        badfailrate[i]=blackchart.list[i].failRate/100;
-
 
+function g_request_data(url, callback, gid){
+    $.ajax({
+        url: Queue.SVR_URL + url,
+        apiName: url,
+        sendTime: new Date(),
+        gid: gid,
+        callme: callback
+    }).done(on_gp_success).fail(on_fail);
+}
+
+function on_gp_success(a,b) {
+    var gid = this.gid;
+    if(check_if_success(a,b)) {
+        this.callme(a,b);
+        Queue.groups.forEach(function(v,i,a){
+            if(v.gid === gid){
+                v.counter ++;
+                v.callme(v);
+            }
+        });
     }
-
-
 }
-function add_success(obj, sta) {
-    var history1 = first_parse(this, obj);
-    var i, j;
-    console.log(" history1 : ");
-    console.log(history1);
-    hispass[t] = 0;
-    hisfail[t] = 0;
-    hisstack[t] = 0;
-    hisrate[t]=0;
-    var lengthnum=history1.length-1;
-    for(i=lengthnum;i<history1.length;i++){
-
-
-        hispass[t] = history1[i].passNum+hispass[t];
-        hisfail[t] = history1[i].failNum+hisfail[t];
-        hisstack[t] = history1[i].avgDue+hisstack[t];
-        hisrate[t] = history1[i].failRate;
-        hisrate[t]=hisrate[t]/100;
-
 
+function on_dat_success(a,b){
+    if(check_if_success(a,b)) {
+        this.callme(a,b);
     }
-
-    if(hispass[t]+hisfail[t]==0){
-        hisrate[t]=0;
-    }
-    t++;
-
 }
 
-function realtime_success(obj, sta) {
-    var output = first_parse(this, obj);
-    //在这里排序 spo\
-    console.log(" output : ");
-    console.log(output);
-    var i, j,k,z;
-    failnum=0;
-    var x=0;
-    var worksum=[];
-    sectorID[0]=output.list[0].sectorId;
-    passNumber[0]=0;
-    failNumber[0]=0;
-    stackeverynum[0]=0;
-    z=0;
-    for(i=1;i<output.list.length;i++){
-        var thisUid = output.list[i].sectorId;
-        x = 0;
-        for(j=0;j<sectorID.length;j++){
-            if(sectorID[j] === thisUid){
-                x=1;
-                break;
-            }
-        }
-        if(x===0){
-            sectorID.push(thisUid);
+function check_if_success(a,b){
+    if(typeof a === "string"){
+        try {
+            a = JSON.parse(a);
+        }catch (e) {
+            console.warn("=----------   异常   -----------=");
+            console.warn(a);
+            console.warn("=----------------------------=");
+            alert("信息失败 : "+e);
+            return;
         }
-
+    }else if(typeof  a == "undefined"){
+        console.warn("=----------   异常   -----------=");
+        console.warn(a);
+        console.warn("=------------------------------=");
+        alert("信息失败 : "+e);
+        return;
     }
-    j=0;
-    for(k=0;k<sectorID.length;k++){
-        var uid = sectorID[k];
-        z=0;
-        for(i=0;i<output.list.length;i++){
-            if(uid===output.list[i].sectorId){
-                passNumber[k]=output.list[i].passNum+passNumber[j];
-                failNumber[k]=output.list[i].failNum+failNumber[j];
-                stackeverynum[k]=output.list[i].due+stackeverynum[j];
-                z++;
-            }
-        }
-        if (failNumber[k] + passNumber[k] == 0) {
-            failrate[k] = 0;
-        }
-        else {
-            failrate[k] = failNumber[k] / (failNumber[k] + passNumber[k]) * 100;
-
-        }
-       /*stackeverynum[k]=stackeverynum[k]/z;*/
-
-        ///
-
+    if(a.ret === "10000") {
+        return true;
+    }else{
+        console.error(JSON.stringify(a));
+        alert("查询失败 : 请参阅控制台输出! ");
     }
-    updateChart();
 
+    return false;
 }
 
-/*function on_load_success_spots(obj, status) {
-    var spotsList = first_parse(this, obj);
-    //在这里排序 spo\
-    console.log("spot List : ");
-    console.log(spotsList);
+function on_fail(msg) {
+    alert("很抱歉,网络错误,请查看Console");
+    console.warn("-----   网络请求失败 ---------")
+    console.warn(JSON.stringify(this));
+    console.warn("----------------------------")
+}
 
-    var i, j, temp;
-    for (i = 0; i < spotsList.list.length - 1; i++) {
-        for (j = 0; j < spotsList.list.length - i - 1; j++) {
-            if (spotsList.list[j].orderNum > spotsList.list[j + 1].orderNum) {
-                temp = spotsList.list[j];
-                spotsList.list[j] = spotsList.list[j + 1];
-                spotsList.list[j + 1] = temp;
-            }
-        }
+function first_parse(ajax, obj) {
+    if (typeof obj === "string") {
+        obj = JSON.parse(obj);
     }
 
-    flowData = spotsList.list;
+    if (typeof obj !== "object") {
+        console.warn(ajax);
+        throw "Error ! Parsing JSON failed ." + JSON.stringify(obj);
+    }
 
-    for (i = 0; i < spotsList.list.length ; i++) {
-        sID[i] = spotsList.list[i].spotId;
-        namedata[i] = spotsList.list[i].spotName;
+    if (obj.ret === "10000") {
+        return obj.model;
+    } else {
+        console.warn(ajax);
+        throw "Error ! Server returned error." + JSON.stringify(obj);
     }
+}
 
-    firsttime_load_spots_data();
-}*/
 
 function on_document_load() {
-    // First Step
-    //get_data("fcSpot/list?flowId=" + scheduleId, on_load_success_spots)
-    firsttime_load_spots_data();
+    if(typeof (page_document_load) !== "undefined"){
+        page_document_load();
+    }
+    if(typeof (resizeAll) !== "undefined"){
+        resizeAll();
+    }
 }
 
-
-var namedata = [];
-
+$(document).ready(on_document_load);
+get_server_url();

+ 0 - 122
js/basic2.js

@@ -1,122 +0,0 @@
-var SVR_URL = "/server/";  //http://172.30.84.3:8803
-if(location.host.indexOf("niimei") === -1){
-    SVR_URL = "http://172.30.84.3:8803/server/";
-}
-
-
-function get_data(url, callback) {
-    $.ajax({
-        url: SVR_URL + url,
-        apiName: url,
-        sendTime: new Date()
-    }).done(callback).fail(on_fail);
-}
-
-function on_fail(msg) {
-    alert("很抱歉,网络错误,请查看Console");
-    console.log("-----   网络请求失败 ---------")
-    console.log(JSON.stringify(this));
-    console.log("----------------------------")
-}
-
-function on_data_success(obj, status) {
-
-}
-
-function first_parse(ajax, obj) {
-    if (typeof obj === "string") {
-        obj = JSON.parse(obj);
-    }
-
-    if (typeof obj !== "object") {
-        console.log(ajax);
-        throw "Error ! Parsing JSON failed ." + JSON.stringify(obj);
-    }
-
-    if (obj.ret == "10000" || obj.ret == 10000 || obj.ret == 1000) {
-        return obj.model;
-    } else {
-        console.log(ajax);
-        throw "Error ! Server returned error." + JSON.stringify(obj);
-    }
-}
-
-
-
-function on_document_load() {
-
-    firsttime_load_spots_data();
-    secondtime_load_spots_data();
-}
-function firsttime_load_spots_data() {
-    get_data("fcFlow/list", first_success)
-}
-var flowID=[];
-var flowname=[];
-var periodID=[];
-var periodname=[];
-function first_success(obj, sta) {
-    var output = first_parse(this, obj);
-    //在这里排序 spo\
-    console.log(" output : ");
-    console.log(output);
-    var i,j,k;
-    j=0;
-    k=0;
-    for(i=0;i<output.list.length;i++){
-        if(userId==output.list[i].flowMasterId){
-            flowID[j]=output.list[i].flowId;
-            flowname[j]=output.list[i].flowName;
-            j++;
-
-        }
-        else {
-            k++;
-        }
-
-    }
-    if(k==output.list.length-1){
-        alert("无权限访问!");
-    }
-    showEachSpot();
-    showEachSpot1();
-
-
-
-
-}
-function secondtime_load_spots_data() {
-    get_data("fcWorkPeriod/list", second_success);
-}
-function thirdtime_load_spots_data() {
-    get_data("fcWorkSchedule/list", third_success);
-}
-function second_success(obj, sta) {
-    var history = first_parse(this, obj);
-    var i, j;
-    console.log(" history : ");
-    console.log(history);
-    for(i=0;i<history.length;i++){
-        periodID[i]=history[i].periodId;
-        periodname[i]=history[i].periodName;
-
-    }
-    thirdtime_load_spots_data();
-
-
-}
-var scheduleID;
-function second_success(obj, sta) {
-    var history = first_parse(this, obj);
-    var i, j;
-    console.log(" history : ");
-    console.log(history);
-    for(i=0;i<history.list.length;i++){
-        if(flowID[i]==history.list[i].flowId&&periodID[i]==history.list[i].periodId){
-            scheduleID=history.list[i].scheduleId;
-        }
-    }
-
-
-
-}

+ 118 - 0
js/entrance.js

@@ -0,0 +1,118 @@
+var flowID = [];
+var flowname = [];
+var periodID = [];
+var periodname = [];
+var userId = utils_get_param("userId");
+
+function page_document_load() {
+    new_data_group("denglu",function(gp){
+        if(gp.counter === 2){
+            showEachSpot();
+            showEachSpot1();
+        }
+    });
+    firsttime_load_spots_data();
+    secondtime_load_spots_data();
+}
+
+function firsttime_load_spots_data() {
+    group_get_data("denglu","fcFlow/list", first_success)
+}
+
+function first_success(obj, sta) {
+    let output = first_parse(this, obj);
+    //在这里排序 spo\
+    console.log(" output : ");
+    console.log(output);
+    let i, j, k;
+    j = 0;
+    k = 0;
+    for (i = 0; i < output.list.length; i++) {
+        if (userId === output.list[i].flowMasterId) {
+            flowID[j] = output.list[i].flowId;
+            flowname[j] = output.list[i].flowName + "(负责人)";
+            j++;
+        } else {
+            flowID[j] = output.list[i].flowId;
+            flowname[j] = output.list[i].flowName + "(无权限)";
+            j++;
+            k++;
+        }
+    }
+    if (k === output.list.length) {
+        alert("请注意:您并不是任何生产线的负责人\n因此,您不得开始任何班次,只能进入已经存在的班次\n 提示:测试模式不受此限制!");
+    }
+}
+
+function secondtime_load_spots_data() {
+    group_get_data("denglu","fcWorkPeriod/list", second_success);
+}
+
+function second_success(obj, sta) {
+    var history = first_parse(this, obj).list;
+    var i, j;
+    console.log(" history : ");
+    console.log(history);
+    for (i = 0; i < history.length; i++) {
+        periodID[i] = history[i].periodId;
+        periodname[i] = history[i].periodName;
+    }
+    showEachSpot1();
+}
+
+function showEachSpot1() {
+    var htmlbody = "", one_person = "";
+    var i = 0;
+    var triGap = periodID.length;
+    htmlbody = "";
+    for (i = 0; i < triGap; i++) {
+        htmlbody = getSpotHtml1(htmlbody, i);
+    }
+    $("#period_ID").html(htmlbody);
+    //console.log(htmlbody);
+}
+
+function getSpotHtml1(htmlbody, i) {
+    htmlbody += "";
+    htmlbody += `<option value="${periodID[i]}">${periodname[i]}</option>`;
+    htmlbody += "";
+    return htmlbody;
+}
+
+function showEachSpot() {
+    var htmlbody = "", one_person = "";
+    var i = 0;
+    var triGap = flowID.length;
+    htmlbody = "";
+    for (i = 0; i < triGap; i++) {
+        htmlbody = getSpotHtml(htmlbody, i);
+    }
+    $("#pro_areaCode").html(htmlbody);
+    //console.log(htmlbody);
+}
+
+function getSpotHtml(htmlbody, i) {
+    htmlbody += "";
+    htmlbody += `<option value="${flowID[i]}">${flowname[i]}</option>`;
+    htmlbody += "";
+    return htmlbody;
+}
+
+function moveToStart(btn) {
+    $(btn).attr("disabled", "disabled");
+    var proAreaCode = $("#pro_areaCode").val();
+    var periodnum = $("#period_ID").val();
+    get_data("/fcWorkSchedule/startSchedule?flowId=" + proAreaCode + "&periodId=" + periodnum, startToSchedule);
+}
+
+function startToSchedule(obj) {
+    let output = first_parse(this, obj);
+    if(output != undefined){
+        var proAreaCode = $("#pro_areaCode").val();
+        alert("即将跳转 拉张页面: scheduleId:"+output.scheduleId);
+        location.href = 'lazhang.html?scheduleId=' + output.scheduleId + '&flowId=' + proAreaCode;
+    }else{
+        alert("开始失败!");
+    }
+}
+

+ 1 - 11
js/getparam.js

@@ -4,19 +4,9 @@ function utils_get_param(name){
     if(r!=null)return  unescape(r[2]); return null;
 }
 
-
-var scheduleId = utils_get_param("scheduleId");
-var flowId = utils_get_param("flowId");
-
-if(flowId == null || scheduleId == null){
-    alert("出错啦!请检查参数完整性");
-}
-
-
 // 去除实际名字
 function getNames(workerIdList, chart){
     // return "张三";
-
 }
 
 function on_load_name_success(obj){
@@ -25,4 +15,4 @@ function on_load_name_success(obj){
 
 function reloadPage(){
     location.reload()
-}
+}

+ 0 - 27
js/getparam1.js

@@ -1,27 +0,0 @@
-function utils_get_param(name){
-    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
-    var r = window.location.search.substr(1).match(reg);
-    if(r!=null)return  unescape(r[2]); return null;
-}
-
-
-var userId = utils_get_param("userId");
-
-if(userId == null ){
-    alert("出错啦!请检查参数完整性");
-}
-
-
-// 去除实际名字
-function getNames(workerIdList, chart){
-    // return "张三";
-
-}
-
-function on_load_name_success(obj){
-
-}
-
-function reloadPage(){
-    location.reload()
-}

+ 261 - 0
js/lazhang-data.js

@@ -0,0 +1,261 @@
+var passNumber = [];
+var failNumber = [];
+var failrate = [];
+var stackeverynum = [];
+var failnum = 0;
+var num = 0;
+var hispass = [];
+var hisfail = [];
+var hisstack = [];
+var hisrate = [];
+var goodpass = [];
+var goodid = [];
+var goodfailrate = [];
+var badpass = [];
+var badid = [];
+var badfailrate = [];
+var t = 0;
+var n = 0;
+var sectorID = [];
+var namedata = [];
+var lazhang = {};
+
+
+var scheduleId = utils_get_param("scheduleId");
+var flowId = utils_get_param("flowId");
+
+if(flowId == null || scheduleId == null){
+    alert("出错啦!请检查参数完整性");
+}
+
+function page_document_load() {
+    get_data("fcWorkScheduleLoad/list?scheduleId=" + scheduleId, first_success)
+}
+
+function first_success(obj, sta) {
+    let output = first_parse(this, obj);
+    let i, j, k, z;
+    failnum = 0;
+    let x = 0;
+    let worksum = [];
+    sectorID[0] = output.list[0].sectorId;
+    passNumber[0] = 0;
+    failNumber[0] = 0;
+    stackeverynum[0] = 0;
+    z = 0;
+    for (i = 1; i < output.list.length; i++) {
+        var thisUid = output.list[i].sectorId;
+        x = 0;
+        for (j = 0; j < sectorID.length; j++) {
+            if (sectorID[j] === thisUid) {
+                x = 1;
+                break;
+            }
+        }
+        if (x === 0) {
+            sectorID.push(thisUid);
+        }
+
+    }
+    j = 0;
+    for (k = 0; k < sectorID.length; k++) {
+        var uid = sectorID[k];
+        z = 0;
+        for (i = 0; i < output.list.length; i++) {
+            if (uid === output.list[i].sectorId) {
+                passNumber[k] = output.list[i].passNum + passNumber[j];
+                failNumber[k] = output.list[i].failNum + failNumber[j];
+                stackeverynum[k] = output.list[i].due + stackeverynum[j];
+                z++;
+            }
+        }
+        if (failNumber[k] + passNumber[k] == 0) {
+            failrate[k] = 0;
+        }
+        else {
+            failrate[k] = failNumber[k] / (failNumber[k] + passNumber[k]) * 100;
+
+        }
+        /*stackeverynum[k]=stackeverynum[k]/z;*/
+
+        ///
+
+    }
+    addtime_load_spots_data();
+    for (i = 2; i < 5; i++) {
+        secondtime_load_spots_data();
+    }
+    chart_load_spots_data();
+    chart1_load_spots_data();
+
+
+    showChart();
+
+    lazhang.timer = setInterval(request_data_realtime, 1000);
+
+}
+
+function request_data_realtime() {
+    get_data("fcWorkScheduleLoad/list?scheduleId=" + scheduleId, realtime_success);
+}
+
+function secondtime_load_spots_data() {
+    get_data("fcBiFlowDaily/list?type=" + num + "&flowId=" + flowId, second_success);
+    num++;
+}
+
+function chart_load_spots_data() {
+    get_data("fcBiWorkerDaily/get?type=0&limit=3", chart_success);
+
+}
+
+function chart1_load_spots_data() {
+    get_data("fcBiWorkerDaily/get?type=4&limit=3", chart1_success);
+
+}
+
+function addtime_load_spots_data() {
+    num++;
+    get_data("fcBiFlowDaily/list?type=" + num + "&flowId=" + flowId, add_success);
+
+}
+
+function second_success(obj, sta) {
+    var history = first_parse(this, obj);
+    var i, j;
+    console.log(" history : ");
+    console.log(history);
+    hispass[t] = 0;
+    hisfail[t] = 0;
+    hisstack[t] = 0;
+    hisrate[t] = 0;
+    for (i = 0; i < history.length; i++) {
+        hispass[t] = history[i].passNum + hispass[t];
+        hisfail[t] = history[i].failNum + hisfail[t];
+        hisstack[t] = history[i].avgDue + hisstack[t];
+        hisrate[t] = history[i].failRate;
+        hisrate[t] = hisrate[t] / 100;
+    }
+    if (history.length != 1) {
+        hisrate[t] = Math.floor(hisfail[t] / (hispass[t] + hisfail[t]) * 10000) / 100;
+    }
+    if (hispass[t] + hisfail[t] == 0) {
+        hisrate[t] = 0;
+    }
+    t++;
+}
+
+function chart_success(obj, sta) {
+    var redchart = first_parse(this, obj);
+    var i, j;
+    i = j = 0;
+    console.log(" redchart : ");
+    console.log(redchart);
+    for (i = 0; i < redchart.list.length; i++) {
+        goodid[i] = redchart.list[i].workerId;
+        goodpass[i] = redchart.list[i].passNum;
+        goodfailrate[i] = redchart.list[i].failRate / 100;
+
+
+    }
+
+
+}
+
+function chart1_success(obj, sta) {
+    var blackchart = first_parse(this, obj);
+    var i, j;
+    i = j = 0;
+    console.log(" black chart : ");
+    console.log(blackchart);
+
+    for (i = 0; i < blackchart.list.length; i++) {
+        badid[i] = blackchart.list[i].workerId;
+        badpass[i] = blackchart.list[i].passNum;
+        badfailrate[i] = blackchart.list[i].failRate / 100;
+    }
+
+
+}
+
+function add_success(obj, sta) {
+    var history1 = first_parse(this, obj);
+    var i, j;
+    console.log(" history1 : ");
+    console.log(history1);
+    hispass[t] = 0;
+    hisfail[t] = 0;
+    hisstack[t] = 0;
+    hisrate[t] = 0;
+    var lengthnum = history1.length - 1;
+    for (i = lengthnum; i < history1.length; i++) {
+        hispass[t] = history1[i].passNum + hispass[t];
+        hisfail[t] = history1[i].failNum + hisfail[t];
+        hisstack[t] = history1[i].avgDue + hisstack[t];
+        hisrate[t] = history1[i].failRate;
+        hisrate[t] = hisrate[t] / 100;
+    }
+
+    if (hispass[t] + hisfail[t] == 0) {
+        hisrate[t] = 0;
+    }
+    t++;
+
+}
+
+function realtime_success(obj, sta) {
+    var output = first_parse(this, obj);
+    //在这里排序 spo\
+    console.trace(" output : ");
+    console.trace(output);
+
+    var i, j, k, z;
+    failnum = 0;
+    var x = 0;
+    var worksum = [];
+    sectorID[0] = output.list[0].sectorId;
+    passNumber[0] = 0;
+    failNumber[0] = 0;
+    stackeverynum[0] = 0;
+    z = 0;
+    for (i = 1; i < output.list.length; i++) {
+        var thisUid = output.list[i].sectorId;
+        x = 0;
+        for (j = 0; j < sectorID.length; j++) {
+            if (sectorID[j] === thisUid) {
+                x = 1;
+                break;
+            }
+        }
+        if (x === 0) {
+            sectorID.push(thisUid);
+        }
+
+    }
+    j = 0;
+    for (k = 0; k < sectorID.length; k++) {
+        var uid = sectorID[k];
+        z = 0;
+        for (i = 0; i < output.list.length; i++) {
+            if (uid === output.list[i].sectorId) {
+                passNumber[k] = output.list[i].passNum + passNumber[j];
+                failNumber[k] = output.list[i].failNum + failNumber[j];
+                stackeverynum[k] = output.list[i].due + stackeverynum[j];
+                z++;
+            }
+        }
+        if (failNumber[k] + passNumber[k] == 0) {
+            failrate[k] = 0;
+        }
+        else {
+            failrate[k] = failNumber[k] / (failNumber[k] + passNumber[k]) * 100;
+
+        }
+        /*stackeverynum[k]=stackeverynum[k]/z;*/
+
+        ///
+
+    }
+    updateChart();
+
+}

+ 298 - 0
js/lazhang-display.js

@@ -0,0 +1,298 @@
+var timeday = ["今日", "昨日", "本周", "本月"];
+
+function getSpotHtml(htmlbody, i) {
+    htmlbody += "<tr>";
+    htmlbody += `<tr>
+                    <td>${timeday[i]}</td>
+                    <td>${hispass[i]}</td>
+                    <td>${hisfail[i]}</td>
+                    <td>${hisstack[i]}</td>
+                    <td>${hisrate[i] + '%'}</td>
+                </tr>`;
+    htmlbody += "</tr>";
+    return htmlbody;
+}
+
+function getSpotHtml1(htmlbody, i) {
+    htmlbody += "<tr>";
+    htmlbody += `<tr>
+                    <td>${goodid[i]}</td>
+                    <td>${goodpass[i]}</td>
+                    <td>${goodid[i]}</td>
+                    <td>${goodfailrate[i] + '%'}</td>
+                </tr>`;
+    htmlbody += "</tr>";
+    return htmlbody;
+}
+
+function getSpotHtml2(htmlbody, i) {
+    htmlbody += "<tr>";
+    htmlbody += `<tr>
+                    <td>${badid[i]}</td>
+                    <td>${badpass[i]}</td>
+                    <td>${badid[i]}</td>
+                    <td>${badfailrate[i] + '%'}</td>
+                </tr>`;
+    htmlbody += "</tr>";
+    return htmlbody;
+}
+
+
+function showEachSpot() {
+    var htmlbody = "", one_person = "";
+    var i = 0;
+    var triGap = 4;
+
+    htmlbody = "";
+    for (i = 0; i < triGap; i++) {
+
+        htmlbody = getSpotHtml(htmlbody, i);
+    }
+    $("#rank-one").html(htmlbody);
+    //console.log(htmlbody);
+}
+
+function showEachSpot1() {
+    var htmlbody = "", one_person = "";
+    var i = 0;
+    var triGap = 3;
+
+    htmlbody = "";
+    for (i = 0; i < triGap; i++) {
+
+        htmlbody = getSpotHtml1(htmlbody, i);
+    }
+    $("#rank-two").html(htmlbody);
+    //console.log(htmlbody);
+}
+
+function showEachSpot2() {
+    var htmlbody = "", one_person = "";
+    var i = 0;
+    var triGap = 3;
+
+    htmlbody = "";
+    for (i = 0; i < triGap; i++) {
+
+        htmlbody = getSpotHtml2(htmlbody, i);
+    }
+    $("#rank-three").html(htmlbody);
+    //console.log(htmlbody);
+}
+
+
+var compAxis = {
+    categories: namedata,
+    crosshair: true,
+    title: {
+        text: '工位',
+        style: {
+            fontSize: '1.5em'
+        }
+    },
+    labels: {
+        style: {
+            fontSize: '1.5em'
+        }
+    }
+};
+
+function showChart() {
+
+    var data = [];
+    var ratedata = [];
+    var stackmax = 0;
+    var failmax = 0;
+    var passdata = [];
+    var faildata = [];
+    var passmax = 0;
+
+    for (i = 0; i < passNumber.length; i++) {
+        if (stackmax < stackeverynum[i]) {
+            stackmax = stackeverynum[i];
+        }
+        if (failmax < failrate[i]) {
+            failmax = failrate[i];
+        }
+        if (passmax < passNumber[i]) {
+            passmax = passNumber[i];
+        }
+        data.push(stackeverynum[i]);
+        ratedata.push(Math.floor(failrate[i]));
+        passdata.push(passNumber[i]);
+        faildata.push(failNumber[i])
+    }
+
+    showEachSpot();
+    showEachSpot1();
+    showEachSpot2();
+
+
+    stackmax = Math.max(stackmax, 5);
+    failmax = Math.max(failmax, 5);
+
+    stackAndFailChart = Highcharts.chart('graph-1', {
+        chart: {
+            zoomType: 'xy',
+            //height: (4 / 16 * 100) + '%' // 16:9 ratio
+        },
+        title: {text: '各工位今日产能'},
+        credits: {enabled: false},
+        exporting: {enabled: false},
+        xAxis: [compAxis],
+        yAxis: [{
+            labels: {
+                format: '{value}',
+                style: {
+                    color: Highcharts.getOptions().colors[0],
+                    fontSize: '1.5em'
+                }
+            },
+            min: 0,
+            max: passmax * 1.5,
+            title: {
+
+                style: {
+                    color: Highcharts.getOptions().colors[0],
+                    fontSize: '1em'
+                }
+            }
+        },],
+        tooltip: {shared: true},
+        legend: {
+            layout: 'vertical',
+            align: 'right',
+            x: -100,
+            verticalAlign: 'top',
+            y: 0,
+            floating: true,
+            backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
+        },
+        series: [{
+            name: '良品数',
+            type: 'column',
+            data: passdata,
+
+        }, {
+            name: '不良品数',
+            type: 'column',
+            data: faildata,
+
+        },
+            {
+                name: '堆积数',
+                type: 'column',
+                data: data,
+            }]
+    });
+
+    FailChart = Highcharts.chart('graph-2', {
+        chart: {
+            //height: (4 / 16 * 100) + '%' // 16:9 ratio
+        },
+        title: {
+            text: '各工位今日不良率'
+        },
+        credits: {
+            enabled: false // 禁用版权信息
+        },
+        exporting: {
+            enabled: false
+        },
+        xAxis: [compAxis],
+        yAxis: [{ // Secondary yAxis
+            title: {
+                text: '不良率',
+                style: {
+                    color: 'red',
+                    fontSize: '1em'
+                }
+            },
+            min: 0,
+            max: 1.5 * failmax,
+            labels: {
+                formatter: function () {
+                    return Math.floor(this.value) + "%";
+                },
+                style: {
+                    color: 'red',
+                    fontSize: '20px'
+                }
+            },
+
+        }],
+        tooltip: {
+            shared: true
+        },
+        legend: {
+            layout: 'vertical',
+            align: 'right',
+            x: -120,
+            verticalAlign: 'top',
+            y: 0,
+            floating: true,
+            backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
+        },
+        series: [{
+            name: '不良率',
+            type: 'spline',
+            data: ratedata,
+            color: 'red',
+            tooltip: {
+                valueSuffix: '%'
+            }
+        }]
+    });
+
+}
+
+function updateChart() {
+    var data = [];
+    var ratedata = [];
+    var stackmax = 0;
+    var failmax = 0;
+    var passdata = [];
+    var faildata = [];
+    var passmax = 0;
+    for (i = 0; i < passNumber.length; i++) {
+        if (stackmax < stackeverynum[i]) {
+            stackmax = stackeverynum[i];
+        }
+        if (failmax < failrate[i]) {
+            failmax = failrate[i];
+        }
+        if (passmax < passNumber[i]) {
+            passmax = passNumber[i];
+        }
+        data.push(stackeverynum[i]);
+        ratedata.push(Math.floor(failrate[i]));
+        passdata.push(passNumber[i]);
+        faildata.push(failNumber[i])
+    }
+
+    stackmax = Math.max(stackmax, 5);
+    failmax = Math.max(failmax, 5);
+
+    // https://api.hcharts.cn/highcharts#Series.addPoint;
+
+    stackAndFailChart.series[0].setData(passdata);
+    stackAndFailChart.series[1].setData(faildata);
+    stackAndFailChart.series[2].setData(data);
+
+    FailChart.series[0].setData(ratedata);
+
+    if (failmax > FailChart.yAxis[0].getExtremes().max * 1.3 || failmax < FailChart.yAxis[0].getExtremes().max * 0.5) {
+        FailChart.yAxis[0].setExtremes(0, failmax * 1.5);
+    }
+    if (passmax > stackAndFailChart.yAxis[0].getExtremes().max * 1.3 || passmax < stackAndFailChart.yAxis[0].getExtremes().max * 0.5) {
+        stackAndFailChart.yAxis[0].setExtremes(0, passmax * 1.5);
+    }
+
+    showEachSpot();
+    showEachSpot1();
+    showEachSpot2();
+
+}
+
+var stackAndFailChart = null;
+var FailChart = null;

+ 32 - 0
js/resize.js

@@ -0,0 +1,32 @@
+
+window.onresize = resizeAll;
+
+function resizeAll() {
+
+    $('[style-height="10"]').each(function(one,items){$(items).height(window.innerHeight * 0.2)});
+    $('[style-height="20"]').each(function(one,items){$(items).height(window.innerHeight * 0.2)});
+    $('[style-height="30"]').each(function(one,items){$(items).height(window.innerHeight * 0.3)});
+    $('[style-height="40"]').each(function(one,items){$(items).height(window.innerHeight * 0.4)});
+    $('[style-height="50"]').each(function(one,items){$(items).height(window.innerHeight * 0.5)});
+    $('[style-height="60"]').each(function(one,items){$(items).height(window.innerHeight * 0.6)});
+    $('[style-height="70"]').each(function(one,items){$(items).height(window.innerHeight * 0.7)});
+    $('[style-height="80"]').each(function(one,items){$(items).height(window.innerHeight * 0.8)});
+    $('[style-height="90"]').each(function(one,items){$(items).height(window.innerHeight * 0.9)});
+    $('[style-height="100"]').each(function(one,items){$(items).height(window.innerHeight)});
+    $('[style-height="30-r"]').each(function(one,items){$(items).height(window.innerHeight * 0.3)});
+
+    $(".graphsize").each(function(a,grp){
+        let graph = $(grp);
+        graph.width(window.innerWidth - 35);
+        graph.height(window.innerHeight *0.2);
+        if (graph.highcharts !== undefined) {
+            graph.highcharts().reflow();
+        }
+    })
+}
+
+var resizeTimer = setInterval(function () {
+    resizeAll();
+}, 5000);
+
+resizeAll();

+ 99 - 549
lazhang.html

@@ -1,5 +1,4 @@
-<!DOCTYPE html>
-<html>
+<html>
 <head>
     <meta charset="UTF-8">
     <meta http-equiv="X-UA-Compatible" content="IE=Edge">
@@ -43,42 +42,43 @@
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <style>
         /* css 代码  */
+        th, td{
+            color:white;
+        }
     </style>
     <script src="https://img.hcharts.cn/highcharts/highcharts.js"></script>
     <script src="https://img.hcharts.cn/highcharts/modules/exporting.js"></script>
     <script src="https://img.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
     <script src="https://img.hcharts.cn/highcharts/themes/dark-unica.js"></script>
     <script language="JavaScript">
-        function startTime()
-        {
-            var today=new Date();//定义日期对象
+        function startTime() {
+            var today = new Date();//定义日期对象
             var yyyy = today.getFullYear();//通过日期对象的getFullYear()方法返回年
-            var MM = today.getMonth()+1;//通过日期对象的getMonth()方法返回年
+            var MM = today.getMonth() + 1;//通过日期对象的getMonth()方法返回年
             var dd = today.getDate();//通过日期对象的getDate()方法返回年
-            var hh=today.getHours();//通过日期对象的getHours方法返回小时
-            var mm=today.getMinutes();//通过日期对象的getMinutes方法返回分钟
-            var ss=today.getSeconds();//通过日期对象的getSeconds方法返回秒
+            var hh = today.getHours();//通过日期对象的getHours方法返回小时
+            var mm = today.getMinutes();//通过日期对象的getMinutes方法返回分钟
+            var ss = today.getSeconds();//通过日期对象的getSeconds方法返回秒
             // 如果分钟或小时的值小于10,则在其值前加0,比如如果时间是下午3点20分9秒的话,则显示15:20:09
-            MM=checkTime(MM);
-            dd=checkTime(dd);
-            mm=checkTime(mm);
-            ss=checkTime(ss);
+            MM = checkTime(MM);
+            dd = checkTime(dd);
+            mm = checkTime(mm);
+            ss = checkTime(ss);
             var day; //用于保存星期(getDay()方法得到星期编号)
-            if(today.getDay()==0)   day   =   "星期日 "
-            if(today.getDay()==1)   day   =   "星期一 "
-            if(today.getDay()==2)   day   =   "星期二 "
-            if(today.getDay()==3)   day   =   "星期三 "
-            if(today.getDay()==4)   day   =   "星期四 "
-            if(today.getDay()==5)   day   =   "星期五 "
-            if(today.getDay()==6)   day   =   "星期六 "
-            document.getElementById('nowDateTimeSpan').innerHTML=yyyy+"-"+MM +"-"+ dd +" " + hh+":"+mm+":"+ss+"   " + day;
-            setTimeout('startTime()',1000);//每一秒中重新加载startTime()方法
+            if (today.getDay() == 0) day = "星期日 "
+            if (today.getDay() == 1) day = "星期一 "
+            if (today.getDay() == 2) day = "星期二 "
+            if (today.getDay() == 3) day = "星期三 "
+            if (today.getDay() == 4) day = "星期四 "
+            if (today.getDay() == 5) day = "星期五 "
+            if (today.getDay() == 6) day = "星期六 "
+            document.getElementById('nowDateTimeSpan').innerHTML = yyyy + "-" + MM + "-" + dd + " " + hh + ":" + mm + ":" + ss + "   " + day;
+            setTimeout('startTime()', 1000);//每一秒中重新加载startTime()方法
         }
 
-        function checkTime(i)
-        {
-            if (i<10){
-                i="0" + i;
+        function checkTime(i) {
+            if (i < 10) {
+                i = "0" + i;
             }
             return i;
         }
@@ -91,542 +91,92 @@
         <div class="navbar-header">
             <a class="navbar-brand" href="index.html">工厂产能监控系统</a>
         </div>
-        <div style="color: #ffffff"><img src="images/logo.jpg" style="width: 10%"> 深圳市度彼电子有限公司——</div>
+        <div style="color:#fff" class="text-center"><img src="images/logo.jpg" style="width: 10%;"> 深圳市度彼电子有限公司</div>
         <font color="#ffffff"><span id="nowDateTimeSpan"></span></font>
     </div>
 
 </nav>
-<section style="margin-top: 100px;color: #ffffff" style-height="20">
-    <div style="width: 38%;float: left">
-        <div class="text-center">本拉产能统计</div>
-        <table class="table table-bordered text-center" style="color: #ffffff">
-            <thead>
-            <tr>
-                <th scope="col">时间</th>
-                <th scope="col">良品数</th>
-                <th scope="col">不良品数</th>
-                <th scope="col">堆积数</th>
-                <th scope="col">不良率</th>
-            </tr>
-            </thead>
-            <tbody id="rank-one">
-
-            </tbody>
-        </table>
+<div class="container">
+    <div style="margin-top: 100px;" style-height="20" class="text-white row">
+        <div class="col-md-4">
+            <div class="text-center">本拉产能统计</div>
+            <table class="table table-bordered text-center" style="color: #ffffff">
+                <thead>
+                <tr>
+                    <th scope="col">时间</th>
+                    <th scope="col">良品数</th>
+                    <th scope="col">不良品数</th>
+                    <th scope="col">堆积数</th>
+                    <th scope="col">不良率</th>
+                </tr>
+                </thead>
+                <tbody id="rank-one">
+
+                </tbody>
+            </table>
+        </div>
+        <div class="col-md-8 text-white">
+            <div class="text-center row">本厂今日生产能手榜</div>
+            <div class="row">
+                <div class="row-md-6">
+                    <table class="table table-bordered text-center table-striped">
+                        <thead>
+                        <tr>
+                            <th scope="col" colspan="4">红榜</th>
+
+                        </tr>
+                        <tr>
+                            <th>人员</th>
+                            <th>良品数</th>
+                            <th>人员</th>
+                            <th>不良率</th>
+
+                        </tr>
+                        </thead>
+                        <tbody id="rank-two">
+                        </tbody>
+                    </table>
+                </div>
+                <div class="row-md-6">
+                    <table class="table table-bordered text-center table-striped">
+                        <thead>
+                        <tr>
+                            <th scope="col" colspan="4">黑榜</th>
+                        </tr>
+                        <tr>
+                            <th>人员</th>
+                            <th>良品数</th>
+                            <th>人员</th>
+                            <th>不良率</th>
+
+                        </tr>
+                        </thead>
+                        <tbody id="rank-three">
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+        </div>
     </div>
-    <div style="width: 60%;float: right">
-        <div class="text-center">本厂今日生产能手榜</div>
-        <table class="table table-bordered text-center" style="color: #ffffff;width: 50%;float: left" >
-            <thead>
-            <tr >
-                <th scope="col" colspan="4">红榜</th>
-
-            </tr>
-            <tr >
-                <th >人员</th>
-                <th >良品数</th>
-                <th >人员</th>
-                <th >不良率</th>
-
-            </tr>
-            </thead>
-            <tbody id="rank-two">
-            <tr>
-                <th scope="row">1</th>
-                <td>Mark</td>
-                <td>Otto</td>
-                <td>@mdo</td>
 
-            </tr>
-            <tr>
-                <th scope="row">2</th>
-                <td>Jacob</td>
-                <td>Thornton</td>
-                <td>@fat</td>
-            </tr>
-            <tr>
-                <th scope="row">2</th>
-                <td>Jacob</td>
-                <td>Thornton</td>
-                <td>@fat</td>
-            </tr>
-            <tr>
-                <th scope="row">3</th>
-                <td>Larry</td>
-                <td>the Bird</td>
-                <td>@twitter</td>
-            </tr>
-            </tbody>
-        </table>
-        <table class="table table-bordered text-center" style="color: #ffffff;width: 50%;float: right" >
-            <thead>
-            <tr >
-                <th scope="col" colspan="4">黑榜</th>
-            </tr>
-            <tr >
-                <th >人员</th>
-                <th >良品数</th>
-                <th >人员</th>
-                <th >不良率</th>
-
-            </tr>
-            </thead>
-            <tbody id="rank-three">
-            <tr>
-                <th scope="row">1</th>
-                <td>Mark</td>
-                <td>Otto</td>
-                <td>@mdo</td>
-
-            </tr>
-            <tr>
-                <th scope="row">2</th>
-                <td>Jacob</td>
-                <td>Thornton</td>
-                <td>@fat</td>
-            </tr>
-            <tr>
-                <th scope="row">2</th>
-                <td>Jacob</td>
-                <td>Thornton</td>
-                <td>@fat</td>
-            </tr>
-            <tr>
-                <th scope="row">3</th>
-                <td>Larry</td>
-                <td>the Bird</td>
-                <td>@twitter</td>
-            </tr>
-            </tbody>
-        </table>
+    <div class="row" style-height="50">
+        <div class="row col-md-12 ">
+            <div id="graph-1" class="chartsize col-md-12" style-height="30"></div>
+        </div>
+        <div class="row col-md-12 ">
+            <div id="graph-2" class="chartsize col-md-12" style-height="30"></div>
+        </div>
     </div>
-</section>
-
 
-
-
-<div class="row" style-height="50-8">
-    <div id="graph-1"></div>
-    <div class="row " style="height: 10em"></div>
-    <div class="row" style-height="">
-        <div id="graph-2"></div>
-    </div>
 </div>
 
 
-<!-- Jquery Core Js -->
-<script src="plugins/jquery/jquery.min.js"></script>
-
-<!-- Bootstrap Core Js -->
-<script src="plugins/bootstrap/js/bootstrap.js"></script>
-
-<!-- Select Plugin Js -->
-<script src="plugins/bootstrap-select/js/bootstrap-select.js"></script>
-
-<!-- Slimscroll Plugin Js -->
-<script src="plugins/jquery-slimscroll/jquery.slimscroll.js"></script>
-
-<!-- Waves Effect Plugin Js -->
-<script src="plugins/node-waves/waves.js"></script>
-
-<!-- Jquery CountTo Plugin Js -->
-<script src="plugins/jquery-countto/jquery.countTo.js"></script>
-
-<!-- Morris Plugin Js -->
-<script src="plugins/raphael/raphael.min.js"></script>
-<script src="plugins/morrisjs/morris.js"></script>
-
-<!-- ChartJs -->
-<script src="plugins/chartjs/Chart.bundle.js"></script>
-
-<!-- Flot Charts Plugin Js -->
-<script src="plugins/flot-charts/jquery.flot.js"></script>
-<script src="plugins/flot-charts/jquery.flot.resize.js"></script>
-<script src="plugins/flot-charts/jquery.flot.pie.js"></script>
-<script src="plugins/flot-charts/jquery.flot.categories.js"></script>
-<script src="plugins/flot-charts/jquery.flot.time.js"></script>
-
-<!-- Sparkline Chart Plugin Js -->
-<script src="plugins/jquery-sparkline/jquery.sparkline.js"></script>
-
-<!-- Custom Js -->
-<script src="js/admin.js"></script>
-<!--<script src="js/pages/index.js"></script>-->
-
 <!-- Demo Js -->
-<script src="js/demo.js"></script>
 <script src="js/basic.js"></script>
 <script src="js/getparam.js"></script>
-
-<script>
-    var timeday=["今日" ,"昨日" ,"本周" ,"本月"];
-    function getSpotHtml(htmlbody,  i) {
-        htmlbody += "<tr>";
-        htmlbody += `<tr>
-                                            <td>${timeday[i]}</td>
-                                            <td>${hispass[i]}</td>
-                                            <td>${hisfail[i]}</td>
-                                            <td>${hisstack[i]}</td>
-                                            <td>${hisrate[i]+'%'}</td>
-                                        </tr>`;
-        htmlbody += "</tr>";
-        return htmlbody;
-    }
-    function getSpotHtml1(htmlbody,  i) {
-        htmlbody += "<tr>";
-        htmlbody += `<tr>
-                                            <td>${goodid[i]}</td>
-                                            <td>${goodpass[i]}</td>
-                                            <td>${goodid[i]}</td>
-                                            <td>${goodfailrate[i]+'%'}</td>
-                                        </tr>`;
-        htmlbody += "</tr>";
-        return htmlbody;
-    }
-    function getSpotHtml2(htmlbody,  i) {
-        htmlbody += "<tr>";
-        htmlbody += `<tr>
-                                            <td>${badid[i]}</td>
-                                            <td>${badpass[i]}</td>
-                                            <td>${badid[i]}</td>
-                                            <td>${badfailrate[i]+'%'}</td>
-                                        </tr>`;
-        htmlbody += "</tr>";
-        return htmlbody;
-    }
-
-
-    function showEachSpot() {
-        var htmlbody = "", one_person = "";
-        var i = 0;
-        var triGap = 4;
-
-        htmlbody = "";
-        for (i = 0; i < triGap; i++) {
-
-            htmlbody = getSpotHtml(htmlbody, i);
-        }
-        $("#rank-one").html(htmlbody);
-        //console.log(htmlbody);
-    }
-    function showEachSpot1() {
-        var htmlbody = "", one_person = "";
-        var i = 0;
-        var triGap = 3;
-
-        htmlbody = "";
-        for (i = 0; i < triGap; i++) {
-
-            htmlbody = getSpotHtml1(htmlbody, i);
-        }
-        $("#rank-two").html(htmlbody);
-        //console.log(htmlbody);
-    }
-    function showEachSpot2() {
-        var htmlbody = "", one_person = "";
-        var i = 0;
-        var triGap = 3;
-
-        htmlbody = "";
-        for (i = 0; i < triGap; i++) {
-
-            htmlbody = getSpotHtml2(htmlbody, i);
-        }
-        $("#rank-three").html(htmlbody);
-        //console.log(htmlbody);
-    }
-
-
-    function showChart() {
-
-        var data = [];
-        var ratedata = [];
-        var stackmax = 0;
-        var failmax = 0;
-        var passdata=[];
-        var faildata=[];
-        var passmax=0;
-
-        for (i = 0; i < passNumber.length; i++) {
-            if (stackmax < stackeverynum[i]) {
-                stackmax = stackeverynum[i];
-            }
-            if (failmax < failrate[i]) {
-                failmax = failrate[i];
-            }
-            if(passmax<passNumber[i]){
-                passmax=passNumber[i];
-            }
-            data.push(stackeverynum[i]);
-            ratedata.push(Math.floor(failrate[i]));
-            passdata.push(passNumber[i]);
-            faildata.push(failNumber[i])
-        }
-
-        showEachSpot();
-        showEachSpot1();
-        showEachSpot2();
-
-
-        stackmax = Math.max(stackmax, 5);
-        failmax = Math.max(failmax, 5);
-
-        stackAndFailChart = Highcharts.chart('graph-1', {
-            chart: {
-                zoomType: 'xy',
-                //height: (4 / 16 * 100) + '%' // 16:9 ratio
-            },
-            title: {
-                text: '各工位今日产能'
-            },
-            credits: {
-                enabled: false // 禁用版权信息
-            },
-            exporting: {
-                enabled: false
-            },
-            xAxis: [{
-                categories: namedata,
-                crosshair: true,
-                title: {
-                    text: '员工',
-                    style: {
-                        fontSize: '1.5em'
-                    }
-                },
-                labels: {
-                    style: {
-                        fontSize: '1.5em'
-                    }
-                }
-            }],
-            yAxis: [{ // Primary yAxis
-                labels: {
-                    format: '{value}',
-                    style: {
-                        color: Highcharts.getOptions().colors[0],
-                        fontSize: '1.5em'
-                    }
-                },
-                min: 0,
-                max: passmax*1.5,
-                title: {
-
-                    style: {
-                        color: Highcharts.getOptions().colors[0],
-                        fontSize: '1em'
-                    }
-                }
-            },
-             ],
-            tooltip: {
-                shared: true
-            },
-            legend: {
-                layout: 'vertical',
-                align: 'right',
-                x: -100,
-                verticalAlign: 'top',
-                y: 0,
-                floating: true,
-                backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
-            },
-            series: [{
-                name: '良品数',
-                type: 'column',
-                data: passdata,
-
-            }, {
-                name: '不良品数',
-                type: 'column',
-                data: faildata,
-
-            },
-                {
-                    name: '堆积数',
-                    type: 'column',
-                    data: data,
-
-                },]
-        });
-        FailChart = Highcharts.chart('graph-2', {
-            chart: {
-                //height: (4 / 16 * 100) + '%' // 16:9 ratio
-            },
-            title: {
-                text: '各工位今日不良率'
-            },
-            credits: {
-                enabled: false // 禁用版权信息
-            },
-            exporting: {
-                enabled: false
-            },
-            xAxis: [{
-                categories: namedata,
-                crosshair: true,
-                title: {
-                    text: '员工',
-                    style: {
-                        fontSize: '1.5em'
-                    }
-                },
-                labels: {
-                    style: {
-                        fontSize: '1.5em'
-                    }
-                }
-            }],
-            yAxis: [ { // Secondary yAxis
-                title: {
-                    text: '不良率',
-                    style: {
-                        color: 'red',
-                        fontSize: '1em'
-                    }
-                },
-                min: 0,
-                max: 1.5 * failmax,
-                labels: {
-                    formatter: function () {
-                        return Math.floor(this.value) + "%";
-                    },
-                    style: {
-                        color: 'red',
-                        fontSize: '20px'
-                    }
-                },
-
-            }],
-            tooltip: {
-                shared: true
-            },
-           legend: {
-                layout: 'vertical',
-                align: 'right',
-                x: -120,
-                verticalAlign: 'top',
-                y: 0,
-                floating: true,
-                backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
-            },
-            series: [{
-                name: '不良率',
-                type: 'spline',
-                data: ratedata,
-                color: 'red',
-                tooltip: {
-                    valueSuffix: '%'
-                }
-            }]
-        });
-
-    }
-
-    function updateChart() {
-        var data = [];
-        var ratedata = [];
-        var stackmax = 0;
-        var failmax = 0;
-        var passdata=[];
-        var faildata=[];
-        var passmax=0;
-        for (i = 0; i < passNumber.length; i++) {
-            if (stackmax < stackeverynum[i]) {
-                stackmax = stackeverynum[i];
-            }
-            if (failmax < failrate[i]) {
-                failmax = failrate[i];
-            }
-            if(passmax<passNumber[i]){
-                passmax=passNumber[i];
-            }
-            data.push(stackeverynum[i]);
-            ratedata.push(Math.floor(failrate[i]));
-            passdata.push(passNumber[i]);
-            faildata.push(failNumber[i])
-        }
-
-        stackmax = Math.max(stackmax, 5);
-        failmax = Math.max(failmax, 5);
-        // https://api.hcharts.cn/highcharts#Series.addPoint;
-        stackAndFailChart.series[0].setData(passdata);
-        stackAndFailChart.series[1].setData(faildata);
-        stackAndFailChart.series[2].setData(data);
-        FailChart.series[0].setData(ratedata);
-        if(failmax > FailChart.yAxis[0].getExtremes().max * 1.3 || failmax < FailChart.yAxis[0].getExtremes().max * 0.5) {
-            FailChart.yAxis[0].setExtremes(0, failmax*1.5);
-        }
-        if(passmax>stackAndFailChart.yAxis[0].getExtremes().max*1.3 || passmax<stackAndFailChart.yAxis[0].getExtremes().max*0.5) {
-            stackAndFailChart.yAxis[0].setExtremes(0, passmax*1.5);
-        }
-
-
-         showEachSpot();
-        showEachSpot1();
-        showEachSpot2();
-
-    }
-
-    var stackAndFailChart = null;
-   var FailChart = null;
-
-    $(document).ready(on_document_load);
-
-    window.onresize = resizeAll;
-
-    function resizeAll() {
-        $('[style-height="10"]').height(window.innerHeight / 10);
-        $('[style-height="20"]').each(function(one,items){$(items).height(window.innerHeight / 5)});
-        $('[style-height="30"]').each(function(one,items){$(items).height(window.innerHeight * 0.4)});
-        $('[style-height="40"]').height(window.innerHeight *0.4);
-        $('[style-height="30-8"]').height(window.innerHeight * 0.4 - 220);
-        $('[style-height="30-1"]').each(function(one,items){$(items).height(window.innerHeight * 0.3)});
-        $('[style-height="30-2"]').each(function(one,items){$(items).height(window.innerHeight * 0.2)});
-
-        $('[style-height="50-8"]').each(function(one,items){$(items).height(window.innerHeight * 0.5)});
-        var graph = $("#graph-1");
-        graph.width(window.innerWidth - 35);
-        graph.height(window.innerHeight *0.2);
-        if (graph.highcharts !== undefined) {
-            graph.highcharts().reflow();
-        }
-        var graph = $("#graph-2");
-        graph.width(window.innerWidth - 35);
-        graph.height(window.innerHeight *0.2);
-        if (graph.highcharts !== undefined) {
-            graph.highcharts().reflow();
-        }
-    }
-
-    setInterval(function () {
-        resizeAll();
-    }, 5000);
-
-    resizeAll();
-
-    //startClock();
-
-</script>
+<script src="js/resize.js"></script>
+<script src="js/lazhang-data.js"></script>
+<script src="js/lazhang-display.js"></script>
 </body>
 
-</html>
-
-
-<!---
-###  SVR_BASE 类似 "http://127.0.0.1:8803"  实际上线之后是确定值,写死在HTML里的JS里面
-
-
-###  各个拉实时产量数据接口地址
-SVR_BASE + "/server/fcWorkRaw/allFlows"
-
-###  单个拉内,所有工位实时产量数据接口地址   e.g. 拉线ID = 2
-SVR_BASE + "/server/fcWorkRaw/allSpots" + "?" + "flowId=2"
-
-
-###  员工上班记录API     e.g. 拉线ID = 2    工位顺序 = 1    员工ID = 33404
-SVR_BASE + "/server/fcWorkStartend/goOnline" + "?" + "flowId=2&sequence=1&workerId=33404"
-
-### 查询已上班员工    e.g. 拉线ID = 2
-SVR_BASE + "/server/fcWorkRaw/getAll" + "?" + "flowId=2"
--->
+</html>

+ 1 - 1
plugins/sweetalert/sweetalert-dev.js

@@ -1183,7 +1183,7 @@ var setParameters = function setParameters(params) {
   }
 
   /*
-   * Timer
+   * Queue
    */
   modal.setAttribute('data-timer', params.timer);
 };