stat_industry.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <view class="page-box-bg-fff m-t20 r-30 p-30">
  3. <StatisticsTitle :is_right="false" :genre="0" :leftText="'行业占比(金额排行)'" :rightText="''">
  4. </StatisticsTitle>
  5. <view class="page-box-bg-fff row-justify-sb center r-30">
  6. <view class="chart_item column-c m-lr20">
  7. <RoseChart ref="roseChart"></RoseChart>
  8. </view>
  9. <view class="row industry-box m-l30">
  10. <view class="row-c p-tb10 industry-item m-r30" v-if="index<=5"
  11. v-for="(item,index) in industryList.titles" :key="index">
  12. <view class="wh-14 m-r10" :class="'industry-icon-'+index"></view>
  13. <text class="size-24 text-color-576">{{item}}</text>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import RoseChart from "@/common/chart/rose_chart.vue";
  21. import StatisticsTitle from "./statistics_title.vue";
  22. export default {
  23. name: 'stat-industry',
  24. components: {
  25. RoseChart,
  26. StatisticsTitle
  27. },
  28. props: {
  29. 'industryList': {
  30. default: () => {
  31. return {
  32. oneMoney: [],
  33. oneNum: [],
  34. roseData: [],
  35. titles: [],
  36. }
  37. }
  38. }
  39. },
  40. data() {
  41. return {};
  42. },
  43. methods: {
  44. onChange(e) {
  45. this.current = e
  46. },
  47. setData(data) {
  48. console.log(data)
  49. this.$refs.roseChart.setServerData(data)
  50. }
  51. }
  52. }
  53. </script>
  54. <style lang="scss" scoped>
  55. .industry-box {
  56. flex-wrap: wrap;
  57. .industry-item {
  58. width: 120rpx;
  59. .industry-icon-0 {
  60. background-color: #2C7DF9;
  61. }
  62. .industry-icon-1 {
  63. background-color: #00BF8A;
  64. }
  65. .industry-icon-2 {
  66. background-color: #ED9A2C;
  67. }
  68. .industry-icon-3 {
  69. background-color: #EE6666;
  70. }
  71. .industry-icon-4 {
  72. background-color: #73C0DE;
  73. }
  74. .industry-icon-5 {
  75. background-color: #9A60B4;
  76. }
  77. }
  78. }
  79. </style>