queueList.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <view class="container">
  3. <view class="userInfoTopFixe">
  4. <userInfo :userInfo="currentUser" type="card" bgClass="bgLinGra"></userInfo>
  5. </view>
  6. <view class="main_box">
  7. <view v-if="queueList.length == 0" class="noData">
  8. <noData :value="noDataValue"></noData>
  9. </view>
  10. <view
  11. class="container_box"
  12. v-if="queueList.length > 0"
  13. v-for="(item, index) in queueList"
  14. :key="index"
  15. >
  16. <view class="topTime_box border-bottom">
  17. <view class="time_box">
  18. <text>{{ item.RegisterDate }} {{ item.startTime }}</text>
  19. </view>
  20. <text class="state_box">已签到</text>
  21. </view>
  22. <view class="queueItem_box">
  23. <queueItem :orderInfo="item" :currentUser="currentUser"></queueItem>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script setup lang="ts">
  30. import { ref } from 'vue';
  31. import { useOnShow } from '@dcloudio/uni-app';
  32. import { common } from '@/utils';
  33. import { getQueueInfo } from '@/pagesPatient/service/queue';
  34. import userInfo from '@/pagesPersonal/st1/components/userInfo/userInfo.vue';
  35. import queueItem from '@/pagesPatient/st1/components/queueItem/queueItem.vue';
  36. import noData from '@/pages/st1/components/noData/noData.vue';
  37. const app = getApp();
  38. const currentUser = ref<any>({});
  39. const showNoData = ref(false);
  40. const noDataValue = ref('暂无候诊记录');
  41. const queueList = ref<any[]>([]);
  42. const pageConfig = ref<any>({});
  43. useOnShow(() => {
  44. let config = common.deepCopy(
  45. app.globalData.config.pageConfiguration.signInList_config
  46. );
  47. pageConfig.value = config;
  48. currentUser.value = app.globalData.currentUser;
  49. main();
  50. });
  51. const main = async () => {
  52. let list: any[] = [];
  53. let show = true;
  54. let queryData = {
  55. CardNo: currentUser.value.cardNo,
  56. MemberId: currentUser.value.memberId,
  57. CardType: currentUser.value.cardType,
  58. HosId: app.globalData.districtId || app.globalData.hosId,
  59. // 后端表示诊室名称,在此用于区分是否走星网
  60. ClinicRoom: pageConfig.value.signReason,
  61. Store: {
  62. cardEncryptionStore: currentUser.value.encryptionStore || '',
  63. baseMemberEncryptionStore: currentUser.value.baseMemberEncryptionStore,
  64. },
  65. };
  66. let resp = await getQueueInfo(queryData);
  67. if (!common.isEmpty(resp)) {
  68. resp.map((item: any) => {
  69. item.week = common.dateFormat(new Date(item.RegisterDate)).week;
  70. });
  71. list = resp;
  72. show = false;
  73. }
  74. queueList.value = list;
  75. showNoData.value = show;
  76. };
  77. </script>
  78. <style lang="scss">
  79. .noData {
  80. width: 100%;
  81. padding-top: 0 !important;
  82. position: absolute;
  83. top: 50%;
  84. margin-top: -100upx;
  85. }
  86. .top_menu {
  87. width: 100%;
  88. position: fixed;
  89. top: 0;
  90. left: 0;
  91. z-index: 100;
  92. background: white;
  93. padding-bottom: 15upx;
  94. }
  95. .main_box {
  96. width: 100%;
  97. height: 100%;
  98. padding: 220upx 30upx 0 30upx;
  99. box-sizing: border-box;
  100. overflow: auto;
  101. }
  102. .container {
  103. overflow: auto;
  104. }
  105. .container_box {
  106. width: 100%;
  107. padding-bottom: 30upx;
  108. box-sizing: border-box;
  109. border-radius: 24upx;
  110. background-color: #fff;
  111. overflow: hidden;
  112. margin-bottom: 30upx;
  113. }
  114. .topTime_box {
  115. padding: 23upx;
  116. background: white;
  117. display: flex;
  118. flex-direction: row;
  119. justify-content: space-between;
  120. align-items: center;
  121. }
  122. .topTime_box text {
  123. width: 156upx;
  124. line-height: 60upx;
  125. font-size: 28upx;
  126. color: #999;
  127. text-align: center;
  128. border-radius: 60upx;
  129. }
  130. .time_box {
  131. width: 80%;
  132. display: flex;
  133. flex-direction: row;
  134. justify-content: flex-start;
  135. align-items: center;
  136. }
  137. .time_box text {
  138. display: inline-block !important;
  139. width: 95% !important;
  140. font-size: 32upx !important;
  141. color: #333 !important;
  142. text-align: left !important;
  143. margin-left: 16upx !important;
  144. }
  145. .state_box {
  146. position: relative;
  147. z-index: 0;
  148. }
  149. .state_box::after {
  150. content: '';
  151. position: absolute;
  152. top: -50%;
  153. bottom: -50%;
  154. left: -50%;
  155. right: -50%;
  156. width: 200%;
  157. height: 200%;
  158. -webkit-transform: scale(0.5);
  159. transform: scale(0.5);
  160. border: solid 1px #e6e6e6;
  161. border-radius: 66px;
  162. box-sizing: border-box;
  163. }
  164. .queueItem_box {
  165. padding: 0 30upx;
  166. }
  167. .public_dialog {
  168. z-index: 11;
  169. }
  170. </style>