Browse Source

redrankvue change

jason.lu 6 years ago
parent
commit
e90a3c520a
2 changed files with 4 additions and 1 deletions
  1. 3 1
      dapingmu.html
  2. 1 0
      js/newRedrankvue.js

+ 3 - 1
dapingmu.html

@@ -124,6 +124,7 @@
                     <table class="table table-bordered text-center table-striped">
                         <thead>
                         <tr>
+                            <th>名次</th>
                             <th @click="useId">人员</th>
                             <th @click="usePass">良品</th>
                             <th @click="useFail">坏品</th>
@@ -132,7 +133,8 @@
                         </tr>
                         </thead>
                         <tbody class="table-rank-0">
-                        <tr v-for="one in parto">
+                        <tr v-for="one in parto" v-bind:class="{'red-bar' : one.isRed, 'green-bar': one.isGreen}">
+                            <td>{{one.seq+1}}</td>
                             <td>{{one.workerName}}</td>
                             <td>{{one.passNum}}</td>
                             <td>{{one.failNum}}</td>

+ 1 - 0
js/newRedrankvue.js

@@ -47,6 +47,7 @@ RedRankTable.showPart = function(slide, part, data){
         if(data.len() - partList[partList.length - 1].seq <= this.markerLen && partList[partList.length - 1].workerId > 0) {
             partList[partList.length - 1].isRed = true;
         }
+
         if(i <= this.markerLen && partList[partList.length - 1].workerId > 0) {
             partList[partList.length - 1].isRed = false;
             partList[partList.length - 1].isGreen = true;