AppIndex.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  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">近三十天各小组好评率排行榜</h2>
  13. <GroupPraise></GroupPraise>
  14. </div>
  15. <!-- 科室当日建单TOP10 -->
  16. <div class="app-item">
  17. <h2 class="app-item__header">科室当日建单TOP10</h2>
  18. <GroupPerformance></GroupPerformance>
  19. </div>
  20. <!-- 近三十天各小组人员工作时间利用率 -->
  21. <div class="app-item">
  22. <h2 class="app-item__header">近三十天各小组人员工作时间利用率</h2>
  23. <TimeUtilization></TimeUtilization>
  24. </div>
  25. </aside>
  26. <article class="app-index__center">
  27. <!-- 今日当班情况 -->
  28. <div class="app-item">
  29. <h2 class="app-item__header app-item__header--big">
  30. 今日当班情况
  31. <ul class="app-item__headerData">
  32. <li class="app-item__headerDataItem">总当班人数<em>{{todayBeOnDuty[0]}}/{{todayBeOnDuty[1]}}</em></li>
  33. </ul>
  34. </h2>
  35. <OnDutyToday @todayBeOnDutyHandle="todayBeOnDutyHandle"></OnDutyToday>
  36. </div>
  37. <!-- 当日工单趋势图 -->
  38. <div class="app-item">
  39. <h2 class="app-item__header app-item__header--big">
  40. 当日工单趋势图
  41. <ul class="app-item__headerData">
  42. <li class="app-item__headerDataItem">执行中<em>{{todayWorkOrder[0]}}</em></li>
  43. <li class="app-item__headerDataItem">已超时<em>{{todayWorkOrder[1]}}</em></li>
  44. <li class="app-item__headerDataItem">已完成<em>{{todayWorkOrder[2]}}</em></li>
  45. </ul>
  46. </h2>
  47. <TodayWorkOrder @todayWorkOrderHandle = "todayWorkOrderHandle"></TodayWorkOrder>
  48. </div>
  49. <!-- 今日工单异常情况 -->
  50. <div class="app-item">
  51. <h2 class="app-item__header app-item__header--big">
  52. 今日工单异常情况
  53. <ul class="app-item__headerData">
  54. <li class="app-item__headerDataItem app-item__headerDataItem--error">异常<em>{{todayAbnormityWorkOrder[0]}}</em></li>
  55. <li class="app-item__headerDataItem app-item__headerDataItem--timeout">超时<em>{{todayAbnormityWorkOrder[1]}}</em></li>
  56. </ul>
  57. </h2>
  58. <ErrorWorkOrder @todayAbnormityWorkOrderHandle="todayAbnormityWorkOrderHandle"></ErrorWorkOrder>
  59. </div>
  60. <!-- 近三十天各类型工单按时送达率趋势 -->
  61. <div class="app-item">
  62. <h2 class="app-item__header app-item__header--big">
  63. 近三十天各类型工单按时送达率趋势
  64. <ul class="app-item__headerData">
  65. <li @click="currentDictionary = item[0]" v-for="item in dictionary" :key="item[0]" class="app-item__headerDataItem app-item__headerDataItem--normal" :class="{'app-item__headerDataItem--active':currentDictionary === item[0]}"><span>{{item[1]}}</span></li>
  66. </ul>
  67. </h2>
  68. <DeliveryRate @changeCurrentDictionary="changeCurrentDictionary" @dictionaryHandle="dictionaryHandle" :currentDictionary="currentDictionary"></DeliveryRate>
  69. </div>
  70. </article>
  71. <aside class="app-index__right">
  72. <!-- 今日积分前三人员 -->
  73. <div class="app-item">
  74. <h2 class="app-item__header">今日积分前三人员</h2>
  75. <PointsRanking></PointsRanking>
  76. </div>
  77. <!-- 近三十天人员按时到达率排行榜 -->
  78. <div class="app-item">
  79. <h2 class="app-item__header">近三十天人员按时到达率排行榜</h2>
  80. <OnTimeArrivalRate></OnTimeArrivalRate>
  81. </div>
  82. <!-- 当日任务类型TOP5 -->
  83. <div class="app-item">
  84. <h2 class="app-item__header">当日任务类型TOP5</h2>
  85. <BusinessTypeRatio></BusinessTypeRatio>
  86. </div>
  87. </aside>
  88. </main>
  89. </div>
  90. </dv-full-screen-container>
  91. </div>
  92. </template>
  93. <script>
  94. import AppHeader from '../components/AppHeader.vue'
  95. import GroupPraise from '../components/GroupPraise.vue'
  96. import GroupPerformance from '../components/GroupPerformance.vue'
  97. import OnDutyToday from '../components/OnDutyToday.vue'
  98. import TodayWorkOrder from '../components/TodayWorkOrder.vue'
  99. import PointsRanking from '../components/PointsRanking.vue'
  100. import BusinessTypeRatio from '../components/BusinessTypeRatio.vue'
  101. import ErrorWorkOrder from '../components/ErrorWorkOrder.vue'
  102. import DeliveryRate from '../components/DeliveryRate.vue'
  103. import TimeUtilization from '../components/TimeUtilization.vue'
  104. import OnTimeArrivalRate from '../components/OnTimeArrivalRate.vue'
  105. export default {
  106. name: 'AppIndex',
  107. components: {
  108. AppHeader, // 头部
  109. GroupPraise, // 近三十天各小组好评率排行榜
  110. GroupPerformance, // 科室当日建单TOP10
  111. OnDutyToday, // 今日当班情况
  112. TodayWorkOrder, // 当日工单趋势图
  113. PointsRanking, // 今日积分前三人员
  114. BusinessTypeRatio, // 当日任务类型TOP5
  115. ErrorWorkOrder, // 今日工单异常情况
  116. DeliveryRate, // 近三十天各类型工单按时送达率趋势
  117. TimeUtilization, // 近三十天各小组人员工作时间利用率
  118. OnTimeArrivalRate// 近三十天人员按时到达率排行榜
  119. },
  120. data () {
  121. return {
  122. todayBeOnDuty: [], // 今日当班情况
  123. todayWorkOrder: [], // 当日工单趋势图
  124. todayAbnormityWorkOrder: [], // 今日工单异常情况
  125. dictionary: [], // 近三十天各类型工单按时送达率趋势
  126. currentDictionary: -1// 近三十天各类型工单按时送达率趋势(id)
  127. }
  128. },
  129. methods: {
  130. // 今日当班情况
  131. todayBeOnDutyHandle (value) {
  132. this.todayBeOnDuty = JSON.parse(value)
  133. },
  134. // 当日工单趋势图
  135. todayWorkOrderHandle (value) {
  136. this.todayWorkOrder = JSON.parse(value)
  137. },
  138. // 今日工单异常情况
  139. todayAbnormityWorkOrderHandle (value) {
  140. this.todayAbnormityWorkOrder = JSON.parse(value)
  141. },
  142. // 近三十天各类型工单按时送达率趋势
  143. dictionaryHandle (value) {
  144. this.dictionary = JSON.parse(value)
  145. this.currentDictionary = this.dictionary[0][0]
  146. this.dictionary.forEach(item => {
  147. if (item[0] === 255) {
  148. item[1] = '转运'
  149. } else if (item[0] === 256) {
  150. item[1] = '标本'
  151. } else if (item[0] === 257) {
  152. item[1] = '药品'
  153. } else if (item[0] === 258) {
  154. item[1] = '静配'
  155. } else if (item[0] === 259) {
  156. item[1] = '其他'
  157. } else if (item[0] === 260) {
  158. item[1] = '陪检'
  159. } else if (item[0] === 380) {
  160. item[1] = '轮巡'
  161. }
  162. })
  163. },
  164. // 近三十天各类型工单按时送达率趋势---修改索引
  165. changeCurrentDictionary (value) {
  166. this.currentDictionary = value
  167. }
  168. },
  169. provide () {
  170. return {
  171. hospitalId: this.$route.params.id
  172. }
  173. },
  174. mounted () {
  175. // setTimeout(() => {
  176. // this.loading = false
  177. // }, 1000)
  178. }
  179. }
  180. </script>
  181. <style lang="less">
  182. .app-index {
  183. color: #fff;
  184. background-color: #000;
  185. width: 100vw;
  186. height: 100vh;
  187. .bg {
  188. padding: 0.2rem;
  189. background-image: url("../assets/img/bg.jpg");
  190. background-size: cover;
  191. background-position: center center;
  192. }
  193. // 各模块公共头部
  194. .app-item {
  195. position: relative;
  196. .app-item__header {
  197. height: 0.3375rem;
  198. font-size: 0.25rem;
  199. color: #fff;
  200. background: url("./../assets/img/image_title01.png") left bottom no-repeat;
  201. background-size: 100%;
  202. display: flex;
  203. justify-content: space-between;
  204. &.app-item__header--big{
  205. background: url("./../assets/img/image_title02.png") left bottom no-repeat;
  206. background-size: 100%;
  207. .app-item__headerData{
  208. display: flex;
  209. justify-content: space-between;
  210. align-content: center;
  211. font-size: .2rem;
  212. color: #fff;
  213. margin-right: 1.6625rem;
  214. margin-top: .05rem;
  215. .app-item__headerDataItem{
  216. margin-left: .3rem;
  217. position: relative;
  218. &.app-item__headerDataItem--normal span{
  219. color: rgba(255, 255, 255, 0.6);
  220. cursor: pointer;
  221. }
  222. &.app-item__headerDataItem--active span{
  223. display: flex;
  224. justify-content: center;
  225. align-items: center;
  226. width: .75rem;
  227. background-color: #14334f;
  228. border-radius: .15rem;
  229. padding-top: .075rem;
  230. padding-bottom: .075rem;
  231. transform: translateY(-0.1rem);
  232. color: #fff;
  233. }
  234. &.app-item__headerDataItem--error{
  235. color: #c27073;
  236. }
  237. &.app-item__headerDataItem--timeout{
  238. color: #c2ab70;
  239. }
  240. }
  241. em{
  242. margin-left: .1rem;
  243. }
  244. }
  245. }
  246. }
  247. }
  248. // 主体
  249. .app-index__main {
  250. display: flex;
  251. justify-content: space-between;
  252. .app-index__left {
  253. width: 24.3%;
  254. }
  255. .app-index__center {
  256. width: 49.5%;
  257. }
  258. .app-index__right {
  259. width: 24.3%;
  260. }
  261. }
  262. }
  263. </style>