|
|
@@ -712,31 +712,32 @@ |
|
|
|
...res.zkMessage, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (this.weekObj.level1List[0] && this.weekObj.level1List[0].total) { |
|
|
|
let max1 = this.weekObj.level1List[0].total || 1 |
|
|
|
this.weekObj.level1List.forEach(item => { |
|
|
|
item.percent = Math.floor((item.total / max1) * 100) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.weekObj.level1List.forEach(item => { |
|
|
|
item.percent = 0 |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
if (this.weekObj.level2List[0] && this.weekObj.level2List[0].total) { |
|
|
|
let max2 = this.weekObj.level2List[0].total || 1 |
|
|
|
|
|
|
|
this.weekObj.level2List.forEach(item => { |
|
|
|
item.percent = Math.floor((item.total / max2) * 100) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.weekObj.level2List.forEach(item => { |
|
|
|
item.percent = 0 |
|
|
|
}) |
|
|
|
|
|
|
|
if (this.weekObj.level1List && this.weekObj.level2List) { |
|
|
|
if (this.weekObj.level1List[0] && this.weekObj.level1List[0].total) { |
|
|
|
let max1 = this.weekObj.level1List[0].total || 1 |
|
|
|
this.weekObj.level1List.forEach(item => { |
|
|
|
item.percent = Math.floor((item.total / max1) * 100) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.weekObj.level1List.forEach(item => { |
|
|
|
item.percent = 0 |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
if (this.weekObj.level2List[0] && this.weekObj.level2List[0].total) { |
|
|
|
let max2 = this.weekObj.level2List[0].total || 1 |
|
|
|
|
|
|
|
this.weekObj.level2List.forEach(item => { |
|
|
|
item.percent = Math.floor((item.total / max2) * 100) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.weekObj.level2List.forEach(item => { |
|
|
|
item.percent = 0 |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.weekObj.createTimeName = this.getTimeLines(this.weekObj.weekDate, 1) |
|
|
|
console.log(this.weekObj, 'this.weekObj') |
|
|
|
this.projectName = res.projectName |
|
|
|