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: {
showDialogDepart (newV, oldV) {
if (!newV && oldV) {
this.selectDepName = this.showData.list[0].departmentName
this.selectDepId = this.showData.list[0].departmentId
this.selectDepName = this.showData.list.length > 0 ? this.showData.list[0].departmentName : '全部'
this.selectDepId = this.showData.list.length > 0 ? this.showData.list[0].departmentId : ''
this.handleDetailReq(this.selectDepId)
}
}

View File

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