| | |
| | | const changes = []; |
| | | const xAxisMonth = this.getXAxisMonth(); |
| | | xAxisMonth.forEach(m => { |
| | | problems.push('0'); |
| | | changes.push('0'); |
| | | problems.push(0); |
| | | changes.push(0); |
| | | }); |
| | | this.data.subtaskSummary.forEach(s => { |
| | | const month = dayjs(s.stPlanTime).month() + 1 + '月'; |
| | | const index = xAxisMonth.findIndex(value => { |
| | | return month == value; |
| | | }); |
| | | if (index) { |
| | | problems[index] = s.proNum; |
| | | changes[index] = s.changeNum; |
| | | if (index != -1) { |
| | | problems[index] += s.proNum; |
| | | changes[index] += s.changeNum; |
| | | } |
| | | }); |
| | | const datas = [problems, changes]; |