数据处理2

 // if (i !== data.length - 1 && data[i].patientId !== data[i + 1].patientId) { // 非最后一行
      //   arr.push(obj); // 插入空行
      //   this.Subtotal = 0;
      //   this.Dispensing = 0;
      // } else if (i === data.length - 1) { // 最后一行
      //   arr.push(obj);
      //   this.Subtotal = 0;
      //   this.Dispensing = 0;
      // }
原文地址:https://www.cnblogs.com/web-zxq/p/12792290.html