chenjun 2 年之前
父节点
当前提交
91acf1fe78
共有 1 个文件被更改,包括 10 次插入3 次删除
  1. 10 3
      src/views/baggageManagement/components/departure/index.vue

+ 10 - 3
src/views/baggageManagement/components/departure/index.vue

@@ -322,7 +322,8 @@ export default {
         StandForDepartrue:[],
         DepartureBuild:[]
       },
-      loopEvent:null
+      loopEvent:null,
+      leaveCount:0,
 
     }
   },
@@ -351,9 +352,11 @@ export default {
       }
     },
     tableRowClassName({ row, rowIndex }) {
-      if (rowIndex < 5) {
+      if (rowIndex < this.leaveCount) {
         return 'bgl-hui'
       }
+      console.log(document.getElementsByClassName("bgl-hui")[this.leaveCount-1])
+      // document.getElementsByClassName("bgl-hui")[this.leaveCount-1].classList.add("redBorder")
     },
     tableCellClassName({ row, column }) {
       if (
@@ -393,7 +396,11 @@ export default {
       }
     },
     initTableData(tableData) {
+      this.leaveCount = 0;
       tableData.forEach(item => {
+        if(item.hasTakenOff == 1){
+          this.leaveCount++
+        }
         item['waitfanj'] = item['noCheckInNumber'] - item['unLoad']
       })
       this.tableData = this._.sortBy(tableData, ['FlightDate', 'PlanDepartureTime'])
@@ -492,7 +499,7 @@ export default {
         td {
           background: #d2d6df;
         }
-        &:nth-child(5) {
+        &.redBorder {
           position: relative;
           &::after {
             content: '';