<template>
|
<div class="zhigongShebao-wrap">
|
<el-table
|
:height="tableHeight"
|
border
|
:data="tableData"
|
:header-cell-style="handleheader"
|
style="width: 100%">
|
<el-table-column
|
prop="area"
|
label="县(市、区)"
|
align="center"
|
width="250">
|
</el-table-column>
|
<el-table-column
|
sortable
|
:sort-method="(a,b) => {return a.insuredNums - b.insuredNums}"
|
prop="insuredNums"
|
:label="dataType"
|
align="center">
|
</el-table-column>
|
<el-table-column
|
sortable
|
:sort-method="(a,b) => {return a.inJobs - b.inJobs}"
|
prop="inJobs"
|
label="在职职工"
|
align="center">
|
</el-table-column>
|
<el-table-column
|
sortable
|
:sort-method="(a,b) => {return a.outJobs - b.outJobs}"
|
prop="outJobs"
|
label="离退休"
|
align="center">
|
</el-table-column>
|
<el-table-column
|
sortable
|
:sort-method="(a,b) => {return a.proportion - b.proportion}"
|
prop="proportion"
|
label="供养比"
|
align="center">
|
</el-table-column>
|
<el-table-column
|
label="操作"
|
width="250"
|
align="center">
|
<template slot-scope="scope">
|
<el-button @click="handleClick(scope.row)" type="text" size="small">查看详情</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
<zhigongshebaoForm ref="zhigongshebaoForm" v-if="zhigongshebaoVisiable"></zhigongshebaoForm>
|
</div>
|
</template>
|
|
<script>
|
import {getSecurityTable} from '@/api/shehuiBaozhang'
|
import zhigongshebaoForm from "./zhigongshebaoForm";
|
import nowSize from "../../../libs/nowSize";
|
export default {
|
name: "chengzhenXinzengJiuye",
|
components: {
|
zhigongshebaoForm
|
},
|
props: ['type','dataType'],
|
data() {
|
return {
|
zhigongshebaoVisiable: false, //弹框
|
tableData: [],
|
tableHeight: window.innerHeight - nowSize(230)
|
}
|
},
|
mounted() {
|
this.getSecurityTable()
|
},
|
methods: {
|
getSecurityTable() {
|
getSecurityTable({type: this.type}).then(res => {
|
if(res.code == 1000) {
|
this.tableData = res.list
|
}
|
})
|
},
|
handleClick(row) {
|
this.zhigongshebaoVisiable = true
|
this.$nextTick(() => {
|
this.$refs.zhigongshebaoForm.init(this.type,row.area)
|
})
|
},
|
handleheader(data) {
|
return {
|
lineHeight: '2.5',
|
}
|
},
|
getHeight() {
|
this.tableHeight = window.innerHeight - nowSize(230)
|
}
|
},
|
created() {
|
window.addEventListener('resize', this.getHeight)
|
},
|
destroyed() {
|
window.addEventListener('resize', this.getHeight)
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
@import "../../../assets/css/base";
|
.zhigongShebao-wrap{
|
width: 100%;
|
height: 100%;
|
box-sizing: border-box;
|
padding-top: 0.234375rem /* 60/256 */;
|
.el-table th.el-table__cell{
|
background-color:$color-blue;
|
}
|
.el-table .el-table__body-wrapper tr{
|
height: 0.265625rem /* 68/256 */;
|
}
|
.el-table tr:nth-child(odd){
|
background-color: #CEF2FF;
|
}
|
.el-table tr:nth-child(even){
|
background-color: #A8E9FF;
|
}
|
.el-table, .el-table__expanded-cell{
|
background-color: transparent;
|
}
|
.el-table thead{
|
color: $color-darkGrey;
|
}
|
.el-table{
|
color: $color-darkGrey;
|
}
|
.el-table .cell{
|
font-size: $fontSize-28;
|
color: $color-darkGrey;
|
font-weight: 300;
|
line-height: 1;
|
}
|
.el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf{
|
border-bottom:1Px solid $color-grey; /*no*/
|
}
|
.el-table--border .el-table__cell, .el-table__body-wrapper .el-table--border.is-scrolling-left~.el-table__fixed{
|
border-right:1Px solid $color-grey; /*no*/
|
}
|
.el-table .sort-caret{
|
border: 0.05rem solid transparent;
|
}
|
.el-table .sort-caret.descending{
|
bottom: -0.04296875rem /* -11/256 */;
|
border-top-color: #cef2ff;
|
}
|
.el-table .descending .sort-caret.descending{
|
border-top-color: #409EFF;
|
}
|
.el-table .sort-caret.ascending{
|
top: -0.04296875rem /* -11/256 */;
|
border-bottom-color: #cef2ff;
|
}
|
.el-table .ascending .sort-caret.ascending{
|
border-bottom-color: #409EFF;
|
}
|
|
}
|
</style>
|
<style scoped>
|
|
</style>
|