Bladeren bron

修改周报

newStyle
douzhuo 2 jaren geleden
bovenliggende
commit
53e63b2923
1 gewijzigde bestanden met toevoegingen van 14 en 1 verwijderingen
  1. +14
    -1
      src/views/reportExcel/weekReport.vue

+ 14
- 1
src/views/reportExcel/weekReport.vue Bestand weergeven

@@ -200,7 +200,7 @@
class="middles-progress"
:show-text="false"
stroke-width="16"
:percentage="percent.value"
:percentage="percent.values"
:color="$options.filters.setColor(index)"
></el-progress>
</div>
@@ -525,6 +525,7 @@ export default {
this.needList.forEach((item) => {
if (this.weekObj[item + "List"]) {
this.bubbleSort(this.weekObj[item + "List"]);
this.weekObj[item + 'List'] = this.dealData(this.weekObj[item + 'List'])
}
});

@@ -570,6 +571,18 @@ export default {
}
},

// 定义一个公共方法对数据进行处理
dealData(arr) {
// 获取最大值
let num = Math.max.apply(Math, arr.map((o) => {
return o.value
}))
arr.map(item => {
item.values = Math.floor(item.value / num * 100)
})
return arr

},
initEcharts() {
// 基本柱状图
const option = {


Laden…
Annuleren
Opslaan