stat_capital.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <view class="page-box-bg-fff m-t20 r-30 p-30">
  3. <!-- 标题插槽 -->
  4. <StatisticsTitle :genre="genre" :leftText="leftText" :rightText="rightText" @onHandle="onHandle"></StatisticsTitle>
  5. <view class="row-justify-sb center p-lr20">
  6. <view class="capital_item">
  7. <view class="row-c flex">
  8. <view class="wh-14 r-100 m-r10" :style="{background:bgColor[leftColor]}"></view>
  9. <text class="size-24 text-color-576">消金类产品4笔</text>
  10. </view>
  11. <view class="sys-weight-600 m-l20 m-tb10">
  12. <text class="size-32 text-color-081">50</text>
  13. <text class="size-28 text-color-081">万</text>
  14. </view>
  15. <text class="size-28 text-color-00B sys-weight-600 m-l20" :style="{color:bgColor[leftColor]}">29.4%</text>
  16. </view>
  17. <view class="chart_item column-c m-lr20">
  18. <CircleChart :bgColor="'#2B7DFA'"></CircleChart>
  19. </view>
  20. <view class="capital_item">
  21. <view class="row-c flex">
  22. <view class="wh-14 r-100 m-r10" :style="{background:bgColor[rightColor]}"></view>
  23. <text class="size-24 text-color-576">消金类产品4笔</text>
  24. </view>
  25. <view class="sys-weight-600 m-l20 m-tb10">
  26. <text class="size-32 text-color-081">50</text>
  27. <text class="size-28 text-color-081">万</text>
  28. </view>
  29. <text class="size-28 text-color-00B sys-weight-600 m-l20" :style="{color:bgColor[rightColor]}">29.4%</text>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import CircleChart from "@/common/chart/circle_chart.vue";
  36. import StatisticsTitle from "@/common/statistics/statistics_title.vue"
  37. export default {
  38. name: 'capital_chart',
  39. components: {
  40. CircleChart,
  41. StatisticsTitle
  42. },
  43. props: {
  44. genre:{
  45. type: Number,
  46. default: 0
  47. },
  48. leftText: {
  49. type: String,
  50. default: ''
  51. },
  52. rightText: {
  53. type: String,
  54. default: '同比环比'
  55. },
  56. leftColor: {
  57. type: Number,
  58. default: 0
  59. },
  60. rightColor:{
  61. type: Number,
  62. default: 0
  63. }
  64. },
  65. data() {
  66. return {
  67. bgColor: ['#00BF8A', '#2B7DFA', '#ED9A2C']
  68. };
  69. }
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. .capital_item{
  74. width: 200rpx;
  75. text-align: left;
  76. }
  77. </style>