search.vue 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147
  1. <template>
  2. <div id="newsList">
  3. <!-- 页面头部 -->
  4. <HomePageHead></HomePageHead>
  5. <!-- 导航栏 -->
  6. <HomePageNavigation></HomePageNavigation>
  7. <!-- 列表页广告一 -->
  8. <HomeAdvertising :imgurl="adImg1" v-if="adImg1"></HomeAdvertising>
  9. <!-- 二级标题-->
  10. <HomeListSecondaryHeadingZgzp v-if="parent_name != ''" :name="parent_name" :nav="secondNav"
  11. :pinyin="parent_pinyin">
  12. </HomeListSecondaryHeadingZgzp>
  13. <main class="index_main">
  14. <!-- 三农资讯网-招工招聘-社会招聘 snzx_society -->
  15. <section class="index_2">
  16. <!-- 职位搜索 -->
  17. <div class="recruit_head_box clearfix phone_none">
  18. <div class="cruit_head_left">
  19. <span class="cruit_head_a cruit_head_only">职位搜索</span>
  20. </div>
  21. <div class="cruit_head_right clearfix">
  22. <span class="cruit_head_right_a" @click="createResume"
  23. v-if="job_search == 1 && type_id == 1">创建个人简历</span>
  24. <!-- <span class="cruit_head_right_a" @click="createJob"
  25. v-if="job_search == 1 && type_id == 3">发布招聘信息</span> -->
  26. </div>
  27. </div>
  28. <form class="phone_form clearfix pc_none" action=" " method=" ">
  29. <div class="phone_form_tip phone_form_tip_1 clearfix">
  30. <el-select v-model="industry_category" placeholder="全部" style="width:32%" clearable
  31. @change="hyChange">
  32. <el-option v-for="item in industry_categoryList" :key="item.hyid"
  33. :label="item.hyname" :value="item.hyid" />
  34. </el-select>
  35. <el-select v-model="position_category" placeholder="全部" style="width:32%" clearable
  36. @change="zwChange">
  37. <el-option v-for="item in position_categoryList" :key="item.zwid"
  38. :label="item.zwname" :value="item.zwid" />
  39. </el-select>
  40. <el-select v-model="position" placeholder="全部" style="width:32%" clearable
  41. no-data-text="请先选择职位类别" @change="jtzwChange">
  42. <el-option v-for="item in positionList" :key="item.zwid" :label="item.zwname"
  43. :value="item.zwid" />
  44. </el-select>
  45. </div>
  46. <div class="phone_form_tip phone_form_tip_2 clearfix">
  47. <el-select v-model="province" placeholder="省" style="width:15%" clearable
  48. @change="provinceChange">
  49. <el-option v-for="item in provinceList" :key="item.id" :label="item.name"
  50. :value="item.id" />
  51. </el-select>
  52. <el-select v-model="city" placeholder="市" style="width:15%" no-data-text="选省"
  53. clearable @change="cityChange">
  54. <el-option v-for="item in cityList" :key="item.id" :label="item.name"
  55. :value="item.id" />
  56. </el-select>
  57. <el-input v-model="keywords"
  58. style="width: 51%"
  59. placeholder="请输入搜索关键词" clearable>
  60. </el-input>
  61. <el-button type="" style="width: 13%" @click="goSearch">搜索</el-button>
  62. </div>
  63. <div class="phone_form_tip clearfix">
  64. </div>
  65. </form>
  66. <form class="cruit_form clearfix phone_none" action=" " method=" ">
  67. <div class="society_form_tip clearfix">
  68. <label class="society_form_label">行业类别:</label>
  69. <div class="society_form_right_a_box clearfix">
  70. <a class="society_form_right_a"
  71. :class="{ society_form_right_a_only: hyid == '' || !hyid || hyid == 0 }" title="全部"
  72. @click="hyChange(0)">
  73. 全部
  74. </a>
  75. <NuxtLink v-for="(item, index) in industry_categoryList" :key="item">
  76. <span class="society_form_right_a"
  77. :class="{ society_form_right_a_only: item.hyid == hyid }" :title="item.hyname"
  78. @click="hyChange(item.hyid)" v-if="index < 20 && hyIndex == 1">{{ item.hyname
  79. }}</span>
  80. <span class="society_form_right_a" v-if="hyIndex == 2" @click="hyChange(item.hyid)"
  81. :class="{ society_form_right_a_only: item.hyid == hyid }" :title="item.hyname">
  82. {{ item.hyname }}
  83. </span>
  84. </NuxtLink>
  85. <span class="society_form_right_btn" @click="hyIndex = 2" v-if="hyIndex == 1">展开</span>
  86. <span class="society_form_right_btn" @click="hyIndex = 1" v-if="hyIndex == 2">收起</span>
  87. </div>
  88. </div>
  89. <div class="society_form_tip clearfix">
  90. <label class="society_form_label">职位类别:</label>
  91. <div class="society_form_right_a_box clearfix">
  92. <a class="society_form_right_a"
  93. :class="{ society_form_right_a_only: zwid == '' || !zwid || zwid == 0 }" title=""
  94. @click="zwChange(0)">全部</a>
  95. <span v-for="(item, index) in position_categoryList" :key="item">
  96. <span class="society_form_right_a" v-if="index < 20 && zwIndex == 1"
  97. @click="zwChange(item.zwid)"
  98. :class="{ society_form_right_a_only: item.zwid == zwid }" :title="item.zwname">
  99. {{ item.zwname }}
  100. </span>
  101. <span class="society_form_right_a" v-if="zwIndex == 2" @click="zwChange(item.zwid)"
  102. :class="{ society_form_right_a_only: item.zwid == zwid }" :title="item.zwname">
  103. {{ item.zwname }}
  104. </span>
  105. </span>
  106. <span class="society_form_right_btn society_form_right_btn_up" @click="zwIndex = 2"
  107. v-if="zwIndex == 1">展开</span>
  108. <span class="society_form_right_btn society_form_right_btn_up" @click="zwIndex = 1"
  109. v-if="zwIndex == 2">收起</span>
  110. </div>
  111. </div>
  112. <div class="society_form_tip clearfix">
  113. <label class="society_form_label">具体职位:</label>
  114. <div class="society_form_right_a_box clearfix">
  115. <a class="society_form_right_a" @click="jtzwChange(0)"
  116. :class="{ society_form_right_a_only: jtzwid == '' || !jtzwid || jtzwid == 0 }"
  117. title="">全部</a>
  118. <span v-for="(item, index) in positionList" :key="item">
  119. <span class="society_form_right_a" v-if="index < 20 && jtzwIndex == 1"
  120. @click="jtzwChange(item.zwid)"
  121. :class="{ society_form_right_a_only: item.zwid == jtzwid }" :title="item.zwname">
  122. {{ item.zwname }}
  123. </span>
  124. <span class="society_form_right_a" v-if="jtzwIndex == 2" @click="jtzwChange(item.zwid)"
  125. :class="{ society_form_right_a_only: item.zwid == jtzwid }" :title="item.zwname">
  126. {{ item.zwname }}
  127. </span>
  128. </span>
  129. <!-- <span class="society_form_right_btn">展开</span> -->
  130. <span class="society_form_right_btn" @click="jtzwIndex = 2" v-if="jtzwIndex == 1">展开</span>
  131. <span class="society_form_right_btn" @click="jtzwIndex = 1" v-if="jtzwIndex == 2">收起</span>
  132. </div>
  133. </div>
  134. <div class="cruit_form_tip clearfix">
  135. <div class="cruit_form_per">
  136. <label class="cruit_form_label">地区选择:</label>
  137. <div class="cruit_form_label_right clearfix">
  138. <el-select v-model="province" placeholder="请选择省" style="width: 140px" clearable
  139. @change="provinceChange">
  140. <el-option v-for="item in provinceList" :key="item.id" :label="item.name"
  141. :value="item.id" />
  142. </el-select>
  143. <el-select v-model="city" placeholder="请选择市" style="width: 140px" no-data-text="请先选择省"
  144. clearable>
  145. <el-option v-for="item in cityList" :key="item.id" :label="item.name"
  146. :value="item.id" />
  147. </el-select>
  148. </div>
  149. </div>
  150. </div>
  151. <div class="cruit_form_tip clearfix">
  152. <div class="cruit_form_per">
  153. <label class="cruit_form_label">关键词:</label>
  154. <div class="cruit_form_label_right clearfix">
  155. <el-input v-model="keywords" style="width: 300px" placeholder="请输入搜索关键词" clearable />
  156. <el-button type="success" @click="goSearch">搜索</el-button>
  157. </div>
  158. </div>
  159. </div>
  160. </form>
  161. <!-- 职位搜索 -->
  162. </section>
  163. </main>
  164. <main class="color_main">
  165. <main class="index_main">
  166. <!-- 选项卡头 -->
  167. <section class="index_3 clearfix">
  168. <div class="recruit_head_box clearfix phone_none">
  169. <div class="cruit_head_left">
  170. <a class="cruit_head_a" :class="{ cruit_head_only: job_search == 1 }"
  171. @mouseover="job_search = 1" title="">找工作</a>
  172. <!-- <a class="cruit_head_a" :class="{ cruit_head_only: job_search == 2 }"
  173. @mouseover="job_search = 2" title="">招人才</a> -->
  174. </div>
  175. <div class="society_head_right clearfix">
  176. <div class="society_head_checkbox_box" v-if="job_search == 1 && type_id == 1">
  177. <el-checkbox v-model="allJob" label="" @change="toggleAllJob" />
  178. </div>
  179. <div class="society_head_right_all_box" v-if="job_search == 1 && type_id == 1">
  180. 全选
  181. </div>
  182. <!-- <div class="society_head_checkbox_box" v-if="job_search == 2 && type_id == 3">
  183. <el-checkbox v-model="allResume" label="" @change="toggleAllResume" />
  184. </div>
  185. <div class="society_head_right_all_box" v-if="job_search == 2 && type_id == 3">
  186. 全选
  187. </div> -->
  188. <div class="society_head_right_a" title="" v-if="job_search == 1 && type_id == 1"
  189. @click="getjob">申请职位</div>
  190. <!-- <div class="society_head_right_a" v-if="job_search == 2 && type_id == 3"
  191. @click="talkResume">
  192. 沟通简历</div> -->
  193. <!-- resumeBoo = true -->
  194. </div>
  195. </div>
  196. <div class="phone_box_1 pc_none">
  197. <div class="phone_box_1_head">
  198. <a title="">找工作</a>
  199. </div>
  200. </div>
  201. <!-- 选项卡头 -->
  202. <!-- 选项卡 -->
  203. <div class=" clearfix">
  204. <!-- 找工作 -->
  205. <div class=" clearfix" v-show="job_search == 1">
  206. <div class="cruit_ul_2 clearfix" v-if="job_vacancy">
  207. <div class="cruit_li_2 clearfix" v-for="(item, index) in job_vacancy" :key="item.id">
  208. <div class="society_inp_checkbox_box_li_1 hand" v-if="type_id == 1">
  209. <el-checkbox v-model="selectedJobs" :value="item.id" @change="jobChange" />
  210. </div>
  211. <NuxtLink class="cruit_li_2_a" :href="`/${item.pinyin}/${item.id}.html`" title="">
  212. <div class="cruit_li_2_head_box clearfix">
  213. <div class="cruit_li_2_head clearfix dot1">{{ item.title }}</div>
  214. <div class="cruit_li_2_head_name clearfix dot1">
  215. {{ item.business_name }}
  216. </div>
  217. </div>
  218. <div class="cruit_li_2_foot_title_box clearfix">
  219. <span class="cruit_li_2_foot_title">{{ item.jtzw_name }}</span>
  220. </div>
  221. <div class="cruit_li_2_foot clearfix">
  222. <span class="cruit_li_2_foot_tag cruit_li_2_foot_addres">
  223. {{ item.city_name }}
  224. </span>
  225. <span class="cruit_li_2_foot_tag cruit_li_2_foot_exper"
  226. v-if="item.experience_name || item.education_name">
  227. <span class="cruit_li_2_foot_tag_in">{{ item.experience_name }}</span>
  228. <span class="cruit_li_2_foot_tag_in">{{ item.education_name }}</span>
  229. </span>
  230. <span class="cruit_li_2_foot_tag cruit_li_2_foot_time">
  231. {{ getTime(item.updated_at, 'year', 1) }}
  232. </span>
  233. </div>
  234. </NuxtLink>
  235. </div>
  236. </div>
  237. <div class="pagination pagination_phone_none" v-if="zptotal">
  238. <el-pagination size="small" background layout="prev, pager, next" :total="zptotal"
  239. class="mt-4" prev-text="上一页" next-text="下一页" @change="changePage" />
  240. </div>
  241. <div class="pagination pagination_pc_none" v-if="zptotal">
  242. <el-pagination
  243. pager-count="5"
  244. size="small"
  245. background
  246. layout="pager"
  247. :default-page-size="pageSize"
  248. :total="zptotal"
  249. class="mt-4"
  250. @current-change="changePage"
  251. />
  252. </div>
  253. <div class="empty" v-if="job_vacancy == false">
  254. <img src="@/public/topic/empty.png" alt="" class="empty_img">
  255. <span class="empty_text">当前暂无数据</span>
  256. </div>
  257. </div>
  258. <!-- 找工作 -->
  259. <!-- 招人才 -->
  260. <!-- <div class=" clearfix" v-show="job_search == 2">
  261. <div class="society_ul_3 clearfix" v-if="job_resume">
  262. <div class="society_li_3 clearfix" v-for="(item, index) in job_resume" :key="item">
  263. <div class="society_inp_checkbox_box_li_3 hand" v-if="type_id == 3">
  264. <el-checkbox v-model="selectedResume" :value="item.id" @change="jobChange" />
  265. </div>
  266. <NuxtLink class="society_li_3_a" :href="`/${item.pinyin}/${item.id}.html`" title="">
  267. <div class="society_li_3_head_box clearfix">
  268. <div class="society_li_3_head clearfix dot1">
  269. {{ item.name }}
  270. </div>
  271. <div class="society_li_3_head_name clearfix dot1">
  272. {{ item.jtzw_name }}
  273. </div>
  274. </div>
  275. <div class="society_li_3_text_box clearfix">
  276. <div class="society_li_3_text">
  277. {{ item.sexy == 1 ? '男' : '女' }}
  278. <em class="point">·</em>
  279. </div>
  280. <div class="society_li_3_text" v-if="item.experience">
  281. {{ item.experience }}年
  282. <em class="point">·</em>
  283. </div>
  284. <div class="society_li_3_text">
  285. {{ item.origin }}
  286. <em class="point">·</em>
  287. </div>
  288. <div class="society_li_3_text">{{ item.hy_name }}</div>
  289. </div>
  290. <div class="society_li_3_tag_box clearfix">
  291. <span class="society_li_3_tag">{{ item.city_name }}</span>
  292. <span class="society_li_3_tag">
  293. {{ getTime(item.updated_at, 'year', 1) }}
  294. </span>
  295. </div>
  296. </NuxtLink>
  297. </div>
  298. </div>
  299. <div class="pagination" v-if="qztotal">
  300. <el-pagination size="small" background layout="prev, pager, next" :total="qztotal"
  301. class="mt-4" prev-text="上一页" next-text="下一页" @change="changePage" />
  302. </div>
  303. <div class="empty" v-if="job_resume == false">
  304. <img src="@/public/topic/empty.png" alt="" class="empty_img">
  305. <span class="empty_text">当前暂无数据</span>
  306. </div>
  307. </div> -->
  308. <!-- 招人才 -->
  309. </div>
  310. <!-- 选项卡 -->
  311. </section>
  312. <!-- 招聘职位 -->
  313. <!-- <div class="cruit_alert_box">投递成功</div> -->
  314. </main>
  315. <!-- 弹框 -->
  316. <section class="cruit_alert_rgb clearfix" v-if="resumeBoo">
  317. <!-- 请选择要沟通的职位1 -->
  318. <!-- <div class="cruit_alert_rgb_box">
  319. <div class="cruit_alert_rgb_head_box">
  320. <div class="cruit_alert_rgb_close hand back100"></div>
  321. <div class="cruit_alert_rgb_head">请选择要沟通的职位</div>
  322. </div>
  323. <form class="cruit_alert_rgb_form clearfix" action=" " method=" ">
  324. <div class="cruit_alert_rgb_form_in clearfix">
  325. <div class="cruit_alert_rgb_li clearfix" v-for="(item, index) in 17" :key="item.id">
  326. <input name="type" type="checkbox" value="" class="cruit_alert_rgb_checkbox hand" />
  327. <label
  328. class="cruit_alert_rgb_label dot1">高级PHP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程师</label>
  329. </div>
  330. </div>
  331. <div class="cruit_alert_rgb_foot clearfix">
  332. <input class="cruit_alert_rgb_foot_sub hand" name="" type="submit" value="沟通职位">
  333. </div>
  334. </form>
  335. </div> -->
  336. <!-- 请选择要沟通的职位2 -->
  337. <!-- 请选择要投递的简历1 -->
  338. <div class="cruit_alert_rgb_box">
  339. <div class="cruit_alert_rgb_head_box">
  340. <div class="cruit_alert_rgb_close hand back100"></div>
  341. <div class="cruit_alert_rgb_head">请选择要沟通的岗位
  342. <span class="close" @click="resumeBoo = false">x</span>
  343. </div>
  344. </div>
  345. <form class="cruit_alert_rgb_form clearfix" action=" " method=" ">
  346. <div class="cruit_alert_rgb_form_in clearfix">
  347. <div class="cruit_alert_rgb_li clearfix" v-for="(item, index) in companyJobList"
  348. :key="item.id">
  349. <!-- <el-checkbox v-model="company_job" :value="item.id" @change="jobChange" /> -->
  350. <el-radio :value="item.id" v-model="company_job" @change="jobChange">
  351. <div class="cruit_alert_rgb_label dot1">
  352. {{ item.title }}
  353. </div>
  354. </el-radio>
  355. </div>
  356. </div>
  357. <div class="cruit_alert_rgb_foot clearfix">
  358. <div class="cruit_alert_rgb_foot_sub hand" @click="getresume">沟通岗位</div>
  359. </div>
  360. </form>
  361. </div>
  362. <!-- 请选择要投递的简历2 -->
  363. </section>
  364. </main>
  365. <!-- 页面底部 -->
  366. <HomeFoot1></HomeFoot1>
  367. </div>
  368. </template>
  369. <script setup>
  370. //1.页面必备依赖 start ---------------------------------------->
  371. import { ElSelect, ElOption, ElInput, ElButton, ElPagination, ElCheckbox, ElRadio, ElMessage } from 'element-plus';
  372. import { ref, onMounted } from 'vue';
  373. import { useRoute } from 'vue-router'
  374. const nuxtApp = useNuxtApp();
  375. const axios = nuxtApp.$axios;
  376. //当前列表名称
  377. const name = ref('')
  378. const selectedJobs = ref([])
  379. const selectedResume = ref([])
  380. const company_job = ref('')
  381. const allJob = ref(false)
  382. const allResume = ref(false)
  383. const cruit_ul_1_a_only_num = ref(0)
  384. const job_search = ref(1) // 选项卡
  385. const { $webUrl, $CwebUrl, $BwebUrl } = useNuxtApp()
  386. //获取用户信息
  387. let type_id = ref('')
  388. let website_id = ref('')
  389. let getUserInfo = () => {
  390. axios.get("/user/getUserInfo").then(response => {
  391. console.log("gettypeid", response.data);
  392. type_id.value = response.data.type_id
  393. website_id.value = response.data.website_id
  394. })
  395. }
  396. onMounted(() => {
  397. getUserInfo()
  398. })
  399. //1.页面必备依赖 end ---------------------------------------->
  400. //1.获得路由id start ---------------------------------------->
  401. const route = useRoute();
  402. const hyid = ref(route.query.hyid);
  403. const zwid = ref(route.query.zwid);
  404. const jtzwid = ref(route.query.jtzwid);
  405. const provinceid = ref(route.query.provinceid);
  406. const cityid = ref(route.query.cityid);
  407. const keyword = route.query.keywords;
  408. let articleId = 0;//路由id
  409. let pageNum = ref(2);
  410. let total = ref(0);
  411. let zptotal = ref(0);
  412. let qztotal = ref(0);
  413. const page = ref(1)
  414. const pageSize = ref(10);
  415. let hyIndex = ref(1);
  416. let zwIndex = ref(1);
  417. let jtzwIndex = ref(1);
  418. //获得当前的完整路径
  419. const fullPath = route.path;
  420. //拆分,取出来中间这一段,然后提取数字部分
  421. const segments = fullPath.split('/');
  422. const targetSegment = segments[2];
  423. const targetRoute = segments[1];
  424. // console.log('111222', targetRoute);
  425. //const numberPart = targetSegment.match(/\d+$/)?.[0];
  426. //let routeId = 20 //排除路径错误可以打开这个
  427. //articleId = numberPart;
  428. //通过导航路径反向查询导航id
  429. const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
  430. method: 'GET',
  431. query: {
  432. 'pinyin': targetRoute,
  433. },
  434. });
  435. // console.log("111222333", getRouteId);
  436. if (getRouteId.code == 200) {
  437. articleId = getRouteId.data.category_id
  438. } else {
  439. // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  440. // console.log("错误位置:通过url路径查询导航池id")
  441. // console.log("后端错误反馈:", getRouteId.message)
  442. // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  443. }
  444. //获得html前的数字
  445. // const pageUrl = segments[3];
  446. // const pageNumber = pageUrl.split('.')[0];
  447. // console.log("当前URL中的页码:")
  448. // console.log(pageNumber)//2
  449. // pageNum.value = parseInt(pageNumber);
  450. pageNum.value = parseInt(route.params.id);
  451. // 创建个人简历
  452. let createResume = () => {
  453. window.open($BwebUrl + '/#/addJobHunting', '_blank');
  454. }
  455. // 发布招聘信息
  456. let createJob = () => {
  457. window.open($BwebUrl + '/#/creatJob', '_blank');
  458. }
  459. //1.获得路由id end ---------------------------------------->
  460. //2.页面数据 start ---------------------------------------->
  461. // 2.1.1 获取省份
  462. const province = ref('') //省
  463. const city = ref('') //市
  464. const provinceList = ref([]) //省列表
  465. const cityList = ref([]) //市列表
  466. const getArea = await requestDataPromise('/web/selectWebsiteArea', {
  467. method: 'GET',
  468. query: {},
  469. });
  470. if (getArea.code == 200) {
  471. provinceList.value = getArea.data;
  472. }
  473. // 2.1.2
  474. // 获取省份和城市
  475. const provinceChange = (val) => {
  476. provinceid.value = val;
  477. city.value = '';
  478. console.log('获取到的省份id', val);
  479. getCity(val)
  480. }
  481. const getCity = async (value) => {
  482. const getCity = await requestDataPromise('/web/selectWebsiteArea', {
  483. method: 'GET',
  484. query: {
  485. 'pid': value,
  486. },
  487. });
  488. if (getCity.code == 200) {
  489. cityList.value = getCity.data;
  490. }
  491. }
  492. // 带参数跳转 省份和城市的回显问题
  493. if (provinceid.value) {
  494. for (let i = 0; i < provinceList.value.length; i++) {
  495. if (provinceList.value[i].id == provinceid.value) {
  496. province.value = provinceList.value[i].id;
  497. }
  498. }
  499. const getCity = await requestDataPromise('/web/selectWebsiteArea', {
  500. method: 'GET',
  501. query: {
  502. 'pid': provinceid.value,
  503. },
  504. });
  505. if (getCity.code == 200) {
  506. cityList.value = getCity.data;
  507. }
  508. if (cityid.value) {
  509. for (let i = 0; i < cityList.value.length; i++) {
  510. if (cityList.value[i].id == cityid.value) {
  511. city.value = cityList.value[i].id;
  512. }
  513. }
  514. }
  515. }
  516. // 2.2.1 行业和职位
  517. const keywords = ref('') //关键词
  518. const industry_categoryList = ref([]) //行业类别列表
  519. const position_categoryList = ref([]) //职位类别列表
  520. const positionList = ref([]) //具体职位列表
  521. const getData = async () => {
  522. const getData = await requestDataPromise('/web/getWebsiteJobSelect', {
  523. method: 'GET',
  524. query: {},
  525. });
  526. if (getData.code == 200) {
  527. // console.log("获取到的分类数据:", getData.data);
  528. industry_categoryList.value = getData.data.hy; //行业
  529. position_categoryList.value = getData.data.zw; //职位
  530. if (zwid.value == 0 || zwid.value == '' || zwid.value == undefined || zwid.value == null) {
  531. positionList.value = getData.data.jtzw; //具体职位
  532. }
  533. }
  534. }
  535. getData()
  536. const job_vacancy = ref('') // 招聘岗位
  537. const job_resume = ref('') // 简历
  538. if (keyword) {
  539. keywords.value = keyword
  540. }
  541. const getJob = async () => {
  542. const getJob = await requestDataPromise('/web/getWebsiteJobList', {
  543. method: 'GET',
  544. query: {
  545. 'catid': articleId,
  546. 'city_id': provinceid.value,
  547. 'hy_id': hyid.value,
  548. 'zw_id': zwid.value,
  549. 'jtzw_id': jtzwid.value,
  550. 'page': page.value,
  551. 'pageSize': pageSize.value,
  552. 'keyword': keywords.value,
  553. },
  554. });
  555. if (getJob.code == 200) {
  556. // console.log("获取到的岗位和简历:", getJob.data);
  557. job_vacancy.value = getJob.data.JobRecruiting; // 招聘岗位
  558. job_resume.value = getJob.data.JobHunting; // 简历
  559. zptotal.value = getJob.data.recruit_count;
  560. qztotal.value = getJob.data.hunt_count;
  561. }
  562. }
  563. getJob()
  564. let hyChange = (val) => {
  565. console.log('hyChange', val)
  566. hyid.value = val;
  567. getJob()
  568. }
  569. let zwChange = async (val) => {
  570. console.log('zwChange', val)
  571. zwid.value = val;
  572. const getPosition = await requestDataPromise('/web/getPositionList', {
  573. method: 'GET',
  574. query: {
  575. 'zwpid': val,
  576. },
  577. })
  578. console.log("11112222", getPosition);
  579. if (getPosition.code == 200) {
  580. positionList.value = getPosition.data; //具体职位
  581. } else {
  582. positionList.value = []; //具体职位
  583. jtzwid.value = 0; //职位id
  584. }
  585. getJob()
  586. }
  587. let jtzwChange = (val) => {
  588. console.log('jtzwChange', val)
  589. jtzwid.value = val;
  590. getJob()
  591. }
  592. // 搜索
  593. const goSearch = async () => {
  594. const getJob = await requestDataPromise('/web/getWebsiteJobList', {
  595. method: 'GET',
  596. query: {
  597. 'catid': articleId,
  598. 'city_id': provinceid.value,
  599. 'hy_id': hyid.value,
  600. 'zw_id': zwid.value,
  601. 'jtzw_id': jtzwid.value,
  602. 'page': page.value,
  603. 'pageSize': pageSize.value,
  604. 'keyword': keywords.value,
  605. },
  606. });
  607. console.log("111获取到的岗位和简历:", getJob.data);
  608. if (getJob.code == 200) {
  609. job_vacancy.value = getJob.data.JobRecruiting; // 招聘岗位
  610. job_resume.value = getJob.data.JobHunting; // 简历
  611. zptotal.value = getJob.data.recruit_count;
  612. qztotal.value = getJob.data.hunt_count;
  613. }
  614. }
  615. //2.2change事件
  616. let jobChange = (val) => {
  617. console.log('jobChange', val)
  618. console.log('jobChange111', selectedJobs.value)
  619. console.log('jobChange111', selectedResume.value)
  620. console.log('jobChange11122', company_job.value) //企业会员的职位
  621. if (selectedJobs.value.length == job_vacancy.value.length) {
  622. allJob.value = true;
  623. } else {
  624. allJob.value = false;
  625. }
  626. if (selectedResume.value.length == job_resume.value.length) {
  627. allResume.value = true;
  628. } else {
  629. allResume.value = false;
  630. }
  631. }
  632. let toggleAllJob = () => {
  633. if (allJob.value) {
  634. selectedJobs.value = job_vacancy.value.map(item => item.id);
  635. } else {
  636. selectedJobs.value = [];
  637. }
  638. }
  639. let toggleAllResume = () => {
  640. if (allResume.value) {
  641. selectedResume.value = job_resume.value.map(item => item.id);
  642. } else {
  643. selectedResume.value = [];
  644. }
  645. }
  646. //分页事件
  647. let changePage = (value) => {
  648. console.log("当前页码", value);
  649. navigateTo(`/${targetSegment}/${value}.html`)
  650. }
  651. //申请职位
  652. let getjob = () => {
  653. if (selectedJobs.value.length == 0) {
  654. ElMessage({
  655. message: '请选择要申请的职位',
  656. type: 'warning',
  657. });
  658. } else {
  659. console.log("获取到的11111_sel:", selectedJobs.value);
  660. console.log("获取到的1111_website_id:", website_id.value);
  661. axios.post('/web/getWebsiteJobApply', {
  662. 'website_id': website_id.value,
  663. 'recruit_id': selectedJobs.value,
  664. }).then(response => {
  665. console.log("获取到的申请结果:", response.data);
  666. if (response.code == 200) {
  667. ElMessage({
  668. message: '投递成功',
  669. type: 'success',
  670. });
  671. } else {
  672. ElMessage({
  673. message: response.message,
  674. type: 'error',
  675. });
  676. }
  677. allJob.value = false;
  678. selectedJobs.value = [];
  679. })
  680. }
  681. }
  682. //沟通简历
  683. let talkResume = () => {
  684. if (selectedResume.value.length == 0) {
  685. ElMessage({
  686. message: '请选择要沟通的简历',
  687. type: 'warning',
  688. });
  689. return false;
  690. } else {
  691. resumeBoo.value = true;
  692. }
  693. // resumeBoo.value = true;
  694. }
  695. //获取当前企业会员的职位
  696. const companyJobList = ref([])
  697. let companyJOb = async () => {
  698. const companyJOb = await requestDataPromise('/web/getWebsiteJobRecruiting', {
  699. method: 'POST',
  700. body: {
  701. 'pageSize': pageSize.value,
  702. 'website_id': website_id.value,
  703. }
  704. })
  705. // console.log("获取到的企业会员的职位11:", companyJOb.data);
  706. if (companyJOb.code == 200) {
  707. // console.log("获取到的企业会员的职位:", companyJOb.data);
  708. companyJobList.value = companyJOb.data
  709. }
  710. }
  711. companyJOb()
  712. // 沟通简历
  713. let resumeBoo = ref(false)
  714. let getresume = async () => {
  715. const resumelist = await requestDataPromise('/web/getWebsiteJobResume', {
  716. method: 'POST',
  717. body: {
  718. 'website_id': website_id.value,
  719. 'recruit_id': company_job.value,
  720. 'hunt_id': selectedResume.value,
  721. },
  722. });
  723. // console.log("沟通简历00", resumelist);
  724. // console.log("沟通简历11", website_id.value);
  725. // console.log("沟通简历22", company_job.value);
  726. // console.log("沟通简历33", selectedResume.value);
  727. if (resumelist.code == 200) {
  728. ElMessage({
  729. message: '投递成功',
  730. type: 'sussess',
  731. });
  732. resumeBoo.value = false;
  733. } else {
  734. ElMessage({
  735. message: resumelist.message,
  736. type: 'error',
  737. });
  738. resumeBoo.value = false;
  739. }
  740. company_job.value = '';
  741. selectedResume.value = [];
  742. job_search.value = 2
  743. }
  744. // //2.3获得页面名称
  745. // let getPageName = async () => {
  746. // const pageName = await requestDataPromise('/web/getOneWebsiteCategory', {
  747. // method: 'GET',
  748. // query: {
  749. // 'catid': articleId
  750. // },
  751. // });
  752. // console.log('11122233344',pageName);
  753. // if (pageName.code == 200) {
  754. // name.value = pageName.data.alias
  755. // } else {
  756. // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  757. // console.log("错误位置:设置页面标题")
  758. // console.log("后端错误反馈:", pageName.message)
  759. // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  760. // }
  761. // }
  762. // //获得列表
  763. // getPageName();
  764. //2.页面数据 end ---------------------------------------->
  765. //3.二级栏目 start ---------------------------------------->
  766. //3.1通过id获取一级栏目
  767. const parent_name = ref([]);
  768. const parent_id = ref([]);
  769. const parent_pinyin = ref("");
  770. let getParentNav = async () => {
  771. const listData = await requestDataPromise('/web/getOneWebsiteCategory', {
  772. method: 'GET',
  773. query: {
  774. 'catid': articleId
  775. },
  776. });
  777. // console.log("1112223334455", listData.data);
  778. if (listData.code == 200) {
  779. // console.log(111999)
  780. console.log(listData.data);
  781. parent_name.value = listData.data.alias;
  782. parent_id.value = listData.data.category_id;
  783. parent_pinyin.value = listData.data.aLIas_pinyin;
  784. } else {
  785. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  786. console.log("错误位置:获取新闻列表")
  787. console.log("后端错误反馈:", listData.message)
  788. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  789. }
  790. getSecondNav();
  791. }
  792. //获得父级栏目详情
  793. getParentNav();
  794. // 3.2获取二级栏目
  795. const secondNav = ref([]);
  796. let getSecondNav = async () => {
  797. const listData = await requestDataPromise('/web/getWebsiteModelCategory', {
  798. method: 'GET',
  799. query: {
  800. 'placeid': 1,
  801. 'pid': parent_id.value,
  802. 'num': 8,
  803. },
  804. });
  805. console.log('listData', listData);
  806. if (listData.code == 200) {
  807. secondNav.value = listData.data;
  808. } else {
  809. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  810. console.log("错误位置:获取新闻列表")
  811. console.log("后端错误反馈:", listData.message)
  812. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  813. }
  814. }
  815. //3.二级栏目 end ---------------------------------------->
  816. //4.设置seo信息 start---------------------------------------->
  817. //4.1 设置seo信息
  818. const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
  819. method: 'GET',
  820. query: {
  821. 'catid': articleId
  822. },
  823. });
  824. if (setData.code == 200) {
  825. let seoTitle = setData.data.seo_title;
  826. let seoDescription = setData.data.seo_description;
  827. let seoKeywords = setData.data.seo_keywords;
  828. let seoSuffix = setData.data.suffix;
  829. let seoName = setData.data.website_name;
  830. useSeoMeta({
  831. title: seoTitle + "_" + seoName + "_" + seoSuffix,
  832. meta: [
  833. { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
  834. { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
  835. { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no',tagPriority: 10 }
  836. ]
  837. });
  838. } else {
  839. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  840. console.log("错误位置:设置列表页面SEO数据")
  841. console.log("后端错误反馈:", setData.message)
  842. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  843. }
  844. //4.设置seo信息 end---------------------------------------->
  845. //5.广告 start---------------------------------------->
  846. let adImg1 = ref({});
  847. let adImg2 = ref({});
  848. onMounted(async () => {
  849. //从客户端获取行政职能部门 加快打开速度
  850. const { $webUrl, $CwebUrl } = useNuxtApp();
  851. //广告1
  852. let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmgw_search_0001`
  853. const responseAd1 = await fetch(url, {
  854. headers: {
  855. 'Content-Type': 'application/json',
  856. 'Userurl': $CwebUrl,
  857. 'Origin': $CwebUrl
  858. }
  859. });
  860. const resultAd1 = await responseAd1.json();
  861. adImg1.value = resultAd1.data[0];
  862. //广告2
  863. let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmgw_list_0002`
  864. const responseAd2 = await fetch(url2, {
  865. headers: {
  866. 'Content-Type': 'application/json',
  867. 'Userurl': $CwebUrl,
  868. 'Origin': $CwebUrl
  869. }
  870. });
  871. const resultAd2 = await responseAd2.json();
  872. adImg2.value = resultAd2.data[0];
  873. })
  874. //5.广告 end---------------------------------------->
  875. </script>
  876. <style lang="less" scoped>
  877. @import url('@/assets/css/zgzpsearch.less');
  878. .empty {
  879. width: 100%;
  880. height: 150px;
  881. line-height: 150px;
  882. text-align: center;
  883. }
  884. .empty_img {
  885. vertical-align: -30px;
  886. margin-right: 20px;
  887. }
  888. .empty_text {
  889. font-size: 26px;
  890. color: #999;
  891. }
  892. </style>
  893. <style lang="less" scoped>
  894. @media screen and (min-width:801px){/*pc*/
  895. .pagination_pc_none{display:none;}
  896. .pc_none{display:none;}
  897. }
  898. @media screen and (max-width:800px){/*ipad_phone*/
  899. .index_main{width:100%;margin-top:0px;}
  900. .index_3{margin-top:0px;}
  901. .color_main{margin-bottom:30px;}
  902. .phone_box_1 {
  903. width: 92%;
  904. margin: 0px auto 0px;
  905. .phone_box_1_head {
  906. height: 50px;
  907. line-height: 50px;
  908. background: #fff;
  909. border-bottom: 1px solid #E6E6E6;
  910. width: 100%;
  911. a {
  912. float: left;
  913. height: 50px;
  914. line-height: 50px;
  915. margin: 0;
  916. position: relative;
  917. color: #489d97;
  918. font-size: 18px;
  919. font-weight: bold;
  920. box-sizing: border-box;
  921. position: relative;
  922. padding-left: 8px;
  923. }
  924. a::before {
  925. content: '';
  926. display: block;
  927. position: absolute;
  928. left: 0px;
  929. top: 18px;
  930. background: linear-gradient(to top, #0998A9, #6ADDD6);
  931. width: 3px;
  932. height: 15px;
  933. }
  934. }
  935. }
  936. .phone_form{
  937. width:92%;
  938. margin: 5px auto 0px;
  939. padding-bottom:8px;
  940. }
  941. .phone_form_tip{
  942. }
  943. .phone_form_tip_1 :deep(.el-select){
  944. margin:0px;
  945. }
  946. .phone_form_tip_1 :deep(.el-select:nth-of-type(2)){
  947. margin:0px 2%;
  948. box-sizing:border-box;
  949. }
  950. :deep(.el-select__wrapper){
  951. margin:5px 0px; padding:4px 4px 4px 8px;
  952. font-size:12px;box-sizing:border-box;
  953. }
  954. .phone_form_tip_2 :deep(.el-select){
  955. margin-right:2%;
  956. }
  957. :deep(.el-input){
  958. font-size:12px;
  959. }
  960. :deep(.el-button){
  961. border:solid 1px #ddd;
  962. color:#fff;float:right;margin:5px 0px 0px 0px;
  963. font-size:12px;
  964. }
  965. .phone_form{
  966. width:92%;
  967. margin: 5px auto 0px;
  968. padding-bottom:8px;
  969. }
  970. .phone_form_tip{
  971. }
  972. .phone_form_tip_1 :deep(.el-select){
  973. margin:0px;
  974. }
  975. .phone_form_tip_1 :deep(.el-select:nth-of-type(2)){
  976. margin:0px 2%;
  977. box-sizing:border-box;
  978. }
  979. :deep(.el-select__wrapper){
  980. margin:5px 0px; padding:4px 4px 4px 8px;
  981. font-size:12px;box-sizing:border-box;
  982. }
  983. .phone_form_tip_2 :deep(.el-select){
  984. margin-right:2%;
  985. }
  986. :deep(.el-input){
  987. font-size:12px;
  988. }
  989. :deep(.el-button){
  990. border:solid 1px #ddd;
  991. color:#fff;float:right;margin:5px 0px 0px 0px;
  992. font-size:12px;
  993. }
  994. .phone_form_tip_1:deep(.el-select__placeholder.is-transparent){color:#000;}
  995. .cruit_ul_2{margin-top:11px;min-height:512px;}
  996. .cruit_li_2{
  997. width:92%;float:none!important;margin:0px auto 11px!important;
  998. }
  999. .cruit_li_2_head_box{margin-top:10px;}
  1000. .cruit_li_2_foot_title{margin-top:10px;}
  1001. .cruit_li_2_foot{margin-top:10px;margin-left:0px;}
  1002. .cruit_li_2_a{padding-bottom:5px;}
  1003. .cruit_li_2_foot_tag{
  1004. background-size: 16px 70%;
  1005. padding-left:18px;margin-bottom:5px;font-size:12px;
  1006. margin-right:13px;
  1007. }
  1008. .cruit_li_2_foot_tag:nth-last-of-type(1){margin-right:0px;}
  1009. .cruit_li_2_foot_tag_in{font-size:12px;}
  1010. .cruit_li_2_foot_tag_in:nth-of-type(2){padding-left:16px;}
  1011. .cruit_li_2_foot_tag_in:nth-of-type(2)::after {
  1012. left: 8px;
  1013. }
  1014. .cruit_li_2_head{font-size:18px;margin-left:0px;}
  1015. .cruit_li_2_head_name{margin-right:0px;}
  1016. .cruit_li_2_foot_title{font-size:12px;margin-left:0px;}
  1017. :deep(.pagination .el-pagination.is-background .el-pager li){ margin:0px 4px;}
  1018. .pagination{width:100%;margin-bottom:0px;}
  1019. .pagination_phone_none{display:none;}
  1020. .phone_none{display:none;}
  1021. }
  1022. </style>