detail_jobHunting.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. <template>
  2. <div>
  3. <!-- 面包屑导航 -->
  4. <div class="breadcrumb">
  5. <div class="inner">
  6. <span class="location">当前位置:</span>
  7. <el-breadcrumb :separator-icon="ArrowRight">
  8. <el-breadcrumb-item>
  9. <NuxtLink to="/">首页</NuxtLink>
  10. </el-breadcrumb-item>
  11. <el-breadcrumb-item v-if="p_parent_name != ''">
  12. <NuxtLink :to="`/${targetSegment}/index.html`"> {{ p_parent_name }}</NuxtLink>
  13. </el-breadcrumb-item>
  14. <el-breadcrumb-item v-if="parent_name != ''">
  15. <NuxtLink :to="`/${targetSegment}/${targetSegment1}/index.html`"> {{ parent_name }}
  16. </NuxtLink>
  17. </el-breadcrumb-item>
  18. <el-breadcrumb-item>
  19. <NuxtLink :to="`/${targetSegment}/${targetSegment1}/${targetSegment2}/list-1.html`">
  20. {{ navTitle }}
  21. </NuxtLink>
  22. </el-breadcrumb-item>
  23. <el-breadcrumb-item>简历详情</el-breadcrumb-item>
  24. </el-breadcrumb>
  25. </div>
  26. </div>
  27. <!-- 简历 -->
  28. <main class="gerenjianli" v-if="type == 2">
  29. <!-- 个人简历 -->
  30. <section class="index_1 clearfix">
  31. <div class="seek_head_box clearfix">
  32. <div class="seek_head_left">
  33. <a class="seek_head_a seek_head_only" title="">个人简历</a>
  34. </div>
  35. <div class="seek_head_right_box clearfix">
  36. <span class="seek_head_right_text">更新时间:{{ jobInfo.created_at }}</span>
  37. </div>
  38. </div>
  39. <div class="index_1_left clearfix">
  40. <div class="seek_introduce_box clearfix">
  41. <div class="seek_introduce_left clearfix">
  42. <div class="seek_introduce_head clearfix">
  43. <h4 class="seek_introduce_h4">{{ jobInfo.name }}</h4>
  44. <div class="seek_introduce_tag clearfix" v-if="resume">此简历已被推荐</div>
  45. <div class="seek_introduce_text clearfix" v-if="resume">
  46. (已有单位把本简历加入人才库)
  47. </div>
  48. </div>
  49. <div class="seek_introduce_title_box clearfix">
  50. <span class="seek_introduce_label">期望岗位:</span>
  51. <span class="seek_introduce_title">{{ jobInfo.jtzw_name }}</span>
  52. <span class="seek_introduce_label">薪资待遇:</span>
  53. <span class="seek_introduce_title">{{ jobInfo.salary_name }}</span>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="seek_introduce_foot clearfix">
  58. <span class="seek_introduce_foot_text" v-if="jobInfo.sexy">
  59. {{ jobInfo.sexy == 1 ? '男' : '女' }}
  60. </span>
  61. <span class="seek_introduce_foot_text" v-if="jobInfo.birth">
  62. {{ getTime(jobInfo.birth, 'year', 0) }}
  63. </span>
  64. <span class="seek_introduce_foot_text" v-if="jobInfo.origin">
  65. 籍贯:{{ jobInfo.origin }}
  66. </span>
  67. <span class="seek_introduce_foot_text" v-if="jobInfo.education_name">
  68. {{ jobInfo.education_name }}
  69. </span>
  70. <span class="seek_introduce_foot_text" v-if="jobInfo.experience_name">
  71. {{ jobInfo.experience_name }}
  72. </span>
  73. <span class="seek_introduce_foot_text" v-if="jobInfo.hunt_cityname">
  74. 工作地点:{{ jobInfo.hunt_cityname }}
  75. </span>
  76. <span class="seek_introduce_foot_text" v-if="jobInfo.language_name">
  77. {{ jobInfo.language_name }}
  78. </span>
  79. </div>
  80. </div>
  81. <div class="index_1_right clearfix">
  82. <img class="index_1_right_img" src="@/public/image/touxiang.png" title="" alt=""
  83. v-if="!jobInfo.imgurl">
  84. <img class="index_1_right_img" :src="jobInfo.imgurl" title="" alt="" v-if="jobInfo.imgurl">
  85. </div>
  86. </section>
  87. <!-- 个人简历 -->
  88. <div class="contact_me" v-if="type_id==3">
  89. <div class="contact_me_btn" @click="getContactMe">
  90. <span class="contact_me_btn_img"></span>
  91. 沟通简历
  92. </div>
  93. </div>
  94. <div class="contact_me" v-else>
  95. <div class="contact_me_btn contact_me_btn_2">
  96. <span class="contact_me_btn_img"></span>
  97. 沟通简历
  98. </div>
  99. </div>
  100. </main>
  101. <main class="jianli" v-if="type == 2">
  102. <!-- 自我介绍 -->
  103. <section class="index_2 clearfix">
  104. <div class="seek_head_box clearfix">
  105. <div class="seek_head_left">
  106. <a class="seek_head_a seek_head_only" title="">自我介绍</a>
  107. </div>
  108. </div>
  109. <article class="seek_article">
  110. {{ jobInfo.self_evaluation }}
  111. </article>
  112. </section>
  113. <!-- 自我介绍 -->
  114. <!-- 工作经历 -->
  115. <section class="index_3 clearfix">
  116. <div class="seek_head_box clearfix">
  117. <div class="seek_head_left">
  118. <a class="seek_head_a seek_head_only" title="">工作经历</a>
  119. </div>
  120. </div>
  121. <div class="seek_in clearfix" v-for="(item, index) in experienceInfo" :key="index">
  122. <div class="seek_in_head clearfix">
  123. <span class="seek_in_head_text">{{ index + 1 }}.{{ item.company_name }}</span>
  124. <span class="seek_in_head_text">
  125. 职位类别:
  126. {{ item.zw_name }}
  127. </span>
  128. <span class="seek_in_head_text">
  129. 具体职位:
  130. {{ item.jtzw_name }}
  131. </span>
  132. <span class="seek_in_head_text" style="float: right;" v-if="item.job_timeList">
  133. {{ getTime(item.job_timeList[0], 'year', 0) }}
  134. -
  135. {{ getTime(item.job_timeList[1], 'year', 0) }}
  136. </span>
  137. </div>
  138. <div class="seek_in_ul clearfix">
  139. <div class="seek_in_li clearfix">
  140. <label class="seek_in_label">工作内容:</label>
  141. <div class="seek_in_li_text">{{ item.job_content }}</div>
  142. </div>
  143. <div class="seek_in_li clearfix">
  144. <label class="seek_in_label">工作业绩:</label>
  145. <div class="seek_in_li_text">{{ item.performance }}</div>
  146. </div>
  147. </div>
  148. </div>
  149. </section>
  150. <!-- 工作经历 -->
  151. <!-- 教育背景 -->
  152. <section class="index_4 clearfix">
  153. <div class="seek_head_box clearfix">
  154. <div class="seek_head_left">
  155. <a class="seek_head_a seek_head_only" title="">教育背景</a>
  156. </div>
  157. </div>
  158. <div class="seek_in clearfix" v-for="(item, index) in education" :key="index">
  159. <div class="seek_in_head clearfix">
  160. <span class="seek_in_head_text"
  161. v-if="item.school_name || item.education_name || item.school_major || item.school_timeList">
  162. {{ index + 1 }}. {{ item.school_name }}
  163. </span>
  164. <span class="seek_in_head_text">
  165. {{ item.education_name }}
  166. </span>
  167. <span class="seek_in_head_text">{{ item.school_major }}</span>
  168. <span class="seek_in_head_text" style="float: right;" v-if="item.school_timeList">
  169. {{ getTime(item.school_timeList[0], 'year', 0) }}
  170. -
  171. {{ getTime(item.school_timeList[1], 'year', 0) }}
  172. </span>
  173. </div>
  174. <div class="seek_in_ul clearfix" v-if="item.school_experience">
  175. <div class="seek_in_li clearfix">
  176. <label class="seek_in_label">在校经历:</label>
  177. <div class="seek_in_li_text">{{ item.school_experience }}</div>
  178. </div>
  179. </div>
  180. </div>
  181. </section>
  182. <!-- 教育背景 -->
  183. <!-- 专业技能 -->
  184. <section class="index_5 clearfix">
  185. <div class="seek_head_box clearfix">
  186. <div class="seek_head_left">
  187. <a class="seek_head_a seek_head_only" title="">专业技能</a>
  188. </div>
  189. </div>
  190. <div class="seek_in clearfix">
  191. <div class="seek_in_ul clearfix">
  192. <div class="seek_in_li clearfix" v-for="(item, index) in skillList">
  193. <label class="seek_in_label" v-if="item.skill">{{ index + 1 }}.</label>
  194. <div class="seek_in_li_text">{{ item.skill }}</div>
  195. </div>
  196. </div>
  197. </div>
  198. </section>
  199. <!-- 专业技能 -->
  200. <!-- 联系方式 -->
  201. <section class="index_6 clearfix">
  202. <div class="seek_head_box clearfix">
  203. <div class="seek_head_left">
  204. <a class="seek_head_a seek_head_only" title="">联系方式</a>
  205. </div>
  206. </div>
  207. <div class="seek_in clearfix" v-if="type_id == 10000 || type_id == 3">
  208. <article class="seek_article_2">
  209. {{ jobInfo.phone }}
  210. </article>
  211. </div>
  212. <div class="seek_in clearfix" v-else>
  213. <article class="seek_article_2">
  214. 登录后可查看
  215. </article>
  216. </div>
  217. </section>
  218. <!-- 联系方式 -->
  219. <!-- 弹框 -->
  220. <section class="cruit_alert_rgb clearfix" v-if="resumeBool">
  221. <!-- 请选择要投递的简历1 -->
  222. <div class="cruit_alert_rgb_box">
  223. <div class="cruit_alert_rgb_head_box">
  224. <div class="cruit_alert_rgb_close hand back100"></div>
  225. <div class="cruit_alert_rgb_head">请选择要沟通的岗位
  226. <span class="close" @click="resumeBool = false">x</span>
  227. </div>
  228. </div>
  229. <form class="cruit_alert_rgb_form clearfix" action=" " method=" ">
  230. <div class="cruit_alert_rgb_form_in clearfix">
  231. <div class="cruit_alert_rgb_li clearfix" v-for="(item, index) in companyJobList"
  232. :key="item.id">
  233. <el-radio :value="item.id" v-model="company_job" @change="jobChange">
  234. <div class="cruit_alert_rgb_label dot1">
  235. {{ item.title }}
  236. </div>
  237. </el-radio>
  238. </div>
  239. </div>
  240. <div class="cruit_alert_rgb_foot clearfix">
  241. <div class="cruit_alert_rgb_foot_sub hand" @click="getresume">沟通岗位</div>
  242. </div>
  243. </form>
  244. </div>
  245. <!-- 请选择要投递的简历2 -->
  246. </section>
  247. </main>
  248. </div>
  249. </template>
  250. <script setup>
  251. import { ref } from 'vue'
  252. import { ElBreadcrumb, ElBreadcrumbItem, ElMessage } from 'element-plus'
  253. import { ArrowRight } from '@element-plus/icons-vue'
  254. const route = useRoute();
  255. const type = ref(2);
  256. const nuxtApp = useNuxtApp();
  257. const axios = nuxtApp.$axios;
  258. //获取用户信息
  259. let type_id = ref('')
  260. let website_id = ref('')
  261. let getUserInfo = () => {
  262. axios.get("/user/getUserInfo").then(response => {
  263. console.log("gettypeid", response.data);
  264. type_id.value = response.data.type_id
  265. website_id.value = response.data.website_id
  266. companyJOb()
  267. })
  268. }
  269. onMounted(() => {
  270. getUserInfo()
  271. })
  272. //1.1 获得跳转过来的id
  273. const articleId = parseInt(route.params.id); //获得该页面的id
  274. let articleIdArr = Array.of(articleId);
  275. //获取当前企业会员的职位
  276. const companyJobList = ref([])
  277. let companyJOb = () => {
  278. axios.post("/web/getWebsiteJobRecruiting", {
  279. 'pageSize': 10,
  280. 'website_id': website_id.value,
  281. }).then(response => {
  282. console.log("gettypeid_获取到的企业会员的职位:", response.data);
  283. companyJobList.value = response.data
  284. })
  285. }
  286. const resumeBool = ref(false)
  287. const job_search = ref('')
  288. const company_job = ref('')
  289. const allResume = ref(false)
  290. // 3 沟通简历
  291. const getContactMe = async () => {
  292. resumeBool.value = true
  293. }
  294. let getresume = () => {
  295. axios.post('/web/getWebsiteJobResume', {
  296. website_id: website_id.value,
  297. recruit_id: company_job.value,
  298. hunt_id: articleIdArr,
  299. }).then(res => {
  300. console.log("沟通岗位", res);
  301. if (res.code == 200) {
  302. ElMessage({
  303. message: '投递成功',
  304. type: 'sussess',
  305. });
  306. resumeBool.value = false;
  307. } else {
  308. ElMessage({
  309. message: res.message,
  310. type: 'error',
  311. });
  312. resumeBool.value = false;
  313. }
  314. company_job.value = '';
  315. job_search.value = 2;
  316. allResume.value = false;
  317. })
  318. }
  319. //1.2 获得路由
  320. const targetSegment = getRoutePath(1);
  321. const targetSegment1 = getRoutePath(2);
  322. const targetSegment2 = getRoutePath(3);
  323. //1.1 获得当前的路由id
  324. let routeId;
  325. let routeType;
  326. let navTitle = ref('')//二级导航标题
  327. let navCid = ref('')//二级导航id
  328. //通过导航路径反向查询导航id
  329. const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
  330. method: 'GET',
  331. query: {
  332. 'pinyin': targetSegment2,
  333. },
  334. });
  335. console.log("getRouteId", getRouteId);
  336. if (getRouteId.code == 200) {
  337. navTitle.value = getRouteId.data.alias
  338. navCid.value = getRouteId.data.category_id
  339. } else {
  340. console.log("获得路由id出错!", getRouteId.message)
  341. }
  342. //1.2 获取二级栏目
  343. let parent_name = ref('');//父级名称
  344. let parent_id = ref('');//父级id
  345. let parent_pinyin = ref('');//父级拼音
  346. const getRoutePName = await requestDataPromise('/web/getWebsiteRoute', {
  347. method: 'GET',
  348. query: {
  349. 'pinyin': targetSegment1,
  350. },
  351. });
  352. console.log("getRoutePName", getRoutePName);
  353. if (getRoutePName.code == 200) {
  354. routeId = getRoutePName.data.category_id
  355. parent_id.value = getRoutePName.data.category_id
  356. parent_name.value = getRoutePName.data.alias
  357. routeType = getRoutePName.data.type
  358. } else {
  359. console.log("获得路由id出错!", getRoutePName.message)
  360. }
  361. //1.3 获取一级栏目
  362. let p_parent_name = ref('');//父级名称
  363. let p_parent_id = ref('');//父级id
  364. const getRoutePName_parent = await requestDataPromise('/web/getWebsiteRoute', {
  365. method: 'GET',
  366. query: {
  367. 'pinyin': targetSegment,
  368. },
  369. });
  370. console.log("getRoutePName_parent", getRoutePName_parent);
  371. if (getRoutePName_parent.code == 200) {
  372. p_parent_id.value = getRoutePName_parent.data.category_id
  373. p_parent_name.value = getRoutePName_parent.data.alias
  374. } else {
  375. console.log("获得路由id出错!", getRoutePName_parent.message)
  376. }
  377. //1.4 展示广告
  378. let adImg1 = ref({})
  379. let adImg2 = ref({})
  380. onMounted(async () => {
  381. //从客户端获取行政职能部门 加快打开速度
  382. const { $webUrl, $CwebUrl } = useNuxtApp();
  383. //广告1
  384. let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmgw_detail_0001`
  385. const responseAd1 = await fetch(url, {
  386. headers: {
  387. 'Content-Type': 'application/json',
  388. 'Userurl': $CwebUrl,
  389. 'Origin': $CwebUrl
  390. }
  391. });
  392. const resultAd1 = await responseAd1.json();
  393. adImg1.value = resultAd1.data[0];
  394. //广告2
  395. let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmgw_detail_0002`
  396. const responseAd2 = await fetch(url2, {
  397. headers: {
  398. 'Content-Type': 'application/json',
  399. 'Userurl': $CwebUrl,
  400. 'Origin': $CwebUrl
  401. }
  402. });
  403. const resultAd2 = await responseAd2.json();
  404. adImg2.value = resultAd2.data[0];
  405. })
  406. // 2 获取详情
  407. let jobInfo = ref([]) //基本信息
  408. let companyInfo = ref([])// 公司介绍
  409. let category = ref([]) // 栏目
  410. let other_job = ref([]) // 岗位
  411. let experienceInfo = ref([]) // 工作经历
  412. let education = ref([]) // 教育背景
  413. let skillList = ref([]) // 专业技能
  414. let resume = ref(0)
  415. const getDetail = async () => {
  416. const listData = await requestDataPromise('/web/getWebsiteJobInfo', {
  417. method: 'GET',
  418. query: {
  419. 'id': articleId,
  420. 'type': type.value,
  421. 'pageSize': 10,
  422. },
  423. });
  424. if (listData.code == 200) {
  425. // console.log("详情1111", listData.data);
  426. // console.log("详情1111222", listData.data.job[0].job_experience);
  427. // console.log("详情111122233", JSON.parse(listData.data.job[0].job_experience));
  428. // console.log("详情1111222233344", JSON.parse(listData.data.job[0].education_experience));
  429. // jobInfo.value = listData.data.job[0];
  430. // category.value = listData.data.category;
  431. if (type.value == 1) {
  432. jobInfo.value = listData.data.job[0];
  433. category.value = listData.data.category;
  434. companyInfo.value = listData.data.company[0];
  435. other_job.value = listData.data.other_job;
  436. }
  437. if (type.value == 2) {
  438. jobInfo.value = listData.data.job[0];
  439. category.value = listData.data.category;
  440. experienceInfo.value = listData.data.job_experience;
  441. education.value = listData.data.education_experience;
  442. skillList.value = JSON.parse(listData.data.job[0].skillList);
  443. resume.value = listData.data.resume;
  444. }
  445. }
  446. }
  447. getDetail();
  448. //获取行业 职位 具体职位
  449. const industry_categoryList = ref([]) //行业类别列表
  450. const position_categoryList = ref([]) //职位类别列表
  451. const positionList = ref([]) //具体职位列表
  452. const getData = async () => {
  453. const getData = await requestDataPromise('/web/getWebsiteJobSelect', {
  454. method: 'GET',
  455. query: {},
  456. });
  457. if (getData.code == 200) {
  458. // console.log("获取到的分类数据:", getData.data);
  459. industry_categoryList.value = getData.data.hy; //行业
  460. position_categoryList.value = getData.data.zw; //职位
  461. positionList.value = getData.data.jtzw; //具体职位
  462. }
  463. }
  464. getData()
  465. //4.设置seo信息 start---------------------------------------->
  466. //4.1 设置seo信息
  467. const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
  468. method: 'GET',
  469. query: {
  470. 'catid': routeId,
  471. },
  472. });
  473. if (setData.code == 200) {
  474. let seoTitle = setData.data.seo_title;
  475. let seoDescription = setData.data.seo_description;
  476. let seoKeywords = setData.data.seo_keywords;
  477. let seoSuffix = setData.data.suffix;
  478. let seoName = setData.data.website_name;
  479. useSeoMeta({
  480. title: seoTitle + "_" + seoName + "_" + seoSuffix,
  481. meta: [
  482. { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
  483. { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
  484. ]
  485. });
  486. } else {
  487. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  488. console.log("错误位置:设置列表页面SEO数据")
  489. console.log("后端错误反馈:", setData.message)
  490. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  491. }
  492. //4.设置seo信息 end---------------------------------------->
  493. </script>
  494. <style scoped lang="less">
  495. @import "@/assets/css/job/detail_jianli.less";
  496. @import "@/assets/css/job/detail_zhaopin.less";
  497. </style>