home.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. <template>
  2. <view class="container">
  3. <view class="top_bg"></view>
  4. <!-- 状态统计区域 -->
  5. <view class="top_types">
  6. <view class="types_box">
  7. <view class="box_num">100</view>
  8. <view class="box_info">工单数</view>
  9. </view>
  10. <view class="types_box">
  11. <view class="box_num">10</view>
  12. <view class="box_info">处理中</view>
  13. </view>
  14. <view class="types_box">
  15. <view class="box_num">50</view>
  16. <view class="box_info">已完成</view>
  17. </view>
  18. <view class="types_box">
  19. <view class="box_num">60</view>
  20. <view class="box_info">已超时</view>
  21. </view>
  22. </view>
  23. <!-- 排班区域 -->
  24. <view class="watch">
  25. <view class="watch_title">
  26. <img src="../../static/images/repairsImg/watch.png" />
  27. 排班
  28. </view>
  29. <!-- 表格区域 -->
  30. <uni-table stripe emptyText="暂无更多数据">
  31. <!-- 表头行 -->
  32. <uni-tr>
  33. <uni-th width="50" align="center">姓名</uni-th>
  34. <uni-th width="50" align="center">工种</uni-th>
  35. <uni-th width="80" align="center">状态</uni-th>
  36. <uni-th width="80" align="center">是否值班</uni-th>
  37. </uni-tr>
  38. <!-- 表格数据行 -->
  39. <uni-tr v-for="(item, index) in tableData" :key="index">
  40. <uni-td align="center">{{ item.name }}</uni-td>
  41. <uni-td align="center">{{ item.type }}</uni-td>
  42. <uni-td align="center">{{ item.status }}</uni-td>
  43. <uni-td align="center">{{ item.work }}</uni-td>
  44. </uni-tr>
  45. </uni-table>
  46. </view>
  47. <!-- 排行榜区域 -->
  48. <view class="rank">
  49. <view class="rank_title">
  50. <img src="../../static/images/repairsImg/rank.png" />
  51. 工单完成排行榜
  52. </view>
  53. <!-- 排行榜柱状图 -->
  54. <view class="rank_charts">
  55. <qiun-data-charts type="bar" :opts="opts" :chartData="chartData" />
  56. </view>
  57. </view>
  58. <!-- 悬浮按钮区域 -->
  59. <view class="fixed">
  60. <img src="../../static/images/repairsImg/add.png" />
  61. <uni-badge :offset="[5, 5]" absolute="rightTop" text="8">
  62. <img class="img" src="../../static/images/repairsImg/message.png" @click="handleGoMsg" />
  63. </uni-badge>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. export default {
  69. data() {
  70. return {
  71. chartData: {
  72. categories: ['张三', '李四', '王五', '老六', '刘八'],
  73. series: [
  74. {
  75. name: '好评数',
  76. data: [35, 36, 31, 33, 13]
  77. },
  78. {
  79. name: '完成数',
  80. data: [18, 27, 21, 24, 6]
  81. }
  82. ]
  83. },
  84. opts: {
  85. color: ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'],
  86. padding: [15, 30, 0, 5],
  87. enableScroll: false,
  88. legend: {},
  89. xAxis: {
  90. boundaryGap: 'justify',
  91. disableGrid: false,
  92. min: 0,
  93. axisLine: false,
  94. max: 40
  95. },
  96. yAxis: {},
  97. extra: {
  98. bar: {
  99. type: 'group',
  100. width: 15,
  101. meterBorde: 1,
  102. meterFillColor: '#FFFFFF',
  103. activeBgColor: '#000000',
  104. activeBgOpacity: 0.08,
  105. linearType: 'custom',
  106. barBorderCircle: true,
  107. seriesGap: 2,
  108. categoryGap: 2
  109. }
  110. }
  111. },
  112. tableData: [
  113. {
  114. name: '张三',
  115. type: '电工',
  116. status: 0,
  117. work: 0
  118. },
  119. {
  120. name: '张三三',
  121. type: '泥工',
  122. status: 0,
  123. work: 0
  124. },
  125. {
  126. name: '张三',
  127. type: '电工',
  128. status: 0,
  129. work: 0
  130. },
  131. {
  132. name: '张三三',
  133. type: '泥工',
  134. status: 0,
  135. work: 0
  136. },
  137. {
  138. name: '张三',
  139. type: '电工',
  140. status: 0,
  141. work: 0
  142. },
  143. {
  144. name: '张三三',
  145. type: '泥工',
  146. status: 0,
  147. work: 0
  148. }
  149. ]
  150. }
  151. },
  152. mounted() {},
  153. methods: {
  154. handleGoMsg() {
  155. uni.navigateTo({
  156. url: '/pagesRepairs/message/message'
  157. })
  158. }
  159. }
  160. }
  161. </script>
  162. <style lang="scss" scoped>
  163. .container {
  164. width: 100vw;
  165. height: calc(100vh - 102rpx);
  166. overflow-y: auto;
  167. .top_bg {
  168. height: 165rpx;
  169. background-color: #6fb6b8;
  170. }
  171. .top_types {
  172. display: flex;
  173. justify-content: space-evenly;
  174. margin: auto;
  175. margin-top: -100rpx;
  176. width: 690rpx;
  177. height: 188rpx;
  178. border-radius: 10rpx;
  179. box-shadow: 0px 0px 4rpx rgba(0, 0, 0, 0.25);
  180. background-color: #fff;
  181. .types_box {
  182. flex: 1;
  183. display: flex;
  184. flex-direction: column;
  185. justify-content: center;
  186. align-items: center;
  187. .box_num {
  188. font-size: 46rpx;
  189. color: #ff5733;
  190. }
  191. .box_info {
  192. margin-top: 10rpx;
  193. font-size: 34rpx;
  194. }
  195. }
  196. }
  197. .watch {
  198. box-sizing: border-box;
  199. margin: 20rpx auto;
  200. padding: 0 30rpx;
  201. width: 690rpx;
  202. border-radius: 10rpx;
  203. box-shadow: 0px 0px 4rpx rgba(0, 0, 0, 0.25);
  204. .watch_title {
  205. display: flex;
  206. align-items: center;
  207. height: 95rpx;
  208. font-size: 36rpx;
  209. border-bottom: 1rpx solid #e6e6e6;
  210. img {
  211. margin-right: 14rpx;
  212. width: 44rpx;
  213. height: 44rpx;
  214. }
  215. }
  216. }
  217. .rank {
  218. box-sizing: border-box;
  219. margin: 0 auto 100rpx;
  220. padding: 0 30rpx;
  221. width: 690rpx;
  222. border-radius: 10rpx;
  223. box-shadow: 0px 0px 4rpx rgba(0, 0, 0, 0.25);
  224. .rank_title {
  225. display: flex;
  226. align-items: center;
  227. height: 95rpx;
  228. font-size: 36rpx;
  229. border-bottom: 1rpx solid #e6e6e6;
  230. img {
  231. margin-right: 14rpx;
  232. width: 41rpx;
  233. height: 41rpx;
  234. }
  235. }
  236. .rank_charts {
  237. height: 650rpx;
  238. }
  239. }
  240. .fixed {
  241. z-index: 2;
  242. position: fixed;
  243. right: 0;
  244. bottom: 155rpx;
  245. display: flex;
  246. justify-content: space-evenly;
  247. align-items: center;
  248. width: 252rpx;
  249. height: 123rpx;
  250. border-radius: 150rpx 0 0 150rpx;
  251. box-shadow: 0px 0px 7rpx rgba(0, 0, 0, 0.15);
  252. background-color: #fff;
  253. img {
  254. width: 76rpx;
  255. height: 76rpx;
  256. }
  257. .img {
  258. width: 88rpx;
  259. height: 88rpx;
  260. }
  261. }
  262. }
  263. </style>