特易招,招聘小程序
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.

90 lines
1.7 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
  1. <template>
  2. <!-- 联系记录 -->
  3. <view class="page">
  4. <navbar title="联系记录"
  5. bgColor="#3796F8"
  6. leftClick
  7. color="#fff"
  8. @leftClick="$utils.navigateBack"/>
  9. <view class="">
  10. <uv-tabs :list="tabs"
  11. lineColor="#3796F8"
  12. lineHeight="8rpx"
  13. lineWidth="50rpx"
  14. :scrollable="false"
  15. @click="clickTabs"></uv-tabs>
  16. </view>
  17. <!-- 工人看到的 -->
  18. <workList :api="api" ref="list" v-if="!role && type == 0"/>
  19. <bossList :api="api" ref="list" v-if="!role && type == 1"/>
  20. <!-- 老板看到的 -->
  21. <userList :api="api" ref="list" v-if="role"/>
  22. </view>
  23. </template>
  24. <script>
  25. import workList from '@/components/list/workList/index.vue'
  26. import bossList from '@/components/list/bossList/index.vue'
  27. import userList from '@/components/list/userList/index.vue'
  28. import { mapState } from 'vuex'
  29. export default {
  30. components : {
  31. bossList,
  32. workList,
  33. userList,
  34. },
  35. data() {
  36. return {
  37. tabs: [
  38. {
  39. name: '我看过谁'
  40. },
  41. {
  42. name: '谁看过我'
  43. },
  44. ],
  45. type : 0,
  46. api : ''
  47. }
  48. },
  49. computed : {
  50. ...mapState([
  51. 'role',
  52. ]),
  53. },
  54. onLoad() {
  55. this.setApi()
  56. },
  57. onShow() {
  58. this.$nextTick(() => {
  59. this.$refs.list.getData()
  60. })
  61. },
  62. onReachBottom() {
  63. this.$refs.list.loadMoreData()
  64. },
  65. methods: {
  66. clickTabs({index}) {
  67. this.type = index
  68. this.setApi()
  69. this.$nextTick(() => {
  70. this.$refs.list.getData()
  71. })
  72. },
  73. setApi(){
  74. if(this.role){
  75. this.api = ['bossQueryWatchWho', 'bossQueryWatchMe'][this.type]
  76. }else{
  77. this.api = ['employeeQueryWatchWho', 'employeeQueryWatchMe'][this.type]
  78. }
  79. },
  80. }
  81. }
  82. </script>
  83. <style scoped lang="scss">
  84. </style>