detail_jobHunting.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  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. </main>
  89. <main class="jianli" v-if="type == 2">
  90. <!-- 自我介绍 -->
  91. <section class="index_2 clearfix">
  92. <div class="seek_head_box clearfix">
  93. <div class="seek_head_left">
  94. <a class="seek_head_a seek_head_only" title="">自我介绍</a>
  95. </div>
  96. </div>
  97. <article class="seek_article">
  98. {{ jobInfo.self_evaluation }}
  99. </article>
  100. </section>
  101. <!-- 自我介绍 -->
  102. <!-- 工作经历 -->
  103. <section class="index_3 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. <div class="seek_in clearfix" v-for="(item, index) in experienceInfo" :key="index">
  110. <div class="seek_in_head clearfix">
  111. <span class="seek_in_head_text">{{ index + 1 }}.{{ item.company_name }}</span>
  112. <span class="seek_in_head_text">
  113. 职位类别:
  114. {{ item.zw_name }}
  115. </span>
  116. <span class="seek_in_head_text">
  117. 具体职位:
  118. {{ item.jtzw_name }}
  119. </span>
  120. <span class="seek_in_head_text" style="float: right;" v-if="item.job_timeList">
  121. {{ getTime(item.job_timeList[0], 'year', 0) }}
  122. -
  123. {{ getTime(item.job_timeList[1], 'year', 0) }}
  124. </span>
  125. </div>
  126. <div class="seek_in_ul clearfix">
  127. <div class="seek_in_li clearfix">
  128. <label class="seek_in_label">工作内容:</label>
  129. <div class="seek_in_li_text">{{ item.job_content }}</div>
  130. </div>
  131. <div class="seek_in_li clearfix">
  132. <label class="seek_in_label">工作业绩:</label>
  133. <div class="seek_in_li_text">{{ item.performance }}</div>
  134. </div>
  135. </div>
  136. </div>
  137. </section>
  138. <!-- 工作经历 -->
  139. <!-- 教育背景 -->
  140. <section class="index_4 clearfix">
  141. <div class="seek_head_box clearfix">
  142. <div class="seek_head_left">
  143. <a class="seek_head_a seek_head_only" title="">教育背景</a>
  144. </div>
  145. </div>
  146. <div class="seek_in clearfix" v-for="(item, index) in education" :key="index">
  147. <div class="seek_in_head clearfix">
  148. <span class="seek_in_head_text"
  149. v-if="item.school_name || item.education_name || item.school_major || item.school_timeList">
  150. {{ index + 1 }}. {{ item.school_name }}
  151. </span>
  152. <span class="seek_in_head_text">
  153. {{ item.education_name }}
  154. </span>
  155. <span class="seek_in_head_text">{{ item.school_major }}</span>
  156. <span class="seek_in_head_text" style="float: right;" v-if="item.school_timeList">
  157. {{ getTime(item.school_timeList[0], 'year', 0) }}
  158. -
  159. {{ getTime(item.school_timeList[1], 'year', 0) }}
  160. </span>
  161. </div>
  162. <div class="seek_in_ul clearfix" v-if="item.school_experience">
  163. <div class="seek_in_li clearfix">
  164. <label class="seek_in_label">在校经历:</label>
  165. <div class="seek_in_li_text">{{ item.school_experience }}</div>
  166. </div>
  167. </div>
  168. </div>
  169. </section>
  170. <!-- 教育背景 -->
  171. <!-- 专业技能 -->
  172. <section class="index_5 clearfix">
  173. <div class="seek_head_box clearfix">
  174. <div class="seek_head_left">
  175. <a class="seek_head_a seek_head_only" title="">专业技能</a>
  176. </div>
  177. </div>
  178. <div class="seek_in clearfix">
  179. <div class="seek_in_ul clearfix">
  180. <div class="seek_in_li clearfix" v-for="(item, index) in skillList">
  181. <label class="seek_in_label" v-if="item.skill">{{ index + 1 }}.</label>
  182. <div class="seek_in_li_text">{{ item.skill }}</div>
  183. </div>
  184. </div>
  185. </div>
  186. </section>
  187. <!-- 专业技能 -->
  188. <!-- 联系方式 -->
  189. <section class="index_6 clearfix">
  190. <div class="seek_head_box clearfix">
  191. <div class="seek_head_left">
  192. <a class="seek_head_a seek_head_only" title="">联系方式</a>
  193. </div>
  194. </div>
  195. <div class="seek_in clearfix" v-if="type_id == 10000 || type_id == 3">
  196. <article class="seek_article_2">
  197. {{ jobInfo.phone }}
  198. </article>
  199. </div>
  200. <div class="seek_in clearfix" v-else>
  201. <article class="seek_article_2">
  202. 登录后可查看
  203. </article>
  204. </div>
  205. </section>
  206. <!-- 联系方式 -->
  207. </main>
  208. </div>
  209. </template>
  210. <script setup>
  211. import { ref } from 'vue'
  212. import { ElBreadcrumb, ElBreadcrumbItem } from 'element-plus'
  213. import { ArrowRight } from '@element-plus/icons-vue'
  214. const route = useRoute();
  215. const type = ref(2);
  216. const nuxtApp = useNuxtApp();
  217. const axios = nuxtApp.$axios;
  218. //获取用户信息
  219. let type_id = ref('')
  220. let website_id = ref('')
  221. let getUserInfo = () => {
  222. axios.get("/user/getUserInfo").then(response => {
  223. console.log("gettypeid", response.data);
  224. type_id.value = response.data.type_id
  225. website_id.value = response.data.website_id
  226. })
  227. }
  228. onMounted(() => {
  229. getUserInfo()
  230. })
  231. //1.1 获得跳转过来的id
  232. const articleId = parseInt(route.params.id); //获得该页面的id
  233. //1.2 获得路由
  234. const targetSegment = getRoutePath(1);
  235. const targetSegment1 = getRoutePath(2);
  236. const targetSegment2 = getRoutePath(3);
  237. //1.1 获得当前的路由id
  238. let routeId;
  239. let routeType;
  240. let navTitle = ref('')//二级导航标题
  241. let navCid = ref('')//二级导航id
  242. //通过导航路径反向查询导航id
  243. const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
  244. method: 'GET',
  245. query: {
  246. 'pinyin': targetSegment2,
  247. },
  248. });
  249. console.log("getRouteId", getRouteId);
  250. if (getRouteId.code == 200) {
  251. navTitle.value = getRouteId.data.alias
  252. navCid.value = getRouteId.data.category_id
  253. } else {
  254. console.log("获得路由id出错!", getRouteId.message)
  255. }
  256. //1.2 获取二级栏目
  257. let parent_name = ref('');//父级名称
  258. let parent_id = ref('');//父级id
  259. let parent_pinyin = ref('');//父级拼音
  260. const getRoutePName = await requestDataPromise('/web/getWebsiteRoute', {
  261. method: 'GET',
  262. query: {
  263. 'pinyin': targetSegment1,
  264. },
  265. });
  266. console.log("getRoutePName", getRoutePName);
  267. if (getRoutePName.code == 200) {
  268. routeId = getRoutePName.data.category_id
  269. parent_id.value = getRoutePName.data.category_id
  270. parent_name.value = getRoutePName.data.alias
  271. routeType = getRoutePName.data.type
  272. } else {
  273. console.log("获得路由id出错!", getRoutePName.message)
  274. }
  275. //1.3 获取一级栏目
  276. let p_parent_name = ref('');//父级名称
  277. let p_parent_id = ref('');//父级id
  278. const getRoutePName_parent = await requestDataPromise('/web/getWebsiteRoute', {
  279. method: 'GET',
  280. query: {
  281. 'pinyin': targetSegment,
  282. },
  283. });
  284. console.log("getRoutePName_parent", getRoutePName_parent);
  285. if (getRoutePName_parent.code == 200) {
  286. p_parent_id.value = getRoutePName_parent.data.category_id
  287. p_parent_name.value = getRoutePName_parent.data.alias
  288. } else {
  289. console.log("获得路由id出错!", getRoutePName_parent.message)
  290. }
  291. //1.4 展示广告
  292. let adImg1 = ref({})
  293. let adImg2 = ref({})
  294. onMounted(async () => {
  295. //从客户端获取行政职能部门 加快打开速度
  296. const { $webUrl, $CwebUrl } = useNuxtApp();
  297. //广告1
  298. let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmgw_detail_0001`
  299. const responseAd1 = await fetch(url, {
  300. headers: {
  301. 'Content-Type': 'application/json',
  302. 'Userurl': $CwebUrl,
  303. 'Origin': $CwebUrl
  304. }
  305. });
  306. const resultAd1 = await responseAd1.json();
  307. adImg1.value = resultAd1.data[0];
  308. //广告2
  309. let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmgw_detail_0002`
  310. const responseAd2 = await fetch(url2, {
  311. headers: {
  312. 'Content-Type': 'application/json',
  313. 'Userurl': $CwebUrl,
  314. 'Origin': $CwebUrl
  315. }
  316. });
  317. const resultAd2 = await responseAd2.json();
  318. adImg2.value = resultAd2.data[0];
  319. })
  320. // 2 获取详情
  321. let jobInfo = ref([]) //基本信息
  322. let companyInfo = ref([])// 公司介绍
  323. let category = ref([]) // 栏目
  324. let other_job = ref([]) // 岗位
  325. let experienceInfo = ref([]) // 工作经历
  326. let education = ref([]) // 教育背景
  327. let skillList = ref([]) // 专业技能
  328. let resume = ref(0)
  329. const getDetail = async () => {
  330. const listData = await requestDataPromise('/web/getWebsiteJobInfo', {
  331. method: 'GET',
  332. query: {
  333. 'id': articleId,
  334. 'type': type.value,
  335. 'pageSize': 10,
  336. },
  337. });
  338. if (listData.code == 200) {
  339. // console.log("详情1111", listData.data);
  340. // console.log("详情1111222", listData.data.job[0].job_experience);
  341. // console.log("详情111122233", JSON.parse(listData.data.job[0].job_experience));
  342. // console.log("详情1111222233344", JSON.parse(listData.data.job[0].education_experience));
  343. // jobInfo.value = listData.data.job[0];
  344. // category.value = listData.data.category;
  345. if (type.value == 1) {
  346. jobInfo.value = listData.data.job[0];
  347. category.value = listData.data.category;
  348. companyInfo.value = listData.data.company[0];
  349. other_job.value = listData.data.other_job;
  350. }
  351. if (type.value == 2) {
  352. jobInfo.value = listData.data.job[0];
  353. category.value = listData.data.category;
  354. experienceInfo.value = listData.data.job_experience;
  355. education.value = listData.data.education_experience;
  356. skillList.value = JSON.parse(listData.data.job[0].skillList);
  357. resume.value = listData.data.resume;
  358. }
  359. }
  360. }
  361. getDetail();
  362. //获取行业 职位 具体职位
  363. const industry_categoryList = ref([]) //行业类别列表
  364. const position_categoryList = ref([]) //职位类别列表
  365. const positionList = ref([]) //具体职位列表
  366. const getData = async () => {
  367. const getData = await requestDataPromise('/web/getWebsiteJobSelect', {
  368. method: 'GET',
  369. query: {},
  370. });
  371. if (getData.code == 200) {
  372. // console.log("获取到的分类数据:", getData.data);
  373. industry_categoryList.value = getData.data.hy; //行业
  374. position_categoryList.value = getData.data.zw; //职位
  375. positionList.value = getData.data.jtzw; //具体职位
  376. }
  377. }
  378. getData()
  379. //4.设置seo信息 start---------------------------------------->
  380. //4.1 设置seo信息
  381. const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
  382. method: 'GET',
  383. query: {
  384. 'catid': routeId,
  385. },
  386. });
  387. if (setData.code == 200) {
  388. let seoTitle = setData.data.seo_title;
  389. let seoDescription = setData.data.seo_description;
  390. let seoKeywords = setData.data.seo_keywords;
  391. let seoSuffix = setData.data.suffix;
  392. let seoName = setData.data.website_name;
  393. useSeoMeta({
  394. title: seoTitle + "_" + seoName + "_" + seoSuffix,
  395. meta: [
  396. { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
  397. { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
  398. ]
  399. });
  400. } else {
  401. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  402. console.log("错误位置:设置列表页面SEO数据")
  403. console.log("后端错误反馈:", setData.message)
  404. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  405. }
  406. //4.设置seo信息 end---------------------------------------->
  407. </script>
  408. <style scoped lang="less">
  409. @import "@/assets/css/job/detail_jianli.less";
  410. @import "@/assets/css/job/detail_zhaopin.less";
  411. </style>