index.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <template>
  2. <view>
  3. <u-sticky class="sticky_wrap" bgColor="#fff">
  4. <view class="header_wrap">
  5. <view class="header_top_wrap" @click="toPerson">
  6. <view class="header_info_left">
  7. <u-avatar :src="$avatar(userInfo.avatar)" size="60rpx"></u-avatar>
  8. <view class="info_wrap">
  9. <text class="follow_name">{{userInfo.userName ? userInfo.userName : "-"}}</text>
  10. <text class="deptName">{{userInfo.dept ? userInfo.dept.deptName : "-"}}</text>
  11. </view>
  12. </view>
  13. </view>
  14. </view>
  15. <u-tabs class="uTabsWrap" :list="list" :activeStyle="{
  16. color: '#303133',
  17. fontWeight: 'bold',
  18. fontSize : '36rpx'
  19. }" :inactiveStyle="{
  20. color: '#606266',
  21. fontWeight: 'bold',
  22. fontSize : '32rpx'}" @change="handleTabChange">
  23. </u-tabs>
  24. <!-- <view class="dayNum_wrap" @click="handleClickDayNum">
  25. <view class="text">{{dayName}}</view>
  26. <u-icon name="arrow-down-fill" color="#aaa" size="10"></u-icon>
  27. </view> -->
  28. </u-sticky>
  29. <view class="main_warp" id="main_warp">
  30. <team :class="[activeTab !== 'team' ? 'hidden' : '' ]" ref="team"></team>
  31. <personage :class="[activeTab !== 'personage' ? 'hidden' : '' ]" ref="personage"></personage>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. import dayjs from "dayjs";
  37. import personage from "./personage/index.vue";
  38. import team from "./team/index.vue";
  39. export default {
  40. components : { personage , team },
  41. data() {
  42. return {
  43. list: [{
  44. name: '团队管理',
  45. value: "team"
  46. }, {
  47. name: '个人跟进',
  48. value: "personage"
  49. }],
  50. activeTab: "team",
  51. userInfo: this.$store.state.user.userInfo,
  52. };
  53. },
  54. methods: {
  55. toPerson() {
  56. uni.switchTab({
  57. url: `/pages/person/index`
  58. })
  59. },
  60. handleTabChange({
  61. value
  62. }) {
  63. this.activeTab = value;
  64. }
  65. },
  66. }
  67. </script>
  68. <style lang="scss" scoped>
  69. .uTabsWrap{
  70. background-color: #fff;
  71. }
  72. .header_wrap {
  73. box-sizing: border-box;
  74. padding: 10rpx;
  75. background: #fff;
  76. .header_top_wrap {
  77. display: flex;
  78. justify-content: space-between;
  79. align-items: center;
  80. .header_info_left {
  81. display: flex;
  82. align-items: center;
  83. // image {
  84. // width: 100rpx;
  85. // height: 100rpx;
  86. // margin-right: 30rpx;
  87. // border-radius: 50%;
  88. // }
  89. .info_wrap {
  90. margin-left: 20rpx;
  91. .follow_name {
  92. font-size: 32rpx;
  93. color: #202020;
  94. font-weight: bold;
  95. margin-right: 20rpx;
  96. }
  97. .deptName{
  98. font-size: 28rpx;
  99. color: #666666;
  100. }
  101. }
  102. }
  103. .header_info_right {
  104. ::v-deep .u-icon__icon {
  105. font-size: 30rpx !important;
  106. }
  107. }
  108. }
  109. .parson_menu_wrap {
  110. background: #ffffff;
  111. border-radius: 20px;
  112. box-shadow: 0px 4px 20px 0px rgba(16, 140, 255, 0.10);
  113. margin-top: 58rpx;
  114. .parson_menu_list {
  115. display: flex;
  116. padding: 40rpx 0;
  117. .menu_item {
  118. width: 33%;
  119. display: flex;
  120. flex-direction: column;
  121. align-items: center;
  122. image {
  123. width: 48rpx;
  124. height: 48rpx;
  125. margin-bottom: 24rpx;
  126. }
  127. text {
  128. font-size: 28rpx;
  129. color: #202020;
  130. }
  131. }
  132. }
  133. }
  134. }
  135. .sticky_wrap {
  136. position: relative;
  137. }
  138. .hidden {
  139. padding: 0;
  140. height: 0;
  141. overflow: hidden;
  142. }
  143. .personClue {
  144. background-color: #fff;
  145. display: flex;
  146. justify-content: flex-start;
  147. }
  148. .main_warp {
  149. padding-top: 20rpx;
  150. padding-bottom: 100rpx;
  151. }
  152. </style>