analysis-card.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view class="analysis-card">
  3. <analysis-card-item :isSubtitle="true" :num="analysisInfo.livelyClub">
  4. <template #title>
  5. <view>活跃机构</view>
  6. </template>
  7. <template #subtitle>
  8. <view>(6个月内有登录商城等行为)</view>
  9. </template>
  10. </analysis-card-item>
  11. <analysis-card-item :isSubtitle="true" :num="analysisInfo.noLivelyClub">
  12. <template #title>
  13. <view>不活跃机构</view>
  14. </template>
  15. <template #subtitle>
  16. <view>(6个月内未登录商城等行为)</view>
  17. </template>
  18. </analysis-card-item>
  19. <analysis-card-item :isPercentage="true" :num="analysisInfo.livelyClubProportion">
  20. <template #title>
  21. <view>活跃机构占比</view>
  22. </template>
  23. </analysis-card-item>
  24. <analysis-card-item :isPercentage="true" :num="analysisInfo.noLivelyClubProportion">
  25. <template #title>
  26. <view>不活跃机构占比</view>
  27. </template>
  28. </analysis-card-item>
  29. </view>
  30. </template>
  31. <script>
  32. import analysisCardItem from './analysis-card-item.vue'
  33. export default {
  34. components: {
  35. analysisCardItem
  36. },
  37. props: {
  38. analysisInfo: {
  39. type: Object,
  40. default: () => ({
  41. livelyClub: 0,
  42. livelyClubProportion: 0,
  43. noLivelyClub: 0,
  44. noLivelyClubProportion: 0
  45. })
  46. }
  47. },
  48. data() {
  49. return {}
  50. },
  51. }
  52. </script>
  53. <style lang="scss">
  54. .analysis-card {
  55. width: 702rpx;
  56. display: grid;
  57. position: relative;
  58. grid-template-columns: repeat(2, 1fr);
  59. grid-template-rows: repeat(2, 1fr);
  60. background-color: #fff;
  61. border-radius: 16rpx;
  62. margin: 0 auto;
  63. &::before {
  64. width: 1px;
  65. height: 200rpx;
  66. content: '';
  67. position: absolute;
  68. left: 50%;
  69. top: 50%;
  70. background-color: #E5E5E5;
  71. transform: translate(-50%, -50%);
  72. }
  73. &::after {
  74. width: 660rpx;
  75. height: 1px;
  76. content: '';
  77. position: absolute;
  78. left: 50%;
  79. top: 50%;
  80. background-color: #E5E5E5;
  81. transform: translate(-50%, -50%);
  82. }
  83. }
  84. </style>