index.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. import * as API from '@/apis/hr/my.js'
  2. import ResumeItem from '@/components/hr/ResumeItem.vue'
  3. //loadJobManagement
  4. export default {
  5. data() {
  6. return {
  7. isReady:false,
  8. src: '/static/img/head/png',
  9. keyword: '遥看瀑布挂前川',
  10. list: [{
  11. name: '全部',
  12. list:[],
  13. status:"",
  14. pageIndex:1,
  15. recordsTotal:0,
  16. }, {
  17. name: '已投递',
  18. list:[],
  19. status:"1",
  20. pageIndex:1,
  21. recordsTotal:0,
  22. }, {
  23. name: '邀沟通',
  24. list:[],
  25. status:"2",
  26. pageIndex:1,
  27. recordsTotal:0,
  28. },{
  29. name: '邀面试',
  30. list:[],
  31. status:"3",
  32. pageIndex:1,
  33. recordsTotal:0,
  34. }, {
  35. name: '邀入职',
  36. list:[],
  37. status:"4",
  38. pageIndex:1,
  39. recordsTotal:0,
  40. },{
  41. name: '已入职',
  42. list:[],
  43. status:"5",
  44. pageIndex:1,
  45. recordsTotal:0,
  46. }, {
  47. name: '不合适',
  48. list:[],
  49. status:"6",
  50. pageIndex:1,
  51. recordsTotal:0,
  52. }],
  53. current: 0
  54. }
  55. },
  56. components: {
  57. ResumeItem
  58. },
  59. onLoad(op){
  60. //this.id=op.id;
  61. },
  62. methods: {
  63. myLoadmore(){
  64. var obj=this.list[this.current];
  65. obj.pageIndex+=1;
  66. this.getList()
  67. },
  68. change(index) {
  69. this.current = index;
  70. var obj=this.list[this.current];
  71. if(obj.list.length==0){
  72. this.getList()
  73. }
  74. },
  75. getList(){
  76. uni.showLoading({
  77. title:"加载中"
  78. })
  79. var obj=this.list[this.current];
  80. var data={
  81. type:obj.status,
  82. pageIndex:obj.pageIndex
  83. };
  84. API.loadJobManagement(data).then((res) => {
  85. obj.list=[
  86. ...obj.list,
  87. ...res.data.data
  88. ];
  89. obj.recordsTotal=res.data.recordsTotal
  90. uni.hideLoading()
  91. console.log(this.list)
  92. }).catch(error => {
  93. uni.showToast({
  94. title:error
  95. })
  96. })
  97. }
  98. },onReady(){
  99. this.getList()
  100. this.isReady=true;
  101. },onShow(){
  102. if(this.isReady){
  103. }
  104. },
  105. }