zhangxiaoxu123456
2022-04-24 1e65bd175264303e7b65c57f6b622930317afdb2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<template>
  <div class="shebaoChikaRenshu-wrap">
    <h1>各县(市、区)2021年就业情况统计表</h1>
    <el-table
      :max-height="tableHeight"
      :data="tableData"
      stripe
      border
      style="width: 100%">
      <template v-for="(item,index) in headerArry">
        <el-table-column
          :key="index"
          align="center"
          :prop="item.val"
          :label="item.time">
          <template slot-scope="scope">
              <span>{{scope.row[index].val}}</span>
          </template>
        </el-table-column>
      </template>
 
      <!--<el-table-column
        prop="yearFinish"
        align="center"
        label="去年完成"
        width="180">
      </el-table-column>
      <el-table-column
        prop="january"
        align="center"
        label="1月">
      </el-table-column>
      <el-table-column
        prop="february"
        align="center"
        label="2月">
      </el-table-column>
      <el-table-column
        prop="march"
        align="center"
        label="3月">
      </el-table-column>
      <el-table-column
        prop="april"
        align="center"
        label="4月">
      </el-table-column>
      <el-table-column
        prop="may"
        align="center"
        label="5月">
      </el-table-column>
      <el-table-column
        prop="june"
        align="center"
        label="6月">
      </el-table-column>
      <el-table-column
        prop="july"
        align="center"
        label="7月">
      </el-table-column>
      <el-table-column
        prop="august"
        align="center"
        label="8月">
      </el-table-column>
      <el-table-column
        prop="september"
        align="center"
        label="9月">
      </el-table-column>
      <el-table-column
        prop="october"
        align="center"
        label="10月">
      </el-table-column>
      <el-table-column
        prop="november"
        align="center"
        label="11月">
      </el-table-column>
      <el-table-column
        prop="december"
        align="center"
        label="12月">
      </el-table-column>-->
    </el-table>
  </div>
</template>
 
<script>
  import {getCardNumsTable} from '@/api/shehuiBaozhang'
  import baoxianForm from "../../../components/juminYanglaoBaoxian/baoxianForm";
  import nowSize from "../../../../libs/nowSize";
    export default {
        name: "shebaoChikaRenshu",
        components: {
            baoxianForm,  //城镇新增就业
        },
        data() {
            return {
                tableData: [],
                headerArry: [],
                tableHeight: window.innerHeight - nowSize(250)
            }
        },
        mounted() {
          this.getCardNumsTable()
        },
        methods: {
            getCardNumsTable(){
                getCardNumsTable().then(res => {
                    if(res.code == 1000) {
                       let result = res.list
                        let data = []
                        result.forEach((item,index) => {
                            let row = item.dataList
                            row.unshift({
                                time: '指标',
                                val: item.name
                            })
                            data.push(row)
                            if(index == 0) {
                                this.headerArry = row
                            }
 
                        })
                        this.tableData = data
                    }
                })
            },
            getHeight() {
                this.tableHeight = window.innerHeight - nowSize(250)
            }
        },
        created() {
            window.addEventListener('resize', this.getHeight)
        },
        destroy() {
            window.addEventListener('resize', this.getHeight)
        }
    }
</script>
 
<style lang="scss">
  @import "../../../../assets/css/base";
  .shebaoChikaRenshu-wrap{
    .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.0859375rem  /* 22/256 */ 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{
      font-size: $fontSize-28;
      color: $color-darkGrey;
      font-weight: 300;
      line-height: 1;
      span{
        font-size: $fontSize-28;
      }
    }
  }
</style>
<style lang="scss" scoped>
  @import "../../../../assets/css/base";
  .shebaoChikaRenshu-wrap{
    width: 100%;
    height: 100%;
    h1{
      font-size: $fontSize-30;
      color: $color-white;
      text-align: center;
      line-height: 2;
      margin-bottom: 0.078125rem  /* 20/256 */;
    }
  }
</style>