workOrderStatistics.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. <template>
  2. <view>
  3. <u-navbar title="工单统计" title-color="#fff" :background="background" back-icon-color="#ffffff"></u-navbar>
  4. <view class="main">
  5. <!-- 标签 -->
  6. <view class="tabs">
  7. <view class="tabs-item item-checked">
  8. 当天
  9. </view>
  10. <view class="tabs-item">
  11. 一周
  12. </view>
  13. <view class="tabs-item">
  14. 当天
  15. </view>
  16. <view class="tabs-item">
  17. 自定义
  18. </view>
  19. </view>
  20. <!-- 数据统计 -->
  21. <view class="data-statistics">
  22. <view class="title">
  23. 数据统计
  24. </view>
  25. <view class="state">
  26. <view class="state-item state1">
  27. <view class="state-classify">
  28. 待指派
  29. </view>
  30. <view class="state-number">
  31. 2
  32. </view>
  33. </view>
  34. <view class="state-item state2">
  35. <view class="state-classify">
  36. 进行中
  37. </view>
  38. <view class="state-number">
  39. 3
  40. </view>
  41. </view>
  42. <view class="state-item state3">
  43. <view class="state-classify">
  44. 已解决
  45. </view>
  46. <view class="state-number">
  47. 33
  48. </view>
  49. </view>
  50. <view class="state-item state4">
  51. <view class="state-classify">
  52. 已关闭
  53. </view>
  54. <view class="state-number">
  55. 34
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. <!-- 工单状态 -->
  61. <view class="workOrder-state">
  62. <view class="title">
  63. 工单状态
  64. </view>
  65. <view class="progress">
  66. <view class="progress-item">
  67. <view class="circle-progress">
  68. <u-circle-progress active-color="#FF7B00" width="136" :percent="12">
  69. <view class="u-progress-content">
  70. <text class='u-progress-info1'>12%</text>
  71. </view>
  72. </u-circle-progress>
  73. </view>
  74. <view class="state">
  75. 待指派
  76. </view>
  77. </view>
  78. <view class="progress-item">
  79. <view class="circle-progress">
  80. <u-circle-progress active-color="#008FA9" width="136" :percent="15">
  81. <view class="u-progress-content">
  82. <text class='u-progress-info2'>15%</text>
  83. </view>
  84. </u-circle-progress>
  85. </view>
  86. <view class="state">
  87. 进行中
  88. </view>
  89. </view>
  90. <view class="progress-item">
  91. <view class="circle-progress">
  92. <u-circle-progress active-color="#18C272" width="136" :percent="73">
  93. <view class="u-progress-content">
  94. <text class='u-progress-info3'>73%</text>
  95. </view>
  96. </u-circle-progress>
  97. </view>
  98. <view class="state">
  99. 已解决
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. <!-- 每月工单数量 -->
  106. <view class="workOrder-amount">
  107. <view class="title">
  108. 每月工单数量
  109. </view>
  110. <view class="chat">
  111. <view id="barEcharts" style="min-height:692rpx;">
  112. </view>
  113. <!-- <image class="chat-img" src="@/assets/img/AUgyKM0@1x2.png" mode=""></image> -->
  114. </view>
  115. </view>
  116. </view>
  117. </template>
  118. <script>
  119. import * as echarts from 'echarts';
  120. export default {
  121. data() {
  122. return {
  123. myChart: null,
  124. background: {
  125. backgroundColor: '#1677FF'
  126. }
  127. }
  128. },
  129. onReady() {
  130. this.getBarCharts();
  131. },
  132. methods: {
  133. getBarCharts(list) {
  134. if (!this.myChart) {
  135. this.myChart = echarts.init(document.getElementById('barEcharts'), null, {
  136. width: uni.upx2px(700),
  137. height: uni.upx2px(692)
  138. });
  139. }
  140. this.myChart.clear();
  141. var data1 = ['1月','2月','3月','4月','5月','6月'];
  142. var dataX = [2,1,0,1,3,0];
  143. var dataC = [3,1,1,0,2,1];
  144. var dataS = [5,2,1,1,5,1];
  145. var option = {
  146. tooltip: {
  147. trigger: 'axis',
  148. axisPointer: {
  149. type: 'shadow'
  150. }
  151. },
  152. legend: {},
  153. grid: {
  154. top: '6%',
  155. left: '3%',
  156. right: '8%',
  157. bottom: '8%',
  158. containLabel: true
  159. },
  160. xAxis: {
  161. type: 'value'
  162. },
  163. yAxis: {
  164. type: 'category',
  165. data: data1
  166. },
  167. barGap: '0',
  168. series: [{
  169. name: '新增工单',
  170. type: 'bar',
  171. data: dataX,
  172. itemStyle: {
  173. color: '#91cc75'
  174. }
  175. },
  176. {
  177. name: '处理工单',
  178. type: 'bar',
  179. data: dataC,
  180. itemStyle: {
  181. color: '#5470c6'
  182. }
  183. },
  184. {
  185. name: '剩余工单',
  186. type: 'bar',
  187. data: dataS,
  188. itemStyle: {
  189. color: '#fac858'
  190. }
  191. }
  192. ]
  193. }
  194. console.log(option)
  195. this.myChart.setOption(option);
  196. },
  197. }
  198. }
  199. </script>
  200. <style lang="scss" scoped>
  201. page {
  202. padding-bottom: 100rpx;
  203. }
  204. /deep/.uicon-nav-back {
  205. color: #FFF !important;
  206. }
  207. .main {
  208. background: linear-gradient(180deg, rgba(22, 119, 255, 1) 0%, rgba(22, 119, 255, 0) 100%);
  209. height: 720rpx;
  210. // 标签
  211. .tabs {
  212. display: flex;
  213. justify-content: space-between;
  214. padding: 24rpx 32rpx;
  215. .tabs-item {
  216. width: 144rpx;
  217. line-height: 56rpx;
  218. text-align: center;
  219. color: rgba(255, 255, 255, 0.6);
  220. }
  221. .item-checked {
  222. border: 1px solid rgba(255, 255, 255, 1);
  223. color: rgba(255, 255, 255, 1);
  224. border-radius: 50px;
  225. }
  226. }
  227. // 数据统计
  228. .data-statistics {
  229. margin: 24rpx 32rpx;
  230. border-radius: 8px;
  231. background-color: rgba(255, 255, 255, 1);
  232. padding: 24rpx;
  233. .title {
  234. color: rgba(16, 16, 16, 1);
  235. font-size: 36rpx;
  236. font-weight: bold;
  237. }
  238. .state {
  239. display: flex;
  240. justify-content: space-between;
  241. margin-top: 24rpx;
  242. .state-item {
  243. width: 144rpx;
  244. height: 144rpx;
  245. border-radius: 8px;
  246. color: rgba(255, 255, 255, 1);
  247. text-align: center;
  248. padding: 24rpx;
  249. font-weight: bold;
  250. .state-classify {
  251. font-size: 32rpx;
  252. }
  253. .state-number {
  254. margin-top: 8rpx;
  255. font-size: 40rpx;
  256. }
  257. }
  258. .state1 {
  259. background: linear-gradient(180deg, rgba(255, 174, 0, 1) 0%, rgba(255, 123, 0, 1) 100%);
  260. }
  261. .state2 {
  262. background: linear-gradient(178.54deg, rgba(50, 204, 213, 1) 0%, rgba(0, 143, 169, 1) 99.73%);
  263. }
  264. .state3 {
  265. background: linear-gradient(180deg, rgba(24, 194, 114, 1) 0%, rgba(0, 148, 79, 1) 100%);
  266. }
  267. .state4 {
  268. background: linear-gradient(180deg, rgba(187, 187, 187, 1) 0%, rgba(153, 153, 153, 1) 100%);
  269. }
  270. }
  271. }
  272. // 工单状态
  273. .workOrder-state {
  274. border-radius: 8px;
  275. background-color: rgba(255, 255, 255, 1);
  276. margin: 24rpx 32rpx;
  277. padding: 24rpx;
  278. .title {
  279. color: rgba(16, 16, 16, 1);
  280. font-size: 36rpx;
  281. font-weight: bold;
  282. }
  283. .progress {
  284. display: flex;
  285. justify-content: space-between;
  286. margin-top: 24rpx;
  287. .progress-item {
  288. text-align: center;
  289. .state {
  290. color: rgba(51, 51, 51, 1);
  291. margin-top: 16rpx;
  292. }
  293. }
  294. .u-progress-info1 {
  295. color: #FF7B00;
  296. font-weight: bold;
  297. }
  298. .u-progress-info2 {
  299. color: #008FA9;
  300. font-weight: bold;
  301. }
  302. .u-progress-info3 {
  303. color: #18C272;
  304. font-weight: bold;
  305. }
  306. }
  307. }
  308. }
  309. // 每月工单数量
  310. .workOrder-amount {
  311. border-radius: 8px;
  312. background-color: rgba(255, 255, 255, 1);
  313. margin: 24rpx 32rpx;
  314. padding: 24rpx 0;
  315. .title {
  316. color: rgba(16, 16, 16, 1);
  317. font-size: 36rpx;
  318. font-weight: bold;
  319. padding: 0 24rpx;
  320. }
  321. .chat {
  322. width: 100%;
  323. height: 692rpx;
  324. margin-top: 54rpx;
  325. .chat-img {
  326. width: 100%;
  327. height: 100%;
  328. }
  329. }
  330. }
  331. </style>