Browse Source

修改周报

newStyle
douzhuo 2 years ago
parent
commit
53e63b2923
1 changed files with 14 additions and 1 deletions
  1. +14
    -1
      src/views/reportExcel/weekReport.vue

+ 14
- 1
src/views/reportExcel/weekReport.vue View File

@@ -200,7 +200,7 @@
class="middles-progress" class="middles-progress"
:show-text="false" :show-text="false"
stroke-width="16" stroke-width="16"
:percentage="percent.value"
:percentage="percent.values"
:color="$options.filters.setColor(index)" :color="$options.filters.setColor(index)"
></el-progress> ></el-progress>
</div> </div>
@@ -525,6 +525,7 @@ export default {
this.needList.forEach((item) => { this.needList.forEach((item) => {
if (this.weekObj[item + "List"]) { if (this.weekObj[item + "List"]) {
this.bubbleSort(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() { initEcharts() {
// 基本柱状图 // 基本柱状图
const option = { const option = {


Loading…
Cancel
Save