myCollect.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  1. <template>
  2. <div class="search" style="padding-bottom: 40px;">
  3. <!-- tbas -->
  4. <div class="tab flex align-center justify-center">
  5. <div class="tab-box flex align-center">
  6. <div class="tab-box-item active">
  7. 简历收藏
  8. </div>
  9. </div>
  10. </div>
  11. <!-- 岗位列表主体 -->
  12. <div class="content flex align-center justify-center">
  13. <div class="content-box flex justify-between">
  14. <div v-show="isNoList == false" class="content-l" v-loading="loading">
  15. <div class="content-l-item flex justify-between" @click="goDetailst(item,index)"
  16. v-for="(item,index) in jobDataList" :key="index">
  17. <template v-if="item.resumesListDto.length > 0">
  18. <div class="content-l-item-l">
  19. <div class="content-l-item-title flex align-center">
  20. <img style="width: 50px;height: 50px;border-radius: 50%;margin-right: 10px;"
  21. :src="item.avatar?item.avatar:'/default.jpg'" alt="" />
  22. {{item.resumesListDto[0].userName }}
  23. <span>
  24. 【{{item.resumesListDto[0].city }}】
  25. </span>
  26. </div>
  27. <div class="content-l-item-info flex align-center flex-wrap">
  28. <div class="content-l-item-infomoney">
  29. {{ item.resumesListDto[0].minSalary }}-{{ item.resumesListDto[0].maxSalary }}
  30. </div>
  31. <div class="content-l-item-infolabel">
  32. {{item.resumesListDto[0].resumesWorkExperience }}年
  33. </div>
  34. <div class="content-l-item-infolabel">
  35. {{item.resumesListDto[0].degree}}
  36. </div>
  37. <div class="content-l-item-infolabel">
  38. {{ item.resumesListDto[0].userAge }}岁
  39. </div>
  40. </div>
  41. <!-- <div class="content-l-item-btn flex align-center" v-if="item.resumesListDto[0].intentPostSkill">
  42. <div class="content-l-item-btn-item" v-for="(ite,ind) in parseSkills(item.resumesListDto[0].intentPostSkill)">
  43. {{ite}}<el-divider v-if="ind+1< item.resumesListDto[0].intentPostSkill.length" direction="vertical" />
  44. </div>
  45. </div> -->
  46. <div class="content-l-item-btn flex align-center">
  47. <div class="content-l-item-btn-item">求职期望:{{ item.resumesListDto[0].expectedPosition }}</div>
  48. </div>
  49. </div>
  50. <div class="content-l-item-r">
  51. <div class="content-l-item-r-title flex algin-center">
  52. <div class="content-l-item-r-title-r">
  53. <div class="content-l-item-r-title-r-t">
  54. {{item.resumesListDto[0].school }}
  55. </div>
  56. <div style="margin-top: 20px;" class="content-l-item-r-title-r-b flex align-center">
  57. <div class="content-l-item-r-title-r-b-i">
  58. {{ item.resumesListDto[0].profession }}
  59. </div>
  60. <div class="content-l-item-r-title-r-b-i">
  61. {{ item.resumesListDto[0].degree }}
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. <div class="content-l-item-r-bom flex align-center">
  67. <div class="content-l-item-r-bomtxt">
  68. 公司:{{item.resumesListDto[0].companyName }}
  69. </div>
  70. </div>
  71. </div>
  72. </template>
  73. </div>
  74. <!-- 分页 -->
  75. <div class="content-l-item-pag flex align-center justify-center">
  76. <el-pagination @current-change="currentChange" v-model="page" :page-count="pages"
  77. :default-page-size="limit" background layout="prev, pager, next" />
  78. </div>
  79. </div>
  80. <div class="content-l" v-if="isNoList">
  81. <el-empty description="暂无匹配岗位" />
  82. </div>
  83. <div class="content-r">
  84. <resume @goDetails="goDetails" />
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. </template>
  90. <script>
  91. import resume from '../../components/resume/resume.vue'
  92. export default {
  93. components: {
  94. resume
  95. },
  96. data() {
  97. return {
  98. jobDataList: [], //岗位列表
  99. page: 1, //分页
  100. limit: 10, //每页条数
  101. pages: 1, //总页数
  102. loading: false, //加载工
  103. isNoList: false,
  104. }
  105. },
  106. mounted() {
  107. //获取简历列表
  108. this.getUserList()
  109. },
  110. methods: {
  111. parseSkills(str) {
  112. if (!str) return [];
  113. try {
  114. // ✅ 如果是多个 JSON 数组拼接:比如 ["A"],["B"]
  115. if (str.includes('],[')) {
  116. const wrapped = `[${str}]`; // 变成 [["A"],["B"]]
  117. const parsed = JSON.parse(wrapped);
  118. return [...new Set(parsed.flat())]; // 扁平化 + 去重
  119. }
  120. // ✅ 正常的单个 JSON 数组字符串
  121. const parsed = JSON.parse(str);
  122. if (Array.isArray(parsed)) {
  123. return [...new Set(parsed)];
  124. }
  125. } catch (e) {
  126. // 非 JSON 格式的情况继续往下处理
  127. }
  128. // ✅ 替换中文逗号
  129. str = str.replace(/,/g, ',');
  130. // ✅ 支持多种分隔符
  131. let arr = [];
  132. if (str.includes('/')) {
  133. arr = str.split('/');
  134. } else if (str.includes(',')) {
  135. arr = str.split(',');
  136. } else {
  137. arr = [str];
  138. }
  139. return [...new Set(arr.map(s => s.trim()).filter(Boolean))];
  140. },
  141. goDetailst(item) {
  142. if (localStorage.getItem('token')) {
  143. const routeUrl = this.$router.resolve({
  144. name: 'resumeInfo',
  145. query: {
  146. resumesId: item.resumesId
  147. }
  148. });
  149. window.open(routeUrl.href, '_blank');
  150. } else {
  151. this.$router.push({
  152. name: 'login'
  153. })
  154. }
  155. },
  156. /**
  157. * @param {Object} item 详情参数
  158. * 去详情
  159. */
  160. goDetails(item) {
  161. if (localStorage.getItem('token')) {
  162. const routeUrl = this.$router.resolve({
  163. name: 'resumeInfo',
  164. query: {
  165. resumesId: item.resumesId
  166. }
  167. });
  168. window.open(routeUrl.href, '_blank');
  169. } else {
  170. this.$router.push({
  171. name: 'login'
  172. })
  173. }
  174. },
  175. //分页
  176. currentChange(e) {
  177. this.page = e
  178. this.getUserList()
  179. },
  180. /**
  181. * 获取简历列表
  182. */
  183. getUserList() {
  184. this.loading = true
  185. let data = {
  186. page: this.page,
  187. limit: this.limit
  188. }
  189. this.$Request.get('/app/myCollection/getCompanyCollectionList', {
  190. params: data
  191. }).then(res => {
  192. this.loading = false
  193. if (res.code == 0) {
  194. this.pages = res.data.pages
  195. this.jobDataList = res.data.records
  196. if (this.jobDataList.length > 0) {
  197. this.isNoList = false
  198. } else {
  199. this.isNoList = true
  200. }
  201. }
  202. })
  203. },
  204. }
  205. }
  206. </script>
  207. <style lang="scss" scoped>
  208. $marginTop-60: 120px;
  209. .active {
  210. border-bottom: 4px solid #00DD9A !important;
  211. color: #00DD9A !important;
  212. }
  213. .tab {
  214. width: 100%;
  215. margin-top: 20px;
  216. .tab-box {
  217. width: calc(100% - $marginTop-60 * 2);
  218. background-color: #ffffff;
  219. border-radius: 12px;
  220. }
  221. .tab-box-item {
  222. border-bottom: 4px solid #ffffff;
  223. margin-left: 40px;
  224. padding: 20px 0;
  225. cursor: pointer;
  226. color: #666666;
  227. }
  228. }
  229. .content {
  230. width: 100%;
  231. margin-top: 20px;
  232. .content-box {
  233. width: calc(100% - $marginTop-60 * 2);
  234. }
  235. .content-l {
  236. width: 65%;
  237. }
  238. .content-l-item:hover {
  239. box-shadow: 0 10px 10px 0 rgba(153, 153, 153, 0.3);
  240. }
  241. .content-l-item {
  242. width: 100%;
  243. background-color: #ffffff;
  244. border-radius: 13px;
  245. margin-bottom: 20px;
  246. cursor: pointer;
  247. position: relative;
  248. }
  249. .content-l-item-isSee {
  250. position: absolute;
  251. top: 0;
  252. right: 0;
  253. background-color: #00DD9A;
  254. color: #ffffff;
  255. font-size: 14px;
  256. padding: 6px 10px;
  257. border-radius: 0 13px 0 13px;
  258. }
  259. .content-l-item-pag {
  260. width: 100%;
  261. padding: 20px 0;
  262. }
  263. .content-l-item-l {
  264. width: 55%;
  265. }
  266. .content-l-item-r {
  267. width: 45%;
  268. position: relative;
  269. }
  270. .content-l-item-r-title {
  271. width: 100%;
  272. height: 54px;
  273. margin-top: 20px;
  274. img {
  275. width: 54px;
  276. height: 54px;
  277. border-radius: 12px;
  278. }
  279. .content-l-item-r-title-r {
  280. margin-left: 10px;
  281. }
  282. .content-l-item-r-title-r-t {
  283. color: #222222;
  284. font-size: 16px;
  285. font-weight: 500;
  286. margin-top: 10px;
  287. }
  288. .content-l-item-r-title-r-b-i {
  289. background-color: #f8f8f8;
  290. color: #666666;
  291. font-size: 13px;
  292. padding: 4px 10px;
  293. border-radius: 4px;
  294. margin-right: 10px;
  295. margin-top: 6px;
  296. }
  297. }
  298. .content-l-item-r-bom {
  299. width: calc(100% - 40px);
  300. height: 48px;
  301. background: linear-gradient(to bottom, #f5fcfc, #fcfbfa);
  302. padding: 0 20px;
  303. border-radius: 0 0 13px 0;
  304. position: absolute;
  305. bottom: 0%;
  306. .content-l-item-r-bomtxt {
  307. width: 340px;
  308. color: #666666;
  309. font-size: 13px;
  310. overflow: hidden;
  311. /* 添加省略号 */
  312. text-overflow: ellipsis;
  313. /* 防止文本换行 */
  314. white-space: nowrap;
  315. }
  316. }
  317. .content-l-item-title {
  318. font-weight: 500;
  319. font-size: 16px;
  320. color: #222222;
  321. padding: 20px 20px 10px 20px;
  322. }
  323. .content-l-item-info {
  324. padding: 0 20px;
  325. padding-bottom: 10px;
  326. .content-l-item-infomoney {
  327. color: #fe574a;
  328. font-size: 16px;
  329. font-weight: 500;
  330. margin-right: 10px;
  331. margin-bottom: 10px;
  332. }
  333. .content-l-item-infolabel {
  334. background-color: #f8f8f8;
  335. // margin-left: 10px;
  336. margin-right: 10px;
  337. border-radius: 4px;
  338. padding: 4px 10px;
  339. color: #666666;
  340. font-size: 13px;
  341. margin-bottom: 10px;
  342. }
  343. }
  344. .content-l-item-btn {
  345. width: calc(100% - 40px);
  346. height: 48px;
  347. background: linear-gradient(to bottom, #f5fcfc, #fcfbfa);
  348. padding: 0 20px;
  349. border-radius: 0 0 0 13px;
  350. .content-l-item-btn-item {
  351. color: #666666;
  352. font-size: 13px;
  353. }
  354. }
  355. .content-r {
  356. width: calc(35% - 20px);
  357. height: fit-content;
  358. border-radius: 13px;
  359. background-color: #ffffff;
  360. }
  361. }
  362. .jobType {
  363. .jobType-item {
  364. // width: 100%;
  365. text-align: center;
  366. line-height: 38px;
  367. cursor: pointer;
  368. }
  369. .jobType-item:hover {
  370. background-color: #f8f8f8;
  371. border-radius: 4px;
  372. color: #00DD9A;
  373. }
  374. }
  375. .zhiwei {
  376. width: 400px;
  377. max-height: 400px;
  378. overflow: hidden;
  379. overflow-y: scroll;
  380. .zhiwei-item {
  381. width: 100%;
  382. }
  383. .zhiwei-item-l {
  384. width: 40%;
  385. font-weight: 500;
  386. }
  387. .zhiwei-item-r {
  388. width: 60%;
  389. }
  390. .zhiwei-item-r-txt {
  391. width: 100%;
  392. font-weight: 500;
  393. color: #999999;
  394. }
  395. .zhiwei-item-r-i {
  396. margin-bottom: 10px;
  397. }
  398. .zhiwei-item-r-i-i {
  399. margin-top: 10px;
  400. margin-right: 10px;
  401. cursor: pointer;
  402. font-size: 14px;
  403. }
  404. .zhiwei-item-r-i-i:hover {
  405. color: #00DD9A;
  406. }
  407. }
  408. ::-webkit-scrollbar {
  409. /* Chrome, Safari, Opera */
  410. width: 4px;
  411. }
  412. ::-webkit-scrollbar-thumb {
  413. background-color: #cccccc;
  414. /* 滚动条颜色 */
  415. }
  416. ::-webkit-scrollbar-track {
  417. background-color: #ffffff;
  418. /* 轨道颜色 */
  419. }
  420. .hangye {
  421. width: 400px;
  422. max-height: 400px;
  423. overflow: hidden;
  424. overflow-y: scroll;
  425. .hangye-item {
  426. .hangye-l {
  427. width: 40%;
  428. font-weight: 500;
  429. }
  430. .hangye-r {
  431. width: 60%;
  432. .hangye-r-item {
  433. margin-right: 10px;
  434. cursor: pointer;
  435. margin-bottom: 10px;
  436. }
  437. .hangye-r-item:hover {
  438. color: #00DD9A;
  439. }
  440. }
  441. }
  442. }
  443. :deep(.el-input__wrapper) {
  444. box-shadow: none;
  445. border: none;
  446. }
  447. .condizione {
  448. width: 100%;
  449. height: auto;
  450. .condizione-box {
  451. width: calc(100% - $marginTop-60 * 2);
  452. height: 100%;
  453. background-color: #ffffff;
  454. border-radius: 13px;
  455. .condizione-box-c {
  456. width: calc(100% - 60px);
  457. }
  458. .condizione-box-c-searchc {
  459. width: 100%;
  460. height: 48px;
  461. margin-top: 30px;
  462. }
  463. .condizione-box-c-search {
  464. width: 80%;
  465. height: 100%;
  466. background-color: #00DD9A;
  467. border-radius: 13px;
  468. align-items: center;
  469. }
  470. .condizione-box-c-search-in {
  471. width: calc(90% - 2px);
  472. height: 44px;
  473. background-color: #ffffff;
  474. margin-left: 2px;
  475. border-radius: 13px;
  476. }
  477. .condizione-box-c-search-ins {
  478. width: calc(100% - 4px);
  479. }
  480. .condizione-box-c-search-btn {
  481. width: 10%;
  482. height: 48px;
  483. align-items: center;
  484. color: #ffffff;
  485. cursor: pointer;
  486. }
  487. .condizione-box-c-downApp {
  488. color: #00DD9A;
  489. cursor: pointer;
  490. position: relative;
  491. }
  492. .condizione-box-c-downApp-rq {
  493. display: none;
  494. position: absolute;
  495. bottom: -240px;
  496. background-color: #ffffff;
  497. padding: 20px;
  498. border-radius: 13px;
  499. border: 1px solid #f5f5f5;
  500. }
  501. .condizione-box-c-downApp-rq-img-txt {
  502. text-align: center;
  503. }
  504. .condizione-box-c-downApp:hover {
  505. .condizione-box-c-downApp-rq {
  506. display: block;
  507. }
  508. }
  509. }
  510. .condizione-box-c-city {
  511. width: 100%;
  512. height: auto;
  513. margin-top: 10px;
  514. .condizione-box-c-city-title {
  515. width: fit-content;
  516. color: #00DD9A;
  517. border-bottom: 4px solid #00DD9A;
  518. font-weight: 500;
  519. cursor: pointer;
  520. }
  521. .condizione-box-c-city-s {
  522. margin-top: 18px;
  523. .condizione-box-c-city-s-i {
  524. font-weight: 400;
  525. font-size: 14px;
  526. color: #333;
  527. margin-left: 10px;
  528. margin-bottom: 10px;
  529. cursor: pointer;
  530. }
  531. .condizione-box-c-city-s-i:hover {
  532. color: #00DD9A;
  533. }
  534. }
  535. .condizione-box-c-city-d {
  536. background-color: #f8f8f8;
  537. border-radius: 4px;
  538. margin-top: 8px;
  539. padding: 8px 0 0 0;
  540. .condizione-box-c-city-d-i {
  541. font-weight: 400;
  542. font-size: 14px;
  543. color: #333;
  544. margin-left: 10px;
  545. margin-bottom: 10px;
  546. cursor: pointer;
  547. }
  548. .condizione-box-c-city-d-i:hover {
  549. color: #00DD9A;
  550. }
  551. }
  552. }
  553. .condizione-box-c-hy {
  554. margin-top: 18px;
  555. width: 100%;
  556. // height: 32px;
  557. .condizione-box-c-hy-l {
  558. .condizione-box-c-hy-l-i {
  559. padding: 6px 12px;
  560. background-color: #f8f8f8;
  561. font-weight: 400;
  562. font-size: 14px;
  563. color: #222222;
  564. cursor: pointer;
  565. margin-right: 18px;
  566. border-radius: 4px;
  567. margin-bottom: 10px;
  568. }
  569. .condizione-box-c-hy-l-i:hover {
  570. color: #00DD9A;
  571. }
  572. }
  573. .condizione-box-c-hy-r {
  574. margin-bottom: 10px;
  575. font-size: 14px;
  576. font-weight: 400;
  577. color: #999999;
  578. cursor: pointer;
  579. }
  580. .condizione-box-c-hy-r:hover {
  581. color: #00DD9A;
  582. }
  583. }
  584. }
  585. .showModal-img {
  586. width: 100%;
  587. height: 300px;
  588. img {
  589. width: 400px;
  590. height: 300px;
  591. }
  592. }
  593. .showModal-title {
  594. width: 100%;
  595. text-align: center;
  596. color: #333333;
  597. font-size: 20px;
  598. font-weight: 500;
  599. margin-top: 5px;
  600. }
  601. .showModal-content {
  602. width: 100%;
  603. height: auto;
  604. margin-top: 10px;
  605. .showModal-content-c {
  606. width: 80%;
  607. height: 100%;
  608. color: #999999;
  609. font-size: 16px;
  610. }
  611. }
  612. .showModal-btn {
  613. width: 100%;
  614. height: 44px;
  615. margin: 30px 0;
  616. .showModal-btn-c {
  617. width: 200px;
  618. height: 100%;
  619. background-color: #00DD9A;
  620. border-radius: 10px;
  621. color: #ffffff;
  622. cursor: pointer;
  623. }
  624. }
  625. </style>