付延余
2022-04-28 cfb813f540e11cbadf041b295c342b02da97da56
src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoChikaRenshu.vue
@@ -2,18 +2,20 @@
  <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>
@@ -113,7 +115,6 @@
                    if(res.code == 1000) {
                       let result = res.list
                        let data = []
                        console.log('result---',result)
                        result.forEach((item,index) => {
                            let row = item.dataList
                            row.unshift({
@@ -127,13 +128,16 @@
                        })
                        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() {
@@ -180,6 +184,9 @@
      color: $color-darkGrey;
      font-weight: 300;
      line-height: 1;
      span{
        font-size: $fontSize-28;
      }
    }
  }
</style>