Browse Source

公司日报周报

branch0222
douzhuo 1 year ago
parent
commit
33af5d3a97
1 changed files with 14 additions and 7 deletions
  1. +14
    -7
      pages/reportExcel/weekReport.vue

+ 14
- 7
pages/reportExcel/weekReport.vue View File

@@ -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')


Loading…
Cancel
Save