visitList.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <div class="visitList">
  3. <!-- <van-sticky>
  4. <m-header v-if="headerStatus" :isFixed="false" />
  5. </van-sticky> -->
  6. <van-tabs v-model="active" @change="tabChange" title-active-color="#000000" title-inactive-color="#808080" color="#01C1B5" class="van-hairline--bottom">
  7. <van-tab title="待回访列表" name="all">
  8. <beforeVisitList />
  9. </van-tab>
  10. <van-tab title="回访记录" name="visited">
  11. <afterVisitList />
  12. </van-tab>
  13. </van-tabs>
  14. <!-- <template v-if="active === 'all'">
  15. <beforeVisitList />
  16. </template>
  17. <template v-else>
  18. <afterVisitList />
  19. </template> -->
  20. </div>
  21. </template>
  22. <script>
  23. import MHeader from "@/components/MHeader";
  24. import { browser } from "@/common/common";
  25. import afterVisitList from './afterVisitList.vue';
  26. import beforeVisitList from './beforeVisitList.vue';
  27. export default {
  28. components: { MHeader, afterVisitList, beforeVisitList },
  29. data() {
  30. const activeType = sessionStorage.getItem('visited')
  31. sessionStorage.removeItem('visited')
  32. return {
  33. headerStatus: true,
  34. active: activeType || 'all',
  35. list: [],
  36. loading: false,
  37. finished: false,
  38. params: {
  39. page: 1,
  40. rows: 20,
  41. },
  42. dataShow: true,
  43. // 类型为回访学员时
  44. formatEndTime: null,
  45. formatStartTime: null,
  46. trainNum: 0,
  47. playTime: 0,
  48. };
  49. },
  50. created() {
  51. this.tenantId = sessionStorage.getItem('tenantId') || null
  52. },
  53. async mounted() {
  54. let params = this.$route.query;
  55. if (params.Authorization) {
  56. localStorage.setItem("Authorization", decodeURI(params.Authorization));
  57. localStorage.setItem("userInfo", decodeURI(params.Authorization));
  58. }
  59. if (browser().android || browser().iPhone) {
  60. this.headerStatus = false;
  61. }
  62. document.title = '回访记录'
  63. },
  64. methods: {
  65. tabChange(val) {
  66. sessionStorage.setItem('visited', val)
  67. }
  68. },
  69. };
  70. </script>
  71. <style lang="less" scoped>
  72. @import url("../../assets/commonLess/variable.less");
  73. .visitList {
  74. min-height: 100vh;
  75. // .visitTime {
  76. // .van-cell__right-icon{
  77. // // line-height: .36rem;
  78. // }
  79. // }
  80. /deep/.van-dropdown-menu__bar {
  81. box-shadow: none;
  82. }
  83. }
  84. /deep/.van-tab {
  85. font-size: .16rem;
  86. }
  87. /deep/.search .van-search {
  88. margin: 10px 0 ;
  89. }
  90. .data-content {
  91. margin: .1rem .15rem 0;
  92. border-radius: .1rem;
  93. overflow: hidden;
  94. .logo {
  95. width: 0.40rem;
  96. height: 0.4rem;
  97. // margin-right: 0.12rem;
  98. border-radius: 100%;
  99. }
  100. &:first-child {
  101. margin-top: 0;
  102. }
  103. .van-row-item {
  104. display: flex;
  105. align-items: center;
  106. }
  107. /deep/.van-grid-item__content {
  108. padding: .03rem
  109. }
  110. /deep/.van-grid-item__content {
  111. background-color: transparent;
  112. }
  113. /deep/.van-grid-item__icon-wrapper {
  114. font-size: .15rem;
  115. font-weight: 500;
  116. color: #000;
  117. }
  118. /deep/.van-grid-item__text {
  119. padding-top: .03rem;
  120. font-size: .12rem;
  121. color: #808080;
  122. }
  123. .teacher_info {
  124. display: flex;
  125. align-items: center;
  126. img {
  127. margin-right: .1rem;
  128. width: .4rem;
  129. height: .4rem;
  130. border-radius: 50%;
  131. }
  132. }
  133. }
  134. .btnWrap {
  135. display: flex;
  136. flex-direction: row;
  137. .cancelBtn {
  138. height: 48px;
  139. line-height: 48px;
  140. background: #eeeff3;
  141. color: @mColor;
  142. text-align: center;
  143. width: 100%;
  144. }
  145. .okBtn {
  146. width: 100%;
  147. height: 48px;
  148. line-height: 48px;
  149. background: @mColor;
  150. color: #fff;
  151. text-align: center;
  152. }
  153. }
  154. </style>