stat_industry.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. <CircleChart ref="circleChart" :bgColor="'#2B7DFA'"></CircleChart>
  8. </view>
  9. <view class="row industry-box m-l30">
  10. <view class="row-c p-tb10 industry-item" v-if="index<=5" v-for="(item,index) in industryList.titles" :key="index">
  11. <view class="wh-14 m-r10" :class="'industry-icon+'+index"></view>
  12. <text class="size-24 text-color-576">{{item}}</text>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. import CircleChart from "@/common/chart/circle_chart.vue";
  20. import StatisticsTitle from "./statistics_title.vue";
  21. export default {
  22. name: 'stat-industry',
  23. components: {
  24. CircleChart,
  25. StatisticsTitle
  26. },
  27. props: {
  28. 'industryList': {
  29. default: () => {
  30. return {
  31. oneMoney: [],
  32. oneNum: [],
  33. roseData: [],
  34. titles: [],
  35. }
  36. }
  37. }
  38. },
  39. data() {
  40. return {
  41. list: [{
  42. name: '电力',
  43. color: '#2B7DFA'
  44. }, {
  45. name: '信息传媒',
  46. color: '#2B7DFA'
  47. }, {
  48. name: '互联网',
  49. color: '#ED9A2C'
  50. }, {
  51. name: '电力',
  52. color: '#ED9A2C'
  53. }, {
  54. name: '信息传媒',
  55. color: '#00BF8A'
  56. }, {
  57. name: '互联网',
  58. color: '#00BF8A'
  59. }, ]
  60. };
  61. },
  62. methods: {
  63. onChange(e) {
  64. this.current = e
  65. },
  66. methods: {
  67. setData(data){
  68. console.log(data)
  69. this.$refs.circleChart.setServerData(data)
  70. }
  71. },
  72. }
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. .industry-box {
  77. flex-wrap: wrap;
  78. .industry-item {
  79. width: 180rpx;
  80. .industry-icon-0{
  81. background-color: #2C7DF9;
  82. }
  83. .industry-icon-1{
  84. background-color: #2C7DF9;
  85. }
  86. .industry-icon-2{
  87. background-color: #00BF8A;
  88. }
  89. .industry-icon-3{
  90. background-color: #00BF8A;
  91. }
  92. .industry-icon-4{
  93. background-color: #ED9A2C;
  94. }
  95. .industry-icon-5{
  96. background-color: #ED9A2C;
  97. }
  98. }
  99. }
  100. </style>