Rap 原分销系统代码Web
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

182 рядки
4.2KB

  1. <template>
  2. <el-row :gutter="40" class="panel-group">
  3. <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
  4. <div class="card-panel" @click="handleSetLineChartData('newVisitis')">
  5. <div class="card-panel-icon-wrapper icon-people">
  6. <svg-icon icon-class="peoples" class-name="card-panel-icon" />
  7. </div>
  8. <div class="card-panel-description">
  9. <div class="card-panel-text">
  10. New Visits
  11. </div>
  12. <count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" />
  13. </div>
  14. </div>
  15. </el-col>
  16. <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
  17. <div class="card-panel" @click="handleSetLineChartData('messages')">
  18. <div class="card-panel-icon-wrapper icon-message">
  19. <svg-icon icon-class="message" class-name="card-panel-icon" />
  20. </div>
  21. <div class="card-panel-description">
  22. <div class="card-panel-text">
  23. Messages
  24. </div>
  25. <count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" />
  26. </div>
  27. </div>
  28. </el-col>
  29. <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
  30. <div class="card-panel" @click="handleSetLineChartData('purchases')">
  31. <div class="card-panel-icon-wrapper icon-money">
  32. <svg-icon icon-class="money" class-name="card-panel-icon" />
  33. </div>
  34. <div class="card-panel-description">
  35. <div class="card-panel-text">
  36. Purchases
  37. </div>
  38. <count-to :start-val="0" :end-val="9280" :duration="3200" class="card-panel-num" />
  39. </div>
  40. </div>
  41. </el-col>
  42. <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
  43. <div class="card-panel" @click="handleSetLineChartData('shoppings')">
  44. <div class="card-panel-icon-wrapper icon-shopping">
  45. <svg-icon icon-class="shopping" class-name="card-panel-icon" />
  46. </div>
  47. <div class="card-panel-description">
  48. <div class="card-panel-text">
  49. Shoppings
  50. </div>
  51. <count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num" />
  52. </div>
  53. </div>
  54. </el-col>
  55. </el-row>
  56. </template>
  57. <script>
  58. import CountTo from 'vue-count-to'
  59. export default {
  60. components: {
  61. CountTo
  62. },
  63. methods: {
  64. handleSetLineChartData(type) {
  65. this.$emit('handleSetLineChartData', type)
  66. }
  67. }
  68. }
  69. </script>
  70. <style lang="scss" scoped>
  71. .panel-group {
  72. margin-top: 18px;
  73. .card-panel-col {
  74. margin-bottom: 32px;
  75. }
  76. .card-panel {
  77. height: 108px;
  78. cursor: pointer;
  79. font-size: 12px;
  80. position: relative;
  81. overflow: hidden;
  82. color: #666;
  83. background: #fff;
  84. box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
  85. border-color: rgba(0, 0, 0, .05);
  86. &:hover {
  87. .card-panel-icon-wrapper {
  88. color: #fff;
  89. }
  90. .icon-people {
  91. background: #40c9c6;
  92. }
  93. .icon-message {
  94. background: #36a3f7;
  95. }
  96. .icon-money {
  97. background: #f4516c;
  98. }
  99. .icon-shopping {
  100. background: #34bfa3
  101. }
  102. }
  103. .icon-people {
  104. color: #40c9c6;
  105. }
  106. .icon-message {
  107. color: #36a3f7;
  108. }
  109. .icon-money {
  110. color: #f4516c;
  111. }
  112. .icon-shopping {
  113. color: #34bfa3
  114. }
  115. .card-panel-icon-wrapper {
  116. float: left;
  117. margin: 14px 0 0 14px;
  118. padding: 16px;
  119. transition: all 0.38s ease-out;
  120. border-radius: 6px;
  121. }
  122. .card-panel-icon {
  123. float: left;
  124. font-size: 48px;
  125. }
  126. .card-panel-description {
  127. float: right;
  128. font-weight: bold;
  129. margin: 26px;
  130. margin-left: 0px;
  131. .card-panel-text {
  132. line-height: 18px;
  133. color: rgba(0, 0, 0, 0.45);
  134. font-size: 16px;
  135. margin-bottom: 12px;
  136. }
  137. .card-panel-num {
  138. font-size: 20px;
  139. }
  140. }
  141. }
  142. }
  143. @media (max-width:550px) {
  144. .card-panel-description {
  145. display: none;
  146. }
  147. .card-panel-icon-wrapper {
  148. float: none !important;
  149. width: 100%;
  150. height: 100%;
  151. margin: 0 !important;
  152. .svg-icon {
  153. display: block;
  154. margin: 14px auto !important;
  155. float: none !important;
  156. }
  157. }
  158. }
  159. </style>