<template>
|
<div class="PersonnelTalents_unitPersonnel--warp">
|
<div class="PT_unitPersonnel--table">
|
<el-table
|
:max-height="tableHeight"
|
:data="tableData"
|
stripe
|
border
|
style="width: 100%" :span-method="mergeColumnTableCell">
|
<el-table-column
|
prop="jyear"
|
label="年份"
|
fixed="left">
|
</el-table-column>
|
<el-table-column
|
prop="scope"
|
label="范围">
|
</el-table-column>
|
<el-table-column
|
label="总体情况">
|
<el-table-column label="事业单位(家)" prop="publicInstitutions">
|
</el-table-column>
|
<el-table-column label="在职人员(万人)" prop="inJobs">
|
</el-table-column>
|
<el-table-column label="年人均收入(万元)" prop="perIncome">
|
</el-table-column>
|
<el-table-column label="全省排名" prop="incomeRank">
|
</el-table-column>
|
<el-table-column label="年人均收入增速" prop="incomeSpeed">
|
</el-table-column>
|
</el-table-column>
|
<el-table-column label="其中">
|
<el-table-column label="工资性 年人均收入 (万元)" prop="wagesIncome"></el-table-column>
|
<el-table-column label="全省排位" prop="wagesRank"></el-table-column>
|
<el-table-column label="各项奖励性和 改革性补贴年 人均收入 (万元)" prop="subsidyIncome"></el-table-column>
|
<el-table-column label="全省排位" prop="subsidyRank"></el-table-column>
|
</el-table-column>
|
</el-table>
|
</div>
|
<!-- 单选框 -->
|
<div class="PT_unitPersonnel--echart-box">
|
<div class="PT_navEchart--title">
|
<el-radio-group v-model="checkedCategory">
|
<el-radio v-for="(categoryItem,index) in CARE_GORY" :label="categoryItem" :key="index"
|
@change="selectEcharts(index)">{{ categoryItem }}
|
</el-radio>
|
</el-radio-group>
|
</div>
|
<div class="PT_unitPersonnel--Echarts" v-show="echartsShow"></div>
|
</div>
|
<div class="yincang-box">
|
<el-button @click="showEchartsBtn" v-show="echartsShow" type="primary">隐藏</el-button>
|
<el-button @click="showEchartsBtn" v-show="!echartsShow" type="primary">显示</el-button>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
|
import nowSize from "../../../../libs/nowSize";
|
import {getPersonTable, getUnitLine} from '@/api/personnelTalents';
|
|
export default {
|
name: "PersonnelTalents_UnitPersonnel",
|
data() {
|
return {
|
tableData: [
|
// {
|
// nianfen: '2022年',
|
// fanwei: '全市',
|
// shiyedanwei: '5363',
|
// zaizhirenyuan: '16.4',
|
// nianrenjunshouru: '10.54',
|
// quanshengpaiming: '3',
|
// nianrenjunshouruzengsu: '3.02%',
|
// gongzixingnianjunshouru: '6.81',
|
// quanshengpaiming1: '8',
|
// gexiangjianglixing: 3.73,
|
// quanshengpaiming2: '1'
|
// },
|
// {
|
// nianfen: '2022年',
|
// fanwei: '全市',
|
// shiyedanwei: '5363',
|
// zaizhirenyuan: '16.4',
|
// nianrenjunshouru: '10.54',
|
// quanshengpaiming: '3',
|
// nianrenjunshouruzengsu: '3.02%',
|
// gongzixingnianjunshouru: '6.81',
|
// quanshengpaiming1: '8',
|
// gexiangjianglixing: 3.73,
|
// quanshengpaiming2: '1'
|
// },
|
// {
|
// nianfen: '2022年',
|
// fanwei: '全市',
|
// shiyedanwei: '5363',
|
// zaizhirenyuan: '16.4',
|
// nianrenjunshouru: '10.54',
|
// quanshengpaiming: '3',
|
// nianrenjunshouruzengsu: '3.02%',
|
// gongzixingnianjunshouru: '6.81',
|
// quanshengpaiming1: '8',
|
// gexiangjianglixing: 3.73,
|
// quanshengpaiming2: '1'
|
// },
|
// {
|
// nianfen: '2021年',
|
// fanwei: '全市',
|
// shiyedanwei: '5363',
|
// zaizhirenyuan: '16.4',
|
// nianrenjunshouru: '10.54',
|
// quanshengpaiming: '3',
|
// nianrenjunshouruzengsu: '3.02%',
|
// gongzixingnianjunshouru: '6.81',
|
// quanshengpaiming1: '8',
|
// gexiangjianglixing: 3.73,
|
// quanshengpaiming2: '1'
|
// },
|
// {
|
// nianfen: '2021年',
|
// fanwei: '全市',
|
// shiyedanwei: '5363',
|
// zaizhirenyuan: '16.4',
|
// nianrenjunshouru: '10.54',
|
// quanshengpaiming: '3',
|
// nianrenjunshouruzengsu: '3.02%',
|
// gongzixingnianjunshouru: '6.81',
|
// quanshengpaiming1: '8',
|
// gexiangjianglixing: 3.73,
|
// quanshengpaiming2: '1'
|
// },
|
// {
|
// nianfen: '2021年',
|
// fanwei: '全市',
|
// shiyedanwei: '5363',
|
// zaizhirenyuan: '16.4',
|
// nianrenjunshouru: '10.54',
|
// quanshengpaiming: '3',
|
// nianrenjunshouruzengsu: '3.02%',
|
// gongzixingnianjunshouru: '6.81',
|
// quanshengpaiming1: '8',
|
// gexiangjianglixing: 3.73,
|
// quanshengpaiming2: '1'
|
// },
|
],
|
checkedCategory: '事业单位',
|
CARE_GORY: ['事业单位', '在职人员', '年人均收入'],
|
tableHeight: window.innerHeight - nowSize(1000),
|
echartsShow: true,
|
echartSeries: {},
|
selectIndex: {
|
type: 1
|
}
|
}
|
},
|
mounted() {
|
this.Init_echarts()
|
this.getPersonTable()
|
this.getUnitLine()
|
},
|
methods: {
|
showEchartsBtn() {
|
this.echartsShow = !this.echartsShow
|
if(this.echartsShow) {
|
this.tableHeight = window.innerHeight - nowSize(960)
|
}else {
|
this.tableHeight = window.innerHeight - nowSize(320)
|
}
|
},
|
mergeColumnTableCell({rowIndex, columnIndex}) {
|
if (columnIndex === 0) {
|
if (rowIndex === 0) {
|
return {
|
rowspan: 3,
|
colspan: 1
|
};
|
} else if (rowIndex === 3) {
|
return {
|
rowspan: 6,
|
colspan: 1
|
}
|
} else {
|
return {
|
rowspan: 0,
|
colspan: 0
|
}
|
}
|
}
|
},
|
Init_echarts() {
|
const myChart = this.$echarts.init(document.querySelector('.PT_unitPersonnel--Echarts'));
|
const option = {
|
color: ['#FF5151', '#51FF5D', '#FFD151'],
|
title: {
|
text: '近一年事业数量变化趋势图',
|
left: 'center',
|
top: '5%',
|
textStyle: {
|
color: '#FFFFFF',
|
fontSize: nowSize(30)
|
}
|
},
|
itemStyle: {
|
normal: {
|
lineStyle: {
|
width: 3, //折线宽度
|
}
|
}
|
},
|
tooltip: {
|
trigger: 'axis'
|
},
|
legend: {
|
right: '2%',
|
top: 'center',
|
orient: 'vertical',
|
itemWidth: nowSize(30),
|
itemHeight: nowSize(4),
|
itemGap: nowSize(80),
|
textStyle: {
|
color: '#FFFFFF',
|
fontSize: nowSize(24),
|
}
|
},
|
grid: {
|
left: '2%',
|
top: '25%',
|
right: '18%',
|
bottom: '0',
|
containLabel: true
|
},
|
xAxis: {
|
name: '单位:年/月',
|
nameTextStyle: {
|
color: '#FFFFFF',
|
fontSize: nowSize(24)
|
},
|
nameGap: nowSize(92),// 坐标轴名称与轴线之间的距离。
|
type: 'category',
|
boundaryGap: false,// 坐标轴两端留白
|
data: this.echartSeries.years,
|
axisLabel: {
|
show: true,
|
textStyle: {
|
color: '#fff',
|
fontSize: nowSize(24)
|
},
|
},
|
axisLine: {
|
lineStyle: {
|
color: '#999999',
|
width: 1, //这里是坐标轴的宽度,可以去掉
|
type: 'solid'
|
}
|
},
|
splitLine: {
|
show: false
|
}
|
},
|
yAxis: {
|
name: '单位:家',
|
nameTextStyle: {
|
color: '#FFFFFF',
|
fontSize: nowSize(24)
|
},
|
nameGap: nowSize(30),// 坐标轴名称与轴线之间的距离。
|
type: 'value',
|
axisLabel: {
|
show: true,
|
textStyle: {
|
color: '#fff',
|
fontSize: nowSize(24)
|
},
|
},
|
axisLine: {
|
lineStyle: {
|
color: '#999999',
|
width: 1, //这里是坐标轴的宽度,可以去掉
|
type: "solid"
|
}
|
},
|
splitLine: {
|
show: false
|
},
|
},
|
series: [
|
{
|
name: '全市',
|
type: 'line',
|
data: this.echartSeries.quanshi
|
},
|
{
|
name: '市直',
|
type: 'line',
|
data: this.echartSeries.shizhi
|
},
|
{
|
name: '县(市、区)',
|
type: 'line',
|
data: this.echartSeries.xian
|
}
|
]
|
};
|
option && myChart.setOption(option)
|
},
|
getHeight() {
|
this.tableHeight = window.innerHeight - nowSize(900)
|
},
|
// 通过点击更换echarts图表信息
|
selectEcharts(index) {
|
this.selectIndex.type = index + 1
|
this.getUnitLine()
|
this.Init_echarts()
|
},
|
// 29. 查询事业单位人员情况表格数据接口
|
getPersonTable() {
|
getPersonTable().then(res => {
|
if (res.code === 1000) {
|
this.tableData = res.list
|
}
|
})
|
},
|
// 41.查询事业年度变化情况折线图数据接口
|
getUnitLine() {
|
getUnitLine(this.selectIndex).then(res => {
|
if (res.code === 1000) {
|
this.echartSeries = res.obj
|
console.log(this.echartSeries);
|
this.Init_echarts()
|
}
|
})
|
}
|
},
|
created() {
|
window.addEventListener('resize', this.getHeight)
|
},
|
destroy() {
|
window.addEventListener('resize', this.getHeight)
|
}
|
|
}
|
</script>
|
<style lang="scss">
|
@import "../../../../assets/css/base";
|
|
.PT_unitPersonnel--table {
|
.el-table tr {
|
background-color: #CEF2FF;
|
}
|
|
.el-table th.el-table__cell {
|
background-color: #51D2FF;
|
}
|
|
.el-table__fixed, .el-table__fixed-right, .el-table__fixed-right::before, .el-table__fixed::before {
|
background-color: #51D2FF;
|
}
|
|
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
|
background-color: #A8E9FF;
|
}
|
|
.el-table thead {
|
color: #111111;
|
}
|
|
.el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf {
|
border-bottom: 1px solid #8E8E8E;
|
}
|
|
.el-table--border .el-table__cell, .el-table__body-wrapper .el-table--border.is-scrolling-left ~ .el-table__fixed {
|
border-right: 1px solid #8E8E8E;
|
}
|
|
.el-table .el-table__cell {
|
//padding: 0.0850375rem /* 22/256 */
|
//0;
|
padding: 0.0546875rem 0;
|
}
|
|
.el-table__body tr.hover-row.current-row > td.el-table__cell, .el-table__body tr.hover-row.el-table__row--striped.current-row > td.el-table__cell, .el-table__body tr.hover-row.el-table__row--striped > td.el-table__cell, .el-table__body tr.hover-row > td.el-table__cell {
|
background: transparent;
|
}
|
|
.el-table .cell {
|
line-height: 0.125rem;
|
font-size: $fontSize-28;
|
color: $color-darkGrey;
|
font-weight: 300;
|
text-align: center;
|
}
|
|
// 头部团体背景颜色
|
.el-table thead.is-group th.el-table__cell {
|
background-color: #51D2FF;
|
}
|
|
// 头部团体单元格下边框颜色
|
.el-table--border th.el-table__cell, .el-table__fixed-right-patch {
|
border-bottom: 1px solid #8E8E8E;
|
}
|
}
|
|
.PT_navEchart--title {
|
.el-radio {
|
width: 1.171875rem;
|
line-height: 0.375rem;
|
|
.el-radio__label {
|
font-size: 0.09375rem;
|
color: #FFFFFF;
|
}
|
|
.el-radio__input {
|
margin-bottom: 0.01953125rem;
|
|
&.is-checked {
|
.el-radio__inner {
|
background-color: #51D2FF;
|
border-color: #51D2FF;
|
background: url("../../../../assets/images/personnelTalents/Yes@2x.png") no-repeat;
|
background-size: 100% 100%;
|
background-color: #51D2FF;
|
|
&:hover {
|
border-color: #51D2FF;
|
}
|
}
|
}
|
|
.el-radio__inner {
|
width: 0.15625rem;
|
height: 0.15625rem;
|
margin-right: 0.06640625rem;
|
background: transparent;
|
border-radius: 1%;
|
box-sizing: content-box;
|
border: 0.0078125rem /* 2/256 */
|
solid #DCDFE6;
|
|
&::after {
|
content: '';
|
width: 0;
|
height: 0;
|
}
|
}
|
}
|
}
|
}
|
</style>
|
<style lang="scss" scoped>
|
@import "../../../../assets/css/base";
|
|
.PersonnelTalents_unitPersonnel--warp {
|
width: 100%;
|
height: 100%;
|
position: relative;
|
.yincang-box{
|
position: absolute;
|
right: 0.078125rem /* 20/256 */;
|
bottom: 0;
|
}
|
.PT_unitPersonnel--table {
|
width: 100%;
|
}
|
|
|
.PT_unitPersonnel--echart-box {
|
width: 100%;
|
margin-top: 0.234375rem /* 60/256 */
|
;
|
height: calc(100% - 2.5rem/* 640/256 */ - 0.254375rem /* 60/256 */
|
);
|
position: relative;
|
.PT_navEchart--title {
|
width: 1px;
|
display: inline-block;
|
position: absolute;
|
left: 0.390625rem;
|
top: 50%;
|
transform: translateY(-50%);
|
}
|
|
.PT_unitPersonnel--Echarts {
|
width: 85%;
|
height: 100%;
|
position: absolute;
|
left: 1.2890625rem;
|
display: inline-block;
|
}
|
}
|
|
}
|
</style>
|