From b55d1c67769dcc8d90eed2bb4f8a7dfd51e7303a Mon Sep 17 00:00:00 2001 From: zhangxiaoxu123456 <zxx19900626> Date: 星期三, 27 四月 2022 11:31:35 +0800 Subject: [PATCH] 细节样式 --- src/pages/components/jiuyeQingkuang/chengzhenXinzengJiuye.vue | 6 +++ src/pages/show/jiuyeAndChuangye/jiuyeChildren/workStatistics.vue | 6 +++ src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoChikaRenshu.vue | 6 +++ src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoShouzhiZongbiao.vue | 8 +++ src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruForm.vue | 8 +++ src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shehuiBaoxian.vue | 6 +++ src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruTotal.vue | 8 +++ src/pages/components/qiyezhigongShebao/zhigongShebao.vue | 8 +++ src/pages/show/jiuyeAndChuangye/jiuyeChildren/biyeshengStatistics.vue | 5 ++ src/pages/show/jiuyeAndChuangye/jiuyeChildren/chuangyeDanbaoDaikuan.vue | 7 +++ src/pages/show/jiuyeAndChuangye/jiuyeChildren/zhiyePeixun.vue | 6 +++ src/pages/components/juminYanglaoBaoxian/baoxianForm.vue | 6 +++ 12 files changed, 75 insertions(+), 5 deletions(-) diff --git a/src/pages/components/jiuyeQingkuang/chengzhenXinzengJiuye.vue b/src/pages/components/jiuyeQingkuang/chengzhenXinzengJiuye.vue index 8293c65..b366e17 100644 --- a/src/pages/components/jiuyeQingkuang/chengzhenXinzengJiuye.vue +++ b/src/pages/components/jiuyeQingkuang/chengzhenXinzengJiuye.vue @@ -1,6 +1,7 @@ <template> <div class="chengzhenXinzengJiuye-wrap"> <el-table + :cell-style="handleCellStyle" :max-height="tableHeight" border :data="tableData" @@ -220,6 +221,11 @@ }, getHeight() { this.tableHeight = window.innerHeight - nowSize(230) + }, + handleCellStyle({rowIndex, columnIndex}) { + if(columnIndex == 0) { + return { background:'#51D2FF' } + } } }, created() { diff --git a/src/pages/components/juminYanglaoBaoxian/baoxianForm.vue b/src/pages/components/juminYanglaoBaoxian/baoxianForm.vue index 99ccfdd..bfafd68 100644 --- a/src/pages/components/juminYanglaoBaoxian/baoxianForm.vue +++ b/src/pages/components/juminYanglaoBaoxian/baoxianForm.vue @@ -1,6 +1,7 @@ <template> <div class="baoxianForm-wrap" :style="{paddingTop : paddingTop + 'rem'}"> <el-table + :cell-style="handleCellStyle" :max-height="tableHeight" border style="width: 100%" @@ -108,6 +109,11 @@ this.tableData = res.list } }) + }, + handleCellStyle({rowIndex, columnIndex}) { + if(columnIndex == 0) { + return { background:'#51D2FF' } + } } } } diff --git a/src/pages/components/qiyezhigongShebao/zhigongShebao.vue b/src/pages/components/qiyezhigongShebao/zhigongShebao.vue index fd8cd81..06a042d 100644 --- a/src/pages/components/qiyezhigongShebao/zhigongShebao.vue +++ b/src/pages/components/qiyezhigongShebao/zhigongShebao.vue @@ -1,6 +1,7 @@ <template> <div class="zhigongShebao-wrap"> <el-table + :cell-style="handleCellStyle" :height="tableHeight" border :data="tableData" @@ -94,7 +95,12 @@ }, getHeight() { this.tableHeight = window.innerHeight - nowSize(230) - } + }, + handleCellStyle({rowIndex, columnIndex}) { + if(columnIndex == 0) { + return { background:'#51D2FF' } + } + }, }, created() { window.addEventListener('resize', this.getHeight) diff --git a/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruForm.vue b/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruForm.vue index c5fa912..5279232 100644 --- a/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruForm.vue +++ b/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruForm.vue @@ -3,6 +3,7 @@ <div class="danwei-box">鍗曚綅锛氫汉</div> <div class="shebaoZhengjiShouruForm-table"> <el-table + :cell-style="handleCellStyle" :max-height="tableHeight" border style="width: 100%" @@ -56,7 +57,12 @@ methods: { getHeight() { this.tableHeight = window.innerHeight - nowSize(350) - } + }, + handleCellStyle({rowIndex, columnIndex}) { + if(columnIndex == 0) { + return { background:'#51D2FF' } + } + }, }, created() { window.addEventListener('resize', this.getHeight) diff --git a/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruTotal.vue b/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruTotal.vue index 3c864a3..6178120 100644 --- a/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruTotal.vue +++ b/src/pages/components/shebaoZhengjiShouru/shebaoZhengjiShouruTotal.vue @@ -3,6 +3,7 @@ <div class="danwei-box">鍗曚綅锛氫汉</div> <div class="shebaoZhengjiShouruForm-table"> <el-table + :cell-style="handleCellStyle" :max-height="tableHeight" border style="width: 100%" @@ -58,7 +59,12 @@ methods: { getHeight() { this.tableHeight = window.innerHeight - nowSize(350) - } + }, + handleCellStyle({rowIndex, columnIndex}) { + if(columnIndex == 0) { + return { background:'#51D2FF' } + } + }, }, created() { window.addEventListener('resize', this.getHeight) diff --git a/src/pages/show/jiuyeAndChuangye/jiuyeChildren/biyeshengStatistics.vue b/src/pages/show/jiuyeAndChuangye/jiuyeChildren/biyeshengStatistics.vue index 5d95d47..0f21727 100644 --- a/src/pages/show/jiuyeAndChuangye/jiuyeChildren/biyeshengStatistics.vue +++ b/src/pages/show/jiuyeAndChuangye/jiuyeChildren/biyeshengStatistics.vue @@ -253,7 +253,7 @@ </tbody> </table>--> <el-table - :height="tableHeight" + :max-height="tableHeight" :data="tableData" :span-method="objectSpanMethod" :cell-style="cellClass" @@ -343,6 +343,9 @@ } } } + if(columnIndex == 0) { + return { background:'#51D2FF' } + } }, getData() { let res = this.tableData diff --git a/src/pages/show/jiuyeAndChuangye/jiuyeChildren/chuangyeDanbaoDaikuan.vue b/src/pages/show/jiuyeAndChuangye/jiuyeChildren/chuangyeDanbaoDaikuan.vue index d3baac5..1224121 100644 --- a/src/pages/show/jiuyeAndChuangye/jiuyeChildren/chuangyeDanbaoDaikuan.vue +++ b/src/pages/show/jiuyeAndChuangye/jiuyeChildren/chuangyeDanbaoDaikuan.vue @@ -5,6 +5,7 @@ <div class="chuangye-table"> <el-table :max-height="tableHeight" + :cell-style="handleCellStyle" border :data="danbaoTableData" style="width: 100%"> @@ -79,6 +80,7 @@ <h1>浜哄姏璧勬簮鏈嶅姟浜т笟鍥綋鏈堟儏鍐电粺璁¤〃</h1> <div class="danbaotongjibiao-table"> <el-table + :cell-style="handleCellStyle" :max-height="tableHeight" border :data="renliziyuanTableData" @@ -218,6 +220,11 @@ }, getHeight() { this.tableHeight = (window.innerHeight - nowSize(400)) / 2 + }, + handleCellStyle({rowIndex, columnIndex}) { + if(columnIndex == 0) { + return {background:'#51D2FF'} + } } }, created() { diff --git a/src/pages/show/jiuyeAndChuangye/jiuyeChildren/workStatistics.vue b/src/pages/show/jiuyeAndChuangye/jiuyeChildren/workStatistics.vue index b78ab56..6848bd8 100644 --- a/src/pages/show/jiuyeAndChuangye/jiuyeChildren/workStatistics.vue +++ b/src/pages/show/jiuyeAndChuangye/jiuyeChildren/workStatistics.vue @@ -7,6 +7,7 @@ :max-height="tableHeight" :data="tableData" :header-cell-style="handleheader" + :cell-style="handleCellStyle" stripe border style="width: 100%"> @@ -263,6 +264,11 @@ lineHeight: '0', } }, + handleCellStyle({rowIndex,columnIndex}) { + if(columnIndex == 0) { + return { background:'#51D2FF' } + } + }, getHeight() { this.tableHeight = window.innerHeight - nowSize(1000) }, diff --git a/src/pages/show/jiuyeAndChuangye/jiuyeChildren/zhiyePeixun.vue b/src/pages/show/jiuyeAndChuangye/jiuyeChildren/zhiyePeixun.vue index 51a17f1..1fe2376 100644 --- a/src/pages/show/jiuyeAndChuangye/jiuyeChildren/zhiyePeixun.vue +++ b/src/pages/show/jiuyeAndChuangye/jiuyeChildren/zhiyePeixun.vue @@ -6,6 +6,7 @@ :data="tableData" max-height="tableHeight" :header-cell-style="handleheader" + :cell-style="handleCellStyle" style="width: 100%"> <el-table-column fixed="left" @@ -109,6 +110,11 @@ } }, + handleCellStyle({rowIndex, columnIndex}) { + if(columnIndex == 0) { + return { background:'#51D2FF' } + } + }, zhiyepeixunEcharts() { let myEchart = this.$echarts.init(document.getElementById('zhiyepeixunEcharts')) let option = { diff --git a/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoChikaRenshu.vue b/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoChikaRenshu.vue index 942efcb..a653ca2 100644 --- a/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoChikaRenshu.vue +++ b/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoChikaRenshu.vue @@ -2,6 +2,7 @@ <div class="shebaoChikaRenshu-wrap"> <h1>鍚勫幙锛堝競銆佸尯锛�2021骞村氨涓氭儏鍐电粺璁¤〃</h1> <el-table + :cell-style="handleCellStyle" :max-height="tableHeight" :data="tableData" stripe @@ -132,6 +133,11 @@ }, getHeight() { this.tableHeight = window.innerHeight - nowSize(250) + }, + handleCellStyle({rowIndex, columnIndex}) { + if(columnIndex == 0) { + return { background:'#51D2FF' } + } } }, created() { diff --git a/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoShouzhiZongbiao.vue b/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoShouzhiZongbiao.vue index 8ad0422..6b8406d 100644 --- a/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoShouzhiZongbiao.vue +++ b/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoShouzhiZongbiao.vue @@ -3,6 +3,7 @@ <div class="shebaoShouzhiZongbiao-table"> <h1>绀句細淇濋殰鍩洪噾缁熻琛�</h1> <el-table + :cell-style="handleCellStyle" :data="tableData" style="width: 100%"> <el-table-column @@ -421,7 +422,12 @@ window.addEventListener('resize',function () { myEchart.resize() }) - } + }, + handleCellStyle({rowIndex, columnIndex}) { + if(columnIndex == 0) { + return { background:'#51D2FF' } + } + }, } } </script> diff --git a/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shehuiBaoxian.vue b/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shehuiBaoxian.vue index f38e2a2..de0e794 100644 --- a/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shehuiBaoxian.vue +++ b/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shehuiBaoxian.vue @@ -7,6 +7,7 @@ :max-height="tableHeight" :data="tableData" :header-cell-style="handleheader" + :cell-style="handleCellStyle" stripe border style="width: 100%"> @@ -133,6 +134,11 @@ lineHeight: '0', } }, + handleCellStyle({rowIndex, columnIndex}) { + if(columnIndex == 0) { + return { background:'#51D2FF' } + } + }, shehuiBaoxianEcharts() { let myEchart = this.$echarts.init(document.getElementById('shehuiBaoxianEcharts')) let option = { -- Gitblit v1.9.1