From 7c2ff43a4f70638fb063d0aa1d2f1624e6cada33 Mon Sep 17 00:00:00 2001 From: 付延余 <f-yanyu@outlook.com> Date: 星期六, 07 五月 2022 15:25:42 +0800 Subject: [PATCH] 其他业务 --- src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoShouzhiZongbiao.vue | 453 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 449 insertions(+), 4 deletions(-) diff --git a/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoShouzhiZongbiao.vue b/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoShouzhiZongbiao.vue index 132f77d..dc510dc 100644 --- a/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoShouzhiZongbiao.vue +++ b/src/pages/show/shehuiBaozhang/shehuiBaozhangChildren/shebaoShouzhiZongbiao.vue @@ -1,13 +1,458 @@ <template> - <div>1111</div> + <div class="shebaoShouzhiZongbiao-wrap"> + <div class="shebaoShouzhiZongbiao-table"> + <h1>绀句細淇濋殰鍩洪噾缁熻琛�</h1> + <el-table + :data="tableData" + :cell-style="handleCellStyle" + style="width: 100%"> + <!--<template v-for="(item,index) in headerArry"> + <template v-if="index == 0"> + <el-table-column + align="center" + :prop="item.item" + label="椤圭洰" + fixed> + <template slot-scope="scope"> + <span style="margin-left: 10px">{{scope.row.item}}</span> + </template> + </el-table-column> + <template v-for="(e,i) in item.dataList"> + <el-table-column :label="e.month" align="center"> + <el-table-column + align="center" + label="鎬绘敹鍏�"> + <template slot-scope="scope"> + <template> + <template> + <span :class="[Number(e.taxesIncome) < 0 ? 'fontColorRed' : '']" style="margin-left: 10px">{{scope.row.dataList[0].totalIncome}}</span> + </template> + </template> + </template> + </el-table-column> + <el-table-column + align="center" + label="寰侀泦鏀跺叆"> + <template slot-scope="scope"> + <span :class="[Number(e.taxesIncome) < 0 ? 'fontColorRed' : '']" style="margin-left: 10px">{{scope.row.dataList[0].taxesIncome}}</span> + </template> + </el-table-column> + <el-table-column + align="center" + label="鏈湀鏀嚭"> + <template slot-scope="scope"> + <span :class="[Number(e.pay) < 0 ? 'fontColorRed' : '']" style="margin-left: 10px">{{scope.row.dataList[0].pay}}</span> + </template> + </el-table-column> + <el-table-column + align="center" + label="鏈湀缁撲綑"> + <template slot-scope="scope"> + <span :class="[Number(e.balance) < 0 ? 'fontColorRed' : '']" style="margin-left: 10px">{{scope.row.dataList[0].balance}}</span> + </template> + </el-table-column> + </el-table-column> + </template> + <template> + <el-table-column + align="center" + :prop="item.surplus" + label="绱缁撲綑"> + <template slot-scope="scope"> + <span :class="[Number(item.surplus) < 0 ? 'fontColorRed' : '']" style="margin-left: 10px">{{item.surplus}}</span> + </template> + </el-table-column> + </template> + </template> + </template>--> + <el-table-column + width="260" + align="center" + prop="item" + label="椤圭洰"> + </el-table-column> + <el-table-column v-if="tableData[0]" :label="tableData[0].month1" align="center"> + <el-table-column + align="center" + label="鎬绘敹鍏�"> + <template slot-scope="scope"> + <span :class="Number(scope.row.totalIncome1) < 0 ? 'fontColorRed' : ''">{{scope.row.totalIncome1}}</span> + </template> + </el-table-column> + <el-table-column + align="center" + prop="taxesIncome1" + label="寰侀泦鏀跺叆"> + <template slot-scope="scope"> + <span :class="Number(scope.row.taxesIncome1) < 0 ? 'fontColorRed' : ''">{{scope.row.taxesIncome1}}</span> + </template> + </el-table-column> + <el-table-column + align="center" + prop="pay1" + label="鏈湀鏀嚭"> + <template slot-scope="scope"> + <span :class="Number(scope.row.pay1) < 0 ? 'fontColorRed' : ''">{{scope.row.pay1}}</span> + </template> + </el-table-column> + <el-table-column + align="center" + prop="balance1" + label="鏈湀缁撲綑"> + <template slot-scope="scope"> + <span :class="Number(scope.row.balance1) < 0 ? 'fontColorRed' : ''">{{scope.row.balance1}}</span> + </template> + </el-table-column> + </el-table-column> + <el-table-column v-if="tableData[0]" :label="tableData[0].month2" align="center"> + <el-table-column + align="center" + prop="totalIncome2" + label="鎬绘敹鍏�"> + <template slot-scope="scope"> + <span :class="Number(scope.row.totalIncome2) < 0 ? 'fontColorRed' : ''">{{scope.row.totalIncome2}}</span> + </template> + </el-table-column> + <el-table-column + align="center" + prop="taxesIncome2" + label="寰侀泦鏀跺叆"> + <template slot-scope="scope"> + <span :class="Number(scope.row.taxesIncome2) < 0 ? 'fontColorRed' : ''">{{scope.row.taxesIncome2}}</span> + </template> + </el-table-column> + <el-table-column + align="center" + prop="pay2" + label="鏈湀鏀嚭"> + <template slot-scope="scope"> + <span :class="Number(scope.row.pay2) < 0 ? 'fontColorRed' : ''">{{scope.row.pay2}}</span> + </template> + </el-table-column> + <el-table-column + align="center" + prop="balance2" + label="鏈湀缁撲綑"> + <template slot-scope="scope"> + <span :class="Number(scope.row.balance2) < 0 ? 'fontColorRed' : ''">{{scope.row.balance2}}</span> + </template> + </el-table-column> + </el-table-column> + <el-table-column v-if="tableData[0]" :label="tableData[0].month3" align="center"> + <el-table-column + align="center" + prop="totalIncome3" + label="鎬绘敹鍏�"> + <template slot-scope="scope"> + <span :class="Number(scope.row.totalIncome3) < 0 ? 'fontColorRed' : ''">{{scope.row.totalIncome3}}</span> + </template> + </el-table-column> + <el-table-column + align="center" + prop="taxesIncome3" + label="寰侀泦鏀跺叆"> + <template slot-scope="scope"> + <span :class="Number(scope.row.taxesIncome3) < 0 ? 'fontColorRed' : ''">{{scope.row.taxesIncome3}}</span> + </template> + </el-table-column> + <el-table-column + align="center" + prop="pay3" + label="鏈湀鏀嚭"> + <template slot-scope="scope"> + <span :class="Number(scope.row.pay3) < 0 ? 'fontColorRed' : ''">{{scope.row.pay3}}</span> + </template> + </el-table-column> + <el-table-column + align="center" + prop="balance3" + label="鏈湀缁撲綑"> + <template slot-scope="scope"> + <span :class="Number(scope.row.balance3) < 0 ? 'fontColorRed' : ''">{{scope.row.balance3}}</span> + </template> + </el-table-column> + </el-table-column> + <el-table-column v-if="tableData[0]" :label="tableData[0].month4" align="center"> + <el-table-column + align="center" + prop="totalIncome4" + label="鎬绘敹鍏�"> + <template slot-scope="scope"> + <span :class="Number(scope.row.totalIncome4) < 0 ? 'fontColorRed' : ''">{{scope.row.totalIncome4}}</span> + </template> + </el-table-column> + <el-table-column + align="center" + prop="taxesIncome4" + label="寰侀泦鏀跺叆"> + <template slot-scope="scope"> + <span :class="Number(scope.row.taxesIncome4) < 0 ? 'fontColorRed' : ''">{{scope.row.taxesIncome4}}</span> + </template> + </el-table-column> + <el-table-column + align="center" + prop="pay4" + label="鏈湀鏀嚭"> + <template slot-scope="scope"> + <span :class="Number(scope.row.pay4) < 0 ? 'fontColorRed' : ''">{{scope.row.pay4}}</span> + </template> + </el-table-column> + <el-table-column + align="center" + prop="balance4" + label="鏈湀缁撲綑"> + <template slot-scope="scope"> + <span :class="Number(scope.row.balance4) < 0 ? 'fontColorRed' : ''">{{scope.row.balance4}}</span> + </template> + </el-table-column> + </el-table-column> + <el-table-column + align="center" + prop="surplus" + label="绱缁撲綑"> + <template slot-scope="scope"> + <span :class="Number(scope.row.surplus) < 0 ? 'fontColorRed' : ''">{{scope.row.surplus}}</span> + </template> + </el-table-column> + </el-table> + <div class="shebaoShouzhiZongbiaoEcharts" id="shebaoShouzhiZongbiaoEcharts"></div> + </div> + </div> </template> <script> - export default { - name: "shebaoShouzhiZongbiao" + import nowSize from "../../../../libs/nowSize"; + import {getStatisticsTable,getStatisticsChart } from '@/api/shehuiBaozhang' + import index from "../../index/index"; +export default { + name: "shebaoShouzhiZongbiao", + data() { + return { + tableHead:[], + tableData:[], + headerArry:{}, + echartsSeries:{} } + }, + mounted() { + this.getStatisticsTable() + this.getStatisticsChart() + }, + methods: { + getStatisticsTable() { + getStatisticsTable().then(res => { + if(res.code == 1000) { + this.tableData = res.list + res.list.forEach((item,index) => { + if(index == 0) { + this.headerArry = item + console.log(this.headerArry,'this.headerArry====') + } + }) + } + }) + }, + shebaoShouzhiZongbiaoEcharts() { + let myEchart = this.$echarts.init(document.getElementById('shebaoShouzhiZongbiaoEcharts')) + let option = { + color : ['#FF5151','#51FF5D','#FFD151','#FFD151'], + title: { + text: '鍘嗗勾绀句繚鍩洪噾绱鏁版嵁鍒嗘瀽鍥�', + left: 'center', + top: '8%', + textStyle: { + color: '#FFFFFF', + fontSize: nowSize(30) + }, + }, + tooltip: { + trigger: 'axis' + }, + legend: { + itemWidth: nowSize(30), + itemHeight: nowSize(4), + itemGap: nowSize(50), + right:'2%', + top: 'center', + orient: 'vertical', + textStyle: { + color: '#FFFFFF', + fontSize: nowSize(24), + } + }, + grid: { + top: '15%', + left: '4%', + right: '18%', + bottom: '9%', + containLabel: true + }, + xAxis: { + type: 'category', + boundaryGap: false, + data: this.echartsSeries.years, + axisLabel: { + show: true, + textStyle: { + color: "#fff", + fontSize:nowSize(24) + } + }, + axisLine: { + lineStyle: { + color: "#999999", + width: 1, + type: "solid" + } + }, + splitLine: { + show: false + } + }, + yAxis: { + type: 'value', + axisLabel: { + show: true, + textStyle: { + color: "#fff", + fontSize:nowSize(24) + } + }, + axisLine: { + lineStyle: { + color: "#999999", + width: 1, + type: "solid" + } + }, + splitLine: { + show: false + } + }, + series: [ + { + name: '骞寸疮璁℃�绘敹鍏�', + type: 'line', + data: this.echartsSeries.income + }, + { + name: '骞寸疮璁℃敮鍑�', + type: 'line', + data: this.echartsSeries.pay + }, + { + name: '骞寸疮璁″緛缂存敹鍏�', + type: 'line', + data: this.echartsSeries.taxes + }, + { + name: '骞寸疮璁$粨浣�', + type: 'line', + data:this.echartsSeries.balance + } + ] + }; + myEchart.setOption(option) + window.addEventListener('resize',function () { + myEchart.resize() + }) + }, + handleCellStyle({row, column, rowIndex, columnIndex}) { + if(columnIndex == 0) { + return { background:'#51D2FF' } + } + }, + //35. 鏌ヨ鍘嗗勾绀句繚鍩洪噾鏁版嵁鍒嗘瀽鍥炬暟鎹帴鍙� + getStatisticsChart() { + getStatisticsChart().then(res => { + if(res.code ===1000){ + this.echartsSeries = res.obj + this.shebaoShouzhiZongbiaoEcharts() + } + }) + } + } +} </script> -<style scoped> +<style lang="scss"> +@import "../../../../assets/css/base"; +.shebaoShouzhiZongbiao-table{ + width: 100%; + height: calc(100% - 0.078125rem /* 20/256 */); + margin-top: 0.078125rem /* 20/256 */; + /*.el-table .cell, el-table th > .cell{*/ + /* display: inline-block;*/ + /* white-space: nowrap;*/ + /* width: auto;*/ + /* overflow: auto;*/ + /*}*/ + .el-table th.el-table__cell{ + background-color:$color-blue; + height: 0.3125rem /* 80/256 */; + } + .el-table tr{ + height: 0.3125rem /* 80/256 */; + } + .el-table tr:nth-child(odd){ + background-color: #CEF2FF; + } + .el-table tr:nth-child(even){ + background-color: #A8E9FF; + } + .el-table, .el-table__expanded-cell{ + background-color: transparent; + } + .el-table thead{ + color: $color-darkGrey; + } + .el-table{ + color: $color-darkGrey; + } + .el-table .cell{ + font-size: $fontSize-28; + color: $color-darkGrey; + font-weight: 300; + line-height: 1; + white-space:pre-line; + } + .el-table--border th.el-table__cell, .el-table__fixed-right-patch{ + border-bottom:1Px solid $color-grey; /*no*/ + } + .el-table thead.is-group th.el-table__cell{ + background-color: $color-blue; + } + .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf{ + border-bottom:1Px solid $color-grey; /*no*/ + } + .el-table--border .el-table__cell, .el-table__body-wrapper .el-table--border.is-scrolling-left~.el-table__fixed{ + border-right:1Px solid $color-grey; /*no*/ + } +} +</style> +<style lang="scss" scoped> +@import "../../../../assets/css/base"; +.shebaoShouzhiZongbiao-wrap{ + width: 100%; + height: calc(100% - 0.078125rem /* 20/256 */); + .shebaoShouzhiZongbiao-table{ + margin-top: 0.078125rem /* 20/256 */; + h1{ + font-size: $fontSize-30; + color: $color-white; + text-align: center; + line-height: 2; + } + .fontColorBlue { + color: $color-blue; + } + .fontColorRed { + color: #FF3939; + } + } + .shebaoShouzhiZongbiaoEcharts{ + height: calc(100% - 640px - 0.33203125rem /* 85/256 */); + } +} </style> -- Gitblit v1.9.1