riku
2022-10-21 0f2fdf16f47bd2d1d8fee86449c3a5095ccc8c23
pages/home/home.js
@@ -212,18 +212,28 @@
    let monthInfo = {
      totalMust: 0,
      finishedMust: 0,
      totalSelf: 0,
      finishedSelf: 0
    }
    subtypes.forEach(s => {
      //月度统计
      if (s.needUpdate) {
        monthInfo.totalMust++
        //统计自巡查类型的台账,类别为-1(暂定)
        if (s.ledgerTypeId == -1) {
          monthInfo.totalSelf++
        }
        if (s.upLoad) {
          monthInfo.finishedMust++
          if (s.ledgerTypeId == -1) {
            monthInfo.finishedSelf++
          }
        }
      }
    });
    monthInfo.percent = Math.round(monthInfo.finishedMust / monthInfo.totalMust * 100)
    monthInfo.percent2 = Math.round(monthInfo.finishedSelf / monthInfo.totalSelf * 100)
    this.setData({monthInfo})
  },