소스 검색

Change stuff and realtime JS made

Guichuan Yu 6 년 전
부모
커밋
20130a02ab
3개의 변경된 파일49개의 추가작업 그리고 58개의 파일을 삭제
  1. 1 34
      dapingmu.html
  2. 12 11
      js/basic.js
  3. 36 13
      lazhang.html

+ 1 - 34
dapingmu.html

@@ -91,41 +91,8 @@
             </div>
         </nav>
         <!-- #END# CPU Usage -->
-        <div class="row clearfix" style="height: 13%">
-                <!-- Visitors -->
-                <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
-                    <div class="card" style="margin-bottom: 0.2em">
-                        <div class="body bg-pink">
-                            <div class="row text-center" style="font-size: 2em">
-                                <div class="col-3"></div>
-                                <div class="col-3">全场产能:</div>
-                                <div class="col-3">122555</div>
-                                <div class="col-3"></div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-                <!-- #END# Visitors -->
-                <!-- Latest Social Trends -->
-                <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
-                    <div class="card" style="margin-bottom: 0.2em">
-                        <div class="body bg-cyan text-center">
-                            <div class="row text-center" style="font-size: 2em">
-                                <div class="col-3"></div>
-                                <div class="col-3">全厂坏品数:</div>
-                                <div class="col-3">15555</div>
-                                <div class="col-3"></div>
-                            </div>
-
-                        </div>
-                    </div>
-                </div>
-                <!-- #END# Latest Social Trends -->
-                <!-- Answered Tickets -->
 
-                <!-- #END# Answered Tickets -->
-            </div>
-        <section >
+        <section style="margin-top: 5em" >
             <div id="graph-1" ></div>
             <div class="row" style="height: 6em"></div>
             <div id="graph-2" ></div>

+ 12 - 11
js/basic.js

@@ -114,23 +114,24 @@ function first_success(obj, sta) {
 }
 function second_success(obj, sta) {
     var history = first_parse(this, obj);
-    var i,j;
-    for(i=0;i<history.length;i++){
-        if(history[t].flowId==thisPageFlow){
-            hispass[t]=history[t].flowPass;
-            hisfail[t]=history[t].flowFail;
-            hisstack[t]=0;
+    var i, j;
+    for (i = 0; i < history.length; i++) {
+        if (history[i].flowId == thisPageFlow) {
+            hispass[t] = history[t].flowPass;
+            hisfail[t] = history[t].flowFail;
+            hisstack[t] = 0;
 
 
             if (hispass[t] + hisfail[t] == 0) {
-                    hisrate[t] = 0;
-                }
-                else {
-                    hisrate[t] = hisfail[i] / (hispass[i] + hisfail[i]) * 100;
-                }
+                hisrate[t] = 0;
+            }
+            else {
+                hisrate[t] = hisfail[i] / (hispass[i] + hisfail[i]) * 100;
+            }
 
 
             t++;
+        }
     }
 }
 

+ 36 - 13
lazhang.html

@@ -297,18 +297,39 @@
         <table class="table table-bordered text-center" style="color: #ffffff">
             <thead>
             <tr>
-                <th scope="col">#</th>
-                <th scope="col">First</th>
-                <th scope="col">Last</th>
-                <th scope="col">Handle</th>
+                <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 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>
+            </thead>
+            <tbody>
             <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>
@@ -324,16 +345,10 @@
             </tr>
             </tbody>
         </table>
-    </div>
-    <div style="width: 60%;float: right">
-        <div class="text-center">本厂今日生产能手榜</div>
-        <table class="table table-bordered text-center" style="color: #ffffff">
+        <table class="table table-bordered text-center" style="color: #ffffff;width: 50%;float: right" >
             <thead>
             <tr >
-
-                <th scope="col" colspan="2">First</th>
-
-                <th scope="col" colspan="2">Handle</th>
+                <th scope="col" colspan="4">黑榜</th>
             </tr>
             </thead>
             <tbody>
@@ -342,6 +357,13 @@
                 <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>
@@ -514,7 +536,7 @@
               </div>
           </div> -->
 <section>
-
+    <div class="row " style="height: 10em"></div>
 <div class="row" style-height="50-8">
     <div id="graph-1"></div>
 </div>
@@ -575,6 +597,7 @@
                                             <td>${timeday[i]}</td>
                                             <td>${hispass[i]}</td>
                                             <td>${hisfail[i]}</td>
+                                            <td>${hisstack[i]}</td>
                                             <td>${hisrate[i]}</td>
                                         </tr>`;
         htmlbody += "</tr>";