| | |
| | | <div class="shebaoChikaRenshu-wrap"> |
| | | <h1>各县(市、区)2021年就业情况统计表</h1> |
| | | <el-table |
| | | :cell-style="handleCellStyle" |
| | | :max-height="tableHeight" |
| | | :data="tableData" |
| | | stripe |
| | | border |
| | | style="width: 100%"> |
| | | <template v-for="item in headerArry"> |
| | | <template v-for="(item,index) in headerArry"> |
| | | <el-table-column |
| | | :key="index" |
| | | align="center" |
| | | :prop="item.val" |
| | | :label="item.time"> |
| | | <template slot-scope="scope"> |
| | | <spn>{{item}}</spn> |
| | | <span>{{scope.row[index].val}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | if(res.code == 1000) { |
| | | let result = res.list |
| | | let data = [] |
| | | console.log('result---',result) |
| | | result.forEach((item,index) => { |
| | | let row = item.dataList |
| | | row.unshift({ |
| | |
| | | |
| | | }) |
| | | this.tableData = data |
| | | console.log('this.headerArry------',this.headerArry) |
| | | console.log('this.tableData------',this.tableData) |
| | | } |
| | | }) |
| | | }, |
| | | getHeight() { |
| | | this.tableHeight = window.innerHeight - nowSize(250) |
| | | }, |
| | | handleCellStyle({rowIndex, columnIndex}) { |
| | | if(columnIndex == 0) { |
| | | return { background:'#51D2FF' } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | color: $color-darkGrey; |
| | | font-weight: 300; |
| | | line-height: 1; |
| | | span{ |
| | | font-size: $fontSize-28; |
| | | } |
| | | } |
| | | } |
| | | </style> |