personnel_orientation.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <view class="content">
  3. <view class="charts-box">
  4. <qiun-data-charts type="ring" :opts="ring_1" :chartData="chartData" background="none" />
  5. </view>
  6. <view class="list">
  7. <view class="item" v-for="(item,index) in 3" :key="index">
  8. <view class="title">红柳煤矿</view>
  9. <view class="inner">
  10. <view class="box">
  11. <view class="name">井下人数</view>
  12. <view class="num">286个</view>
  13. </view>
  14. <view class="box">
  15. <view class="name">矿级领导</view>
  16. <view class="num">1个</view>
  17. </view>
  18. <view class="box">
  19. <view class="name">公司领导</view>
  20. <view class="num">0个</view>
  21. </view>
  22. </view>
  23. <view class="right_arrow">
  24. <view class="text">查看详情</view>
  25. <view class="icon"></view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. data() {
  34. return {
  35. chartData: {
  36. categories: [],
  37. "series": [{
  38. "data": [{
  39. "name": "一班",
  40. "value": 50
  41. },
  42. {
  43. "name": "二班",
  44. "value": 30
  45. },
  46. {
  47. "name": "三班",
  48. "value": 20
  49. },
  50. {
  51. "name": "四班",
  52. "value": 18
  53. },
  54. {
  55. "name": "五班",
  56. "value": 8
  57. }
  58. ]
  59. }]
  60. },
  61. ring_1: {
  62. "dataLabel": false,
  63. "legend": {
  64. "position": "bottom",
  65. },
  66. "title": {
  67. "name": "下矿总人数",
  68. "color": "#555",
  69. },
  70. "subtitle": {
  71. "name": "3515人",
  72. "color": "#333",
  73. },
  74. "extra": {
  75. "ring": {
  76. "centerColor": "#F1F1F1",
  77. "border": false,
  78. },
  79. }
  80. }
  81. };
  82. }
  83. }
  84. </script>
  85. <style lang="scss">
  86. page {
  87. background-color: #F1F1F1;
  88. }
  89. /* 请根据需求修改图表容器尺寸,如果父容器没有高度图表则会显示异常 */
  90. .charts-box {
  91. width: 100%;
  92. height: 300px;
  93. }
  94. .content {
  95. width: 750rpx;
  96. box-sizing: border-box;
  97. padding: 25rpx;
  98. }
  99. .list {
  100. .item {
  101. width: 700rpx;
  102. background-color: #FFFFFF;
  103. border-radius: 8px;
  104. overflow: hidden;
  105. margin-bottom: 25rpx;
  106. .title {
  107. line-height: 80rpx;
  108. padding-left: 20rpx;
  109. border-left: 8rpx solid #83DCFC;
  110. border-bottom: 1px solid #eee;
  111. }
  112. .inner {
  113. display: flex;
  114. justify-content: space-around;
  115. .box {
  116. padding: 30rpx 0;
  117. color: #999;
  118. text-align: center;
  119. .name {
  120. line-height: 60rpx;
  121. }
  122. .num {
  123. color: #49C27D;
  124. }
  125. }
  126. .box:nth-child(2) {
  127. .num {
  128. color: #B85A56;
  129. }
  130. }
  131. .box:nth-child(3) {
  132. .num {
  133. color: #34383D;
  134. }
  135. }
  136. }
  137. .right_arrow {
  138. width: 160rpx;
  139. height: 60rpx;
  140. margin-left: 520rpx;
  141. display: flex;
  142. align-items: center;
  143. .text {
  144. font-size: 28rpx;
  145. color: #999999;
  146. margin-right: 8rpx;
  147. }
  148. .icon {
  149. width: 30rpx;
  150. height: 30rpx;
  151. background-image: url(./icon/right.png);
  152. background-size: cover;
  153. background-repeat: no-repeat;
  154. }
  155. }
  156. }
  157. }
  158. </style>