数组是否包含 遍历 数组

  var boolA = this.selectLots.some(
        (item) => item == this.AObj.slotGroupName
      );
      var boolB = this.selectLots.some(
        (item) => item == this.BObj.slotGroupName
      );

      if (boolA) {
        for (let index = 0; index < this.listA.length; index++) {
          if (listA[index].carNo && !listA[index].oil) {
            this.listA[index].oil = obj.oil;
            this.listA[index].planDetailId = obj.planDetailId;
          }
        }
      }

 

posted @ 2024-09-12 11:33  ThisCall  阅读(5)  评论(0编辑  收藏  举报