jiazhengUserManager.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view class="admin-jiazheng-page">
  3. <view class="icon-title-navBar-box">
  4. <view @click="goUpPage" class="nav-bar-icon"></view>
  5. <text class="nav-bar-title">家政人员</text>
  6. </view>
  7. <v-tabs v-model="current" :tabs="tabs" :scroll="false" @change="changeTab" field="name"
  8. class="admin-tab-box"></v-tabs>
  9. <gerenZiliao ref="gerenZiliao" @goNext="gerenziliaoNext" v-show="current ==0"></gerenZiliao>
  10. <qiuzhiXinxi ref="qiuzhiXinxi" @goUp="goUpQiuzhixinxi" @goNext="goNextQiuzhixinxi" v-show="current ==1">
  11. </qiuzhiXinxi>
  12. <zhaopianZiliao ref="zhaopianZiliao" @goUp="goUpZhaopianZiliao" @goNext="goNextZhaopianZiliao"
  13. v-show="current ==2"></zhaopianZiliao>
  14. <banzhengXinxi ref="banzhengXinxi" @goUp="goUpBanzhengXinxi" v-show="current ==3"></banzhengXinxi>
  15. </view>
  16. </template>
  17. <script>
  18. import {
  19. ref
  20. } from "vue";
  21. import banzhengXinxi from './banzhengXinxi.vue';
  22. import qiuzhiXinxi from './qiuzhiXinxi.vue';
  23. import zhaopianZiliao from './zhaopianZiliao.vue';
  24. import gerenZiliao from './gerenZiliao.vue';
  25. export default {
  26. data() {
  27. return {
  28. current: 0,
  29. // tabs: ['个人资料', '求职信息', '照片资料', '办证信息']
  30. tabs: [{
  31. id: 1,
  32. name: '个人资料',
  33. disabled: false
  34. },
  35. {
  36. id: 2,
  37. name: '求职信息',
  38. disabled: true
  39. },
  40. {
  41. id: 3,
  42. name: '照片资料',
  43. disabled: true
  44. },
  45. {
  46. id: 4,
  47. name: '办证信息',
  48. disabled: true
  49. },
  50. ],
  51. }
  52. },
  53. components: {
  54. banzhengXinxi,
  55. qiuzhiXinxi,
  56. gerenZiliao,
  57. zhaopianZiliao,
  58. },
  59. methods: {
  60. changeTab(data) {
  61. console.log('data', data);
  62. },
  63. goUpPage() {
  64. uni.redirectTo({
  65. url: `/pages/admin/Jiazheng/jiazhengUserInfo`
  66. })
  67. },
  68. gerenziliaoNext(data, num) {
  69. console.log('data', data);
  70. console.log('num', num);
  71. this.current = num + 1
  72. this.tabs = this.tabs.map((item, i) => {
  73. if (i == this.current) item.disabled = false
  74. return item
  75. })
  76. console.log('this.tabs', this.tabs);
  77. },
  78. goUpQiuzhixinxi(data, num) {
  79. this.current = num - 1
  80. },
  81. goNextQiuzhixinxi(data, num) {
  82. this.current = num + 1
  83. this.tabs = this.tabs.map((item, i) => {
  84. if (i == this.current) item.disabled = false
  85. return item
  86. })
  87. console.log('this.tabs', this.tabs);
  88. },
  89. goUpZhaopianZiliao(data, num) {
  90. this.current = num - 1
  91. },
  92. goNextZhaopianZiliao(data, num) {
  93. this.current = num + 1
  94. this.tabs = this.tabs.map((item, i) => {
  95. if (i == this.current) item.disabled = false
  96. return item
  97. })
  98. },
  99. goUpBanzhengXinxi(data, num) {
  100. this.current = num - 1
  101. }
  102. }
  103. }
  104. </script>