stat_capital.vue 2.1 KB

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