AppIndex.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <template>
  2. <div class="app-index">
  3. <dv-full-screen-container class="bg">
  4. <div>
  5. <!-- 头部 -->
  6. <AppHeader></AppHeader>
  7. <!-- 主体 -->
  8. <main class="app-index__main">
  9. <aside class="app-index__left">
  10. <!-- 故障工单实时动态 -->
  11. <div class="app-item">
  12. <h2 class="app-item__header app-item__header--big">故障工单实时动态</h2>
  13. <RealTimeRepairOrder class="app-item__body"></RealTimeRepairOrder>
  14. </div>
  15. <!-- 上月维修科室排名TOP5 -->
  16. <div class="app-item">
  17. <h2 class="app-item__header app-item__header--big">
  18. 上月维修科室排名TOP5
  19. </h2>
  20. <MaintenanceDepartmentTotal class="app-item__body"></MaintenanceDepartmentTotal>
  21. </div>
  22. <!-- 上月维修人员工单数TOP5 -->
  23. <div class="app-item">
  24. <h2 class="app-item__header app-item__header--big">
  25. 上月维修人员工单数TOP5
  26. </h2>
  27. <PersonnelIntegral class="app-item__body"></PersonnelIntegral>
  28. </div>
  29. </aside>
  30. <article class="app-index__center">
  31. <!-- 汇总数据 -->
  32. <div class="app-item">
  33. <TotalStatistics class="app-item__body"></TotalStatistics>
  34. </div>
  35. <!-- 上月趋势图 -->
  36. <div class="app-item">
  37. <h2 class="app-item__header app-item__header--big">
  38. 上月趋势图
  39. <ul class="app-item__headerData">
  40. <li class="app-item__headerDataItem" :class="{ active: todayWorkOrderSign == 'repair' }">维修</li>
  41. <li class="app-item__headerDataItem" :class="{ active: todayWorkOrderSign == 'delivery' }">配送</li>
  42. </ul>
  43. </h2>
  44. <TrendChart class="app-item__body" @signEmit="todayWorkOrderSign = $event"></TrendChart>
  45. </div>
  46. <div class="app-item-wrap">
  47. <!-- 上月故障现象占比 -->
  48. <div class="app-item">
  49. <h2 class="app-item__header app-item__header--big">
  50. 上月故障现象占比
  51. </h2>
  52. <CategoryTotal class="app-item__body"></CategoryTotal>
  53. </div>
  54. <!-- 上月业务分类工单占比 -->
  55. <div class="app-item">
  56. <h2 class="app-item__header app-item__header--big">
  57. 上月业务分类工单占比
  58. </h2>
  59. <BusinessTotal class="app-item__body"></BusinessTotal>
  60. </div>
  61. </div>
  62. </article>
  63. <aside class="app-index__right">
  64. <!-- 故障工单实时动态 -->
  65. <div class="app-item">
  66. <h2 class="app-item__header app-item__header--big">配送陪检工单实时动态</h2>
  67. <RealTimeDeliveryOrder class="app-item__body"></RealTimeDeliveryOrder>
  68. </div>
  69. <!-- 上月配送陪检科室排名TOP5 -->
  70. <div class="app-item">
  71. <h2 class="app-item__header app-item__header--big">
  72. 上月配送陪检科室排名TOP5
  73. </h2>
  74. <DeliveryTotal class="app-item__body"></DeliveryTotal>
  75. </div>
  76. <!-- 上月配送陪检人员积分 -->
  77. <div class="app-item">
  78. <h2 class="app-item__header app-item__header--big">
  79. 上月配送陪检人员积分
  80. </h2>
  81. <DeliveryUserTotal class="app-item__body"></DeliveryUserTotal>
  82. </div>
  83. </aside>
  84. </main>
  85. </div>
  86. </dv-full-screen-container>
  87. </div>
  88. </template>
  89. <script>
  90. import AppHeader from '../components/AppHeader.vue'
  91. import RealTimeRepairOrder from '../components/RealTimeRepairOrder.vue'
  92. import RealTimeDeliveryOrder from '../components/RealTimeDeliveryOrder.vue'
  93. import TotalStatistics from '../components/TotalStatistics.vue'
  94. import TrendChart from '../components/TrendChart.vue'
  95. import MaintenanceDepartmentTotal from '../components/MaintenanceDepartmentTotal.vue'
  96. import DeliveryTotal from '../components/DeliveryTotal.vue'
  97. import DeliveryUserTotal from '../components/DeliveryUserTotal.vue'
  98. import PersonnelIntegral from '../components/PersonnelIntegral.vue'
  99. import CategoryTotal from '../components/CategoryTotal.vue'
  100. import BusinessTotal from '../components/BusinessTotal.vue'
  101. export default {
  102. name: 'AppIndex',
  103. components: {
  104. AppHeader, // 头部
  105. RealTimeRepairOrder, // 故障工单实时动态
  106. RealTimeDeliveryOrder, // 配送陪检工单实时动态
  107. TotalStatistics, // 汇总数据
  108. TrendChart, // 上月趋势图
  109. MaintenanceDepartmentTotal, // 上月维修科室排名TOP5
  110. DeliveryTotal, // 上月配送陪检科室排名TOP5
  111. DeliveryUserTotal, // 运送人员排名TOP5
  112. PersonnelIntegral, // 上月维修人员工单数TOP5
  113. CategoryTotal, // 上月故障现象占比
  114. BusinessTotal // 上月业务分类工单占比
  115. },
  116. data () {
  117. return {
  118. todayWorkOrderSign: 'repair'
  119. }
  120. },
  121. methods: {
  122. },
  123. provide () {
  124. console.log('route', this.$route)
  125. let hosId, dutyId, parentDutyId
  126. if (this.$route.params.queryType === '1') {
  127. hosId = undefined
  128. dutyId = undefined
  129. parentDutyId = undefined
  130. } else if (this.$route.params.queryType === '2') {
  131. hosId = this.$route.query.hosId ? +this.$route.query.hosId : undefined
  132. dutyId = undefined
  133. parentDutyId = undefined
  134. } else if (this.$route.params.queryType === '3') {
  135. hosId = undefined
  136. dutyId = this.$route.query.dutyId ? +this.$route.query.dutyId : undefined
  137. parentDutyId = undefined
  138. } else if (this.$route.params.queryType === '4') {
  139. hosId = undefined
  140. dutyId = undefined
  141. parentDutyId = this.$route.query.dutyId ? +this.$route.query.dutyId : undefined
  142. }
  143. console.log(parentDutyId, hosId, dutyId)
  144. return {
  145. parentDutyId,
  146. hosId,
  147. dutyId
  148. }
  149. },
  150. mounted () {
  151. }
  152. }
  153. </script>
  154. <style lang="less">
  155. .app-index {
  156. color: #fff;
  157. background-color: #062B4D;
  158. width: 100vw;
  159. height: 100vh;
  160. .bg {
  161. padding: 0.2rem;
  162. }
  163. .app-item-wrap{
  164. position: relative;
  165. overflow: hidden;
  166. display: flex;
  167. margin-top: .1rem;
  168. .app-item{
  169. margin-right: 0.1rem;
  170. margin-top: 0;
  171. flex: 1;
  172. &:last-of-type{
  173. margin-right: 0;
  174. }
  175. }
  176. }
  177. // 各模块公共头部
  178. .app-item {
  179. position: relative;
  180. margin-top: .1rem;
  181. border: 1px solid #265A8A;
  182. border-radius: .1rem;
  183. overflow: hidden;
  184. &:first-of-type{
  185. margin-top: 0;
  186. }
  187. .app-item__header {
  188. height: .525rem;
  189. font-size: .325rem;
  190. color: #fff;
  191. background: linear-gradient( 90deg, #485E8D 0%, #1E3C64 61%, #071F34 100%);
  192. display: flex;
  193. justify-content: space-between;
  194. align-items: center;
  195. line-height: 1;
  196. padding: 0 .125rem 0 .2rem;
  197. &.app-item__header--big{
  198. .app-item__headerData{
  199. display: flex;
  200. justify-content: space-between;
  201. align-content: center;
  202. font-size: .2rem;
  203. color: #fff;
  204. .app-item__headerDataItem{
  205. // cursor: pointer;
  206. margin-left: .0625rem;
  207. position: relative;
  208. color: #C8C8C8;
  209. font-size: .15rem;
  210. width: .525rem;
  211. height: .3rem;
  212. border-radius: .1rem;
  213. display: flex;
  214. align-items: center;
  215. justify-content: center;
  216. &.active{
  217. border: 1px solid #265A8A;
  218. background-color: #14334F;
  219. }
  220. &:first-of-type{
  221. margin-left: 0;
  222. }
  223. &.app-item__headerDataItem--normal span{
  224. color: rgba(255, 255, 255, 0.6);
  225. cursor: pointer;
  226. }
  227. &.app-item__headerDataItem--active span{
  228. display: flex;
  229. justify-content: center;
  230. align-items: center;
  231. width: .75rem;
  232. background-color: #14334f;
  233. border-radius: .15rem;
  234. padding-top: .075rem;
  235. padding-bottom: .075rem;
  236. transform: translateY(-0.1rem);
  237. color: #fff;
  238. }
  239. &.app-item__headerDataItem--error{
  240. color: #c27073;
  241. }
  242. &.app-item__headerDataItem--timeout{
  243. color: #c2ab70;
  244. }
  245. }
  246. em{
  247. margin-left: .1rem;
  248. }
  249. }
  250. }
  251. }
  252. }
  253. // 主体
  254. .app-index__main{
  255. display: flex;
  256. justify-content: space-between;
  257. .app-index__left {
  258. width: 6.125rem;
  259. margin-right: .1rem;
  260. }
  261. .app-index__center {
  262. flex: 1;
  263. margin-right: .1rem;
  264. }
  265. .app-index__right {
  266. width: 5.15rem;
  267. }
  268. }
  269. }
  270. </style>