personnel_orientation.vue 3.2 KB

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