riku
2026-03-05 9465dc404f7e7cd56100e4859ee0946a3fef7b09
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import fetchSubtask from '../../pSupervisionSummary/fetchSubtask';
 
Component({
  behaviors: [fetchSubtask],
  properties: {},
  data: {
    latestSubtask: undefined,
  },
  methods: {
    _onFetchDone() {
      const { subtasks } = this.data;
      if (subtasks.length > 0) {
        //筛选首个未完成整改的记录,作为提醒展示
        for (let i = 0; i < subtasks.length; i++) {
          const s = subtasks[i];
          if (s.proCheckedNum > s.changeNum) {
            this.setData({ latestSubtask: s });
            break;
          }
        }
      }
    },
 
    goto() {
      wx.navigateTo({
        url: '/pages/mExtra/pSupervisionSummary/index',
      });
    },
  },
});