付延余
2022-04-15 bd73b450b86d4db3cd0b94263df6ec645776dac5
src/pages/show/otherBusiness/otherBusinessChild/OtherB_PeopleJunShouRu.vue
@@ -7,28 +7,35 @@
        style="width: 100%">
        <el-table-column
          prop="year"
          label="年份">
          label="年份" min-width="80">
        </el-table-column>
        <el-table-column
          label="国民人均可支配收入">
          <el-table-column
            prop="shouru"
            label="收入(元)"
            min-width="80"
          >
          </el-table-column>
          <el-table-column
            prop="quanshengpaiwei"
            label="全省排名"
            min-width="80"
          >
          </el-table-column>
          <el-table-column
            prop="zengzhang"
            label="增长"
            min-width="80"
          >
          </el-table-column>
          <el-table-column
            prop="quanshengpaiwei1"
            label="全省排位"
            min-width="80"
          >
          </el-table-column>
        </el-table-column>
@@ -36,21 +43,29 @@
          <el-table-column
            prop="shouru1"
            label="收入(元)"
            min-width="80"
          >
          </el-table-column>
          <el-table-column
            prop="quanshengpaiwei2"
            label="全省排位"
            min-width="80"
          >
          </el-table-column>
          <el-table-column
            prop="zengzhang1"
            label="增长"
            min-width="80"
          >
          </el-table-column>
          <el-table-column
            prop="quanshengpaiwei3"
            label="全省排位"
            min-width="80"
          >
          </el-table-column>
        </el-table-column>
@@ -58,21 +73,27 @@
          <el-table-column
            prop="shouru2"
            label="收入(元)"
            min-width="80"
          >
          </el-table-column>
          <el-table-column
            prop="quashengpaiwei4"
            label="全省排位"
            min-width="80"
          >
          </el-table-column>
          <el-table-column
            prop="zengzhang2"
            label="增长 "
            min-width="80"
          >
          </el-table-column>
          <el-table-column
            prop="quanshengpaiwei5"
            label="全省排位"
            min-width="80"
          >
          </el-table-column>
        </el-table-column>
@@ -85,6 +106,8 @@
</template>
<script>
import nowSize from '../../../../libs/nowSize'
export default {
  name: "OtherB_PerpleJunShouRu",
  data() {
@@ -103,21 +126,178 @@
        quashengpaiwei4: 3,
        zengzhang2: '4.4%',
        quanshengpaiwei5: 6
      }, {
        year: 2020,
        shouru: 30955,
        quanshengpaiwei: 3,
        zengzhang: '5.5%',
        quanshengpaiwei1: 9,
        shouru1: 40243,
        quanshengpaiwei2: 3,
        zengzhang1: '4.4%',
        quanshengpaiwei3: 6,
        shouru2: 40243,
        quashengpaiwei4: 3,
        zengzhang2: '4.4%',
        quanshengpaiwei5: 6
      }]
      },
        {
          year: 2020,
          shouru: 30955,
          quanshengpaiwei: 3,
          zengzhang: '5.5%',
          quanshengpaiwei1: 9,
          shouru1: 40243,
          quanshengpaiwei2: 3,
          zengzhang1: '4.4%',
          quanshengpaiwei3: 6,
          shouru2: 40243,
          quashengpaiwei4: 3,
          zengzhang2: '4.4%',
          quanshengpaiwei5: 6
        }],
      option: {
        color: ['#FF5151', '#51FF5D', '#FFD151'],
        title: {
          text: '历年全市居民人均可支配收入分析图',
          left: 'center',
          top: '5%',
          textStyle: {
            color: '#FFFFFF',
            fontSize: nowSize(30)
          }
        },
        tooltip: {
          trigger: 'axis'
        },
        legend: {
          right: '5%',
          top: 'center',
          orient: 'vertical',
          itemWidth: nowSize(30),
          itemHeight: nowSize(4),
          itemGap: nowSize(80),
          textStyle: {
            color: '#FFFFFF',
            fontSize: nowSize(24),
          }
        },
        grid: {
          left: '10%',
          right: '20%',
          bottom: '0%',
          containLabel: true
        },
        xAxis: {
          name: '单位:年',
          nameTextStyle: {
            color: '#FFFFFF',
            fontSize: nowSize(24)
          },
          nameGap: nowSize(92),// 坐标轴名称与轴线之间的距离。
          type: 'category',
          boundaryGap: false,// 坐标轴两端留白
          data: ['2017年', '2018年', '2019年', '2020年', '2021年'],
          axisLabel: {
            show: true,
            textStyle: {
              color: '#fff',
              fontSize: nowSize(24)
            },
          },
          axisLine: {
            lineStyle: {
              color: '#999999',
              width: 1,   //这里是坐标轴的宽度,可以去掉
              type: 'solid'
            }
          },
          splitLine: {
            show: false
          }
        },
        yAxis: {
          name: '单位:年',
          nameTextStyle: {
            color: '#FFFFFF',
            fontSize: nowSize(24)
          },
          nameGap: nowSize(30),// 坐标轴名称与轴线之间的距离。
          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',
            smooth: false,  //设置折线为圆滑曲线,false则有转折点
            // symbol:'none', //默认显示折点,为none时不显示
            itemStyle: {
              normal: {
                lineStyle: {
                  width: 3, //折线宽度
                }
              }
            },
            emphasis: {   //鼠标经过时折点小圆圈样式
              borderColor: 'rgba(0,196,132,0.2)',
              borderWidth: 100
            },
            stack: 'Total',
            data: [120, 132, 101, 134, 90, 230]
          },
          {
            name:'城镇居民',
            type: 'line',
            smooth: false,  //设置折线为圆滑曲线,false则有转折点
            // symbol:'none', //默认显示折点,为none时不显示
            itemStyle: {
              normal: {
                lineStyle: {
                  width: 3, //折线宽度
                }
              }
            },
            emphasis: {   //鼠标经过时折点小圆圈样式
              borderColor: 'rgba(0,196,132,0.2)',
              borderWidth: 100
            },
            stack: 'Total',
            data: [220, 182, 191, 234, 290, 330]
          },
          {
            name:'农村居民',
            type: 'line',
            smooth: false,  //设置折线为圆滑曲线,false则有转折点
            // symbol:'none', //默认显示折点,为none时不显示
            itemStyle: {
              normal: {
                lineStyle: {
                  width: 3, //折线宽度
                }
              }
            },
            emphasis: {   //鼠标经过时折点小圆圈样式
              borderColor: 'rgba(0,196,132,0.2)',
              borderWidth: 100
            },
            stack: 'Total',
            data: [150, 232, 201, 154, 190, 330]
          }
        ]
      }
    }
  },
  mounted() {
    this.Init_echarts()
  },
  methods: {
    Init_echarts() {
      const option = this.option
      const myChart = this.$echarts.init(document.querySelector('.OtherB-PeopleJunShouRu__echart'));
      option && myChart.setOption(this.option)
    }
  }
}
@@ -127,6 +307,9 @@
@import "../../../../assets/css/base";
.OtherB-PeopleJunShouRu__table {
  .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell{
    background:transparent;
  }
  width: 100%;
  height: calc(100% - 0.078125rem /* 20/256 */
  );
@@ -142,7 +325,6 @@
  .el-table tr {
    height: 0.3125rem; /* 80/256 */
  }
  .el-table tr:nth-child(odd) {
@@ -192,7 +374,7 @@
  .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*/
    height:0.46875rem;//表格正文行高度
    height: 0.46875rem; //表格正文行高度
  }
}
</style>
@@ -205,6 +387,7 @@
  //);
  .OtherB-PeopleJunShouRu__table {
    width:100%;
    margin-top: 0.078125rem /* 20/256 */
  ;
@@ -215,11 +398,11 @@
      line-height: 2;
    }
  }
  .OtherB-PeopleJunShouRu__echart{
    width:8.75rem;
    height:2.75rem;
    background: blue;
    margin-top:120px;
  .OtherB-PeopleJunShouRu__echart {
    width: 8.75rem;
    height: 2.75rem;
    margin-top: 120px;
  }
}
</style>