visitList.vue 3.7 KB

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