index.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <!--
  2. * @Author: liuzhenlin 461480418@qq.ocm
  3. * @Date: 2023-01-12 11:57:48
  4. * @LastEditors: wanglj wanglijie@dashoo.cn
  5. * @LastEditTime: 2025-03-26 18:00:04
  6. * @Description: file content
  7. * @FilePath: \opms\pages\schedule\index.vue
  8. -->
  9. <template>
  10. <!-- 页面内容 -->
  11. <div class="home">
  12. <!-- <van-pull-refresh v-model="loading" @refresh="onRefresh"> -->
  13. <van-tabs v-model:active="active" @click-tab="onClickTab">
  14. <van-tab title="即将上机">
  15. <div class="list-container">
  16. <soon-geton v-if="active === 0" ref="soonGetonRef" />
  17. </div>
  18. </van-tab>
  19. <van-tab title="正在上机">
  20. <div class="list-container">
  21. <in-progress v-if="active === 1" ref="inProgressRef" />
  22. </div>
  23. </van-tab>
  24. <van-tab title="等待审核">
  25. <div class="list-container">
  26. <my-appoint v-if="active === 2" ref="myAppointRef" />
  27. </div>
  28. </van-tab>
  29. <van-tab title="预约记录">
  30. <div class="list-container">
  31. <appoint-record v-if="active === 3" ref="recordRef" />
  32. </div>
  33. </van-tab>
  34. <van-tab title="送样预约">
  35. <div class="list-container">
  36. <sample-appoint-list v-if="active === 4" ref="sampleAppointListRef" />
  37. </div>
  38. </van-tab>
  39. </van-tabs>
  40. <!-- </van-pull-refresh> -->
  41. <van-tabbar route :placeholder="true">
  42. <van-tabbar-item replace to="/home" icon="wap-home-o">首页</van-tabbar-item>
  43. <van-tabbar-item replace to="/instr-follow" icon="star">收藏仪器</van-tabbar-item>
  44. <van-tabbar-item replace to="/instr-list" icon="printer">全部仪器</van-tabbar-item>
  45. <van-tabbar-item replace to="/instr-appoint-record" icon="label">我的预约</van-tabbar-item>
  46. </van-tabbar>
  47. </div>
  48. </template>
  49. <script>
  50. import SoonGeton from './soonGeton/index.vue'
  51. import InProgress from './inProgress/index.vue'
  52. import MyAppoint from './myAppoint/index.vue'
  53. import AppointRecord from './appointRecord/index.vue'
  54. import SampleAppointList from './SampleAppointList.vue'
  55. export default {
  56. name: 'appointList',
  57. components: { SoonGeton, InProgress, MyAppoint, AppointRecord, SampleAppointList },
  58. data() {
  59. return {
  60. loading: false,
  61. active: 0,
  62. activeTab: 0
  63. }
  64. },
  65. // onLoad(option) {
  66. // console.log(option)
  67. // if (option.type && option.type === 'inProgress') {
  68. // this.curInstTabIndex = 1
  69. // }
  70. // console.log('onLoad')
  71. // setTimeout(() => {
  72. // this.showTemp = true
  73. // this.initList()
  74. // }, 500)
  75. // },
  76. // onShow() {
  77. // setTimeout(() => {
  78. // if (!this.$refs.soonGetonRef) {
  79. // return
  80. // }
  81. // switch (this.curInstTabIndex) {
  82. // case 0:
  83. // this.$refs.soonGetonRef.onRefresh()
  84. // break
  85. // case 1:
  86. // this.$refs.inProgressRef.onRefresh()
  87. // break
  88. // case 2:
  89. // this.$refs.myAppointRef.onRefresh()
  90. // break
  91. // }
  92. // })
  93. // },
  94. methods: {
  95. // 下拉刷新被触发
  96. onRefresh() {
  97. // this.initList()
  98. this.loading = false
  99. },
  100. onClickTab(e) {
  101. this.active = e.name
  102. }
  103. // initList() {
  104. // if (this.curAppointTypeIndex == 0) {
  105. // switch (this.curInstTabIndex) {
  106. // case 0:
  107. // if (!this.$refs.soonGetonRef) return
  108. // this.$refs.soonGetonRef.queryForm.pageNum = 1
  109. // this.$refs.soonGetonRef.appointList = []
  110. // this.$refs.soonGetonRef.getInstList()
  111. // break
  112. // case 1:
  113. // if (!this.$refs.inProgressRef) return
  114. // this.$refs.inProgressRef.queryForm.pageNum = 1
  115. // this.$refs.inProgressRef.appointList = []
  116. // this.$refs.inProgressRef.getInstList()
  117. // break
  118. // case 2:
  119. // if (!this.$refs.myAppointRef) return
  120. // this.$refs.myAppointRef.queryForm.pageNum = 1
  121. // this.$refs.myAppointRef.appointList = []
  122. // this.$refs.myAppointRef.getInstList()
  123. // break
  124. // }
  125. // } else if (this.curAppointTypeIndex == 1) {
  126. // this.$refs.sampleDeliveryRef.queryForm.pageNum = 1
  127. // this.$refs.sampleDeliveryRef.getSampleAppointList()
  128. // }
  129. // },
  130. }
  131. }
  132. </script>
  133. <style lang="scss" scoped>
  134. * {
  135. box-sizing: border-box;
  136. }
  137. .home {
  138. height: 100%;
  139. overflow: hidden;
  140. display: flex;
  141. flex-direction: column;
  142. padding-top: 10px;
  143. .list-container {
  144. height: 100%;
  145. background-color: #f7f8fa;
  146. padding: 10px;
  147. overflow-y: auto;
  148. flex: 1;
  149. }
  150. .van-tabs {
  151. flex: 1;
  152. height: 0;
  153. display: flex;
  154. flex-direction: column;
  155. }
  156. :deep(.van-tabs__content) {
  157. flex: 1;
  158. height: 0;
  159. }
  160. .van-tab__panel {
  161. height: 100%;
  162. }
  163. }
  164. </style>