index.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <!-- 检索列表页 - 职位检索 -->
  2. <template>
  3. <div class="default-width">
  4. <div style="width: 100%; height: 20px;"></div>
  5. <v-card style="z-index: 998">
  6. <div class="stickyBox my-3">
  7. <headSearch></headSearch>
  8. </div>
  9. <cityFilter class="mx-5 mb-3" @updateCheckedInput="checkedInputChange"></cityFilter>
  10. <conditionFilter class="mx-5 mb-3"></conditionFilter>
  11. </v-card>
  12. <div class="d-flex mt-3">
  13. <div class="mr-3" style="min-width: 884px;">
  14. <div v-if="!items?.length" style="text-align: center;">暂无数据</div>
  15. <PositionLongStrip v-else :items="items"></PositionLongStrip>
  16. </div>
  17. <rightRecommend></rightRecommend>
  18. </div>
  19. <CtPagination
  20. v-if="total > 0"
  21. :total="total"
  22. :page="pageInfo.pageNo"
  23. :limit="pageInfo.pageSize"
  24. @handleChange="handleChangePage"
  25. ></CtPagination>
  26. </div>
  27. </template>
  28. <script setup>
  29. import rightRecommend from './components/rightRecommend'
  30. import cityFilter from './components/cityFilter'
  31. import conditionFilter from './components/conditionFilter'
  32. import headSearch from '@/components/headSearch'
  33. import PositionLongStrip from '@/components/PositionLongStrip/item.vue'
  34. import { getJobAdvertisedSearch } from '@/api/position'
  35. import CtPagination from '@/components/CtPagination'
  36. // import { dealDictData } from '@/views/recruit/position/components/dict'
  37. import { ref } from 'vue'
  38. import { useRoute, useRouter } from 'vue-router'
  39. defineOptions({name: 'retrieval-position-page'})
  40. // const route = useRoute()
  41. const route = useRoute(); const router = useRouter()
  42. console.log('to:/recruit/position-> query', route.query)
  43. const pageInfo = { pageNo: 1, pageSize: 20}
  44. const items = ref([])
  45. const total = ref(0)
  46. // 测试数据
  47. const test = {
  48. job: {
  49. id: 1,
  50. pos: "广州",
  51. name: "测试数据",
  52. positionId: 1,
  53. payFrom: 5000,
  54. payTo: 12000,
  55. payUnit: 1,
  56. areaId: 110000,
  57. expType: 0,
  58. eduType: 0,
  59. tagList: [
  60. "无经验要求",
  61. "金融产品",
  62. ]
  63. },
  64. enterprise: {
  65. id: 1,
  66. name: "广州门墩儿科技有限公司",
  67. anotherName: "门墩儿科技",
  68. industryId: 1,
  69. scale: 0,
  70. financingStatus: 0,
  71. logoUrl: "https://img.bosszhipin.com/beijin/mcs/chatphoto/20171009/8b09998594701c82c6d9932c6f5d3ea293cf1c0a52480018916865cbf3ed2c2f.jpg?x-oss-process=image/resize,w_120,limit_0",
  72. tags: [ "培训/辅导机构", "天使轮", "100-499人"],
  73. tags1: [ '就近分配', '室内清洁', '系统接单', '无需坐班', '日常保洁', '简单易上手', '日常保洁', '简单易上手'],
  74. welfareList: ['周末双休', '五险一金', '包餐', '节日福利', '员工旅游', '定期体检', '全勤奖', '带薪年假,年底双薪等福利多多']
  75. },
  76. contact: {
  77. enterpriseId: 1,
  78. userId: 1,
  79. avatar: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F5bbef4cc-6268-46d9-87b3-3aa7d2168aad%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1718339519&t=6ff0d47abd90d209ca81b671e898deb8",
  80. name: "ces女士",
  81. status: 1,
  82. postNameCn: "人事经理",
  83. postNameEn: "uman resources",
  84. postCode: "HR"
  85. }
  86. }
  87. // 测试数据
  88. // 职位搜索
  89. const getPositionList = async () => {
  90. const pageReqVO = {
  91. ...pageInfo,
  92. // content: '', // 搜索内容,示例值(xx科技/xx经理)
  93. // areaIds: [], //工作地区id集合,示例值([])
  94. // expType: 0, // 工作经验(menduner_exp_type),示例值(1)
  95. // eduType: 0, // 学历要求(menduner_education_type),示例值(1)
  96. // payType: 0, // 薪酬待遇范围(menduner_pay_scope),示例值(12)
  97. // jobType: 0, // 求职类型(menduner_job_type),示例值(2)
  98. // positionId: 0, // 职位类型,示例值(2)
  99. // enterpriseType: 0, // 企业类型(menduner_enterprise_type)
  100. // industryIds: [], // 行业信息id集合,示例值([])
  101. // scale: 0, // 人员规模(0-20人,20-99人)示例值(1)
  102. // financingStatus: 0 // 融资阶段(未融资,天使轮,A轮,不需要融资),示例值(1)
  103. }
  104. const res = await getJobAdvertisedSearch(pageReqVO)
  105. // items.value = res.list
  106. items.value = [...res.list, test]
  107. total.value = res.total
  108. }
  109. // items.value = [test]
  110. getPositionList()
  111. const handleChangePage = (index) => {
  112. pageInfo.pageNo = index
  113. getPositionList()
  114. }
  115. const checkedInputChange = (idChecked) => {
  116. console.log('str11111111111', idChecked)
  117. let str = ref('')
  118. idChecked.forEach((_e, index) => {
  119. if (_e?.length) str.value += `${index ? '&' : '' }level${index+1}=${_e.join('_')}`
  120. })
  121. if (str.value) router.push(`${route.path}?${str.value}`)
  122. }
  123. </script>