caregiver.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <template>
  2. <view class="container">
  3. <view class="user-info-box">
  4. <view class="img-box">
  5. <u-avatar :src="nurseInfo.photographUrl || defaultImg" size="121rpx" mode="aspectFill"></u-avatar>
  6. </view>
  7. <view class="info-r">
  8. <view class="info-r-top">
  9. <span class="name">{{nurseInfo.name || '-'}}</span>
  10. <span class="status" v-if="nurseInfo.orderReceivingStatus == '0'">正常接单</span>
  11. <span class="status" v-else>关闭接单</span>
  12. </view>
  13. <span class="phone">{{nurseInfo.phoneNumber || '-'}}</span>
  14. </view>
  15. </view>
  16. <view class="num-box flex-ac">
  17. <view class="num-item flex-ac">
  18. <view class="num-item-l">
  19. <span class="name">今日订单数</span>
  20. <span class="num">{{nurseInfo.todayCount || 0}}</span>
  21. </view>
  22. <image src="/static/copy.png" mode="aspectFill"></image>
  23. </view>
  24. <view class="num-item flex-ac">
  25. <view class="num-item-l">
  26. <span class="name">总订单数</span>
  27. <span class="num">{{nurseInfo.orderCount || 0}}</span>
  28. </view>
  29. <image src="/static/copy.png" mode="aspectFill"></image>
  30. </view>
  31. </view>
  32. <view class="order-box flex-dc">
  33. <view class="title-box flex-box-c-b">
  34. <span class="title">订单管理</span>
  35. <span class="more" @click="toPath(0)">查看全部></span>
  36. </view>
  37. <view class="order-list flex-box">
  38. <view class="order-item flex-box-cloum" v-for="item,index in orderType" :key="index"
  39. @click="toPath(item.index)">
  40. <image :src="item.icon" mode="aspectFill"></image>
  41. <span class="name">{{item.name}}</span>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="order-box flex-dc">
  46. <view class="title-box flex-box-c-b">
  47. <span class="title">应用中心</span>
  48. </view>
  49. <view class="order-list flex-box">
  50. <view class="order-item flex-box-cloum" @click="toPath(2)">
  51. <image src="@/static/my/icon-04.png" mode="aspectFill"></image>
  52. <span class="name">待服务</span>
  53. <u-badge type="error" max="99" :value="nurseInfo.waitServiceCount" :offset="[-10, -10]"
  54. absolute></u-badge>
  55. </view>
  56. <view class="order-item flex-box-cloum" @click="toPath(3)">
  57. <image src="@/static/my/icon-04.png" mode="aspectFill"></image>
  58. <span class="name">服务中</span>
  59. <u-badge type="error" max="99" :value="nurseInfo.inServiceCount" :offset="[-10, -10]"
  60. absolute></u-badge>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </template>
  66. <script>
  67. import {
  68. getNurseInfo
  69. } from "@/api/hospital.js"
  70. export default {
  71. data() {
  72. return {
  73. defaultImg: require('@/static/default-head-photo.png'),
  74. nurseInfo: {
  75. nickname: '张三',
  76. phone: '18509887879'
  77. },
  78. orderType: [{
  79. index: 2,
  80. name: '待服务',
  81. icon: require('@/static/my/icon-04.png'),
  82. }, {
  83. index: 3,
  84. name: '服务中',
  85. icon: require('@/static/my/icon-04.png'),
  86. }, {
  87. index: 4,
  88. name: '待评价',
  89. icon: require('@/static/my/icon-04.png'),
  90. }, {
  91. index: 5,
  92. name: '已完成',
  93. icon: require('@/static/my/icon-04.png'),
  94. }, ],
  95. nurseInfo: {},
  96. }
  97. },
  98. onLoad() {
  99. this.getNurseInfo()
  100. },
  101. methods: {
  102. //获取信息
  103. getNurseInfo(){
  104. let that = this;
  105. getNurseInfo().then(res => {
  106. if (res.code == 200) {
  107. let data = res.data;
  108. this.nurseInfo = data;
  109. }
  110. })
  111. .catch((err) => {
  112. console.log(err);
  113. })
  114. },
  115. toPath(val) {
  116. uni.navigateTo({
  117. url: '/pages/workbench/order/list?type=' + val
  118. })
  119. }
  120. }
  121. }
  122. </script>
  123. <style lang="scss" scoped>
  124. .container {
  125. padding: 30rpx;
  126. .user-info-box {
  127. display: flex;
  128. align-items: center;
  129. padding: 20rpx;
  130. background-color: #fff;
  131. border-radius: 20rpx;
  132. .img-box {}
  133. .info-r {
  134. display: flex;
  135. flex-direction: column;
  136. margin-left: 25rpx;
  137. .info-r-top {
  138. display: flex;
  139. align-items: center;
  140. margin-bottom: 10rpx;
  141. .name {
  142. display: inline-flex;
  143. font-size: 36rpx;
  144. height: 36rpx;
  145. line-height: 36rpx;
  146. justify-content: center;
  147. font-weight: bold;
  148. }
  149. .status {
  150. display: inline-flex;
  151. font-size: 24rpx;
  152. margin-left: 10rpx;
  153. height: 40rpx;
  154. line-height: 40rpx;
  155. padding: 0 20rpx;
  156. background-color: #FFF9D9;
  157. color: #B16E55;
  158. border-radius: 50rpx;
  159. }
  160. }
  161. .phone {
  162. font-size: 28rpx;
  163. color: #101010;
  164. }
  165. }
  166. }
  167. .num-box {
  168. margin-top: 20rpx;
  169. .num-item {
  170. width: 48%;
  171. padding: 20rpx;
  172. background-color: #fff;
  173. border-radius: 20rpx;
  174. justify-content: center;
  175. &:first-child {
  176. margin-right: 20rpx;
  177. }
  178. .num-item-l {
  179. display: flex;
  180. align-items: center;
  181. flex-direction: column;
  182. margin-right: 20rpx;
  183. .name {
  184. font-size: 36rpx;
  185. color: #101010;
  186. }
  187. .num {
  188. font-size: 36rpx;
  189. font-weight: bold;
  190. color: #101010;
  191. }
  192. }
  193. image {
  194. width: 40rpx;
  195. height: 40rpx;
  196. border-radius: 50%;
  197. }
  198. }
  199. }
  200. .order-box {
  201. background-color: #fff;
  202. padding: 20rpx;
  203. border-radius: 20rpx;
  204. margin-top: 20rpx;
  205. .title-box {
  206. margin-bottom: 20rpx;
  207. .title {
  208. font-size: 36rpx;
  209. font-weight: bold;
  210. color: #101010;
  211. }
  212. .more {
  213. font-size: 28rpx;
  214. color: #9a9a9a;
  215. }
  216. }
  217. .order-list {
  218. .order-item {
  219. position: relative;
  220. margin: 20rpx 40rpx;
  221. image {
  222. width: 90rpx;
  223. height: 90rpx;
  224. }
  225. .name {
  226. margin-top: 15rpx;
  227. font-size: 28rpx;
  228. color: #101010;
  229. }
  230. }
  231. }
  232. }
  233. }
  234. </style>