From 6e352fc609a77935c55e21e9b71d3c1be8a5accd Mon Sep 17 00:00:00 2001 From: zhangxiaoxu123456 <zxx19900626> Date: 星期日, 24 四月 2022 15:56:31 +0800 Subject: [PATCH] 社会保障 --- src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoChikaRenshu.vue | 67 ++++++++++++++++++++++++++++----- 1 files changed, 57 insertions(+), 10 deletions(-) diff --git a/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoChikaRenshu.vue b/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoChikaRenshu.vue index 05a9df6..9106609 100644 --- a/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoChikaRenshu.vue +++ b/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoChikaRenshu.vue @@ -2,18 +2,23 @@ <div class="shebaoChikaRenshu-wrap"> <h1>鍚勫幙锛堝競銆佸尯锛�2021骞村氨涓氭儏鍐电粺璁¤〃</h1> <el-table + :max-height="tableHeight" :data="tableData" stripe border style="width: 100%"> - <el-table-column - align="center" - prop="dataName" - label="鎸囨爣鍚嶇О" - fixed="left" - width="220"> - </el-table-column> - <el-table-column + <template v-for="item in headerArry"> + <el-table-column + align="center" + :prop="item.val" + :label="item.time"> + <template slot-scope="scope"> + <spn>{{item}}</spn> + </template> + </el-table-column> + </template> + + <!--<el-table-column prop="yearFinish" align="center" label="鍘诲勾瀹屾垚" @@ -78,13 +83,15 @@ prop="december" align="center" label="12鏈�"> - </el-table-column> + </el-table-column>--> </el-table> </div> </template> <script> - import baoxianForm from "../../../components/juminYanglaoBaoxian/baoxianForm"; + import {getCardNumsTable} from '@/api/shehuiBaozhang' + import baoxianForm from "../../../components/juminYanglaoBaoxian/baoxianForm"; + import nowSize from "../../../../libs/nowSize"; export default { name: "shebaoChikaRenshu", components: { @@ -93,7 +100,47 @@ 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 = [] + console.log('result---',result) + 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 + console.log('this.headerArry------',this.headerArry) + console.log('this.tableData------',this.tableData) + } + }) + }, + getHeight() { + this.tableHeight = window.innerHeight - nowSize(250) + } + }, + created() { + window.addEventListener('resize', this.getHeight) + }, + destroy() { + window.addEventListener('resize', this.getHeight) } } </script> -- Gitblit v1.9.1