普兆健康管家前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

195 lines
4.5 KiB

  1. <template>
  2. <view class="page__view">
  3. <navbar title="检测预约" leftClick @leftClick="$utils.navigateBack" color="#191919" bgColor="#FFFFFF" />
  4. <view class="main">
  5. <view class="tabs">
  6. <uv-tabs
  7. :list="tabs"
  8. :scrollable="false"
  9. lineColor="#7451DE"
  10. lineWidth="48rpx"
  11. lineHeight="4rpx"
  12. :activeStyle="{
  13. 'font-family': 'PingFang SC',
  14. 'font-weight': 500,
  15. 'font-size': '32rpx',
  16. 'line-height': 1.4,
  17. 'color': '#7451DE',
  18. }"
  19. :inactiveStyle="{
  20. 'font-family': 'PingFang SC',
  21. 'font-weight': 400,
  22. 'font-size': '32rpx',
  23. 'line-height': 1.4,
  24. 'color': '#181818',
  25. }"
  26. @click="clickTabs"
  27. ></uv-tabs>
  28. </view>
  29. <view class="list">
  30. <view class="list-item" v-for="item in list" :key="item.id">
  31. <checkupCard :data="item" @sendBack="openTrackingNoPopup(item.id)"></checkupCard>
  32. </view>
  33. </view>
  34. </view>
  35. <checkupTrackingNoPopup ref="checkupTrackingNoPopup" @submitted="getData"></checkupTrackingNoPopup>
  36. </view>
  37. </template>
  38. <script>
  39. import mixinsList from '@/mixins/list.js'
  40. import checkupCard from './checkupCard.vue'
  41. import checkupTrackingNoPopup from '@/pages_order/checkup/checkupTrackingNoPopup.vue'
  42. export default {
  43. mixins: [mixinsList],
  44. components: {
  45. checkupCard,
  46. checkupTrackingNoPopup,
  47. },
  48. data() {
  49. return {
  50. tabs: [
  51. { name: '全部' },
  52. { name: '自采' },
  53. { name: '上门' },
  54. { name: '到店' },
  55. { name: '已取消' },
  56. ],
  57. mixinsListApi: '',
  58. }
  59. },
  60. methods: {
  61. //点击tab栏
  62. clickTabs({ index }) {
  63. if (index == 0) {
  64. delete this.queryParams.status
  65. } else {
  66. this.queryParams.status = index - 1
  67. }
  68. this.getData()
  69. },
  70. // todo: delete
  71. getData() {
  72. this.list = [
  73. {
  74. id: '001',
  75. url: '',
  76. title: '月度装定制营养包',
  77. userName: '周小艺',
  78. phone: '15558661691',
  79. amount: 688,
  80. appointmentTime: '2025-04-28 08:14',
  81. type: 3,
  82. typeDesc: '到店检测',
  83. status: 5,
  84. },
  85. {
  86. id: '002',
  87. url: '',
  88. title: '青少年体检套餐',
  89. userName: '周小艺',
  90. phone: '15558661691',
  91. amount: 688,
  92. appointmentTime: '2025-04-28 08:00~09:00',
  93. type: 3,
  94. typeDesc: '到店检测',
  95. status: 3,
  96. },
  97. {
  98. id: '003',
  99. url: '',
  100. title: '孕产妇体检套餐',
  101. userName: '周小艺',
  102. phone: '15558661691',
  103. amount: 688,
  104. createTime: '2025-04-28 08:14',
  105. type: 1,
  106. status: 0,
  107. },
  108. {
  109. id: '004',
  110. url: '',
  111. title: '青少年体检套餐',
  112. userName: '周小艺',
  113. phone: '15558661691',
  114. amount: 688,
  115. appointmentTime: null,
  116. type: 1,
  117. typeDesc: '自采检测',
  118. status: 1,
  119. },
  120. {
  121. id: '005',
  122. url: '',
  123. title: '青少年体检套餐',
  124. userName: '周小艺',
  125. phone: '15558661691',
  126. amount: 688,
  127. appointmentTime: '2025-04-28 08:00~09:00',
  128. type: 2,
  129. typeDesc: '上门检测',
  130. status: 2,
  131. },
  132. ]
  133. this.total = this.list.length
  134. },
  135. openTrackingNoPopup(id) {
  136. this.$refs.checkupTrackingNoPopup.open(id)
  137. },
  138. },
  139. }
  140. </script>
  141. <style scoped lang="scss">
  142. .page__view {
  143. width: 100vw;
  144. min-height: 100vh;
  145. background-color: $uni-bg-color;
  146. position: relative;
  147. /deep/ .nav-bar__view {
  148. position: fixed;
  149. top: 0;
  150. left: 0;
  151. }
  152. }
  153. .main {
  154. width: 100vw;
  155. padding: calc(var(--status-bar-height) + 244rpx) 32rpx 40rpx 32rpx;
  156. box-sizing: border-box;
  157. .tabs {
  158. position: fixed;
  159. top: calc(var(--status-bar-height) + 120rpx);
  160. left: 0;
  161. width: 100%;
  162. height: 84rpx;
  163. background: #FFFFFF;
  164. /deep/ .uv-tabs__wrapper__nav__line {
  165. border-radius: 2rpx;
  166. bottom: 0;
  167. }
  168. }
  169. }
  170. .list {
  171. &-item {
  172. & + & {
  173. margin-top: 40rpx;
  174. }
  175. }
  176. }
  177. </style>