|
|
@@ -684,15 +684,22 @@ |
|
|
|
...res.zkMessage, |
|
|
|
} |
|
|
|
} |
|
|
|
let [max1, max2] = [this.weekObj.level1List[0].total||1, this.weekObj.level2List[0].total||1] |
|
|
|
|
|
|
|
this.weekObj.level1List.forEach(item => { |
|
|
|
item.percent = Math.floor((item.total/max1)*100) |
|
|
|
}) |
|
|
|
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) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
this.weekObj.level2List.forEach(item => { |
|
|
|
item.percent = Math.floor((item.total/max2)*100) |
|
|
|
}) |
|
|
|
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) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.weekObj.createTimeName = this.getTimeLines(this.weekObj.weekDate, 1) |
|
|
|
console.log(this.weekObj, 'this.weekObj') |
|
|
|