filter和map的使用

  if (
      this.dataAggridvue.filter(
        item =>
          item.Accepted == true && item.InvoiceGroupCode !== InvoiceGroupCode
      ).length > 0
    ) {
      this.dataAggridvue.map(function (obj, index) {
        if (obj.InvoiceGroupCode === InvoiceGroupCode) {
          obj.Accepted = true;
        } else {
          obj.Accepted = false;
        }
      });

  

posted @ 2019-06-19 19:43  龙旋风  阅读(957)  评论(3)    收藏  举报