operationalAnalysis.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <view class="report">
  3. <view class="report-header">
  4. <view class="report-header-left">
  5. 营收趋势分析
  6. </view>
  7. <view class="report-header-right">
  8. <view class="report-header-right-item" :class="{'current': current === 1}" @click="current = 1">日</view>
  9. <view class="report-header-right-item" :class="{'current': current === 2}" @click="current = 2">月</view>
  10. <view class="report-header-right-item" :class="{'current': current === 3}" @click="current = 3">年</view>
  11. </view>
  12. </view>
  13. <view class="charts-box">
  14. <qiun-data-charts type="column" :chartData="chartData" :opts="opts" />
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. current: 3,
  23. chartData: {
  24. categories: ["党固路",
  25. "富强路",
  26. "玉兔山路",
  27. "顺时路",
  28. "本杰路",
  29. "可处路",
  30. "物资路",
  31. "桂花苑路",
  32. "丰林路",
  33. "教育路"
  34. ],
  35. series: [{
  36. data: [100,
  37. 140,
  38. 230,
  39. 100,
  40. 130,
  41. 100,
  42. 100,
  43. 100,
  44. 100,
  45. 100
  46. ]
  47. }],
  48. },
  49. opts: {
  50. xAxis: {
  51. rotateLabel: true
  52. },
  53. yAxis: {
  54. showTitle: true,
  55. splitNumber: 5,
  56. data: [
  57. {
  58. title: '收益(元)',
  59. max: 250
  60. }
  61. ]
  62. },
  63. legend: {
  64. show: false
  65. },
  66. padding: [10, 0, 10, 0],
  67. extra: {
  68. column: {
  69. width: 20
  70. }
  71. }
  72. }
  73. }
  74. },
  75. methods: {
  76. }
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. .report {
  81. padding: 28rpx;
  82. font-family: PingFangSC-regular;
  83. &-header {
  84. display: flex;
  85. align-items: center;
  86. &-left {
  87. border-left: solid 4px #EC0D0D;
  88. padding-left: 10rpx;
  89. color: #101010;
  90. font-size: 30rpx;
  91. margin-right: 40rpx;
  92. }
  93. &-right {
  94. display: flex;
  95. &-item {
  96. width: 100rpx;
  97. height: 60rpx;
  98. line-height: 60rpx;
  99. text-align: center;
  100. border: solid 1px #008CFF;
  101. border-right: none;
  102. &:last-child {
  103. border-radius: 0 8rpx 8rpx 0;
  104. border-right: solid 1px #008CFF;
  105. }
  106. &:first-child {
  107. border-radius: 8rpx 0 0 8rpx;
  108. }
  109. }
  110. .current {
  111. background-color: #008CFF;
  112. color: #fff;
  113. }
  114. }
  115. }
  116. .charts-box {
  117. margin-top: 30rpx;
  118. width: 100%;
  119. height: 700rpx;
  120. }
  121. }
  122. </style>