search.vue 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163
  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 zwid = route.query.zwid;
  408. // const jtzwid = route.query.jtzwid;
  409. // const provinceid = route.query.provinceid;
  410. // const cityid = route.query.cityid;
  411. const keyword = route.query.keywords;
  412. let articleId = 0;//路由id
  413. let pageNum = ref(2);
  414. let total = ref(0);
  415. let zptotal = ref(0);
  416. let qztotal = ref(0);
  417. const page = ref(1)
  418. const pageSize = ref(10);
  419. let hyIndex = ref(1);
  420. let zwIndex = ref(1);
  421. let jtzwIndex = ref(1);
  422. //获得当前的完整路径
  423. const fullPath = route.path;
  424. //拆分,取出来中间这一段,然后提取数字部分
  425. const segments = fullPath.split('/');
  426. const targetSegment = segments[2];
  427. const targetRoute = segments[1];
  428. // console.log('111222', targetRoute);
  429. //const numberPart = targetSegment.match(/\d+$/)?.[0];
  430. //let routeId = 20 //排除路径错误可以打开这个
  431. //articleId = numberPart;
  432. //通过导航路径反向查询导航id
  433. const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
  434. method: 'GET',
  435. query: {
  436. 'pinyin': targetRoute,
  437. },
  438. });
  439. // console.log("111222333", getRouteId);
  440. if (getRouteId.code == 200) {
  441. articleId = getRouteId.data.category_id
  442. } else {
  443. // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  444. // console.log("错误位置:通过url路径查询导航池id")
  445. // console.log("后端错误反馈:", getRouteId.message)
  446. // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  447. }
  448. //获得html前的数字
  449. // const pageUrl = segments[3];
  450. // const pageNumber = pageUrl.split('.')[0];
  451. // console.log("当前URL中的页码:")
  452. // console.log(pageNumber)//2
  453. // pageNum.value = parseInt(pageNumber);
  454. pageNum.value = parseInt(route.params.id);
  455. // 创建个人简历
  456. let createResume = () => {
  457. window.open($BwebUrl + '/#/addJobHunting', '_blank');
  458. }
  459. // 发布招聘信息
  460. let createJob = () => {
  461. window.open($BwebUrl + '/#/creatJob', '_blank');
  462. }
  463. //1.获得路由id end ---------------------------------------->
  464. //2.页面数据 start ---------------------------------------->
  465. // 2.1.1 获取省份
  466. const province = ref('') //省
  467. const city = ref('') //市
  468. const provinceList = ref([]) //省列表
  469. const cityList = ref([]) //市列表
  470. const getArea = await requestDataPromise('/web/selectWebsiteArea', {
  471. method: 'GET',
  472. query: {},
  473. });
  474. if (getArea.code == 200) {
  475. provinceList.value = getArea.data;
  476. }
  477. // 2.1.2
  478. // 获取省份和城市
  479. const provinceChange = (val) => {
  480. provinceid.value = val;
  481. city.value = '';
  482. console.log('获取到的省份id', val);
  483. getCity(val)
  484. }
  485. const getCity = async (value) => {
  486. const getCity = await requestDataPromise('/web/selectWebsiteArea', {
  487. method: 'GET',
  488. query: {
  489. 'pid': value,
  490. },
  491. });
  492. if (getCity.code == 200) {
  493. cityList.value = getCity.data;
  494. }
  495. }
  496. // 带参数跳转 省份和城市的回显问题
  497. if (provinceid.value) {
  498. for (let i = 0; i < provinceList.value.length; i++) {
  499. if (provinceList.value[i].id == provinceid.value) {
  500. province.value = provinceList.value[i].id;
  501. }
  502. }
  503. const getCity = await requestDataPromise('/web/selectWebsiteArea', {
  504. method: 'GET',
  505. query: {
  506. 'pid': provinceid.value,
  507. },
  508. });
  509. if (getCity.code == 200) {
  510. cityList.value = getCity.data;
  511. }
  512. if (cityid.value) {
  513. for (let i = 0; i < cityList.value.length; i++) {
  514. if (cityList.value[i].id == cityid.value) {
  515. city.value = cityList.value[i].id;
  516. }
  517. }
  518. }
  519. }
  520. // phone
  521. const industry_category = ref('') //行业类别
  522. const position_category = ref('') //职位类别
  523. const position = ref('') //具体职位
  524. // 2.2.1 行业和职位
  525. const keywords = ref('') //关键词
  526. const industry_categoryList = ref([]) //行业类别列表
  527. const position_categoryList = ref([]) //职位类别列表
  528. const positionList = ref([]) //具体职位列表
  529. const getData = async () => {
  530. const getData = await requestDataPromise('/web/getWebsiteJobSelect', {
  531. method: 'GET',
  532. query: {},
  533. });
  534. if (getData.code == 200) {
  535. // console.log("获取到的分类数据:", getData.data);
  536. industry_categoryList.value = getData.data.hy; //行业
  537. position_categoryList.value = getData.data.zw; //职位
  538. if (zwid.value == 0 || zwid.value == '' || zwid.value == undefined || zwid.value == null) {
  539. positionList.value = getData.data.jtzw; //具体职位
  540. }
  541. }
  542. }
  543. getData()
  544. const job_vacancy = ref('') // 招聘岗位
  545. const job_resume = ref('') // 简历
  546. if (keyword) {
  547. keywords.value = keyword
  548. }
  549. const getJob = async () => {
  550. const getJob = await requestDataPromise('/web/getWebsiteJobList', {
  551. method: 'GET',
  552. query: {
  553. 'catid': articleId,
  554. 'city_id': provinceid.value,
  555. 'hy_id': hyid.value,
  556. 'zw_id': zwid.value,
  557. 'jtzw_id': jtzwid.value,
  558. 'page': page.value,
  559. 'pageSize': pageSize.value,
  560. 'keyword': keywords.value,
  561. },
  562. });
  563. if (getJob.code == 200) {
  564. // console.log("获取到的岗位和简历:", getJob.data);
  565. job_vacancy.value = getJob.data.JobRecruiting; // 招聘岗位
  566. job_resume.value = getJob.data.JobHunting; // 简历
  567. zptotal.value = getJob.data.recruit_count;
  568. qztotal.value = getJob.data.hunt_count;
  569. }
  570. }
  571. getJob()
  572. let hyChange = (val) => {
  573. console.log('hyChange', val)
  574. hyid.value = val;
  575. getJob()
  576. }
  577. let zwChange = async (val) => {
  578. console.log('zwChange', val)
  579. zwid.value = val;
  580. const getPosition = await requestDataPromise('/web/getPositionList', {
  581. method: 'GET',
  582. query: {
  583. 'zwpid': val,
  584. },
  585. })
  586. console.log("11112222", getPosition);
  587. if (getPosition.code == 200) {
  588. positionList.value = getPosition.data; //具体职位
  589. } else {
  590. positionList.value = []; //具体职位
  591. jtzwid.value = 0; //职位id
  592. }
  593. getJob()
  594. }
  595. let jtzwChange = (val) => {
  596. console.log('jtzwChange', val)
  597. jtzwid.value = val;
  598. getJob()
  599. }
  600. // 搜索
  601. const goSearch = async () => {
  602. const getJob = await requestDataPromise('/web/getWebsiteJobList', {
  603. method: 'GET',
  604. query: {
  605. 'catid': articleId,
  606. 'city_id': provinceid.value,
  607. 'hy_id': hyid.value,
  608. 'zw_id': zwid.value,
  609. 'jtzw_id': jtzwid.value,
  610. 'page': page.value,
  611. 'pageSize': pageSize.value,
  612. 'keyword': keywords.value,
  613. },
  614. });
  615. console.log("111获取到的岗位和简历:", getJob.data);
  616. if (getJob.code == 200) {
  617. job_vacancy.value = getJob.data.JobRecruiting; // 招聘岗位
  618. job_resume.value = getJob.data.JobHunting; // 简历
  619. zptotal.value = getJob.data.recruit_count;
  620. qztotal.value = getJob.data.hunt_count;
  621. }
  622. }
  623. //2.2change事件
  624. let jobChange = (val) => {
  625. console.log('jobChange', val)
  626. console.log('jobChange111', selectedJobs.value)
  627. console.log('jobChange111', selectedResume.value)
  628. console.log('jobChange11122', company_job.value) //企业会员的职位
  629. if (selectedJobs.value.length == job_vacancy.value.length) {
  630. allJob.value = true;
  631. } else {
  632. allJob.value = false;
  633. }
  634. if (selectedResume.value.length == job_resume.value.length) {
  635. allResume.value = true;
  636. } else {
  637. allResume.value = false;
  638. }
  639. }
  640. let toggleAllJob = () => {
  641. if (allJob.value) {
  642. selectedJobs.value = job_vacancy.value.map(item => item.id);
  643. } else {
  644. selectedJobs.value = [];
  645. }
  646. }
  647. let toggleAllResume = () => {
  648. if (allResume.value) {
  649. selectedResume.value = job_resume.value.map(item => item.id);
  650. } else {
  651. selectedResume.value = [];
  652. }
  653. }
  654. //分页事件
  655. let changePage = (value) => {
  656. console.log("当前页码", value);
  657. navigateTo(`/${targetSegment}/${value}.html`)
  658. }
  659. //申请职位
  660. let getjob = () => {
  661. if (selectedJobs.value.length == 0) {
  662. ElMessage({
  663. message: '请选择要申请的职位',
  664. type: 'warning',
  665. });
  666. } else {
  667. console.log("获取到的11111_sel:", selectedJobs.value);
  668. console.log("获取到的1111_website_id:", website_id.value);
  669. axios.post('/web/getWebsiteJobApply', {
  670. 'website_id': website_id.value,
  671. 'recruit_id': selectedJobs.value,
  672. }).then(response => {
  673. console.log("获取到的申请结果:", response.data);
  674. if (response.code == 200) {
  675. ElMessage({
  676. message: '投递成功',
  677. type: 'success',
  678. });
  679. } else {
  680. ElMessage({
  681. message: response.message,
  682. type: 'error',
  683. });
  684. }
  685. allJob.value = false;
  686. selectedJobs.value = [];
  687. })
  688. }
  689. }
  690. //沟通简历
  691. let talkResume = () => {
  692. if (selectedResume.value.length == 0) {
  693. ElMessage({
  694. message: '请选择要沟通的简历',
  695. type: 'warning',
  696. });
  697. return false;
  698. } else {
  699. resumeBoo.value = true;
  700. }
  701. // resumeBoo.value = true;
  702. }
  703. //获取当前企业会员的职位
  704. const companyJobList = ref([])
  705. let companyJOb = async () => {
  706. const companyJOb = await requestDataPromise('/web/getWebsiteJobRecruiting', {
  707. method: 'POST',
  708. body: {
  709. 'pageSize': pageSize.value,
  710. 'website_id': website_id.value,
  711. }
  712. })
  713. // console.log("获取到的企业会员的职位11:", companyJOb.data);
  714. if (companyJOb.code == 200) {
  715. // console.log("获取到的企业会员的职位:", companyJOb.data);
  716. companyJobList.value = companyJOb.data
  717. }
  718. }
  719. companyJOb()
  720. // 沟通简历
  721. let resumeBoo = ref(false)
  722. let getresume = async () => {
  723. const resumelist = await requestDataPromise('/web/getWebsiteJobResume', {
  724. method: 'POST',
  725. body: {
  726. 'website_id': website_id.value,
  727. 'recruit_id': company_job.value,
  728. 'hunt_id': selectedResume.value,
  729. },
  730. });
  731. // console.log("沟通简历00", resumelist);
  732. // console.log("沟通简历11", website_id.value);
  733. // console.log("沟通简历22", company_job.value);
  734. // console.log("沟通简历33", selectedResume.value);
  735. if (resumelist.code == 200) {
  736. ElMessage({
  737. message: '投递成功',
  738. type: 'sussess',
  739. });
  740. resumeBoo.value = false;
  741. } else {
  742. ElMessage({
  743. message: resumelist.message,
  744. type: 'error',
  745. });
  746. resumeBoo.value = false;
  747. }
  748. company_job.value = '';
  749. selectedResume.value = [];
  750. job_search.value = 2
  751. }
  752. // //2.3获得页面名称
  753. // let getPageName = async () => {
  754. // const pageName = await requestDataPromise('/web/getOneWebsiteCategory', {
  755. // method: 'GET',
  756. // query: {
  757. // 'catid': articleId
  758. // },
  759. // });
  760. // console.log('11122233344',pageName);
  761. // if (pageName.code == 200) {
  762. // name.value = pageName.data.alias
  763. // } else {
  764. // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  765. // console.log("错误位置:设置页面标题")
  766. // console.log("后端错误反馈:", pageName.message)
  767. // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  768. // }
  769. // }
  770. // //获得列表
  771. // getPageName();
  772. //2.页面数据 end ---------------------------------------->
  773. //3.二级栏目 start ---------------------------------------->
  774. //3.1通过id获取一级栏目
  775. const parent_name = ref([]);
  776. const parent_id = ref([]);
  777. const parent_pinyin = ref("");
  778. let getParentNav = async () => {
  779. const listData = await requestDataPromise('/web/getOneWebsiteCategory', {
  780. method: 'GET',
  781. query: {
  782. 'catid': articleId
  783. },
  784. });
  785. // console.log("1112223334455", listData.data);
  786. if (listData.code == 200) {
  787. // console.log(111999)
  788. console.log(listData.data);
  789. parent_name.value = listData.data.alias;
  790. parent_id.value = listData.data.category_id;
  791. parent_pinyin.value = listData.data.aLIas_pinyin;
  792. } else {
  793. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  794. console.log("错误位置:获取新闻列表")
  795. console.log("后端错误反馈:", listData.message)
  796. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  797. }
  798. getSecondNav();
  799. }
  800. //获得父级栏目详情
  801. getParentNav();
  802. // 3.2获取二级栏目
  803. const secondNav = ref([]);
  804. let getSecondNav = async () => {
  805. const listData = await requestDataPromise('/web/getWebsiteModelCategory', {
  806. method: 'GET',
  807. query: {
  808. 'placeid': 1,
  809. 'pid': parent_id.value,
  810. 'num': 8,
  811. },
  812. });
  813. console.log('listData', listData);
  814. if (listData.code == 200) {
  815. secondNav.value = listData.data;
  816. } else {
  817. // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  818. // console.log("错误位置:获取新闻列表")
  819. // console.log("后端错误反馈:", listData.message)
  820. // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  821. }
  822. }
  823. //3.二级栏目 end ---------------------------------------->
  824. //4.设置seo信息 start---------------------------------------->
  825. //4.1 设置seo信息
  826. const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
  827. method: 'GET',
  828. query: {
  829. 'catid': articleId
  830. },
  831. });
  832. if (setData.code == 200) {
  833. let seoTitle = setData.data.seo_title;
  834. let seoDescription = setData.data.seo_description;
  835. let seoKeywords = setData.data.seo_keywords;
  836. let seoSuffix = setData.data.suffix;
  837. let seoName = setData.data.website_name;
  838. useSeoMeta({
  839. title: seoTitle + "_" + seoName + "_" + seoSuffix,
  840. meta: [
  841. { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
  842. { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
  843. { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no',tagPriority: 10 }
  844. ]
  845. });
  846. } else {
  847. // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  848. // console.log("错误位置:设置列表页面SEO数据")
  849. // console.log("后端错误反馈:", setData.message)
  850. // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  851. }
  852. //4.设置seo信息 end---------------------------------------->
  853. //5.广告 start---------------------------------------->
  854. let adImg1 = ref({});
  855. let adImg2 = ref({});
  856. onMounted(async () => {
  857. //从客户端获取行政职能部门 加快打开速度
  858. const { $webUrl, $CwebUrl } = useNuxtApp();
  859. //广告1
  860. let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmgw_search_0001`
  861. const responseAd1 = await fetch(url, {
  862. headers: {
  863. 'Content-Type': 'application/json',
  864. 'Userurl': $CwebUrl,
  865. 'Origin': $CwebUrl
  866. }
  867. });
  868. const resultAd1 = await responseAd1.json();
  869. adImg1.value = resultAd1.data[0];
  870. //广告2
  871. let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmgw_list_0002`
  872. const responseAd2 = await fetch(url2, {
  873. headers: {
  874. 'Content-Type': 'application/json',
  875. 'Userurl': $CwebUrl,
  876. 'Origin': $CwebUrl
  877. }
  878. });
  879. const resultAd2 = await responseAd2.json();
  880. adImg2.value = resultAd2.data[0];
  881. })
  882. //5.广告 end---------------------------------------->
  883. </script>
  884. <style lang="less" scoped>
  885. @import url('@/assets/css/zgzpsearch.less');
  886. .empty {
  887. width: 100%;
  888. height: 150px;
  889. line-height: 150px;
  890. text-align: center;
  891. }
  892. .empty_img {
  893. vertical-align: -30px;
  894. margin-right: 20px;
  895. }
  896. .empty_text {
  897. font-size: 26px;
  898. color: #999;
  899. }
  900. </style>
  901. <style lang="less" scoped>
  902. @media screen and (min-width:801px){/*pc*/
  903. .pagination_pc_none{display:none;}
  904. .pc_none{display:none;}
  905. }
  906. @media screen and (max-width:800px){/*ipad_phone*/
  907. .index_main{width:100%;margin-top:0px;}
  908. .index_3{margin-top:0px;}
  909. .color_main{margin-bottom:30px;}
  910. .phone_box_1 {
  911. width: 92%;
  912. margin: 0px auto 0px;
  913. .phone_box_1_head {
  914. height: 50px;
  915. line-height: 50px;
  916. background: #fff;
  917. border-bottom: 1px solid #E6E6E6;
  918. width: 100%;
  919. a {
  920. float: left;
  921. height: 50px;
  922. line-height: 50px;
  923. margin: 0;
  924. position: relative;
  925. color: #489d97;
  926. font-size: 18px;
  927. font-weight: bold;
  928. box-sizing: border-box;
  929. position: relative;
  930. padding-left: 8px;
  931. }
  932. a::before {
  933. content: '';
  934. display: block;
  935. position: absolute;
  936. left: 0px;
  937. top: 18px;
  938. background: linear-gradient(to top, #0998A9, #6ADDD6);
  939. width: 3px;
  940. height: 15px;
  941. }
  942. }
  943. }
  944. .phone_form{
  945. width:92%;
  946. margin: 5px auto 0px;
  947. padding-bottom:8px;
  948. }
  949. .phone_form_tip{
  950. }
  951. .phone_form_tip_1 :deep(.el-select){
  952. margin:0px;
  953. }
  954. .phone_form_tip_1 :deep(.el-select:nth-of-type(2)){
  955. margin:0px 2%;
  956. box-sizing:border-box;
  957. }
  958. :deep(.el-select__wrapper){
  959. margin:5px 0px; padding:4px 4px 4px 8px;
  960. font-size:12px;box-sizing:border-box;
  961. }
  962. .phone_form_tip_2 :deep(.el-select){
  963. margin-right:2%;
  964. }
  965. :deep(.el-input){
  966. font-size:12px;
  967. }
  968. :deep(.el-button){
  969. border:solid 1px #ddd;
  970. color:#fff;float:right;margin:5px 0px 0px 0px;
  971. font-size:12px;
  972. }
  973. .phone_form{
  974. width:92%;
  975. margin: 5px auto 0px;
  976. padding-bottom:8px;
  977. }
  978. .phone_form_tip{
  979. }
  980. .phone_form_tip_1 :deep(.el-select){
  981. margin:0px;
  982. }
  983. .phone_form_tip_1 :deep(.el-select:nth-of-type(2)){
  984. margin:0px 2%;
  985. box-sizing:border-box;
  986. }
  987. :deep(.el-select__wrapper){
  988. margin:5px 0px; padding:4px 4px 4px 8px;
  989. font-size:12px;box-sizing:border-box;
  990. }
  991. .phone_form_tip_2 :deep(.el-select){
  992. margin-right:2%;
  993. }
  994. :deep(.el-input){
  995. font-size:12px;
  996. }
  997. :deep(.el-button){
  998. border:solid 1px #ddd;
  999. color:#fff;float:right;margin:5px 0px 0px 0px;
  1000. font-size:12px;
  1001. }
  1002. .phone_form_tip_1:deep(.el-select__placeholder.is-transparent){color:#000;}
  1003. .cruit_ul_2{margin-top:11px;min-height:512px;}
  1004. .cruit_li_2{
  1005. width:92%;float:none!important;margin:0px auto 11px!important;
  1006. }
  1007. .cruit_li_2_head_box{margin-top:10px;}
  1008. .cruit_li_2_foot_title{margin-top:10px;}
  1009. .cruit_li_2_foot{margin-top:10px;margin-left:0px;}
  1010. .cruit_li_2_a{padding-bottom:5px;}
  1011. .cruit_li_2_foot_tag{
  1012. background-size: 16px 70%;
  1013. padding-left:18px;margin-bottom:5px;font-size:12px;
  1014. margin-right:13px;
  1015. }
  1016. .cruit_li_2_foot_tag:nth-last-of-type(1){margin-right:0px;}
  1017. .cruit_li_2_foot_tag_in{font-size:12px;}
  1018. .cruit_li_2_foot_tag_in:nth-of-type(2){padding-left:16px;}
  1019. .cruit_li_2_foot_tag_in:nth-of-type(2)::after {
  1020. left: 8px;
  1021. }
  1022. .cruit_li_2_head{font-size:18px;margin-left:0px;}
  1023. .cruit_li_2_head_name{margin-right:0px;}
  1024. .cruit_li_2_foot_title{font-size:12px;margin-left:0px;}
  1025. :deep(.pagination .el-pagination.is-background .el-pager li){ margin:0px 4px;}
  1026. .pagination{width:100%;margin-bottom:0px;}
  1027. .pagination_phone_none{display:none;}
  1028. .phone_none{display:none;}
  1029. }
  1030. </style>