rightcard.vue 3.48 KB
<template>
  <div class="rightcard">
    <div class="card1 cardCon d-center">
      <div class="cardhead">登记业务量</div>
      <div class="cardcontent" style="margin-top: .3646rem">
        <dv-scroll-board v-if="config.data.length > 0" :config="config" class="board" />
        <div v-else class="nodata">暂无数据</div>
      </div>
    </div>
    <div class="card2 cardCon mt-10">
      <div class="cardhead">新建国有房屋信息</div>
      <Rose />
    </div>
    <div class="card3 cardCon mt-10">
      <div class="cardhead">登记类型总量</div>
      <columnarsmat />
    </div>
  </div>
</template>

<script>
import columnarsmat from "@/components/Echart/Columnarsmat";
import Rose from "@/components/Echart/Rose";
import work from "@/api/work";
export default {
  data () {
    return {
      config: {
        headerBGC: '#016AC5',
        oddRowBGC: '#154295',
        evenRowBGC: '#154295',
        header: ['序号', '业务名称', '登记业务量'],
        columnWidth: [120, 270, 140],
        data: [],
        key: 0
      }
    }
  },
  components: { columnarsmat, Rose },
  mounted () {
    this.getdjywltotal();
    window.addEventListener("resize", () => {
      this.cdata.seriesData = [];
      this.getdjywltotal();
    });
    // scroll(tableref.value.$refs.bodyWrapper);//设置滚动
  },
  methods: {
    // 获取登记业务量玫瑰图数据
    async getdjywltotal () {
      try {
        let p = {
          DJLX: "",
          QLLX: "",
          XZQDM: "",
        };

        let res = await work.getdjywltotal(p);
        res.result.map((item, index) => {
          this.config.data.push([index, item.AREACODE, item.ywtotal])

        });

        // 遍历修改数组键,作为echars图表的参数


      } catch (error) {
        console.log(error);
      }

    },
  },
}
</script>
<style lang="scss" scoped>
/deep/.row-item:not(:last-child) {
  margin-bottom: 0.026rem;
}

.rightcard {
  width: 30%;
  display: flex;
  height: calc(100vh - 114px);
  flex-direction: column;

  .cardhead {
    font-size: 0.1042rem;
    font-weight: bold;
    color: #02d9fd;
    text-align: center;
    position: absolute;
    left: 0;
    right: 0;
    top: 0.0625rem;
    text-align: center;
  }

  .cardcontent {
    width: 100%;
    height: 100%;
    display: -webkit-box;
    overflow: hidden;

    .nodata {
      font-size: 0.1042rem;
      color: #02d9fd;
      font-weight: bold;
      margin: auto;
      margin-top: 120px;
    }
  }

  .cardCon {
    padding: 0.0521rem 0.026rem;
    position: relative;
    text-align: center;
    width: 100%;
  }

  .card1 {
    height: 33%;
    background: url("~@/image/xjgyfwxx.png") no-repeat;
    background-size: 100% 100%;

    /deep/.dv-scroll-board {
      .header {
        height: 0.1875rem;
        align-items: center;
      }
    }

    .board {
      width: 90%;
      margin: 0 auto;
      height: 1.1031rem;
      margin-top: 0.0521rem;

      /deep/.header {
        font-size: 0.0738rem;
      }

      /deep/.rows {
        .ceil {
          font-size: 0.0738rem;
          color: #6bc1fc;
        }
      }
    }
  }

  .card2 {
    height: 33%;
    background: url("~@/image/djywl.png") no-repeat;
    background-size: 100% 100%;
    padding: 0.3825rem 0 0 0;
    overflow: hidden;
  }

  .card3 {
    height: 33%;
    flex: 1;
    background: url("~@/image/djlxzl.png") no-repeat;
    background-size: 100% 100%;
    padding-bottom: 0;

    .cardhead {
      top: 0.0417rem;
    }
  }

  .cardhead {
    position: absolute;
  }
}
</style>