From cfb813f540e11cbadf041b295c342b02da97da56 Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期四, 28 四月 2022 15:55:00 +0800
Subject: [PATCH] 其他业务
---
src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shehuiBaoxian.vue | 30 +++++++++++++++++++++++-------
1 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shehuiBaoxian.vue b/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shehuiBaoxian.vue
index 30e2521..de0e794 100644
--- a/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shehuiBaoxian.vue
+++ b/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shehuiBaoxian.vue
@@ -2,11 +2,12 @@
<div class="shehuiBaoxian-wrap">
<div class="shehuiBaoxian-table">
<h1>绀句細淇濋櫓鍙備繚浜哄憳缁熻琛�</h1>
- <div class="danwei-box">鍗曚綅:涓囦汉</div>
+ <div class="danwei-box">鍗曚綅:涓囦汉</div>
<el-table
- max-height="640"
+ :max-height="tableHeight"
:data="tableData"
:header-cell-style="handleheader"
+ :cell-style="handleCellStyle"
stripe
border
style="width: 100%">
@@ -84,8 +85,8 @@
label="12鏈�">
</el-table-column>
</el-table>
- <div class="shehuiBaoxianEcharts" id="shehuiBaoxianEcharts"></div>
</div>
+ <div class="shehuiBaoxianEcharts" id="shehuiBaoxianEcharts"></div>
</div>
</template>
@@ -102,6 +103,7 @@
juminData: [], //鍩庝埂灞呮皯鍏昏�佷繚闄╁弬淇濅汉鏁�
gongshangData: [], //宸ヤ激淇濋櫓鍙備繚浜烘暟
shiyeData: [], //澶变笟淇濋櫓鍙備繚浜烘暟
+ tableHeight: window.innerHeight - nowSize(960)
}
},
mounted() {
@@ -132,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 = {
@@ -152,7 +159,7 @@
itemWidth: nowSize(30),
itemHeight: nowSize(4),
itemGap: nowSize(50),
- right:'2%',
+ right:'8%',
top: 'center',
orient: 'vertical',
textStyle: {
@@ -163,7 +170,7 @@
grid: {
top: '15%',
left: '4%',
- right: '20%',
+ right: '25%',
bottom: '3%',
containLabel: true
},
@@ -237,7 +244,16 @@
window.addEventListener('resize',function () {
myEchart.resize()
})
+ },
+ getHeight() {
+ this.tableHeight = window.innerHeight - nowSize(960)
}
+ },
+ created() {
+ window.addEventListener('resize', this.getHeight)
+ },
+ destroy() {
+ window.addEventListener('resize', this.getHeight)
}
}
</script>
@@ -287,7 +303,6 @@
height: 100%;
.shehuiBaoxian-table{
width: 100%;
- height: 100%;
position: relative;
.danwei-box{
position: absolute;
@@ -305,7 +320,8 @@
}
}
.shehuiBaoxianEcharts{
- height: calc(100% - 640px - 0.33203125rem /* 85/256 */);
+ width: 100%;
+ height: calc(100% - 2.5rem /* 640/256 */ - 0.33203125rem /* 85/256 */);
}
}
</style>
--
Gitblit v1.9.1