xm-over-view.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <div>
  3. <div :class="$style.box" bordered>
  4. <div :class="$style.boxtext">
  5. <li>{{ today }}</li>
  6. <li>关键用户使用体验监测</li>
  7. </div>
  8. <div :class="$style.boxitems">
  9. <div :class="[$style.items, $style.itemone, $style.action]">
  10. <span :class="$style.number">{{ datalist.operateUserCount || 0 }}</span>
  11. <img src="./image/circle.svg" />
  12. <span :class="$style.itemtit">点击人数</span>
  13. </div>
  14. <div :class="[$style.items, $style.itemtwo, $style.action]">
  15. <span :class="$style.number">{{ datalist.todayOperateCount || 0 }}</span>
  16. <img src="./image/circle.svg" />
  17. <span :class="$style.itemtit">点击总量</span>
  18. </div>
  19. <div :class="[$style.items, $style.itemtwo, $style.action]">
  20. <span :class="$style.number"
  21. >{{ datalist.mobileOperateAvg ? (datalist.mobileOperateAvg / 1000).toFixed(1) : 0 }}
  22. <span :class="$style.second">s</span>
  23. </span>
  24. <img src="./image/circle.svg" />
  25. <span :class="$style.itemtit">移动端<br />平均响应时间</span>
  26. </div>
  27. <div :class="[$style.items, $style.itemone, $style.action]">
  28. <span :class="$style.number"
  29. >{{ datalist.pcOperateAvg ? (datalist.pcOperateAvg / 1000).toFixed(1) : 0 }}
  30. <span :class="$style.second">s</span>
  31. </span>
  32. <img src="./image/circle.svg" />
  33. <span :class="$style.itemtit">PC端<br />平均响应时间</span>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. </template>
  39. <script>
  40. import moment from 'moment'
  41. import TrackService from './track-service'
  42. import components from './_import-components/xm-over-view-import'
  43. export default {
  44. name: 'XmOverView',
  45. metaInfo: {
  46. title: 'OverView',
  47. },
  48. components,
  49. data() {
  50. return {
  51. today: '',
  52. datalist: {},
  53. }
  54. },
  55. mounted() {
  56. this.initData()
  57. this.today = moment().format('YYYY-MM-DD')
  58. },
  59. methods: {
  60. initData() {
  61. TrackService.getTotalCostTime()
  62. .then((res) => {
  63. this.datalist = res.data
  64. })
  65. .catch((e) => {})
  66. },
  67. },
  68. }
  69. </script>
  70. <style module lang="scss">
  71. @use '@/common/design' as *;
  72. .box {
  73. position: absolute;
  74. width: 100%;
  75. height: 100%;
  76. color: $card-background;
  77. background-image: url('./image/bg.png');
  78. background-repeat: no-repeat;
  79. background-position: 50% -12px;
  80. background-size: 90% 90%;
  81. .boxtext {
  82. position: absolute;
  83. top: 30%;
  84. left: 50%;
  85. width: 322px;
  86. font-size: $heading-3-size;
  87. color: $card-background;
  88. text-align: center;
  89. transform: translate(-50%, -50%);
  90. li {
  91. list-style: none;
  92. }
  93. }
  94. .boxitems {
  95. position: absolute;
  96. top: 64%;
  97. right: 0;
  98. left: 0;
  99. display: flex;
  100. justify-content: center;
  101. margin-right: -10px;
  102. .itemone {
  103. margin-top: -20px;
  104. }
  105. .itemtwo {
  106. margin-top: 15px;
  107. }
  108. .items {
  109. position: relative;
  110. margin-right: 10px;
  111. img {
  112. width: 110px;
  113. }
  114. .number {
  115. position: absolute;
  116. width: 110px;
  117. margin-top: -15px;
  118. font-size: $btn-height-lg;
  119. text-align: center;
  120. }
  121. .second {
  122. position: absolute;
  123. margin-top: 10px;
  124. font-size: $padding-lg;
  125. }
  126. .itemtit {
  127. display: block;
  128. width: 110px;
  129. margin-top: 5px;
  130. text-align: center;
  131. }
  132. }
  133. .action {
  134. animation: move 4s infinite;
  135. }
  136. .action:hover {
  137. cursor: pointer;
  138. animation-play-state: paused;
  139. }
  140. }
  141. }
  142. @keyframes move {
  143. 0% {
  144. top: -10px;
  145. }
  146. 50% {
  147. top: 10px;
  148. }
  149. 100% {
  150. top: -10px;
  151. }
  152. }
  153. .bg {
  154. position: absolute;
  155. left: 3%;
  156. width: 465px;
  157. margin: 0 auto;
  158. }
  159. </style>