| | |
| | | <div class="PersonnelTalents_unitPersonnel--warp"> |
| | | <div class="PT_unitPersonnel--table"> |
| | | <el-table |
| | | :max-height="tableHeight" |
| | | :data="tableData" |
| | | stripe |
| | | border |
| | |
| | | <el-table-column label="全省排位" prop="quanshengpaiming2"></el-table-column> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!-- 单选框 --> |
| | | <div class="PT_unitPersonnel--echart-box"> |
| | | <div class="PT_navEchart--title"> |
| | | <el-checkbox v-model="checked">备选项</el-checkbox> |
| | | <el-checkbox v-model="checked">备选项</el-checkbox> |
| | | <el-checkbox v-model="checked">备选项</el-checkbox> |
| | | <el-radio-group v-model="checkedCategory"> |
| | | <el-radio v-for="categoryItem in careGory" :label="categoryItem" :key="categoryItem">{{ categoryItem }} |
| | | </el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | <div class="PT_unitPersonnel--Echarts"></div> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import nowSize from "../../../../libs/nowSize"; |
| | | |
| | | const CARE_GORY = ['事业单位', '在职人员', '年人均收入'] |
| | | export default { |
| | | name: "PersonnelTalents_UnitPersonnel", |
| | | data() { |
| | |
| | | quanshengpaiming2: '1' |
| | | }, |
| | | ], |
| | | option: { |
| | | color: ['#FF5151', '#51FF5D', '#FFD151'], |
| | | title: { |
| | | text: '历年全市居民人均可支配收入分析图', |
| | | left: 'center', |
| | | top: '5%', |
| | | textStyle: { |
| | | color: '#FFFFFF', |
| | | fontSize: nowSize(30) |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | right: '5%', |
| | | top: 'center', |
| | | orient: 'vertical', |
| | | itemWidth: nowSize(30), |
| | | itemHeight: nowSize(4), |
| | | itemGap: nowSize(80), |
| | | textStyle: { |
| | | color: '#FFFFFF', |
| | | fontSize: nowSize(24), |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '5%', |
| | | right: '20%', |
| | | bottom: '0%', |
| | | containLabel: true |
| | | }, |
| | | xAxis: { |
| | | name: '单位:年', |
| | | nameTextStyle: { |
| | | color: '#FFFFFF', |
| | | fontSize: nowSize(24) |
| | | }, |
| | | nameGap: nowSize(92),// 坐标轴名称与轴线之间的距离。 |
| | | type: 'category', |
| | | boundaryGap: false,// 坐标轴两端留白 |
| | | data: ['2017年', '2018年', '2019年', '2020年', '2021年'], |
| | | 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', |
| | | smooth: false, //设置折线为圆滑曲线,false则有转折点 |
| | | // symbol:'none', //默认显示折点,为none时不显示 |
| | | itemStyle: { |
| | | normal: { |
| | | lineStyle: { |
| | | width: 3, //折线宽度 |
| | | } |
| | | } |
| | | }, |
| | | emphasis: { //鼠标经过时折点小圆圈样式 |
| | | borderColor: 'rgba(0,196,132,0.2)', |
| | | borderWidth: 100 |
| | | }, |
| | | stack: 'Total', |
| | | data: [120, 132, 101, 134, 90, 230] |
| | | }, |
| | | { |
| | | name: '城镇居民', |
| | | type: 'line', |
| | | smooth: false, //设置折线为圆滑曲线,false则有转折点 |
| | | // symbol:'none', //默认显示折点,为none时不显示 |
| | | itemStyle: { |
| | | normal: { |
| | | lineStyle: { |
| | | width: 3, //折线宽度 |
| | | } |
| | | } |
| | | }, |
| | | emphasis: { //鼠标经过时折点小圆圈样式 |
| | | borderColor: 'rgba(0,196,132,0.2)', |
| | | borderWidth: 100 |
| | | }, |
| | | stack: 'Total', |
| | | data: [220, 182, 191, 234, 290, 330] |
| | | }, |
| | | { |
| | | name: '农村居民', |
| | | type: 'line', |
| | | smooth: false, //设置折线为圆滑曲线,false则有转折点 |
| | | // symbol:'none', //默认显示折点,为none时不显示 |
| | | itemStyle: { |
| | | normal: { |
| | | lineStyle: { |
| | | width: 3, //折线宽度 |
| | | } |
| | | } |
| | | }, |
| | | emphasis: { //鼠标经过时折点小圆圈样式 |
| | | borderColor: 'rgba(0,196,132,0.2)', |
| | | borderWidth: 100 |
| | | }, |
| | | stack: 'Total', |
| | | data: [150, 232, 201, 154, 190, 330] |
| | | } |
| | | ] |
| | | } |
| | | checkedCategory: '事业单位', |
| | | careGory: CARE_GORY, |
| | | tableHeight: window.innerHeight - nowSize(900) |
| | | } |
| | | }, |
| | | mounted(){ |
| | | mounted() { |
| | | this.Init_echarts() |
| | | }, |
| | | methods: { |
| | |
| | | } |
| | | }, |
| | | Init_echarts() { |
| | | const option = this.option |
| | | const myChart = this.$echarts.init(document.querySelector('.PT_unitPersonnel--Echarts')); |
| | | option && myChart.setOption(this.option) |
| | | 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: ['2017年', '2018年', '2019年', '2020年', '2021年'], |
| | | 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: [120, 132, 101, 134, 90, 230] |
| | | }, |
| | | { |
| | | name: '城镇居民', |
| | | type: 'line', |
| | | data: [220, 182, 191, 234, 290, 330] |
| | | }, |
| | | { |
| | | name: '农村居民', |
| | | type: 'line', |
| | | data: [150, 232, 201, 154, 190, 330] |
| | | } |
| | | ] |
| | | }; |
| | | option && myChart.setOption(option) |
| | | }, |
| | | getHeight() { |
| | | this.tableHeight = window.innerHeight - nowSize(900) |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | window.addEventListener('resize',this.getHeight) |
| | | }, |
| | | destroy() { |
| | | window.addEventListener('resize',this.getHeight) |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss"> |
| | |
| | | .el-table .el-table__cell { |
| | | //padding: 0.0850375rem /* 22/256 */ |
| | | //0; |
| | | padding:0.0546875rem 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 { |
| | |
| | | } |
| | | |
| | | .el-table .cell { |
| | | line-height:0.125rem; |
| | | line-height: 0.125rem; |
| | | font-size: $fontSize-28; |
| | | color: $color-darkGrey; |
| | | font-weight: 300; |
| | |
| | | border-bottom: 1px solid #8E8E8E; |
| | | } |
| | | } |
| | | .PT_navEchart--title{ |
| | | .el-checkbox{ |
| | | width:1.171875rem; |
| | | line-height:0.375rem; |
| | | } |
| | | .el-checkbox__label{ |
| | | font-size:0.09375rem; |
| | | color:#FFFFFF; |
| | | } |
| | | .el-checkbox__inner{ |
| | | width:40px; |
| | | height:40px; |
| | | margin-right:17px; |
| | | background: #51D2FF; |
| | | //&:after{ |
| | | // background: url("../../../../assets/images/personnelTalents/Yes@2x.png") no-repeat; |
| | | // background:100% 100%; |
| | | // content:'' |
| | | //} |
| | | } |
| | | .el-checkbox__inner::after{ |
| | | border: 0.01953125rem /* 5/256 */ solid #FFF; |
| | | height: 0.08203125rem /* 21/256 */; |
| | | width: 0.0625rem /* 16/256 */; |
| | | border-left: 0; |
| | | border-top: 0; |
| | | |
| | | .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; |
| | | |
| | | &::after { |
| | | content: ''; |
| | | width: 0; |
| | | height: 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | .PersonnelTalents_unitPersonnel--warp { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .PT_unitPersonnel--table { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | |
| | | .PT_unitPersonnel--echart-box { |
| | | width: 100%; |
| | | margin-top: 0.234375rem /* 60/256 */ |
| | | ; |
| | | height: calc(100% - 2.34375rem /* 600/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; |
| | | } |
| | | } |
| | | |
| | | .PT_unitPersonnel--Echarts { |
| | | width: 1920px; |
| | | margin-top: 120px; |
| | | height:600px; |
| | | //height: calc(100% - 640px - 0.33203125rem /* 85/256 */ |
| | | //); |
| | | display:inline-block; |
| | | //height: 2.75rem; |
| | | } |
| | | |
| | | .PT_navEchart--title{ |
| | | width:1.171875rem; |
| | | display:inline-block; |
| | | position:relative; |
| | | left:100px; |
| | | top:-250px; |
| | | } |
| | | } |
| | | </style> |