Blame view

src/views/home/dataView/rightcard.vue 3.02 KB
xiaomiao committed
1
<template>
任超 committed
2
  <div class="rightcard">
任超 committed
3
    <div class="card1 cardCon d-center">
田浩浩 committed
4
      <div class="cardhead">新建国有房屋信息</div>
xiaomiao committed
5
      <div class="cardcontent" style="margin-top: .3646rem">
xiaomiao committed
6 7
        <dv-scroll-board v-if="config.data.length>0" :config="config" class="board" />
         <div v-else="config.data.length==0" class="nodata">暂无数据</div>
xiaomiao committed
8 9
      </div>
    </div>
任超 committed
10
    <div class="card2 cardCon mt-10">
xiaomiao committed
11
      <div class="cardhead">登记业务量</div>
任超 committed
12
      <Rose />
xiaomiao committed
13
    </div>
任超 committed
14
    <div class="card3 cardCon mt-10">
xiaomiao committed
15
      <div class="cardhead">登记类型总量</div>
任超 committed
16
      <columnarsmat />
xiaomiao committed
17 18
    </div>
  </div>
xiaomiao committed
19 20 21
</template>

<script>
xiaomiao committed
22 23
import columnarsmat from "@/components/Echart/Columnarsmat";
import Rose from "@/components/Echart/Rose";
xiaomiao committed
24
import work from "@/api/work";
xiaomiao committed
25
export default {
任超 committed
26
  data () {
xiaomiao committed
27
    return {
任超 committed
28 29 30 31
      config: {
        headerBGC: '#016AC5',
        oddRowBGC: '#154295',
        evenRowBGC: '#154295',
任超 committed
32
        header: ['序号', '用途', '性质', '面积'],
xiaomiao committed
33 34
        data: [],
        key:0
任超 committed
35 36
      }
    }
xiaomiao committed
37
  },
任超 committed
38 39
  components: { columnarsmat, Rose },
  mounted () {
xiaomiao committed
40
    this.addhousetotal();
xiaomiao committed
41
    // scroll(tableref.value.$refs.bodyWrapper);//设置滚动
xiaomiao committed
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
  },
   methods: {
    async addhousetotal () {
      try {
        let {result:res}= await work.addhousetotal();
        console.log("resultssssssssssss",res);
        res.map((item,index) => {
          console.log("item",item);
          console.log("index",index);
          return (
            this.config.data.push([index,item.fwyt,item.fwxz,item.mj])
          )

        });
        console.log("this.config.data",this.config.data);
      } catch (error) {
        console.log("error",error);
      }
    }
任超 committed
61 62
  }
}
xiaomiao committed
63 64
</script>
<style lang="scss" scoped>
任超 committed
65
/deep/.row-item:not(:last-child) {
xiaomiao committed
66
  margin-bottom: .026rem;
任超 committed
67 68
}

任超 committed
69
.rightcard {
任超 committed
70
  width: 32%;
任超 committed
71
  display: flex;
xiaomiao committed
72
  height: calc(100vh - 114px);
任超 committed
73 74
  flex-direction: column;

xiaomiao committed
75
  .cardhead {
xiaomiao committed
76
    font-size: .1042rem;
任超 committed
77 78 79 80 81 82
    font-weight: bold;
    color: #02D9FD;
    text-align: center;
    position: absolute;
    left: 0;
    right: 0;
xiaomiao committed
83
    top: .0625rem;
任超 committed
84
    text-align: center;
xiaomiao committed
85
  }
任超 committed
86

xiaomiao committed
87
  .cardcontent {
任超 committed
88
    width: 100%;
89
    height: 100%;
xiaomiao committed
90 91
    display: -webkit-box;
    overflow: hidden;
xiaomiao committed
92 93 94 95 96 97 98
    .nodata{
 font-size: .1042rem;
 color: #02D9FD;
 font-weight: bold;
 margin:auto;
 margin-top: 120px;
    }
任超 committed
99
  }
xiaomiao committed
100

任超 committed
101
  .cardCon {
xiaomiao committed
102
    padding: .0521rem .026rem;
任超 committed
103 104 105 106
    position: relative;
    text-align: center;
    width: 100%;
  }
任超 committed
107

任超 committed
108
  .card1 {
xiaomiao committed
109 110
     height: 33%;
    background: url("~@/image/xjgyfwxx.png") no-repeat;
任超 committed
111
    background-size: 100% 100%;
任超 committed
112

任超 committed
113 114 115
    .board {
      width: 90%;
      margin: 0 auto;
xiaomiao committed
116 117
      height: 1.1031rem;
      margin-top: .0521rem;
任超 committed
118
    }
任超 committed
119
  }
xiaomiao committed
120

任超 committed
121
  .card2 {
xiaomiao committed
122
    height: 33%;
任超 committed
123 124
    background: url("~@/image/djywl.png") no-repeat;
    background-size: 100% 100%;
xiaomiao committed
125
    padding: .3825rem 0 0 0;
xiaomiao committed
126
  }
任超 committed
127

任超 committed
128
  .card3 {
xiaomiao committed
129
    height: 33%;
任超 committed
130
    flex: 1;
xiaomiao committed
131
    background: url("~@/image/djlxzl.png") no-repeat;
任超 committed
132
    background-size: 100% 100%;
xiaomiao committed
133
    padding-bottom: 0;
任超 committed
134
    .cardhead {
xiaomiao committed
135
      top: .0417rem;
任超 committed
136
    }
xiaomiao committed
137
  }
xiaomiao committed
138

任超 committed
139 140 141
  .cardhead {
    position: absolute;
  }
xiaomiao committed
142
}
xiaomiao committed
143
</style>