This commit is contained in:
熊成强 2020-11-17 16:35:20 +08:00
parent 3de4e8600b
commit eb7af8c9f1
2 changed files with 40 additions and 23 deletions

View File

@ -124,8 +124,8 @@ export default {
watch: { watch: {
showDialogDepart (newV, oldV) { showDialogDepart (newV, oldV) {
if (!newV && oldV) { if (!newV && oldV) {
this.selectDepName = this.showData.list[0].departmentName this.selectDepName = this.showData.list.length > 0 ? this.showData.list[0].departmentName : '全部'
this.selectDepId = this.showData.list[0].departmentId this.selectDepId = this.showData.list.length > 0 ? this.showData.list[0].departmentId : ''
this.handleDetailReq(this.selectDepId) this.handleDetailReq(this.selectDepId)
} }
} }

View File

@ -49,13 +49,20 @@
<div id="level_chart"></div> <div id="level_chart"></div>
</div> </div>
<div class='num_report'> <div class='num_report'>
<el-table :data="tableData" <el-table
:header-cell-style="{background:'#F5F7FA'}" :header-cell-style="{background:'#F5F7FA'}"
:data="tableData"
border border
> style="width: 100%">
<el-table-column prop="desc" label="绩效等级"> <el-table-column
fixed
sortable
prop="desc"
label="绩效等级">
</el-table-column> </el-table-column>
<el-table-column prop="num" width="140" label="实际分布"> <el-table-column
prop="num"
label="实际分布">
</el-table-column> </el-table-column>
<el-table-column label="操作" width="140"> <el-table-column label="操作" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
@ -134,7 +141,6 @@ export default {
type: 'shadow' type: 'shadow'
}, },
formatter (params) { formatter (params) {
console.log('params: ', params)
for (let x in params) { for (let x in params) {
return '考核部门:' + params[x].axisValueLabel + '<br/>考核人数:' + params[x].value return '考核部门:' + params[x].axisValueLabel + '<br/>考核人数:' + params[x].value
} }
@ -180,6 +186,17 @@ export default {
type: 'shadow' type: 'shadow'
} }
}, },
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
formatter (params) {
for (let x in params) {
return '绩效等级:' + params[x].axisValueLabel + '<br/>实际分布:' + params[x].value
}
}
},
grid: { grid: {
left: '3%', left: '3%',
right: '4%', right: '4%',
@ -405,7 +422,7 @@ export default {
padding-left: 20px; padding-left: 20px;
} }
.num_report { .num_report {
width: 420px; width: 500px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }