topData.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <div class="topDataBlock">
  3. <div class="topData">
  4. <div class="DataTitle">创客项目人数</div>
  5. <div class="topData_value">
  6. <span>{{data.people}}</span>
  7. <span><img src="@/assets/img/upIcon.png"></span>
  8. </div>
  9. </div>
  10. <div class="topData">
  11. <div class="DataTitle">目前积累创客项目数量</div>
  12. <div class="topData_value">
  13. <span>{{ data.project }}</span>
  14. </div>
  15. </div>
  16. <div class="topData">
  17. <div class="DataTitle">创客活动数量</div>
  18. <div class="topData_value">
  19. <span>{{ data.activity }}</span>
  20. </div>
  21. </div>
  22. <div class="topData">
  23. <div class="DataTitle">学院目前资金总预算</div>
  24. <div class="topData_value">
  25. <span>{{ data.budget }}</span>
  26. <span>(千万)</span>
  27. </div>
  28. </div>
  29. <div class="topData">
  30. <div class="DataTitle">已支出预算</div>
  31. <div class="topData_value">
  32. <span>{{ data.isPay }}</span>
  33. <span>(千万)</span>
  34. </div>
  35. </div>
  36. </div>
  37. </template>
  38. <script>
  39. export default {
  40. props:['data']
  41. }
  42. </script>
  43. <style lang="less" scoped>
  44. .topDataBlock{
  45. margin-top: 20px;
  46. width: 100%;
  47. height: 130px;
  48. // background: #b65f5f;
  49. display: flex;
  50. justify-content:space-between;
  51. align-items: center;
  52. .topData{
  53. width: 19%;
  54. height: 94%;
  55. border-radius: 5px;
  56. box-sizing: border-box;
  57. position: relative;
  58. // padding: 15px 10px 10px 35px;
  59. .DataTitle{
  60. margin: 15px 10px 10px 0px;
  61. color: white;
  62. font-size: 18px;
  63. position: relative;
  64. box-sizing: border-box;
  65. padding-left: 35px;
  66. width: 100%;
  67. text-overflow: ellipsis;
  68. display: flex;
  69. overflow: hidden;
  70. white-space: nowrap;
  71. &::after{
  72. content: '';
  73. display: block;
  74. position: absolute;
  75. width: 7px;
  76. height: 86%;
  77. top: 7%;
  78. left: 23px;
  79. background-color: white;
  80. }
  81. }
  82. .topData_value{
  83. width: auto;
  84. height: 40%;
  85. margin: 15px 20px 10px 20px;
  86. display: flex;
  87. align-items: center;
  88. color: white;
  89. span{
  90. height: 100%;
  91. display: flex;
  92. // align-items: flex-end;
  93. }
  94. span:nth-of-type(1){
  95. font-size: 2.8em;
  96. }
  97. span:nth-of-type(2){
  98. align-items: flex-end;
  99. img{
  100. height: 32px;
  101. margin-left: 5px;
  102. }
  103. }
  104. }
  105. }
  106. .topData:nth-child(1){
  107. background-image: linear-gradient(100deg, #3caef5 60%,#497df5);
  108. }
  109. .topData:nth-child(2){
  110. background-image: linear-gradient(100deg, #fcb871 60%,#f77c5f);
  111. }
  112. .topData:nth-child(3){
  113. background-image: linear-gradient(100deg, #3ce0ea 60%,#29bfa3);
  114. }
  115. .topData:nth-child(4){
  116. background-image: linear-gradient(100deg, #3caef5 60%,#497df5);
  117. }
  118. .topData:nth-child(5){
  119. background-image: linear-gradient(100deg, #fcb871 60%,#f77c5f);
  120. }
  121. }
  122. </style>