box-item.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <div class="bottom-charts">
  3. <div class="bc-chart-item">
  4. <div class="bcci-header">赵钱收费站</div>
  5. <dv-active-ring-chart :config="config1" />
  6. <Label-Tag :config="labelConfig" />
  7. </div>
  8. <dv-decoration-2 class="decoration-1" :reverse="true" style="width: 5px" />
  9. <div class="bc-chart-item">
  10. <div class="bcci-header">孙李收费站</div>
  11. <dv-active-ring-chart :config="config2" />
  12. <Label-Tag :config="labelConfig" />
  13. </div>
  14. <dv-decoration-2 class="decoration-2" :reverse="true" style="width: 5px" />
  15. <div class="bc-chart-item">
  16. <div class="bcci-header">周吴收费站</div>
  17. <dv-active-ring-chart :config="config3" />
  18. <Label-Tag :config="labelConfig" />
  19. </div>
  20. <dv-decoration-2 class="decoration-3" :reverse="true" style="width: 5px" />
  21. <div class="bc-chart-item">
  22. <div class="bcci-header">郑王收费站</div>
  23. <dv-active-ring-chart :config="config4" />
  24. <Label-Tag :config="labelConfig" />
  25. </div>
  26. </div>
  27. </template>
  28. <script>
  29. import LabelTag from "./LabelTag";
  30. export default {
  31. name: "BottomCharts",
  32. components: {
  33. LabelTag,
  34. },
  35. data() {
  36. return {
  37. config1: {
  38. data: [
  39. {
  40. name: "收费站",
  41. value: 356,
  42. },
  43. {
  44. name: "监控中心",
  45. value: 215,
  46. },
  47. {
  48. name: "道路外场",
  49. value: 90,
  50. },
  51. {
  52. name: "其他",
  53. value: 317,
  54. },
  55. ],
  56. color: ["#00baff", "#3de7c9", "#fff", "#ffc530", "#469f4b"],
  57. radius: "65%",
  58. activeRadius: "70%",
  59. },
  60. config2: {
  61. data: [
  62. {
  63. name: "收费站",
  64. value: 615,
  65. },
  66. {
  67. name: "监控中心",
  68. value: 322,
  69. },
  70. {
  71. name: "道路外场",
  72. value: 198,
  73. },
  74. {
  75. name: "其他",
  76. value: 80,
  77. },
  78. ],
  79. color: ["#00baff", "#3de7c9", "#fff", "#ffc530", "#469f4b"],
  80. radius: "65%",
  81. activeRadius: "70%",
  82. },
  83. config3: {
  84. data: [
  85. {
  86. name: "收费站",
  87. value: 452,
  88. },
  89. {
  90. name: "监控中心",
  91. value: 512,
  92. },
  93. {
  94. name: "道路外场",
  95. value: 333,
  96. },
  97. {
  98. name: "其他",
  99. value: 255,
  100. },
  101. ],
  102. color: ["#00baff", "#3de7c9", "#fff", "#ffc530", "#469f4b"],
  103. radius: "65%",
  104. activeRadius: "70%",
  105. },
  106. config4: {
  107. data: [
  108. {
  109. name: "收费站",
  110. value: 156,
  111. },
  112. {
  113. name: "监控中心",
  114. value: 415,
  115. },
  116. {
  117. name: "道路外场",
  118. value: 90,
  119. },
  120. {
  121. name: "其他",
  122. value: 210,
  123. },
  124. ],
  125. color: ["#00baff", "#3de7c9", "#fff", "#ffc530", "#469f4b"],
  126. radius: "65%",
  127. activeRadius: "70%",
  128. },
  129. labelConfig: {
  130. data: ["收费站", "监控中心", "道路外场", "其他"],
  131. },
  132. };
  133. },
  134. };
  135. </script>
  136. <style lang="less">
  137. .bottom-charts {
  138. width: 100%;
  139. height: 100%;
  140. display: flex;
  141. position: relative;
  142. .bc-chart-item {
  143. width: 25%;
  144. height: 100%;
  145. padding-top: 20px;
  146. box-sizing: border-box;
  147. }
  148. .bcci-header {
  149. height: 50px;
  150. text-align: center;
  151. line-height: 50px;
  152. font-size: 20px;
  153. }
  154. .dv-active-ring-chart {
  155. height: calc(~"100% - 80px");
  156. }
  157. .label-tag {
  158. height: 30px;
  159. }
  160. .active-ring-name {
  161. font-size: 18px !important;
  162. }
  163. .decoration-1,
  164. .decoration-2,
  165. .decoration-3 {
  166. display: absolute;
  167. left: 0%;
  168. }
  169. }
  170. </style>